-
Thank you @fanoush, it's good to know that it can be done. :)
Espruino is only missing 0x2A02 0x2A03 and 0x2A05, their value is not used, just their existence.
-
missing 0x2A02 0x2A03 and 0x2A05, their value is not used
the first two are mentioned here https://devzone.nordicsemi.com/f/nordic-q-a/26129/add-peripheral-privacy-flag-and-reconnection-address-characteristics-to-generic-access-service-in-nrf52832 this is something that was removed from bluetooth specs, I still don't know what it actually does - something about secure connections when address is changing?
0x2A05 is service changed, that should allow updating list of services, characteristics without need to disconnect and reconnect when implemented properly, was already discussed here http://forum.espruino.com/conversations/357737/
Those are kind of special, you can find them in 16bit uuid pdf here https://www.bluetooth.com/specifications/assigned-numbers/
GATT Service
0x1800 Generic Access
0x1801 Generic Attribute
GATT Characteristic and Object Type
0x2A00 Device Name
0x2A01 Appearance
0x2A02 Peripheral Privacy Flag
0x2A03 Reconnection Address
0x2A04 Peripheral Preferred Connection Parameters
0x2A05 Service Changed
They need to be implemented in specific way for BLE/GATT to work properly so you control them by calling specific softdevice APIs or passing specific data/flags. You can't implement them yourself in javascript. At least the 0x2A04 Peripheral Preferred Connection Parameters and 0x2A05 Service Changed are pretty important to work as expected or stuff will break.
So yes you can make espruino to look the same but by modification of C source in https://github.com/espruino/Espruino/blob/master/targets/nrf5x/bluetooth.c