aliro_ble_central.h
Device-side (User-Device) BLE transport interface: the central/client mirror of…
Overview
Device-side (User-Device) BLE transport interface: the central/client mirror of aliro_ble.h. Where the reader advertises 0xFFF2, serves the GATT characteristics and runs an L2CAP CoC server, the initiator scans, connects, reads the reader's SPSM/versions, writes its selected version and opens a CoC client to that SPSM. The platform-free half (advert + READ-payload decoding, BleSK salt assembly) lives in aliro_ble_central.c and is host-testable; the NimBLE backend for the transport calls sits in ports/esp32, so a Zephyr bt_gap_*/bt_l2cap_* backend can be written behind this same header.
depends on aliro_advtag.h · used by aliro_ble_central.c
API
Cstruct aliro_ble_central_adv
Reader identity recovered from one 0xFFF2 service-data advert. Field order is the inverse of build_aliro_svc_data (aliro_ble.c:532).
Cstruct aliro_ble_central_peer
What the peer publishes on the reader-SPSM characteristic (D3B5A130-9E23-4B3A-8BE4-6B1EE5F980A3), read before the CoC opens.
Cstruct aliro_ble_central_callbacks
Callbacks for BLE central transport: on_ready when CoC opens and peer facts are known, on_data for each inbound SDU, on_closed when link or CoC drops.
Cstruct aliro_ble_central_config
Configuration for BLE central transport: reader_id to match by truncated group/sub ID in adverts, selected_version for device-version characteristic, and callbacks.