A BLE beacon library for ESP32 boards on Arduino environment.
This is unofficial library conforming to LINE Simple Beacon (Official).
- Web: Create your LINE official account.
https://manager.line.biz/ - App: Add your official account as friend.
- App: Make available LINE Beacon on your smartphone.
LINE app
>Settings
>Privacy
>Provide usage data
> fill checkbox atLINE Beacon
- PC: Issue "LINE Simple Beacon Hardware ID" from below.
https://manager.line.biz/beacon/register - Arduino IDE: Set the issued ID to variable "hwid" in sample sketches.
- Arduino IDE: Upload the sketch to your ESP32 based board.
- Programming: Develop your backend (server-side) script using LINE messaging API to handle beacon event.
https://developers.line.biz/en/reference/messaging-api/#beacon-event
// Set your hardware ID
const String hwid = "0123456789";
// Create beacon instance
GreenBeacon beacon = GreenBeacon(hwid);
// Set advertise message & Start advertising
beacon.start("hey");
- BLEDevice.h (ESP32_BLE_Arduino)
No need additional installation if you installed Arduino core for the ESP32 from boards manager on Arduino IDE.
hwid
: Issued LINE Simple Beacon hardware ID. It must be 10 chars of hex string.
device_name
: (optional) BLE Device name.
NEEDLESS TO USE IN USER SKETCH (run in constructor)
Initialize BLEDevice
instance.
Set issued LINE Simple Beacon's Hardware ID.
Deprecation: use constructor to set Hardware ID instead.
message
: The payload message (Max length: 13 bytes). This string will be set to beacon.dm
on LINE Messaging API's beacon event. See Beacon event.
Start advertising.
The message argument is optional.
Stop advertising.
This project is licensed under the MIT License - see the LICENSE.md file for details.