Https://docs.arduino.cc/tutorials/nano-rp2040-connect/rp2040-ble-device-to-device/ is not working

Hi All,

I have just tried the tutorial project (https://docs.arduino.cc/tutorials/nano-rp2040-connect/rp2040-ble-device-to-device/) and it does not work using the latest libraries for Arduino on two new Nano RP2040 Connect boards. There are a couple of issues.

First issue is they won't connect with each other. The sketches both compile, and I have loaded the peripheral code into one rp2040 and the central code into the other. They don't connect even though I have tried almost every imaginable orientation of the two boards relative to each other.

Second, and maybe more important. The peripheral code has a problem: when I load it into either of my boards, the serial port disconnects from the PC and will not reappear until I load a different sketch.
If I stub out "BLEByteCharacteristic LEDCharacteristic(UUID) line, the COM port doesn't disconnect when I load the code. I tried moving this line after the connected to central section so I can at least monitor the connect status. The port disconnect happens when I load the sketch into either of the two boards.

I have loaded other sketches into board boards and they both work normally running them. It appears that the BLE/library code has an issue.

Any help much appreciated.

Thanks,
Scott

Hi All,

A quick update. I was able to intermittently solve both issues after several hours of research.

The problem of the peripheral Arduino disconnecting it's COM port is solved by reducing the length of the UUID supplied to "BLEByteCharacteristic LEDCharacteristic(UUID)". Using a 16-bit UUID works fine and solves this problem. Does this mean there isn't enough room to broadcast the 128-bit UUID with the other services and characteristics?
Finally, I did intermittently get the two devices to connect after updating their firmware to the latest version. Still, the two devices are less than a foot apart and have substantial trouble connecting with each other. I was able, using the Cypress CySmart adapter and it's software, reliably and repeatedly connect with the BLE_device. The BLE_central did intermittently connect but would then fail to retrieve services or characteristics. Often, the central would report that the device connected, but the device code reported connection failed. Sounds like there are several firmware issues still lurking in the library code.

Best,
Scott

Try increasing the separation distance and observe the results. It’s possible that you’re overloading the receiver’s front end, which can cause signal distortion.

Hi gilshultz,

I've also tried several feet apart and several distances in between. I've seen RSSI values from -65 to -33 dBm. I didn't see any noticeable difference in communication reliability at any distance.

Thanks,
Scott

At those levels, it should work. Do you have another unit you can substitute to validate that the current one is functioning correctly? Have you tried the simple send-and-receive examples available in the libraries?

Sorry, I’m more familiar with Linux and don’t know much about troubleshooting on a PC. Let me know if there’s anything else I can assist with!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.