I am trying to understand the difference between BLE.setDeviceName and then the appendLocalName on the advertisement data.
setDeviceName does not appear to be in the docs at this point but is still there on the BLE class. Does it do anything?Generally, appendLocalName does do what I expect it too, it changes the local name from Argon-xxxxx to whatever I specify.
However, appending a local name uses some custom data bytes, where leaving it “Argon-xxxxx” does not. In my use case I would like to use as much custom data as possible, which leaves me scratching my head a bit. How is Argon-xxxxx being set and not using any custom data space? And can I override that some other way?
I believe the difference is that the Argon-xxxx name goes out when advertising the BLE configuration service, which allows the mobile app to find the Argon by BLE.
When you use appendLocalName, it appends the name to your advertising payload, which uses up some of the limited advertising data space.
The part that causes confusion is that many BLE testing apps cache the BLE MAC to device name mapping, so it looks like the Argon-xxxxx name is going out with your advertising payload, but usually it’s just cached in the tool.
I’m not 100% positive that’s how it works, but I believe that’s correct.
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.