DevHeads IoT Integration Server

DII

DevHeads IoT Integration Server

The DevHeads IoT Integration Server accelerates technology engineering by helping pro devs learn, share and collaborate.

Join

seeking-collabs

🪲-firmware-and-baremetal

📦-middleware-and-os

📡-edge-networking

🟩-pcb-and-analog

jobs

☁-iot-cloud

✅-code-review

devheads-feed

general-dev-chat

How to Identify and Resolve Latency Spikes in a Linux GPIO Application Using Preempt_rt Kernel Patch

Hi guys, during a discussion yesterday, my colleague and I were exploring ways to detect and solve latency problems in a Linux-centric setup. We kinda needed some insights regarding the matter. We're experiencing increased response times that's up to 20ms in a Linux GPIO application after running tests for several hours. The usual response time is around 150 microseconds. We're using a Preempt_rt kernel patch. My question is is this ,are there any recommended tools or techniques to identify which processes or drivers might be causing these latency spikes during extended testing? @Middleware & OS...

Are there alternatives to system() that might be more performant for CGI scripts on embedded Linux?

I'm facing a performance issue with the system() call in C on my embedded Linux system. The command I'm running which is a network ping or a file system operation executes quickly when I run it directly on the command line. However, when I call the same command from within a compiled CGI script using system(), it becomes significantly slower from milliseconds to seconds. What are some potential reasons why system() might be slower than running the command directly? Are there any alternatives to system() that might be more performant for CGI scripts on embedded Linux? @Middleware & OS...

What exactly do inner and outer cache policies refer to?

Hey guys @Middleware & OS I am trying to develop my own RTOS kernel for a Cortex-M7 STM32F746 Disco board and setting memory access policies using the MPU. I need to understand the difference between inner and outer cache policies. According to ARM documentation, the inner policy affects caches inside the processor, while the outer policy signals on the memory bus for external caching systems. Could someone clarify: 1. What exactly do inner and outer cache policies refer to? 2. How do these policies apply to internal SRAM vs. external SDRAM, especially if there's no external L2 cache? 3. Does the outer policy matter when configuring internal SRAM?...

Developing automotive test systems with STM32 Nucleo devices (like Nucleo144) using RTOS

I've been working with STM32 Nucleo boards (mainly Nucleo144) for basic projects using CubeIDE. Now I want to delve deeper into automotive test applications. My plan is to explore RTOS development, TouchGFX, and automotive protocols (CAN, LIN). I'm familiar with LabVIEW but a beginner in Python and C. Are there any recommended resources or tutorials specifically for developing automotive test systems with STM32 Nucleo devices (like Nucleo144) using RTOS and these protocols? Any suggestions on getting started with this learning path would be appreciated🙏...

How to Keep Spring Boot App Running After Closing PuTTY Session Without Using a Linux Service?

Hi Everyone, I'm running a Spring Boot application with an embedded Tomcat server deployed as an executable jar file on a Linux server. I access the server through PuTTY and start the application using
java -jar my-jar.jar
java -jar my-jar.jar
The problem is, when I close the PuTTY session, the embedded Tomcat server and the jar file stop running. The application doesn't produce any specific error messages in this scenario. While I understand running the jar as a Linux service is a solution, I'm interested in exploring other methods to keep the application running continuously, even after closing the PuTTY session. Are there any recommended approaches besides using a service? @Middleware & OS...

Is it possible to compile Busybox directly into the initramfs during the kernel build process?

@Middleware & OS I'm working on an embedded Linux system and want to use Busybox for its small footprint. Is it possible to compile Busybox directly into the initramfs during the kernel build process? This would allow Busybox to be loaded in RAM during boot, minimizing the need for a large root filesystem. I've searched online but haven't found a definitive answer. Can you advise on the best approach for achieving this?...

Any tips for a smooth transition from mbed to Zephyr development?

@Middleware & OS I've written a C++ LCD driver using PlatformIO and mbed. Now I'm setting up Zephyr for a new project. I understand Zephyr uses Python, CMake, west, and the SDK. Is this correct? I initially tried PlatformIO with Zephyr, but ran into version compatibility issues. Installing Zephyr from the command line seems less user-friendly.
Any tips for a smooth transition from mbed to Zephyr development?...

Building an embedded Linux system for an A20-based board using Buildroot

@Middleware & OS I'm building an embedded Linux system for an A20-based board using Buildroot. The system boots successfully from an SD card. I've included all available CAN drivers and protocols (can, can_raw, and vcan). However, I'm encountering an issue: The command
ip link add dev vcan0 type vcan
ip link add dev vcan0 type vcan
works perfectly, creating a virtual CAN interface (vcan0). But, when I try to create a physical CAN interface with
ip link add dev can0 type can
ip link add dev can0 type can
, I get an error message: "RTNETLINK answers: Operation not supported."...

making a smoke sensor that sends a sms message to a user when it detects smoke.

I'm new to arduino coding and we are tasked with making a smoke sensor that sends a sms message to a user when it detects smoke. One problem that we've encountered is that our gsm module 900a can't seem to find a network (the status LED blinks every second rather than every 3 seconds). How can we fix this problem? I will provide the code below int buzzer = 8;...

Using Blender for electronic " design and visualization"

Hey everyone! as a person who love to create 3D project i recently discovered that Blender can be used for electronic too , design and visualization, such as PCBs and simulating assembly processes. and even creating interactive 3D renderings for better presentations for it . Has anyone here tried using Blender for electronics, or do you have any tips on getting started with this?

Encountering hardfaults in FreeRTOS v10.3.0 on a Microchip PIC32 while using vsnprintf or sprin

Hi guys, I'm encountering hardfaults in FreeRTOS v10.3.0 on a Microchip PIC32 while using vsnprintf or sprintf functions. I suspect stack corruption, as I'm using static memory allocation no malloc with a pre-allocated buffer char _log_buffer[128]. I've tried different printf implementations newlib, newlib nano, tinyprintf without success. I tried troubleshooting with these: ~Verified thread stack alignment. ~Ruled out dynamic allocation issues by mocking malloc/calloc/realloc/free. Are there any recommended techniques to confirm stack corruption specifically related to printf calls in FreeRTOS?...

How can I ensure my CAN ISR completes processing quickly enough to avoid the interrupt WDT panic?

@Middleware & OS I'm using an MCP25625 CAN controller with an ESP32-S3 and esp-idf with RTOS. I'm encountering an interrupt WDT panic within my CAN interrupt service routine (ISR). I know ISRs typically involve checking the interrupt cause, clearing the flag, and potentially deferring complex processing to a separate task using queues or semaphores. But in this case, I'm realizing that reading the MCP25625 registers within the ISR context might be causing the WDT panic. How can I ensure my CAN ISR completes processing quickly enough to avoid the interrupt WDT panic? Are there specific techniques for handling CAN interrupts efficiently within the ESP-IDF RTOS environment? ...

collect temperature data from a sensor connected to my mcu and store it every minute on SD card

@Middleware & OS Hello guys can i implement a simple sensor data collection and storage system using embedded software in C, I want to collect temperature data from a sensor connected to my microcontroller and store the collected data periodically every minute on an SD card. is there any resources or tutorials that can help me get started with this kind of project?...

How can I modify the state machine logic?

I'm working on this RTOS-based application for a vending machine controller with C and a state machine approach that manages various vending machine states as Idle,CoinInserted, SelectionMade & Dispensing, but I'm encountering an error message in the console: StateMachine Error: Invalid transition from CoinInserted to Dispensing. This occurs when a user inserts enough coins to trigger dispensing, but the selection hasn't been confirmed yet. ``` typedef enum { STATE_IDLE,...

Can someone decode what data in hex is being sent in the following image?

hello everyone can someone decode what data in hex is being sent in the following image?

How can I set up a CoAP server using the libcoap library on a Raspberry Pi using c language?

@Middleware & OS Hello guys how can I set up a CoAP server using the libcoap library on a Raspberry Pi using c language. And also, are there any specific considerations or common pitfalls to avoid when setting up a CoAP server with libcoap on Raspberry pi?...

Debugging Variable Display Issues on ARM M7 with FreeRTOS using Lauterbach Trace32

Hey guys @MCU, MPU & Firmware i am currently developing a test device using an ARM M7 (NXP S32KXXX) MCU with FreeRTOS and debugging it with Lauterbach Trace32. The device reads Ethernet frames and sends response frames. While debugging, I encountered an issue where variables (locals, globals, stack) always show as 0 in Trace32, even though the code seems to execute correctly (e.g., a loop iterates as expected, but the loop index always appears as 0). The memory dump reflects the same static val...

Real-Time Data Push to Web Browsers on Resource-Constrained Embedded ARM-Linux Devices

@Middleware & OS I'm developing a real-time data monitoring application on a resource-constrained embedded ARM-Linux device. The goal is to push data updates to multiple web browsers (around 20 clients) simultaneously. Each client will visualize roughly 100 data points. I've explored options like APE and Comet, but they seem more suited for traditional server environments with more resources. For instance, APE might be too heavyweight for the limited processing power of the embedded device. Are there any lightweight protocols or libraries well-suited for pushing real-time data to web browsers from resource-constrained embedded Linux devices?...

Managing Relay Sequences with Non-Blocking Delays on Arduino Leonardo

Hello everyone 👋🏻, I have a small issue. I programmed some Leonardo boards to execute relay sequences in a sound and light installation. Of course, I used delay() in my sequences, and everything is triggered by multiple RF relays. The problem is that when an actor presses the wrong button on the remote control, it triggers another panel. I would like to add an RF relay that resets the panel, but I’m blocked by the delay() which prevents exiting the sequence. I have to wait for it to finish before I can interact with my sketch again. It shouldn’t be too complicated, but I need help with this. Does anyone have an idea?...

Why Certain Untracked Folders Are Not Stashed with git stash -u?

Good day everyone, please I used git stash -u to stash changes. While some untracked files were stashed, my supervye folder remains untracked. Interestingly, other files copied from the same location were stashed successfully. My .gitignore doesn't explicitly ignore this folder. Is this behavior expected for untracked folders with git stash -u? Or could there be another reason the folder isn't being stashed? @Middleware & OS...