Avatar for user87803

user87803

Member since Mar 2018 • Last active Apr 2018
  • 1 conversations
  • 2 comments

Most recent activity

    • 6 comments
    • 2,503 views
  • in JavaScript
    Avatar for user87803

    isn't there a way to set the name characteristic using lower level code?
    I've experimented with python bluepy for the raspberry pi zero w that appears to read and write the 0x2A00 name characteristic, but does not actually write.
    Is there an espruino equivalent?
    I have tried

    NRF.setAdvertising({0x2A00: "<Puck>"},{});
    

    but that doesn't work either (despite the fact that it should if the puck conforms to bluetooth specifications.

  • in JavaScript
    Avatar for 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

    NRF.setAdveritising({},{name: "<name>"});
    

    however it does not persist through power cycling and whilst I have found a way to make that happen using the following code:

    E.setBootCode('NRF.setAdvertising({},{na­me: "<name>"});',true);
    

    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.

Actions