Change the puck UUID? #2030
Replies: 22 comments
-
Posted at 2017-02-02 by @gfwilliams You mean the MAC address? I'm afraid it's not at the moment - it is taken out of a register which I believe is set at the factory (however if Espruino itself were changed I believe it might be able to ignore that) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-02-02 by Adam79 Think he means this for example Connected to device UUID: 5D9D6DC0-8162-4DF5-97F7-544733A0B978 Named: Puck.js de81 |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-02-02 by billsalt Correct I don't want to change BDADDR (programmed at the factory). I tried to use nrf.setAdvertising() as shown in the iBeacon discussion (http://forum.espruino.com/conversations/298200/) , but couldn't get it to work for changing the UUID. All of the iBeacons I use for the application I'm developing have the same UUID for ease of location and then use the Major and Minor. Something I'm missing? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-02-03 by @gfwilliams
So they're iBeacons? I don't think normal Bluetooth LE has the concept of a UUID for a Puck (@adam79 I think that's a UUID that the connecting computer has created - the Puck doesn't broadcast that) iBeacons broadcast their own UUIDs - see this forum post - I think it'll tell you all you need about how to set Puck.js up as an iBeacon with its own UUID: http://forum.espruino.com/conversations/298200/ |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-02-03 by billsalt Hi @gfwilliams, thanks for the reply. I had indeed found that conversation, but it didn't work for me. I think the problem stems from bootcode that I had set and can't seem to get rid of. I've read past conversations about issues and tried what I found. See attached; what am I doing wrong to clear the flash and get rid of bootcode? Attachments: |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-02-03 by @gfwilliams Ahh - I have no idea why yet, but I think something's got confused in the hardware - I've had this once or twice before. Try disconnecting and reconnecting the battery (usually you can do it just by gently lifting it away from the PCB) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-02-03 by billsalt @gfwilliams - that didn't work. I had gotten to this point by using "save on send", so I enabled that again and used "var foo;" and was finally able to clear it out that way. I had even reloaded the boot code. Somehow that area of flash isn't getting cleared properly by any other method. I'd say there is a bug if I had to guess... I'd imagine this is going to cause others to have issues, so it bears looking into if you can do so. See attached screen grab. Now, on to my task. I tried the following, but don't see the UUID/major, minor being advertised when I use my iBeacon scanners on the iPhone. It is based on the previously mentioned conversation:
Attachments: |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-02-03 by @gfwilliams Actually can you try:
I literally just added this. If it doesn't show up in iOS you could use something like nRF Connect and see if that can find it. (it's documented at http://www.espruino.com/Puck.js+iBeacon) I've improved the flash save code ready for the 1v92 release so that might help - your timeout errors are strange though. You're completely sure you did reboot it by removing the battery? so the red LED flashed again? Whenever i noticed that issue, a reboot solved it |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-02-03 by billsalt HI @gfwilliams; Yes, I rebooted it. I've even reloaded the flash completely (DFU). I'm still having flash issues, it seems. I can't even make this behave enough to load the code snippet above. See the attached screen grab. This is after doing the DFU update. I can't even get it to load code. I think somehow my flash is corrupted in this device. Do you concur? I have a spare but haven't used it yet... Attachments: |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-02-03 by billsalt @gfwilliams - last post of the day; need to move to another task. I switched to a 'virgin' device and can't get the code snippet to load. I must be making some noob mistake here. I just copied the code you provided above into the editor window and clicked the 'send to espruino' button. It seems to send, but a dump(); shows nothing. I tried copy and paste directly into the espruino window to no avail. See the attachment above; I get the same behavior. I must be doing something stupid here? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-02-03 by @gfwilliams That's fine - On the other Puck, you could try:
This will blow away all the saved code - it doesn't get removed when you update the firmware I'm afraid. When 1v92 is released it should fix any issues like that though. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-02-03 by billsalt Thanks @gfwilliams for putting up with the noob... I'll be looking out for 1v92 and I'll work on the beacon code some more, probably over the weekend. I hope you can tell that I love the puck, btw... Quick question: is there a version of this code that will run on the Nordic 10040 Dev Kit? I'd love to be able to use the work you've done on a board with easier access to IO and power supplies. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-02-03 by @gfwilliams The nRF52832DK? Should be... Try the file in http://www.espruino.com/binaries/travis/master/ |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-02-03 by billsalt @gfwilliams -- cool! Loaded it up, connected, loaded my LBS service code and it all works just fine. Seems the LED's and buttons have the polarity switched though... No big deal at all! Nice... |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-02-06 by @gfwilliams Yes, it's because they really are switched on the board. 0 is on, 1 is off - and the interpreter doesn't (yet) flip the states behind the scenes for you. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-02-07 by Artscada Hi Gordon. I have Puck.js with ibeacon. There is an Android application associated with BaaS http://www.contexthub.com/ configured so - when entering the zone ibeacon the server is running in webhook telegram bot with a value of 1 or 0, "Hello Artscada" (1) at the exit - "Bye Artscada "(0). |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-02-07 by Artscada Example of realization. We deliver clean water in bottles of 20 liters, often miss the time of the call to service delivery. If you put Puck upstairs and into a bottle with a ball magnet. Broadcast UUID1 .... UUID9 10% increments over time will give the average daily water consumption. UUID10 - an appeal to the bot ordering water and paying https://t.me/legendarobot Attachments: |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-02-07 by Artscada How is the code?
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-02-07 by @gfwilliams Yes, that sounds like it would work perfectly! I did a demo of Puck.js with a magnet on a ping-pong ball as a float, and it broadcast as an Eddystone beacon only when the water had reached a certain level. Only thing I'd say if you would want to ensure that the magnet on the float actually floated close to Puck.js - if it was right over the other side of the water cooler it might be harder to detect... |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-02-13 by Artscada Tell me please. Can I change the puck.js "transmission power (db)" as in conventional ibeacon in the range of "+4 dbm" to "-40 dbm" |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-02-13 by @gfwilliams |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-02-15 by Artscada Thank you |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2017-02-02 by billsalt
I'd like to change the puck UUID; not just a service UUID or a beacon ID, but the base UUID. Is this possible?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions