Skip to content
Device Library

Device Library

Device library is a collection of definitions (JSON format) and optional dynamic scripts (LUA) that can act in various BLE roles. The repository is available on GitHub: https://github.com/blesploit/device-library, help with new entries much appreciated!

Bundled devices can be browsed in “Device Library” section of mobile app.

Overview

A library entry is a folder on the filesystem that describes BLE device roles (each optional):

  • Observer - for recognizing the device based on advertised data: matching conditions, decoding logic
  • Central - for connecting and controlling the peripheral device: quick action or full menu scripts
  • Peripheral - for device simulation: its BLE GATT profile (services + characteristics), advertising data, UI, interface, and scripting logic.

Device folder layout

my-device/
  manifest.json         ← identity, role declarations, asset paths
  ble.json              ← GATT services, characteristics, descriptors, pairing
  vars.json             ← runtime variables (strings, numbers, bools)
  uuids.json            ← symbolic name → UUID map
  assets/
    icon.svg
    other_graphic.png
    graphics.json
  observer/
    adv_decode.lua      ← Lua script executed during mobile BLE scan
  central/
    dynamic.lua         ← Lua script executed on the mobile GATT client
    menu.json           ← GATT-client menu tree with Lua snippet hooks
  peripheral/
    adv.json            ← advertising profiles (raw hex, scan response)
    interface.json      ← peripheral display / UI simulation bindings
    dynamic.lua         ← Lua script executed on the ESP32 simulator

Reference

File / topic
manifest.json — identity, roles, asset pathsManifest
ble.json (GATT services and characteristics), adv.json (advertising data), interface.json (physical buttons)Peripheral
uuids.json (proprietary service/characteristic definitions), vars.json (optional variables), assets/graphics.json (graphic elements)optional json
menu.json — central menu treecentral

Lua scripting

Lua runs in three separate contexts. No globals are shared between them.

ContextRuns onReference
PeripheralESP32 firmwareESP32 peripheral LUA
CentralMobile (phone)mobile central LUA
ObserverMobile (phone)mobile observer LUA
© BLESPlo.it · BLE Research Tool · GitHub