Skip to content

Comments

use the device id to create a unique ble identifier#16

Open
x29a wants to merge 3 commits intoEmeryth:masterfrom
x29a:unique_ble_id
Open

use the device id to create a unique ble identifier#16
x29a wants to merge 3 commits intoEmeryth:masterfrom
x29a:unique_ble_id

Conversation

@x29a
Copy link

@x29a x29a commented Mar 3, 2021

currently this creates an exception on bootup, i assume the device id is to long. when only using one byte as suffix, it works.

Any ideas?

This change requires a new build of GB as described here: Emeryth/Gadgetbridge#2 or included in the upstream PR.

@x29a
Copy link
Author

x29a commented Mar 4, 2021

After more investigation, i found the default advertising name size to be 31, so that should be more than enough?

The error i get is NRF_ERROR_INVALID_PARAM.

The strlen of the new name returns 22, so that would be <31.

@x29a
Copy link
Author

x29a commented Mar 4, 2021

Ok, looks like a classical fail. Defined the buffer too small (22 is greater than the 15 after all).

Now all 8 bytes of the Device ID are used so the BLE device name might be something like SMAQ2-DEADBEEF.

@x29a x29a changed the title WIP: use the device id to create a unique ble identifier use the device id to create a unique ble identifier Mar 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant