Complete Example
Built on the MicroPython environment of the Cassia M2000 gateway, this demo covers three common capabilities — BLE, MQTT, and HTTP — providing a complete reference that developers can use as a starting point for their own APPs.
BLE: scan advertisements, connect to devices and perform GATT read/write and notification subscription with the
cassiablueAPI.MQTT: connect to an MQTT broker asynchronously with
micropython-mqtt, subscribe to command topics and publish data.HTTP client / server: issue HTTP client requests with
aiohttpand expose a local HTTP service (RESTful API and static pages) withmicrodot.
Full source code and build scripts are available on GitHub: