Possible to replace or add BLE characteristics in default services? #12823
-
I am trying to emulate a device using MicroPython, I'm not entirely sure if this is specific to the Pico or the MicroPython implementation. If I register Generic Access and Generic Attribute Services they appear in addition to those that are provided by default. The problem is the connecting device requires the appearance Is it possible either to disable the default services or change characteristics in them? Besides Also if I add the 5 services the device requires, only 4 of them (in addition to the existing 2 default ones) appear in nRF. Not sure if that's a BLE thing or a bug but thought it was worth mentioning. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
@ajchellew Unfortunately this is not possible right now. I'm not sure what the best option is for how to provide this: I'm leaning towards (b) because there are a few things in the default services that are a bit of a pain to implement by hand. If you're able to build your own firmware, it's easy enough to disable the built-in default gap & gatt services. |
Beta Was this translation helpful? Give feedback.
-
I added an option for Option A seems wasteful, as one would need to duplicate all the code to setup the GAP service just to be able to change one byte from the default value. |
Beta Was this translation helpful? Give feedback.
@ajchellew Unfortunately this is not possible right now.
I'm not sure what the best option is for how to provide this:
a) A way to disable the default services, which means the user is expected to provide them explicitly
b) Make it possible to configure all the options.
I'm leaning towards (b) because there are a few things in the default services that are a bit of a pain to implement by hand.
If you're able to build your own firmware, it's easy enough to disable the built-in default gap & gatt services.
For nimble: https://github.com/micropython/micropython/blob/master/extmod/nimble/modbluetooth_nimble.c#L653 & https://github.com/micropython/micropython/blob/master/extmod/nimble/modbluet…