A BLE beacon library for ESP32 boards on Arduino environment.
A BLE beacon library for ESP32 boards on Arduino environment.
This is unofficial library conforming to LINE Simple Beacon (Official).
LINE app
> Settings
> Privacy
> Provide usage data
> fill checkbox at LINE Beacon
// Set your hardware ID
const String hwid = "0123456789";
// Create beacon instance
GreenBeacon beacon = GreenBeacon(hwid);
// Set advertise message & Start advertising
beacon.start("hey");
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.