Files
2026-06-14 16:24:40 +02:00

67 lines
1.6 KiB
Typst

#import "/metadata.typ": *
#import "/tail/bibliography.typ": *
#import "/tail/glossary.typ": *
#import "/main/architecture/description.typ": *
#import "/resources/slides.typ": *
== Gateway — BLE to MQTT Bridge
#slide[
#grid(
columns: (1fr, 1fr),
gutter: 2em,
align: top+left,
[
*Architecture*
- Raspberry Pi 4 Python
- Passive @ble:short scan (bleak)
- MQTTS publisher (paho-mqtt)
- systemd service auto-restart
- Remote access via Tailscale
],
[
// *Data flow*\
// Thingy:52
// $->$ BLE advertising
// Raspberry Pi
// $->$ MQTTS (TLS)
// RabbitMQ broker
// $->$
// InfluxDB
]
)
]
== Gateway — Overview
#slide[
#align(center)[
#figure(
image("/resources/img/gateway_overview.svg", height: 40%),
caption: [Gateway communication chain from @ble:short advertising to database storage]
)
]
]
== Gateway — Key Challenges
#slide[
#grid(
columns: (1fr, 1fr),
gutter: 2em,
align: top+left,
[
*BLE filtering*
- GATT $->$ passive advertising
- Filter: `company_id = 0xffff`
- exactly 14 bytes
- Continuous BLE scan (100% duty cycle)
- Deduplication: 10s cache per MAC address
],
[
*Reliability — validated in production*
- MQTT auto-restart via systemd
- `os._exit(1)` on disconnection
- Validated with 2 cases:
- Network disconnection
- Wrong MQTT credentials
- Multiple nodes publishing
simultaneously confirmed by broker
- No duplicate data
]
)
]