AntiLost: Difference between revisions

From RevSpace
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 7: Line 7:


== Introduction ==
== Introduction ==
[[File:AntiLostServices.png|thumb|right|250px|BLE GATT services advertised]]
This page is about so-called "anti-lost" tags and understanding how to communicate with them.


This page is about so-called "anti-lost" tags and how to communicate with them.
They act as a Bluetooth low-energy (BLE) GATT server, implementing a bunch of services.


This allows them to implement the following functions:
This allows them to implement the following functions:
* read out general characteristics of the anti-lost, like the name
* read out general characteristics of the anti-lost, like the name
* read out battery level of the anti-lost
* read out battery level of the anti-lost
* enable beeping from the client
* enable beeping from the client (e.g. smartphone)
* notify when the button is pressed on the anti-lost
* notify when the button is pressed on the anti-lost


Line 20: Line 20:
* start beeping when the connection is lost (silenced by a button press)
* start beeping when the connection is lost (silenced by a button press)


They do this by implementing a BLE GATT server, with a bunch of services.
== Technical ==
 
=== GATT services ===
[[File:AntiLostServices.png|thumb|right|250px|BLE GATT services advertised]]
See https://en.wikipedia.org/wiki/Bluetooth_Low_Energy#Technical_details
 
The services exposed by the anti-lost are:
* 0x1800: generic access for name and type of device
* 0x180F: battery service, allows you to read the battery level characteristic
* 0x1802: immediate alert, allows you to make the anti-lost beep
* 0x000FFE0-0000-1000-80000-00805F9B34FB: allows you to get notified when the button is pressed
 
=== BLE on ESP32 ===
The ESP32 is capable of doing BLE operations.
 
In particular, this library allows you to control the anti-lost as a GATT device: https://github.com/nkolban/ESP32_BLE_Arduino
Relevant example code is BLE_client.ino

Revision as of 07:12, 18 August 2018

Project AntiLost
NewAntiLost.jpg
Status Initializing
Contact bertrik
Last Update 2018-08-18

Introduction

This page is about so-called "anti-lost" tags and understanding how to communicate with them.

They act as a Bluetooth low-energy (BLE) GATT server, implementing a bunch of services.

This allows them to implement the following functions:

  • read out general characteristics of the anti-lost, like the name
  • read out battery level of the anti-lost
  • enable beeping from the client (e.g. smartphone)
  • notify when the button is pressed on the anti-lost

Also:

  • start beeping when the connection is lost (silenced by a button press)

Technical

GATT services

BLE GATT services advertised

See https://en.wikipedia.org/wiki/Bluetooth_Low_Energy#Technical_details

The services exposed by the anti-lost are:

  • 0x1800: generic access for name and type of device
  • 0x180F: battery service, allows you to read the battery level characteristic
  • 0x1802: immediate alert, allows you to make the anti-lost beep
  • 0x000FFE0-0000-1000-80000-00805F9B34FB: allows you to get notified when the button is pressed

BLE on ESP32

The ESP32 is capable of doing BLE operations.

In particular, this library allows you to control the anti-lost as a GATT device: https://github.com/nkolban/ESP32_BLE_Arduino Relevant example code is BLE_client.ino