Skip to content

Commit 07521b6

Browse files
authored
[Cellular] Use FreeRTOS Cellular Interface to replace the prefix Lab-Project (#39)
* [Cellular] Use FreeRTOS Cellular Interface to replace Lab-Project-FreeRTOS-Cellular-Library * [Cellular] Update the description. * Add CHANGELOG.md
1 parent cefe8c6 commit 07521b6

File tree

2 files changed

+71
-38
lines changed

2 files changed

+71
-38
lines changed

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Change Log for FreeRTOS Cellular Interface Library
2+
3+
## v1.0.0 (September 2021)
4+
5+
This is the first release of the FreeRTOS Cellular Interface library in this repository.
6+
7+
The FreeRTOS Cellular Interface library provides an implementation of the standard AT commands for the [3GPP TS v27.007](https://portal.3gpp.org/desktopmodules/Specifications/SpecificationDetails.aspx?specificationId=1515) and support for the 3 cellular modems [Quectel BG96](https://www.quectel.com/product/bg96.htm), [Sierra Wireless HL7802](https://www.sierrawireless.com/products-and-solutions/embedded-solutions/products/hl7802/) and [U-Blox Sara-R4](https://www.u-blox.com/en/product/sara-r4-series).

README.md

+64-38
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,29 @@
1-
# FreeRTOS Labs - FreeRTOS Cellular Interface Library
1+
# FreeRTOS Cellular Interface
22

33
## On this page:
44
* [Introduction](#Introduction)
55
* [Getting Started](#Getting-Started)
66
* [Download the source code](#Download-the-source-code)
77
* [Folder Structure](#Folder-Structure)
8-
* [API documentation](#API-documentation)
9-
* [Configure and Build](#Configure-and-build-the-libraries)
10-
* [Integrate Cellular Interface with MCU platforms](#Integrate-FreeRTOS-Cellular-Library-with-MCU-platforms)
8+
* [Integrate FreeRTOS Cellular Interface with MCU platforms](#Integrate-FreeRTOS-Cellular-Interface-with-MCU-platforms)
119
* [Adding support for new cellular modems](#Adding-support-for-new-cellular-modems)
10+
* [Building Unit Tests](#Building-Unit-Tests)
11+
* [Generating documentation](#Generating-documentation)
12+
* [Contributing](#Contributing)
1213

1314
## Introduction
1415

15-
The FreeRTOS Cellular Library exposes the capability of a few popular cellular modems through a uniform API. Currently, this Labs project contains libraries for these three cellular modems.
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.
1617

1718
* [Quectel BG96](https://www.quectel.com/product/lte-bg96-cat-m1-nb1-egprs/)
1819
* [Sierra Wireless HL7802](https://www.sierrawireless.com/products-and-solutions/embedded-solutions/products/hl7802/)
1920
* [U-Blox Sara-R4](https://www.u-blox.com/en/product/sara-r4-series)
2021

21-
The current version of the FreeRTOS Cellular Library encapsulates the TCP stack offered by those cellular modems. They all implement the same uniform [Cellular Library API](https://github.com/FreeRTOS/Lab-Project-FreeRTOS-Cellular-Library/raw/main/doc/document/cellular.zip). That API hides the complexity of AT commands, and exposes a socket-like interface to C programmers.
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.
2223

23-
Even though applications can choose to use the FreeRTOS Cellular Library 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 Library. The [FreeRTOS Cellular Demo](https://github.com/FreeRTOS/Lab-Project-FreeRTOS-Cellular-Demo) project uses such an implementation.
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.
2425

25-
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](https://github.com/FreeRTOS/Lab-Project-FreeRTOS-Cellular-Library/tree/main/common) of such standard AT commands in a [reusable common component](https://github.com/FreeRTOS/Lab-Project-FreeRTOS-Cellular-Library/tree/master/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.
26+
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.
2627

2728
The common component that implements the 3GPP TS v27.007 standard has been written in compliance of the following code quality criteria:
2829

@@ -33,61 +34,45 @@ The common component that implements the 3GPP TS v27.007 standard has been writt
3334

3435
### Download the source code
3536

36-
The source code can be downloaded from the FreeRTOS labs or by itself.
37-
3837
To clone using HTTPS:
3938

4039
```
41-
git clone https://github.com/FreeRTOS/Lab-Project-FreeRTOS-Cellular-Library.git
40+
git clone https://github.com/FreeRTOS/FreeRTOS-Cellular-Interface.git
4241
```
4342

4443
Using SSH:
4544

4645
```
47-
git clone [email protected]/FreeRTOS/Lab-Project-FreeRTOS-Cellular-Library.git
46+
git clone [email protected]/FreeRTOS/FreeRTOS-Cellular-Interface.git
4847
```
4948

5049
### Folder structure
5150

5251
At the root of this repository are these folders:
5352

54-
* include : Cellular API definitions
55-
* common : reusable common code that implements the standard AT commands defined by 3GPP TS v27.007
53+
* source/include : Cellular API definitions
54+
* source/include/common : reusable common code that implements the standard AT commands defined by 3GPP TS v27.007
5655
* modules : vendor-specific code that implements non-3GPP AT commands for each cellular modem
57-
* doc : documentations
58-
59-
### API documentation
60-
61-
The pre-generated doxygen documents can be found in [**“doc/document/cellular.zip"**](https://github.com/FreeRTOS/Lab-Project-FreeRTOS-Cellular-Library/raw/main/doc/document/cellular.zip). After unzipping it, the **“celluar/index.html”** file is the entry page.
62-
63-
There is dedicated documentation for the common component that implements the standard AT commands defined by 3GPP TS v27.007. Find that documentation in [**“doc/document/cellular_common.zip”**](https://github.com/FreeRTOS/Lab-Project-FreeRTOS-Cellular-Library/raw/main/doc/document/cellular_common.zip).
64-
65-
### Configure and build the libraries
66-
67-
The FreeRTOS Cellular Library should be built as part of an application. In order to build a library as part of an application, certain configurations must be provided. The [Lab-Project-FreeRTOS-Cellular-Demo](https://github.com/FreeRTOS/Lab-Project-FreeRTOS-Cellular-Demo) project provides an [example](https://github.com/FreeRTOS/Lab-Project-FreeRTOS-Cellular-Demo/blob/master/source/cellular/bg96/cellular_config.h) of how to configure the build. More information can be found within the [Cellular API References](https://www.freertos.org/Documentation/api-ref/cellular/cellular_config.html).
68-
69-
Please refer to the README of [Lab-Project-FreeRTOS-Cellular-Demo](https://github.com/FreeRTOS/Lab-Project-FreeRTOS-Cellular-Demo) project for more information.
56+
* docs : documentations
7057

71-
## Integrate FreeRTOS Cellular Library with MCU platforms
58+
## Integrate FreeRTOS Cellular Interface with MCU platforms
7259

73-
The FreeRTOS Cellular Library runs on MCUs. It use an abstracted interface - the [Comm Interface](https://github.com/FreeRTOS/Lab-Project-FreeRTOS-Cellular-Library/blob/master/include/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/comm_if.html). These are example implementations of the Comm Interface:
60+
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/comm_if.html). These are example implementations of the Comm Interface:
7461

75-
* [FreeRTOS windows simulator comm interface](https://github.com/FreeRTOS/Lab-Project-FreeRTOS-Cellular-Demo/blob/master/source/cellular/comm_if_windows.c)
62+
* FreeRTOS windows simulator comm interface
7663
* [FreeRTOS Common IO UART comm interface](https://github.com/aws/amazon-freertos/blob/feature/cellular/vendors/st/boards/stm32l475_discovery/ports/comm_if/comm_if_uart.c)
7764
* [STM32 L475 discovery board comm interface](https://github.com/aws/amazon-freertos/blob/feature/cellular/vendors/st/boards/stm32l475_discovery/ports/comm_if/comm_if_st.c)
7865
* [Sierra Sensor Hub board comm interface](https://github.com/aws/amazon-freertos/blob/feature/cellular/vendors/sierra/boards/sensorhub/ports/comm_if/comm_if_sierra.c)
7966

80-
The FreeRTOS Cellular Library uses kernel APIs for task synchronization and memory management. Please refer to "cellular/cellular_platform.html" after unzipping the doc to see the needed API.
81-
82-
The [Lab-Project-FreeRTOS-Cellular-Demo](https://github.com/FreeRTOS/Lab-Project-FreeRTOS-Cellular-Demo) project has implemented such kernel APIs by using FreeRTOS primitives. If the target platform is FreeRTOS, [this implementation](https://github.com/FreeRTOS/Lab-Project-FreeRTOS-Cellular-Demo/blob/master/source/cellular/cellular_platform.c) provides a pre-integrated interface. If your platform is not FreeRTOS, you need to re-implement the APIs contained in [this file](https://github.com/FreeRTOS/Lab-Project-FreeRTOS-Cellular-Demo/blob/master/source/cellular/cellular_platform.c).
67+
The FreeRTOS Cellular Interface uses kernel APIs for task synchronization and memory management.
8368

8469
## Adding support for new cellular modems
8570

86-
FreeRTOS Labs 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/Lab-Project-FreeRTOS-Cellular-Library/tree/master/common) that has already implemented the 3GPP standard AT commands.
71+
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.
8772

8873
In order to port the [common component](https://www.freertos.org/Documentation/api-ref/cellular_common/index.html):
8974

90-
1. Implement the cellular modem porting interface defined in [cellular_common_portable.h](https://github.com/FreeRTOS/Lab-Project-FreeRTOS-Cellular-Library/blob/main/common/include/cellular_common_portable.h). ([Documentation](https://www.freertos.org/Documentation/api-ref/cellular_common/cellular__common__portable_8h.html))
75+
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).
9176
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_common/cellular_common_APIs.html).
9277
3. Implement Cellular Library callback functions that handle vendor-specific (non-3GPP) Unsolicited Result Code (URC). The URC handlers to be implemented are the ones not marked with an “o” in [this table](https://www.freertos.org/Documentation/api-ref/cellular_common/cellular_common_URC_handlers.html).
9378

@@ -96,7 +81,48 @@ It is recommended that you start by cloning the implementation of one of the exi
9681

9782
Current Example Implementations:
9883

99-
* [Quectel BG96](https://github.com/FreeRTOS/Lab-Project-FreeRTOS-Cellular-Library/tree/master/modules/bg96)
100-
* [Sierra Wireless HL7802](https://github.com/FreeRTOS/Lab-Project-FreeRTOS-Cellular-Library/tree/main/modules/hl7802)
101-
* [U-Blox Sara-R4](https://github.com/FreeRTOS/Lab-Project-FreeRTOS-Cellular-Library/tree/main/modules/sara_r4)
84+
* [Quectel BG96](https://github.com/FreeRTOS/FreeRTOS-Cellular-Interface/tree/main/modules/bg96)
85+
* [Sierra Wireless HL7802](https://github.com/FreeRTOS/FreeRTOS-Cellular-Interface/tree/main/modules/hl7802)
86+
* [U-Blox Sara-R4](https://github.com/FreeRTOS/FreeRTOS-Cellular-Interface/tree/main/modules/sara_r4)
87+
88+
## Building Unit Tests
89+
90+
### Checkout CMock Submodule
91+
By default, the submodules in this repository are configured with `update=none` in [.gitmodules](.gitmodules) to avoid increasing clone time and disk space usage of other repositories (like [amazon-freertos](https://github.com/aws/amazon-freertos) that submodules this repository).
92+
93+
94+
To build unit tests, the submodule dependency of CMock is required. Use the following command to clone the submodule:
95+
```
96+
git submodule update --checkout --init --recursive --test/unit-test/CMock
97+
```
98+
99+
### Platform Prerequisites
100+
101+
- For building the unit tests, **CMake 3.13.0** or later and a **C90 compiler**.
102+
- For running unit tests, **Ruby 2.0.0** or later is additionally required for the CMock test framework (that we use).
103+
- For running the coverage target, **gcov** and **lcov** are additionally required.
104+
105+
### Steps to build unit tests
106+
107+
1. Go to the root directory of this repository. (Make sure that the **CMock** submodule is cloned as described [above](#checkout-cmock-submodule).)
108+
109+
1. Run the *cmake* command: `cmake -S test -B build`
110+
111+
1. Run this command to build the library and unit tests: `make -C build all`
112+
113+
1. The generated test executables will be present in `build/bin/tests` folder.
114+
115+
1. Run `cd build && ctest` to execute all tests and view the test run summary.
116+
117+
## Generating documentation
118+
119+
The Doxygen references were created using Doxygen version 1.9.2. To generate the
120+
Doxygen pages, please run the following command from the root of this repository:
121+
122+
```shell
123+
doxygen docs/doxygen/config.doxyfile
124+
```
125+
126+
## Contributing
102127

128+
See [CONTRIBUTING.md](./.github/CONTRIBUTING.md) for information on contributing.

0 commit comments

Comments
 (0)