Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

bluetooth low energy advertising packet and topology

I want to advertise a single id lets say "stackoverflow1" on a ble device. So people close to the sensor can get this message (welcome to wwdc2012) as popups on the iPhone. That's it! meaning that there is no update on the value or anything else in other words I just want to know which room I came in. In another room there's another sensor adversing "stackoverflow2".

Now the question is, should I put the rooms' sensor (advertiser) as Peripherals and visitors' iPhones as Centrals?

If your answer is yes, can I send this Id in advertising packet? i.e. can I skip connection to the room's peripheral? Please guide me a little but on this

Thanks

like image 607
CppChase Avatar asked Feb 18 '23 13:02

CppChase


1 Answers

Yes, the iPhones should be centrals and the in-room device should be a peripheral. It's perfectly fine to put enough data in the advertisement that the iOS app can do something useful after simply seeing the peripheral advertised without actually connecting to it. That way, multiple centrals/phones can detect proximity at once without a single phone tying up an exclusive connection to the device. Instead of specifying the room in the service name, you should be able to put it in the advertisement data for the device, giving them all the same service name. That way the iOS app doesn't need to know the completely list of rooms (i.e. services) in advance and they can be added to without changing the app.

In short, the gist of what you described should work fine, and seems like a sound approach to me.

like image 58
Andrew Madsen Avatar answered Mar 05 '23 11:03

Andrew Madsen