sma-q2-oss icon indicating copy to clipboard operation
sma-q2-oss copied to clipboard

use the device id to create a unique ble identifier

Open x29a opened this issue 4 years ago • 2 comments
trafficstars

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: https://github.com/Emeryth/Gadgetbridge/pull/2 or included in the upstream PR.

x29a avatar Mar 03 '21 22:03 x29a

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 avatar Mar 04 '21 15:03 x29a

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 avatar Mar 04 '21 20:03 x29a