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 Resolve Undefined Symbols for Architecture x86_64 While Compiling FFmpeg with x264?

I am working on compiling FFmpeg version 0.9.0.git with x264 version 0.120 on an x86_64 system, and I am encountering an issue during the build process. Hereā€™s how I am configuring FFmpeg: ``` ./configure --enable-gpl --enable-libmp3lame ...

Zephyr HID Sample Not Pairing on nRF52840 Dongle - Solutions?

Hello Guys, Just-pair seems to not work when using peripherals-HID samples from zephyr, on nrf52840dongle Any possible way to fix it?...

Managing DMA Callback and FreeRTOS Tasks with Timing Constraints on STM32f4

My current project involves constantly receiving digital samples through DMA on an STM32f4 and performing DSP in the complete callback interrupt triggered after each sample. However, frequent callbacks are hindering freeRTOS from running other tasks while DMA waits for completion. My objective is to allow freeRTOS tasks to run every 6ms following a completed DMA callback. Initially, I thought about disabling interrupts using __disable_irq() in the complete callback and re-enabling them with __enable_irq(), but considering my high-priority button interrupt was still activeā€”and not knowing whether this technique could guarantee exactly 6msā€”I tried another approach of only deactivating the specific DMA interrupt by utilizing __set_BASEPRI(priority << (8 - __NVIC_PRIO_BITS)). I then started a timer that runs at intervals of 6ms before restoring normal function via calling back with_ _set_BASEPRI(0) upon elapsed period time completing successfully executed timed actionsā€”nonetheless,it did not work since it kept switching between both types of call-backs without allowing freertos tum to operate independently. ...
Solution:
Adjusting the timing might help yeah , but it's more about ensuring the callbacks donā€™t hog all the CPU time. By using double buffering or adjusting interrupt priorities, youā€™re already reducing the time DMA interrupts take. If FreeRTOS still isnā€™t getting enough time, you might also consider tweaking task priorities or adding some delay within the callback if possibleā€¦

Fixing INT8 Quantization Error for Depthwise Conv2D Layers

Hey everyone, Thanks for the previous suggestions on tackling the inference timeout issue in my vibration anomaly detection project. I implemented quantization to optimize the model, but now I'm encountering a new error: Error Message:...
Solution:
Instead of fully quantizing the model to INT8, you can use mixed precision quantization. This approach leaves unsupported layers like Depthwise Conv2D in float32 FP32 while quantizing the rest of the model to INT8 For TensorFlow Lite, you can specify dynamic range quantization for unsupported layers. See how you can adjust your conversion script: ``` converter = tf.lite.TFLiteConverter.from_keras_model(model)...

Issues with 64-bit DLL Injection Shellcode on OpenBSD Ignoring Integer Pushes

I want to inject a 64 bit DLL into a 64 bit process on OpenBSD. The shellcode needs to push several 64 bit values onto the stack, including the old instruction pointer, the address of the DLL, and the address of the LoadLibrary function. ``` section .text global _start ...
Solution:
@Marvee Amasi The issue with your shellcode on OpenBSD is likely due to security features like W^X, which prevents memory regions from being writable and executable simultaneously, and strict requirements for stack alignment. To address this, ensure that the memory region containing your shellcode is executable using mprotect if necessary. Also, make sure the stack is 16-byte aligned before calling LoadLibrary to meet the x86-64 ABI requirements. Verify that NASM correctly encodes the push instructions by checking the output with a disassembler, and ensure you are using the correct assembler and linker flags for 64-bit mode. Debugging with a tool like gdb can also help trace the execution and confirm that the 64-bit values are pushed correctly onto the stack....

Assembly Program on 64-bit OpenBSD Compiles Without Errors but Shows No Output

I don't get any errors whatsoever , but why don't I get any output when running this program on 64-bit OpenBSD system. I've compiled the code using:
as -o test.o test.s; ld -Bstatic test.o
as -o test.o test.s; ld -Bstatic test.o
The program executes without errors, but no text is printed to the console. ...
Solution:
It seems like your assembly program isn't printing text because it might be missing the correct system calls. On Unix-like systems (like OpenBSD), printing to the console usually involves using the write system call. Here's a simple, complete assembly program that prints "Hello, World!" to the console you can use this as a guide šŸ‘‡ ```assembly .section .data message: .asciz "Hello, World!\n"...
attachment 0

Tips for Simplifying ML Models to Avoid Inference Timeout on Arduino Nano 33 BLE Sense

Hi everyone, Following up on my previous post regarding the "Inference Timeout on Layer 5" error in my vibration anomaly detection project on the Arduino Nano 33 BLE Sense, Iā€™m looking for advice on reducing the model's complexity to avoid these timeouts. The model was trained using Edge Impulse and includes multiple layers, with Layer 5 being particularly resource-intensive. The Arduino Nano 33 BLE Sense seems to struggle with the inference at this layer, leading to timeouts....
Solution:
Hey @wafa_ath , thanks for the update on your vibration anomaly detection project! Here are some quick tips to tackle that timeout issue: ā€¢ Simplify your model: Cut down layers/parameters, especially in Layer 5 ā€¢ Try quantization: Use 8-bit integers instead of 32-bit floats ā€¢ Efficient architectures: Look into depthwise separable convolutions or MobileNet...

Issues with Boost Library for x86_32 Architecture on Ubuntu 22.04 ā€“ How to Manage Conflicts with x86

I'm working on a C++ project that uses the Boost program_options library on Ubuntu 22.04 system with an Intel Core i7 processor. I've successfully compiled and run the project for x86_64 architecture using the following command:
g++ program.cpp -m64 -static -lboost_program_options -o compiled/program.out
g++ program.cpp -m64 -static -lboost_program_options -o compiled/program.out
So when I try to compile for x86_32 architecture using -m32, I encounter the following error: ```/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../libboost_program_options.a when searching for -lboost_program_options /usr/bin/ld: skipping incompatible /usr/lib/libboost_program_options.a when searching for -lboost_program_options...
Solution:
Was receiving a linker error indicating that it cannot find the 32-bit Boost library, and I noticed that some of my project's dependencies might also require specific 32-bit libraries , but I was able to manage these with pkg-config . Thanks

How Do You Debug CPU Utilization and Multi-threading Issues?

Hey folks - wondering how you all debug issues with cpu utilization, mutex/semaphores, multi-threading, priority inversion, etc. How often are you debugging these types of issues today?

Bluetooth Device Stops Advertising After Pairing Failures in Zephyr RTOS

Hello everyone, I have a situation where the device tries to auto connect and then stops advertising. ``` Booting Zephyr OS build v3.7.0-rc1-106-g012520d2d7e8 ...

Configuring Zephyr RTOS for Unit Testing with Separate Source and Test Directories

Hey guys, Iā€™m looking to setting up a new application in Zephyr RTOS with integrated unit testing for my application sources. I understand that Zephyr includes the ztest framework and the sanitycheck test runner. My aim is to maintain a clear separation between the production code and the testing code using the following directory structure: ``` PROJECT_ROOT...

DevHeads Weekly Office Hours, 8/23/24: Introduction to Embedded Linuxā€”Yocto vs Poky vs OpenEmbedded

In this Office Hours session, DevHeadsā€™ Ming takes us into fundamental concepts that form the backbone of Yocto, Poky, and OpenEmbedded. Understanding these differences is crucial to navigating the world of embedded systems development effectively. ā€¢ What is Yocto? Yocto is not just a single entity but rather a collection of tools and metadata used to create custom Linux-based systems for embedded devices. ā€¢ Role of Poky: Poky serves as a starting point for building custom embedded Linux distributions using Yocto tools and methodologies. ā€¢ OpenEmbedded: OpenEmbedded is the upstream build system for the Yocto Project. It is a powerful and flexible framework for building custom Linux distributions for embedded systems....

Issues Adding Example Qt Application to st-image-weston on STM32MP1 Discovery Board

Hi Iā€™m trying to learn embedded with stm32mp1 discovery board on my Ubuntu. The task ım trying to do is adding an example qt application to my st-image-weston image and flash it to the board but I got errors. I can share the link to st community post if you can help
Solution:
@nesnes I see you fixed the first issue by using the correct syntax of the IMAGE_INSTALL:append = "" For your second issue, your script is not working on your board, but it looks like you have posted the directory tree of /usr/local on your build host. Try searching for one of the files on your board with something like:...

Problem Statement: All bi-directional Audio passthrough from device to controller

Iā€™m working on a project that requires bi-directional audio transfer between a mobile device (iOS or Android) and a controller running Ubuntu 20.04 or macOS. Iā€™ve explored two potential solutions but encountered issues with both: 1. Using oFono on Linux to Act as an HFP-AG: I attempted to use oFono to make the controller function as a Hands-Free Profile Audio Gateway (HFP-AG). However, Iā€™ve found this approach to be unstable. Most of the time, the system automatically selects the A2DP profile, and Iā€™m unable to manually choose the HFP-AG profile. 2. Bluetooth Device Connected via USB (UAC-Class) with HFP/HSP Profile: In this approach, the Bluetooth device is connected to the controller via USB audio, with the HFP/HSP profile connected to the mobile device. The idea is to route the incoming audio stream through USB audio and vice versa. I managed to implement the USB audio part successfully, but Iā€™m stuck at creating the SCO link for the Bluetooth profile. Although the HFP profile is identified, establishing the SCO link is where Iā€™m blocked. ...

Troubleshooting Bootloader Access on Nucleo L476RG Using Nucleo L496ZG as Master

Good day guys, I need some help in troubleshooting an issue I'm having with accessing the bootloader on a Nucleo L476RG "slave" board? I'm using a Nucleo L496ZG as the master board, with DigitalOut pins (extBoot0 and extReset) connected to the slave's BOOT0 and NRST pins. There's also a Serial instance (usart) on the master linked to the slave's UART2. It appears that BOOT1 is fixed low, so the bootloader runs instead of executing what's in SRAM. In resetToBootloader, I set BOOT0 high, pull NRST low for 0.1 seconds, then bring it back high. This resets the slave and stops the program from running....
attachment 0

How to integrate wakaama in any freeRtos project? Any suggestions

How to integrate wakaama in any freeRtos project? Any suggestions
Solution:
Hi @shadababe04 to get Wakaama working within a FreeRTOS project, begin by setting up your FreeRTOS environment, then bring in the Wakaama source code. You'll need to configure Wakaama, which might involve tweaking the config.h file and possibly adjusting its memory management to fit seamlessly with FreeRTOS.

How do I resolve the OSError when reading accelerometer data from MPU6050 using MicroPython?

Hello guys am working on a Project Gesture Recognition and Error Handling with MPU6050 Accelerometer Using MicroPython. How do capture and display accelerometer data from the MPU6050 sensor using MicroPython properly, i have made sure that the sensor is properly initialized and the sensor is positioned correctly when reading the values, but still getting the error
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "mpu6050.py", line 45, in get_accel_data
OSError: Failed to read accelerometer data
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "mpu6050.py", line 45, in get_accel_data
OSError: Failed to read accelerometer data
...
Solution:
Consider adding a small delay after initialization and using a lower I2C clock speed
attachment 0

How can I resolve system hangs after extended operation on a BeagleBone Black parking assistance sys

hey guys finally completed my project on parking assistance system using a BeagleBone Black running Embedded Linux, VL53L0X time of flight distance sensor to detect the distance to nearby objects and a 0.96-inch OLED display to show the distance and warning messages. And have performed a series of test on it like: - placing an objects at different distances and verifying accurate readings and warnings. - checking the OLED for correct display output - simulating parking scenarios to validate the systemā€™s reliability....

Why does the HAL Tick timer stop incrementing after creating a FreeRTOS mutex in STM32CubeIDE?

I've been working on an STM32 project using STM32CubeIDE 1.11.2 with CubeMX 6.7.0, and I'm testing on the Nucleo-F767ZI board. After creating a FreeRTOS mutex, I've noticed that the HAL Tick timer stops incrementing. Here's what I've done so far: 1. I started a new STM32 project in STM32CubeIDE with all default settings....

Any web dev here to help me with something? I am trying to run an MQTT dashboard

I have some files and I would like to run them, I am simply trying to integrate an MQTT dashboard for an embedded system, here are the files : bundle.js, index.html, main.css, main.js and tailwind.config.js The problem is that I can't run make since the commands are made for UNIX systems. Let me know if you can help me...
Solution:
Nvm solved it running python3 -m http.server 8080 worked