How to send some data between iBeacons

I started developing iBeacon technology. I know how to connect, calculate the proximity effect ... But once the connection is established, how can I send some text data between the sender and the receiver? There is a method (for example) that I can use somehow

self.peripheralManager.accessibilityLabel

Is there also enough deviceID with which I can manage it using WebServer Thanks ....

+1
source share
3 answers

The iBeacon protocol is only for transmitting / detecting beacon identifiers and calculating their proximity. That is all he does.

All that is required for this must be done separately - presumably using the CoreBluetooth function or iOS new Multipeer Connectivity . In fact, discovering neighboring users and transferring data between them is exactly what Multipeer Connectivity is for.

+1
source

iBeacons are used only as a transmitter, so you cannot send them data.

More information about the problem / solution can be found here: Data transfer using iBeacon or similar technology

0
source

You can try using Bluetooth LE (CoreBluetooth) instead of iBeacon if your main goal is to send data between two devices.

You can see how this is done in this sample project: SimpleShare: Easy Bluetooth LE Sharing for iOS

This method is designed to advertise your Service application via Bluetooth LE, and then, when another device detects your phone and connects, your phone starts updating the Characteristic value to send longer text strings in small fragments corresponding to Bluetooth LE data size limits . SimpleShare uses this technique to send an array of strings from one phone to another, which can be used to send yes / no between phones, but also to send object or user identifiers between phones, which can then be used to download more information about this user ID from the web service.

CoreBluetooth also has the advantage over iBeacon that it can continue to work when the application is in the background, so if knowing the specifics of each distance by phone is less important to you than exchanging text between phones, this may be the best structure to use for your application .

Hope this helps!

0
source

Source: https://habr.com/ru/post/1208210/


All Articles