Set Bluetooth name via Service #1161
Replies: 5 comments
-
Posted at 2018-03-15 by Ollie 'E.setBootCode' underpins the Espruino save on send functionality from the IDE, and that has an option to persist/run after reset. I guess there's an argument you can pass, but if not maybe you can use the IDE. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-03-15 by Spocki The option is called alwaysExec, see http://www.espruino.com/Reference#l_E_setBootCode |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-03-15 by Ollie Ah thanks, so in that case, that won't help. Looks like OP is passing true for |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-03-16 by user87803 isn't there a way to set the name characteristic using lower level code?
but that doesn't work either (despite the fact that it should if the puck conforms to bluetooth specifications. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-03-16 by @gfwilliams I'm not quite sure I understand the question... If you do WARNING - THIS IS DANGEROUS if you run code with The only thing it won't persist through is If you want it to persist through completely erasing the device's memory then you have 2 options:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2018-03-15 by user87803
I'm looking for a method of changing the bluetooth interfaces name in a way that persists through power cycling without modifying onInit() or setBootCode()
I have already used
however it does not persist through power cycling and whilst I have found a way to make that happen using the following code:
It is still removable with reset(true).
I can't use any methods that write to the onInit() function or E.init() handler as existing data there would be erased, so my question was whether writing to the 0X2A00 service (that defines the name), can be done at a lower level either via a puck, the web IDE, or a raspberry pi using the bluepy library.
Beta Was this translation helpful? Give feedback.
All reactions