BLE Connection First time then no advertisement

Advance Notice: I am not sure if this is a ArduinoBLE problem or some other bluetooth issue.

I have been trying to figure this one out, but have been stumped. I have tried used the example sketches as well, I have built 6 different breadboards all with the Nano 33 BLE, but nothing appears to resolve this problem.

The Problem
After I first compile and upload the application to the board I am able to see the device in LightBlue and/or BLE Scanner in iOS on my iPhone. If I connect to the device I see the characteristics and all so it looks good. If I then upload any new code, or kill power to the device, or anything else that causes a disconnection the device no longer appears in the list for advertised devices under either app.

Observations

  • I noticed that opening the LightBlue app on another device (my iPad) it does show up there.
  • Power cycling the iPhone does not change the state (the devices still don't show up)

Has anyone had this experience and resolved it?
Is there a method or function call that resets the advertisement to devices previously connected?

More time spent and I have figured out that the device is actually listed in the list, but the name has changed to "Temperature-Humidity", which was set in the setDeviceName method. Later in the code I have the setLocalName assigned the name that I wanted and strangely enough the name that is initially shown the first time both LighBlue and BLE Scanner see.

Changing the setDeviceName to the same as the setLocalName value does not get reflected back in LightBlue until you reload the app (presumably to clear a cache of device names).

Problem solved, and it was completely developer error.

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