Skip to content

Commit 59c7871

Browse files
Move modules to independent repositories. (#112)
* Update cellular library to MIT license * Remove modules in cellular interface repo. * Update README. * Provide modules' repositories for reference implementations. * Update doxygen files. * Update HL7802 link in README. * Fix spelling. * Align introduction. * Remove Lab- prefix at url links * Update README. * Create Community-Supported-Ports Merged conflict. * Handle undefined message when sending AT command (#110) * Update pktio to handle undefined message when sending AT command * Undefined message handler is moved to pkthandler * Use PktRespMutex in pktio thread to keep data consistency * Add test cases to cover the undefined message handle flow * Update ATE0 handling in SARA R4 and HL7802. ATE0 may still echo back ATE0. Change the AT command type to CELLULAR_AT_WO_PREFIX * Reset the AT command type before calling callback (#113) * Reset the AT command type before calling pkthandler callback * Remove thirdparty folder. * Remove modules folder. * Update README doc for integrating library with cellular modems. * Remove Transport interface part in README. * Convert PNG to SVG. Co-authored-by: Ching-Hsin Lee <chinglee@amazon.com> Co-authored-by: chinglee-iot <61685396+chinglee-iot@users.noreply.github.com>
1 parent 5ded1c2 commit 59c7871

22 files changed

Lines changed: 78 additions & 13483 deletions

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
[submodule "test/unit-test/CMock"]
22
path = test/unit-test/CMock
33
url = https://github.com/ThrowTheSwitch/CMock
4-
[submodule "modules/ThirdParty/Community-Supported-Ports"]
5-
path = modules/ThirdParty/Community-Supported-Ports
6-
url = https://github.com/FreeRTOS/FreeRTOS-Cellular-Interface-Community-Supported-Ports

README.md

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,14 @@
77
* [Folder Structure](#Folder-Structure)
88
* [Integrate FreeRTOS Cellular Interface with MCU platforms](#Integrate-FreeRTOS-Cellular-Interface-with-MCU-platforms)
99
* [Adding support for new cellular modems](#Adding-support-for-new-cellular-modems)
10+
* [Integrate FreeRTOS Cellular Interface with Cellular Modules](#integrate-freertos-cellular-interface-with-cellular-modules)
1011
* [Building Unit Tests](#Building-Unit-Tests)
1112
* [Generating documentation](#Generating-documentation)
1213
* [Contributing](#Contributing)
1314

1415
## Introduction
1516

16-
The FreeRTOS Cellular Interface exposes the capability of a few popular cellular modems through a uniform API. Currently, this repository contains libraries for these three cellular modems.
17-
18-
* [Quectel BG96](https://www.quectel.com/product/lte-bg96-cat-m1-nb1-egprs/)
19-
* [Sierra Wireless HL7802](https://www.sierrawireless.com/products-and-solutions/embedded-solutions/products/hl7802/)
20-
* [U-Blox Sara-R4](https://www.u-blox.com/en/product/sara-r4-series)
21-
22-
The current version of the FreeRTOS Cellular Interface encapsulates the TCP stack offered by those cellular modems. They all implement the same uniform [Cellular Library API](https://github.com/FreeRTOS/FreeRTOS-Cellular-Interface/tree/main/source/include/cellular_api.h). That API hides the complexity of AT commands, and exposes a socket-like interface to C programmers.
23-
24-
Even though applications can choose to use the FreeRTOS Cellular Interface API directly, the API is not designed for such a purpose. In a typical FreeRTOS system, applications use high level libraries, such as the [coreMQTT](https://github.com/FreeRTOS/coreMQTT) library and the [coreHTTP](https://github.com/FreeRTOS/coreHTTP) library, to communicate with other end points. Those high level libraries use an abstract interface, the [Transport Interface](https://github.com/FreeRTOS/coreMQTT/blob/main/source/interface/transport_interface.h), to send and receive data. A Transport Interface can be implemented on top of the FreeRTOS Cellular Interface.
17+
The Cellular Interface library implement a simple unified [Application Programing Interfaces (APIs)](https://www.freertos.org/Documentation/api-ref/cellular/index.html) that hide the complexity of AT commands. The cellular modems to be interchangeable with the popular options built upon TCP stack and exposes a socket-like interface to C programmers.
2518

2619
Most cellular modems implement more or less the AT commands defined by the [3GPP TS v27.007](https://portal.3gpp.org/desktopmodules/Specifications/SpecificationDetails.aspx?specificationId=1515) standard. This project provides an implementation of such standard AT commands in a [reusable common component](https://github.com/FreeRTOS/FreeRTOS-Cellular-Interface/tree/main/source/include/common). The three Cellular libraries in this project all take advantage of that common code. The library for each modem only implements the vendor-specific AT commands, then exposes the complete Cellular API.
2720

@@ -51,12 +44,11 @@ git clone git@github.com/FreeRTOS/FreeRTOS-Cellular-Interface.git
5144
At the root of this repository are these folders:
5245

5346
* source : reusable common code that implements the standard AT commands defined by 3GPP TS v27.007.
54-
* modules : vendor-specific code that implements non-3GPP AT commands for each cellular modem.
5547
* docs : documentations.
5648
* test : unit test and cbmc.
5749
* tools : tools for Coverity static analysis and CMock.
5850

59-
## Integrate FreeRTOS Cellular Interface with MCU platforms
51+
## Implement Comm Interface with MCU platforms
6052

6153
The FreeRTOS Cellular Interface runs on MCUs. It uses an abstracted interface - the [Comm Interface](https://github.com/FreeRTOS/FreeRTOS-Cellular-Interface/tree/main/source/interface/cellular_comm_interface.h), to communicate with cellular modems. A Comm Interface must be implemented as well on the MCU platform. The most common implementations of the Comm Interface are over UART hardware, but it can be implemented over other physical interfaces such as SPI as well. The documentation of the Comm Interface is found within the [Cellular API References](https://www.freertos.org/Documentation/api-ref/cellular/cellular_porting.html#cellular_porting_comm_if). These are example implementations of the Comm Interface:
6254

@@ -71,7 +63,7 @@ The FreeRTOS Cellular Interface uses kernel APIs for task synchronization and me
7163

7264
FreeRTOS Cellular Interface now supports AT commands, TCP offloaded Cellular abstraction Layer. In order to add support for a new cellular modem, the developer can use the [common component](https://github.com/FreeRTOS/FreeRTOS-Cellular-Interface/tree/main/source/include/common) that has already implemented the 3GPP standard AT commands.
7365

74-
In order to port the [common component](https://www.freertos.org/Documentation/api-ref/cellular_common/index.html):
66+
In order to port the [common component](https://www.freertos.org/Documentation/api-ref/cellular/cellular_porting_module_guide.html):
7567

7668
1. Implement the cellular modem porting interface defined in [cellular_common_portable.h](https://github.com/FreeRTOS/FreeRTOS-Cellular-Interface/tree/main/source/include/common/cellular_common_portable.h) ([Document](https://www.freertos.org/Documentation/api-ref/cellular/cellular__common__portable_8h.html)).
7769
2. Implement the subset of Cellular Library APIs that use vendor-specific (non-3GPP) AT commands. The APIs to be implemented are the ones not marked with an "o" in [this table](https://www.freertos.org/Documentation/api-ref/cellular/cellular_common__a_p_is.html).
@@ -82,9 +74,25 @@ It is recommended that you start by cloning the implementation of one of the exi
8274

8375
Current Example Implementations:
8476

85-
* [Quectel BG96](https://github.com/FreeRTOS/FreeRTOS-Cellular-Interface/tree/main/modules/bg96)
86-
* [Sierra Wireless HL7802](https://github.com/FreeRTOS/FreeRTOS-Cellular-Interface/tree/main/modules/hl7802)
87-
* [U-Blox Sara-R4](https://github.com/FreeRTOS/FreeRTOS-Cellular-Interface/tree/main/modules/sara_r4)
77+
* [Quectel BG96](https://github.com/FreeRTOS/FreeRTOS-Cellular-Interface-Reference-Quectel-BG96)
78+
* [Sierra Wireless HL7802](https://github.com/FreeRTOS/FreeRTOS-Cellular-Interface-Reference-Sierra-Wireless-HL7802)
79+
* [U-Blox Sara-R4](https://github.com/FreeRTOS/FreeRTOS-Cellular-Interface-Reference-ublox-SARA-R4)
80+
81+
## Integrate FreeRTOS Cellular Interface with application
82+
83+
Once comm interface and cellular module implementation are ready, we can start to integrate
84+
FreeRTOS Cellular Interface. The following diagram depicts the relationship of these software components:
85+
<p align="center"><img src="/docs/plantuml/images/cellular_components.svg" width="50%"><br>
86+
87+
Follow these steps to integrate FreeRTOS Cellular Interface into your project:
88+
1. Clone this repository into your project.
89+
2. Clone one of the refenerce cellular module implementations ( BG96 / HL7802 / SARA-R4 )
90+
or create your own cellular module implementaion in your project.
91+
3. Implement comm interface.
92+
4. Build these software components with your application and execute.
93+
94+
We also provide [Demos for FreeRTOS-Cellular-Interface on Windows simulator](https://github.com/FreeRTOS/FreeRTOS/tree/main/FreeRTOS-Plus/Demo/FreeRTOS_Cellular_Interface_Windows_Simulator)
95+
as references for these three cellular modems example implementations.
8896

8997
## Building Unit Tests
9098

docs/doxygen/pages.dox

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,20 @@ FreeRTOS Cellular Library use communication interface to communicate with cellul
1010
This library contains the following three components in three folders.
1111
| FreeRTOS Cellular Library folders | High Level Description |
1212
| :--------------------| :--------------------- |
13-
| include | FreeRTOS Cellular Library APIs definitions help to abstract the control of cellular module. |
14-
| common | FreeRTOS Cellular Library APIs implemenation with 3GPP TS v27.007 AT commands. |
15-
| modules | FreeRTOS Cellular Library APIs implemenation with cellular module specific AT commands. |
13+
| source | Reusable common code that implements the standard AT commands defined by 3GPP TS v27.007. |
14+
| docs | Documentations. |
15+
| test | Unit test and cbmc. |
16+
| tools | tools for Coverity static analysis and CMock. |
1617

1718
- <b>Supported cellular modules</b><br>
1819
Three cellular modules are supported in this library.
1920
| Cellular module |
2021
| :--------------------|
21-
| quectel BG96 |
22-
| Sierra HL7802 |
23-
| Ublox SARA R4 series |
22+
| [Quectel BG96](https://github.com/FreeRTOS/FreeRTOS-Cellular-Interface-Reference-Quectel-BG96) |
23+
| [Sierra HL7802](https://github.com/FreeRTOS/FreeRTOS-Cellular-Interface-Reference-Sierra-Wireless-HL7802) |
24+
| [Ublox SARA R4 series](https://github.com/FreeRTOS/FreeRTOS-Cellular-Interface-Reference-ublox-SARA-R4) |
2425
New cellular module can reference these module porting to be integrated into FreeRTOS Cellular Library.<br>
25-
Please reference cellular common library document for detail information about porting new cellular module.
26+
Please reference [Porting module Guide](https://www.freertos.org/Documentation/api-ref/cellular/cellular_porting_module_guide.html) document for detail information about porting new cellular module.
2627
- <b>Currently Supported Features in FreeRTOS Cellular Library</b>
2728
- User of FreeRTOS Cellular Library is able to use Cat-M1 cellular technology to connect to network.
2829
- User of FreeRTOS Cellular Library is able to perform control plane operations like (initialize modem, register on a network etc.) in a vendor agnostic way.

docs/doxygen/portingCellularModule.dox

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ Reference @subpage cellular_module_urc_handler for detail information.
4242
Three cellular module portings can be referenced.<br>
4343
It is recommended that you start by cloning the implementation of one of the existing modems,<br>
4444
then make modifications where your modem's vendor-specific (non-3GPP) AT commands are different. <br>
45-
- <a href="">BG96</a>
46-
- <a href="">HL7802</a>
47-
- <a href="">SARA R4 series</a>
45+
- <a href="https://github.com/FreeRTOS/FreeRTOS-Cellular-Interface-Reference-Quectel-BG96">BG96</a>
46+
- <a href="https://github.com/FreeRTOS/FreeRTOS-Cellular-Interface-Reference-Sierra-Wireless-HL7802">HL7802</a>
47+
- <a href="https://github.com/FreeRTOS/FreeRTOS-Cellular-Interface-Reference-ublox-SARA-R4">SARA R4 series</a>
4848
*/
4949

5050
/**
Lines changed: 43 additions & 0 deletions
Loading

lexicon.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ closedcallback
150150
cmakelists
151151
cmd
152152
cmdbuf
153+
cmock
153154
com
154155
comm
155156
commad
Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)