Skip to content

Commit bc17118

Browse files
authored
Update README.md (#1)
1 parent a48750a commit bc17118

1 file changed

Lines changed: 18 additions & 15 deletions

File tree

README.md

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@
44

55
FreeRTOS offers a suite of networking stacks designed for IoT applications. Applications can access communication protocols at different levels - MQTT, HTTP, Secure Sockets, etc. Common connectivity technologies such as Ethernet, Wi-Fi and BLE have been integrated with the networking stacks of FreeRTOS, with [a wide selection of microcontrollers and modules](https://devices.amazonaws.com/search?page=1&sv=freertos) pre-integrated.
66

7-
The demos in this project demonstrate how to establish mutually authenticated MQTT connections to MQTT brokers, such as AWS IoT Core, by using cellular connectivity. The demos use the [FreeRTOS Cellular Library](https://github.com/FreeRTOS/Lab-Project-FreeRTOS-Cellular-Library/raw/main/doc/document/cellular.zip) sub-moduled from an external project. The FreeRTOS Cellular Library exposes the capability of a few popular cellular modems through a uniform API.
7+
The demos in this project demonstrate how to establish mutually authenticated MQTT connections to MQTT brokers, such as AWS IoT Core, by using cellular connectivity. The demos use the [Cellular Library](https://github.com/FreeRTOS/Lab-Project-FreeRTOS-Cellular-Library/raw/main/doc/document/cellular.zip) sub-moduled from an external project. The FreeRTOS Cellular Library exposes the capability of a few popular cellular modems through a uniform API.
88

9-
1. Quectel BG96
10-
2. Sierra Wireless HL7802
11-
3. U-Blox Sara-R4
9+
1. [Quectel BG96](https://www.quectel.com/product/bg96.htm)
10+
2. [Sierra Wireless HL7802](https://www.sierrawireless.com/products-and-solutions/embedded-solutions/products/hl7802/)
11+
3. [U-Blox Sara-R4](https://www.u-blox.com/en/product/sara-r4-series)
1212

1313
The MQTT and HTTP libraries of FreeRTOS use an abstract [Transport Interface](https://github.com/FreeRTOS/coreMQTT/blob/main/source/interface/transport_interface.h) to send/receive data in a generic way. The demos in this project offer a [implementation](https://github.com/FreeRTOS/Lab-Project-FreeRTOS-Cellular-Demo/blob/master/source/coreMQTT/using_mbedtls.c) of the Transport Interface on top of the uniform API exposed by the FreeRTOS Cellular Library.
1414

1515
## Hardware Setup
1616

17-
The demos in this project can be run in the [FreeRTOS Windows Simulator](https://freertos.org/FreeRTOS-Windows-Simulator-Emulator-for-Visual-Studio-and-Eclipse-MingW.html). You will need a Windows PC and one of the supported cellular modems to run a demo. A version of Visual Studio, such as the [free Community version of Visual Studios](https://visualstudio.microsoft.com/vs/community/), will be needed for building the demos.
17+
The demos in this project can be run in the [FreeRTOS Windows Simulator](https://freertos.org/FreeRTOS-Windows-Simulator-Emulator-for-Visual-Studio-and-Eclipse-MingW.html). You will need a Windows PC and one of the supported cellular modems to run a demo. A version of Visual Studio, such as the free Community version of [Visual Studios](https://visualstudio.microsoft.com/vs/community/), will be needed for building the demos.
1818

1919
FreeRTOS Windows simulator make use of COM port to communicate with cellular module. Setup you cellular module communication with the following steps.
2020

@@ -25,7 +25,7 @@ FreeRTOS Windows simulator make use of COM port to communicate with cellular mod
2525
Screenshot 1. Cellular module COM port in windows device manager</p>
2626

2727

28-
1. Use [Putty](https://www.putty.org/) or any terminal tool to verify connection with the cellular module. Refer to you cellular module’s manual for settings like baud rate, parity, and flow control.
28+
2. Use [Putty](https://www.putty.org/) or any terminal tool to verify connection with the cellular module. Refer to you cellular module’s manual for settings like baud rate, parity, and flow control.
2929

3030
Input “ATE1”, the modem should return “OK”. Depending on your modem setting, you may see an echo of “ATE1” as well.
3131
Input “AT”, the modem should return “OK”.
@@ -44,10 +44,10 @@ Figure 1. Components and Interfaces</p>
4444

4545
The other components shown as blue boxes and dotted lines are implemented by this project:
4646

47-
1. The [Demo Application](https://github.com/FreeRTOS/Lab-Project-FreeRTOS-Cellular-Demo/blob/main/source). It is largely the same as the [coreMQTT demo](https://github.com/FreeRTOS/FreeRTOS/tree/master/FreeRTOS-Plus/Demo/coreMQTT_Windows_Simulator/MQTT_Mutual_Auth), with added logic to set up cellular as the transport. (The original coreMQTT demo was designed for Wi-Fi on FreeRTOS Windows Simulator.) There is also a demo application that integrates [1nce Zero Touch Provisioning](https://1nce.com/en/help-center/tutorials-documentations/1nce-connectivity-suite/) with the FreeRTOS Cellular Library and coreMQTT for connecting to AWS IoT Core.
48-
2. The [Transport Interface](https://github.com/FreeRTOS/Lab-Project-FreeRTOS-Cellular-Demo/blob/main/source/coreMQTT/using_mbedtls.c) is needed by the MQTT library (sub-moduled from the [coreMQTT](https://github.com/freertos/coreMQTT) project) to send and receive packets.
49-
3. The[TLS porting interface](https://github.com/FreeRTOS/Lab-Project-FreeRTOS-Cellular-Demo/blob/main/source/mbedtls/mbedtls_freertos_port.c) is needed by the mbedTLS library to run on FreeRTOS.
50-
4. The [Comm Interface](https://github.com/FreeRTOS/Lab-Project-FreeRTOS-Cellular-Demo/blob/main/source/cellular/comm_if_windows.c) is used by the FreeRTOS Cellular Library to communicate with the cellular modems over UART connections.
47+
* The [Demo Application](https://github.com/FreeRTOS/Lab-Project-FreeRTOS-Cellular-Demo/blob/main/source). It is largely the same as the [coreMQTT demo](https://github.com/FreeRTOS/FreeRTOS/tree/master/FreeRTOS-Plus/Demo/coreMQTT_Windows_Simulator/MQTT_Mutual_Auth), with added logic to set up cellular as the transport. (The original coreMQTT demo was designed for Wi-Fi on FreeRTOS Windows Simulator.) There is also a demo application that integrates [1nce Zero Touch Provisioning](https://1nce.com/en/help-center/tutorials-documentations/1nce-connectivity-suite/) with the FreeRTOS Cellular Library and coreMQTT for connecting to AWS IoT Core.
48+
* The [Transport Interface](https://github.com/FreeRTOS/Lab-Project-FreeRTOS-Cellular-Demo/blob/main/source/coreMQTT/using_mbedtls.c) is needed by the MQTT library (sub-moduled from the [coreMQTT](https://github.com/freertos/coreMQTT) project) to send and receive packets.
49+
* The[TLS porting interface](https://github.com/FreeRTOS/Lab-Project-FreeRTOS-Cellular-Demo/blob/main/source/mbedtls/mbedtls_freertos_port.c) is needed by the mbedTLS library to run on FreeRTOS.
50+
* The [Comm Interface](https://github.com/FreeRTOS/Lab-Project-FreeRTOS-Cellular-Demo/blob/main/source/cellular/comm_if_windows.c) is used by the FreeRTOS Cellular Library to communicate with the cellular modems over UART connections.
5151

5252
## Developer References and API Documents
5353

@@ -56,7 +56,8 @@ Please refer to [FreeRTOS Cellular Library API document](https://github.com/Free
5656

5757
## Download the source code
5858

59-
This repo uses Git Submodules to bring in external components.
59+
The source code can be downloaded from the FreeRTOS labs or by itself through Github.
60+
6061
To clone using HTTPS:
6162

6263
```
@@ -126,7 +127,8 @@ There is also a demo for 1nce zero touch provisioning with BG96 modem:
126127

127128
### **Configure cellular network**
128129

129-
Cellular configurations can be found in [“source/cellular/<cellular_module>/cellular_config.h”](https://github.com/FreeRTOS/Lab-Project-FreeRTOS-Cellular-Demo/tree/main/source/cellular). Modify the following parameters for your network environment.
130+
The following parameters in the cellular configuration, [cellular_config.h](https://github.com/FreeRTOS/Lab-Project-FreeRTOS-Cellular-Demo/tree/main/source/cellular), (located in "source/cellular/<cellular_module>/cellular_config.h”) must be modified for your network environment.
131+
130132
| Configuration | Description | Value |
131133
|-----------------|-----------------------|--------|
132134
| CELLULAR_COMM_INTERFACE_PORT | Cellular communication interface make use of COM port on computer to communicate with cellular module on windows simulator. | Your COM port connected to cellular module |
@@ -153,7 +155,7 @@ Reference the cellular module documentation for COM port settings. Update the [c
153155

154156
[“source/FreeRTOS/FreeRTOSConfig.h](https://github.com/FreeRTOS/Lab-Project-FreeRTOS-Cellular-Demo/blob/main/source/FreeRTOS/FreeRTOSConfig.h)”, “[source/mbedtls/mbedtls_config.h](https://github.com/FreeRTOS/Lab-Project-FreeRTOS-Cellular-Demo/blob/master/source/mbedtls/mbedtls_config.h)” and “[source/coreMQTT/core_mqtt_config.h](https://github.com/FreeRTOS/Lab-Project-FreeRTOS-Cellular-Demo/blob/main/source/coreMQTT/core_mqtt_config.h)” are configurations for the corresponding sub-modules.
155157

156-
## Demo app execution flow
158+
## Demo Execution Step flow
157159

158160
The demo app performs three types of operations. By searching the names of functions in the diagram below, you can find the exact places these operations are made in the source code.
159161

@@ -164,6 +166,7 @@ The demo app performs three types of operations. By searching the names of func
164166
The following diagram illustrates the interactions between the demo app and other components.
165167
<p align="center"><img src="doc/cellular_demo_sequence.png"><br>
166168
Figure 2. Demo application sequence diagram</p>
169+
167170
## Build and run the MQTT mutual authentication demos
168171

169172
1. In Visual Studio, open one of the mqtt_mutual_auth_demo.sln projects that matches your cellular modem.
@@ -214,8 +217,8 @@ Incoming Publish Message : Hello World!
214217
1NCE is a global IoT Carrier specialized in providing managed connectivity services for low bandwidth IoT applications. In this demo, 1NCE service(a 1NCE sim card + AWS IoT device onboarding server) and BG96 cellular module are used to demonstrate how to provision device with zero-touch and connect to AWS IoT core. Refer to the [1nce blueprint for FreeRTOS](https://github.com/1NCE-GmbH/blueprint-freertos), in particular, [this flow chart](https://1nce.com/wp-content/uploads/2020/07/Identity2.png), to learn how the zero-touch-provisioning works.
215218

216219
1. In Visual Studio, open the 1nce_bg96_zero_touch_provisioning_demo.sln project. In this Visual Studio solution file, the macro of `USE_1NCE_ZERO_TOUCH_PROVISIONING` is defined. Please look for `#ifdef USE_1NCE_ZERO_TOUCH_PROVISIONING` in the source files to see how it does differently to provision the device by using the 1nce service. Otherwise, this demo performs the same mutually authenticated MQTT operations as the other demos.
217-
2. Generate a self-signed certificate and its private key locally. (See [this example](https://docs.aws.amazon.com/iot/latest/developerguide/create-device-cert.html).) Update “[source/demo_config.h](https://github.com/FreeRTOS/Lab-Project-FreeRTOS-Cellular-Demo/blob/main/source/demo_config.h)” with the certificate and private key. These are for the purpose of establishing TLS connection to 1nce server. Note that adding keys into a header file is done for convenience of demonstration only. Production devices should use secure storage to store the keys.
218-
3. Get APN for your SIM card from 1NCE. Update `CELLULAR_APN` in file “[cellular_config.h for BG96](https://github.com/FreeRTOS/Lab-Project-FreeRTOS-Cellular-Demo/blob/main/source/cellular/bg96/cellular_config.h)”. And follow Configure Application Settings steps above to finish the rest configuration.
220+
2. [Generate a self-signed certificate and its private key locally.](https://docs.aws.amazon.com/iot/latest/developerguide/create-device-cert.html) Update “[source/demo_config.h](https://github.com/FreeRTOS/Lab-Project-FreeRTOS-Cellular-Demo/blob/main/source/demo_config.h)” with the certificate and private key. These are for the purpose of establishing TLS connection to 1nce server. Note that adding keys into a header file is done for convenience of demonstration only. Production devices should use secure storage to store the keys.
221+
3. Get APN for your SIM card from 1NCE. Update `CELLULAR_APN` in file “[cellular_config.h](https://github.com/FreeRTOS/Lab-Project-FreeRTOS-Cellular-Demo/blob/main/source/cellular/bg96/cellular_config.h) for BG96. And follow Configure Application Settings steps above to finish the rest configuration.
219222
4. Compile and run.
220223

221224

0 commit comments

Comments
 (0)