Removing beacon mode set with NRF.setScanResponse #2468
Replies: 7 comments
-
Posted at 2018-02-12 by @gfwilliams If you don't want to advertise Puck.js normally at all and just want Eddystone then you can just use the standard Eddystone example:
This also works too:
You can use |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-03-07 by Pi What would be the best way to advertise manufacturer data and Eddystone at the same time? I can't figure how to do something like this (obviously not working):
Thanks. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-03-07 by @gfwilliams Ahh, yes. It's a bit frustrating because of the way Try this:
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-03-07 by Pi Thanks @gfwilliams. I can't make the above work, the Eddystone url doesn't show up (the manufacturer data do), and at some point I couldn't connect to the puck, EspruinoHub couldn't see it at all (took the battery out to reset it). The code below worked, not sure if is the best way, but as long as it works, all good :)
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-03-08 by @gfwilliams
Which is just:
Actually I made the same mistake with the example code - using
I just tried this and it works for me. Your inability to connect is most likely because the Hope that helps! Just to add It's probably best to just pack it into a byte with: |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-03-09 by Pi @gfwilliams thanks, your help is much appreciated. The reason I was getting results with NRF.setScanRespose was probably because I am using Google's "Nearby" (Settings->Google->Nearby on android), which is scanning for Eddystone links, but I see now that it's not exactly what I need. For reasons I don't understand, the above code doesn't work correctly for me (have tried it on 2 pucks). Manufacturer data are advertised properly, but I don't see the url. I am checking with nRF Connect and 0x0590 is there, very rarely 0xFEAA may pop up very shortly and disappear again. Same on Nearby, if I refresh constantly I may see it at some point, but it's gone once I refresh again. EspruinoHub on console (PuTTY) is showing feaa and the link for the puck though. Stringifying data is not the way to go, I know, but I start using it when I couldn't figure out how to send code to change color on a ble bulb from one puck to another, got a little confused with all the conversions among different bases. But it's kind of working, slice and parseInt ftw. I still cannot understand though how you can represent, lets say 1000 states, with 255 numbers. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-03-09 by @gfwilliams
It's strange - it doesn't appear well for me either - but when dumping the raw advertising data received I do see the 2 types of advertising packet being sent as they should be. If Scan Response works then that's probably best then.
You're right, you can't :) It's basically just turning 1000 states into 256 states, but the light measurement isn't accurate enough that it really matters. You could always use 2 bytes for 16 bits ( |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-02-10 by Pi
Hi. In the Eddystone beacon tutorial it says that we can broadcast beacon url together with other advertising by using
Which works fine, but I cannot find a way to turn off beacon advertising,
doesn't seems to work, is there another command I should use? Thanks.
Beta Was this translation helpful? Give feedback.
All reactions