You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+18-15Lines changed: 18 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,17 +4,17 @@
4
4
5
5
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.
6
6
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.
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.
14
14
15
15
## Hardware Setup
16
16
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.
18
18
19
19
FreeRTOS Windows simulator make use of COM port to communicate with cellular module. Setup you cellular module communication with the following steps.
20
20
@@ -25,7 +25,7 @@ FreeRTOS Windows simulator make use of COM port to communicate with cellular mod
25
25
Screenshot 1. Cellular module COM port in windows device manager</p>
26
26
27
27
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.
29
29
30
30
Input “ATE1”, the modem should return “OK”. Depending on your modem setting, you may see an echo of “ATE1” as well.
31
31
Input “AT”, the modem should return “OK”.
@@ -44,10 +44,10 @@ Figure 1. Components and Interfaces</p>
44
44
45
45
The other components shown as blue boxes and dotted lines are implemented by this project:
46
46
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.
51
51
52
52
## Developer References and API Documents
53
53
@@ -56,7 +56,8 @@ Please refer to [FreeRTOS Cellular Library API document](https://github.com/Free
56
56
57
57
## Download the source code
58
58
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
+
60
61
To clone using HTTPS:
61
62
62
63
```
@@ -126,7 +127,8 @@ There is also a demo for 1nce zero touch provisioning with BG96 modem:
126
127
127
128
### **Configure cellular network**
128
129
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.
| 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
153
155
154
156
[“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.
155
157
156
-
## Demo app execution flow
158
+
## Demo Execution Step flow
157
159
158
160
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.
159
161
@@ -164,6 +166,7 @@ The demo app performs three types of operations. By searching the names of func
164
166
The following diagram illustrates the interactions between the demo app and other components.
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.
215
218
216
219
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.
0 commit comments