Cicada
IoT Communications Module
|
IoT Communications Module for Energy Access. A quick way to get production ready, bi-directional communications for your IoT embedded device.
<img alt="Project Status" src="https://img.shields.io/badge/Project%20Status-stable-green"
<img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/EnAccess/Cicada-FW/check-generic.yaml"
An easy way to get production ready, bi-directional communications for your IoT embedded device.
This repository contains the source code for UART drivers, 2G, 3G, 4G and Wifi modems. This library is platform agnostic, designed to be portable - including examples for mbed, FreeRTOS, or bare metal.
Cicada uses the MQTT protocol to connect to the cloud but it can be used for general IP communication as well.
Dialing up the cellular modem, opening an IP channel and sending a MQTT packet can be done in less than 50 lines of code.
It's easy to add support for a new microcontroller or embedded os. There is also support for Unix (Linux, OS X) to test code on a PC without the need of having access to actual microcontroller hardware.
The source code for each of these modules can be found in the cicada/commdevices
directory.
This library is designed to be adapted to different hardware use cases, but Okra has also designed and manufactured PCBAs for all three supported communication modules, which can be used in conjunction with this library. See the Cicada Wifi and Cicada Cellular repos for further details.
To setup build dependencies, do: git submodule init
git submodule update
Run meson <builddirectory>
to generate build files. Finally, change to the builddirectory and run ninja
.
Run meson <builddirectory> --cross-file <crossfile>
Example: meson stm32build --cross-file stm32.cross.build
The following code shows a simple example for STM32 which dials up the modem, connects to a host and sends an MQTT packet:
See examples/
directory for full example code.