A BLE beacon broadcasts its identity to nearby Bluetooth devices, to enable the other devices to determine their location relative to the beacon, and to perform actions based on information broadcast by the beacon.
Example applications of beacons include indoor positioning system, location-based advertising and more.
From the definition of its purpose as a broadcast device, a BLE beacon thus cannot be connected to, and can only send information in its Bluetooth advertisement packets.
There are several BLE beacon protocols. The Ameba BLEBeacon library supports the iBeacon and AltBeacon protocols.
Procedure
Ensure that the following Bluetooth apps are installed on your mobile phone. These apps will show you the raw data sent by Ameba and allow you to interact with the data.
The recommended application is nRF connect, and is available at the links below:
Android : https://play.google.com/store/apps/details?id=no.nordicsemi.android.mcp
iOS :https://apps.apple.com/us/app/nrf-connect/id1054362403
LightBlue is an alternative application that can also be used, but has less features:
Android : https://play.google.com/store/apps/details?id=com.punchthrough.lightblueexplorer
iOS :https://apps.apple.com/us/app/lightblue/id557428110
Download Arduino IDE, install Ameba RTL8722DM board.
refer to https://www.amebaiot.com/en/amebad-arduino-getting-started/
Open the example, "Files" -> "Examples" -> “AmebaBLE” -> “BLEBeacon”
Upload the code and press the reset button on Ameba once the upload is finished.
On your mobile phone, open the Bluetooth app and scan for the beacon signal broadcast by Ameba.
If you happen to be in an environment with multiple BLE beacons, you can tap the entries to expand them, and verify that the beacon data is identical to the data in the sketch.
Reference https://www.amebaiot.com/en/amebad-arduino-ble-beacon/
Comments