|
| 1 | +# FreeRTOS + wolfIP + wolfMQTT TLS Example |
| 2 | + |
| 3 | +This example demonstrates a full-stack embedded MQTT client using FreeRTOS, wolfIP, and wolfMQTT with TLS 1.3 security. |
| 4 | + |
| 5 | +## Stack Components |
| 6 | +- FreeRTOS (POSIX port) - Real-time operating system |
| 7 | +- wolfIP - TCP/IP networking stack |
| 8 | +- wolfMQTT - MQTT client implementation |
| 9 | +- wolfSSL - TLS 1.3 security layer |
| 10 | +- TAP interface - Virtual network interface |
| 11 | + |
| 12 | +## Prerequisites |
| 13 | +- Linux with TUN/TAP support |
| 14 | +- CMake (>= 3.13) |
| 15 | +- GCC |
| 16 | +- Mosquitto broker (for testing) |
| 17 | +- wolfSSL libraries |
| 18 | + |
| 19 | +## Building and Running |
| 20 | + |
| 21 | +### Setup |
| 22 | +1. Run the setup script to clone and configure dependencies: |
| 23 | +```bash |
| 24 | +./setup.sh |
| 25 | +``` |
| 26 | + |
| 27 | +2. Configure the network interface (requires root): |
| 28 | +```bash |
| 29 | +sudo ./setup_network.sh |
| 30 | +``` |
| 31 | + |
| 32 | +3. Build the example: |
| 33 | +```bash |
| 34 | +cd build && cmake .. && make |
| 35 | +``` |
| 36 | + |
| 37 | +4. Run the example (requires root): |
| 38 | +```bash |
| 39 | +sudo ./freertos_sim |
| 40 | +``` |
| 41 | + |
| 42 | +### Testing |
| 43 | +Test the MQTT client using the provided script: |
| 44 | +```bash |
| 45 | +sudo ./test_mqtt.sh |
| 46 | +``` |
| 47 | + |
| 48 | +## Network Configuration |
| 49 | +- TAP Interface: 10.10.0.1/24 (Host/Broker) |
| 50 | +- FreeRTOS IP: 10.10.0.10/24 |
| 51 | +- Default Gateway: 10.10.0.1 |
| 52 | +- MQTT Broker Port: 8883 (TLS) |
| 53 | + |
| 54 | +## Security Features |
| 55 | +- TLS 1.3 with wolfSSL |
| 56 | +- Certificate-based authentication |
| 57 | +- Secure MQTT over TLS |
| 58 | + |
| 59 | +## Software Bill of Materials (SBOM) |
| 60 | +| Component | Version | License | Source | |
| 61 | +|-----------|---------|----------|---------| |
| 62 | +| FreeRTOS | Latest | MIT | https://github.com/FreeRTOS/FreeRTOS | |
| 63 | +| FreeRTOS-Kernel | Latest | MIT | https://github.com/FreeRTOS/FreeRTOS-Kernel | |
| 64 | +| wolfSSL | Latest | GPLv2 | https://github.com/wolfSSL/wolfssl | |
| 65 | +| wolfIP | Latest | GPLv2 | https://github.com/wolfSSL/wolfip | |
| 66 | +| wolfMQTT | Latest | GPLv2 | https://github.com/wolfSSL/wolfMQTT | |
0 commit comments