Home

Awesome

MicroPython AIOBLE iTag

Examples for interacting with iTag BLE (Bluetooth 4.0) keychain devices using aioble on a TinyPICO (ESP32).

thumb

The tag is a simple Bluetooth Low Energy device with a single push button powered by a 3V CR-2032 Lithium cell.

You can connect to it, send a command to make it beep, read it's battery percentage and get notified when the button is pressed.

Installation

Using mip via mpremote:

$ mpremote mip install aioble

See examples.

BLE GATT

GATT is an acronym for the Generic Attribute Profile. It defines the way two Bluetooth Low Energy devices transfer data back and forth using concepts called Services and Characteristics.

The device presents 3 GATT services, each with a characteristic.

Mobile app

The tag can be interacted with using an app called "iSearching", found in the iOS an Android app stores.

Powering

Power on the tag by holding the push button. The iTag beeps twice and blinks LED to indicate it's on.

Power off the tag the same way. It will long-beep once to indicate it's now off.

Beeping

Write a 0x01 to the Immediate Alert > Alert Level characteristic and the tag will start fast-beeping.

Write a 0x00 to the characteristic to make the tag stop fast-beeping.

The tag will slow-beep after a connection has been made and then disconnected. This is to let the user know the device is no longer in range (eg. has been left behind). Press the tag button to acknowledge and mute.

Battery

Read the Battery Service > Battery Level characteristic and it will return the tags current battery level expressed as a percentage (0x60 = 96%).

Push button

Each time the tags push button is pressed, it sends a notification to the Custom Service > Custom Characteristic with a fixed value of 0x01.

You can listen for notifications on the Custom Characteristic to detect when the button is pressed.

Teardown

tag_colours

Comes in a variety of colours. I bought one of each.

inside

Battery compartment rotates to reveal the battery. Case is loosely press fit together (no glue). Easily pried apart with a pry tool or fingernail.

pcb_front

v1.6 | v1.8 | v5.0

MCU: ST17H26 TSSOP-16 RF Transceiver

pcb_back

v1.6 | v1.8 | v5.0

Even though they were all purchased on the same day, the PCBs show different versions and dates:

Buy

These devices can be found on AliExpress under various names:

Don't be fooled by the descriptions. There is NO GPS in the device!

Price ranges from $2 to $20 AUD.

Links

License

Licensed under the MIT License.

Copyright (c) 2024 Mike Causer