Hi Robert, Nice to know you are interested in improving Bluetooth support on NuttX.
Last time I tested it (more than 1 year) it was working fine to scan for devices, but I never tried to advertise from the board and connect. I think NuttX needs some Bluetooth demo for advertising and sending data, like a temperature sensor, etc. Best Regards, Alan On Tue, Jun 11, 2024 at 4:23 PM Robert-Alexandru COMAN (110095) < robert.coman1...@stud.acs.upb.ro> wrote: > Hi all, > > I am looking into contributing to enhance the Bluetooth stack on Nuttx. I > have begun testing the BLE stack in order to familiarize myself with it. > For that, I am using the ESP32-DevKitC development board with the > esp32-devkitc configuration loaded. > > The problem I encountered is that the advertising of packets is broken (at > least on ESP32). I am unable to detect any advertising packets being sent, > thus I am unable to pair the device running Nuttx with any other device. > > I tried to investigate the issue by printing byte by byte the HCI packets > sent by the host to the controller and the responses received, hoping to > maybe discover some fault in the initialization of the controller or in the > enabling of the advertising process. From the logs, it seems that > everything is fine; for each command that is sent, there is a response with > a 'success' return code. In theory, this means that advertising should > work, but in my case, it does not. I also tried different values for the > advertising parameters, but to no avail. > > I am using my smartphone as a way to sniff the advertising packets from > the BLE stack and I found the following: on some occasions, in around 1 out > of 10 system boots, right after the BLE stack is initialized and > advertising enabled by default, I receive only one advertising packet. > After that, advertising seems to stop because I am not seeing other > advertising packets being sent after that. Apart from that, in the majority > of system boots, no advertising packets are seen at all. > > Firstly, I would like to know if this issue has been encountered with > other development boards as well. Does advertising work with other boards > or is it just an esp32 related issue? This might help to narrow down the > problem. Secondly, I would like to know if anyone has successfully tested > BLE on the ESP32 in the past (with a different version of NuttX) and > encountered no issues. Do you think it is a driver issue, a linker issue, > or something else further up in the stack? > > I am looking forward to hearing from you and would appreciate any > assistance in resolving this issue. > > Best regards, > Robert >