Skip to content

Commit 19c5242

Browse files
author
Amanda Butler
authored
Edit CellularInterface.md
Edit file, mostly for active voice and minor grammar changes.
1 parent 6ddde69 commit 19c5242

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

docs/porting/connectivity/CellularInterface.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ For example,
3333
}
3434
```
3535

36-
In addition you need to map onboard modem pin aliases to your target board pin names and polarity in `targets/TARGET_FAMILY/YOUR_TARGET/PinNames.h`. If any of the pins are not connected, mark it 'NC'. An example UART configuration is shown below:
36+
In addition, you need to map onboard modem pin aliases to your target board pin names and polarity in `targets/TARGET_FAMILY/YOUR_TARGET/PinNames.h`. If any pin is not connected, mark it 'NC'. An example UART configuration is shown below:
3737

3838
```
3939
typedef enum {
@@ -56,13 +56,13 @@ typedef enum {
5656
5757
```
5858

59-
If your board has an onboard modem, you need to implement `NetworkInterface::get_target_default_instance` that instantiates the default cellular device driver for your modem with the default pin configurations and power up/down functionality. Typically onboard drivers are named as `ONBOARD_xxx.cpp` in your Mbed OS target folder, where `xxx` stands for a cellular device modem driver. You may need to create a new cellular device driver class for your modem in the `features/cellular/framework/targets/` folder, if not already existing.
59+
If the board has an onboard modem, you need to implement `NetworkInterface::get_target_default_instance`, which instantiates the default cellular device driver for your modem with the default pin configurations and power up/down functionality. Typically, onboard drivers are named `ONBOARD_xxx.cpp` in the Mbed OS target folder, where `xxx` stands for a cellular device modem driver. You may need to create a new cellular device driver class for your modem in the `features/cellular/framework/targets/` folder.
6060

6161
### Adding a new cellular device driver
6262

63-
A generic cellular driver `features/cellular/framework/targets/GENERIC/GENERIC_AT3GPP/GENERIC_AT3GPP.cpp` class inheriting [AT_CellularDevice](https://os.mbed.com/docs/development/mbed-os-api-doxy/_a_t___cellular_device_8h_source.html) has been written to serve as a default driver for porting. It uses only the standard AT commands from 3GPP TS 27.007 to communicate with a modem. You need to copy the generic class and modify its `cellular_properties array` to define which features are supported by your modem. You may also need to override any non-standard AT commands in AT_xxx classes implementing cellular APIs. Please check other drivers to see how they are done, in order to find out what methods are typically overridden.
63+
A generic cellular driver `features/cellular/framework/targets/GENERIC/GENERIC_AT3GPP/GENERIC_AT3GPP.cpp` class inheriting [AT_CellularDevice](https://os.mbed.com/docs/development/mbed-os-api-doxy/_a_t___cellular_device_8h_source.html) is the default driver for porting. It uses only the standard AT commands from 3GPP TS 27.007 to communicate with a modem. You need to copy the generic class and modify its `cellular_properties array` to define which features your modem supports. You may also need to override any nonstandard AT commands in AT_xxx classes implementing cellular APIs. Please view other drivers as examples to determine which methods to override.
6464

65-
In addition to the driver class you need to copy and modify `features/cellular/framework/targets/GENERIC/GENERIC_AT3GPP/mbed_lib.json` that defines correct pins and other setup for your modem.
65+
In addition to the driver class, you need to copy and modify `features/cellular/framework/targets/GENERIC/GENERIC_AT3GPP/mbed_lib.json`, which defines correct pins and other setup for your modem.
6666

6767
### Socket adaptation
6868

@@ -71,15 +71,15 @@ You can implement the socket API in two ways:
7171
- Use the IP stack on the cellular module (AT mode).
7272
- Use the LWIP stack on Mbed OS (PPP mode).
7373

74-
A modem can support both the AT and PPP modes, but an application developer needs to select at compile time which mode should be used. PPP and/or AT mode selection is made in the application's `mbed_app.json` configuration file using the `lwip.ppp-enabled` flag.
74+
A modem can support both the AT and PPP modes, but an application developer needs to select at compile time which mode should be used. PPP and AT mode selection occur in the application's `mbed_app.json` configuration file using the `lwip.ppp-enabled` flag.
7575

7676
If the modem supports PPP mode, you can use the LWIP stack to handle sockets and IP connectivity for your modem. If your cellular module has an IP stack, you need to implement AT commands to control network sockets. For example implementations of a socket adaptation, look in `features/cellular/framework/targets`.
7777

7878
When the modem has AT and/or PPP mode support in place and the application developer has selected which mode to use, it's up to the cellular framework to instantiate the correct classes. For example, [mbed-os-example-cellular](https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-cellular/) instantiates [CellularContext class](https://os.mbed.com/docs/development/mbed-os-api-doxy/_cellular_context_8h_source.html). CellularContext instantiates classes implementing [the AT command layer](https://os.mbed.com/docs/development/mbed-os-api-doxy/_a_t___cellular_device_8h_source.html) between the modem and the Mbed OS CPU. If an application developer has configured PPP mode in `mbed_app.json`, then [AT_CellularContext](https://os.mbed.com/docs/development/mbed-os-api-doxy/_a_t___cellular_context_8h_source.html) connects to a cellular network and calls `nsapi_ppp_connect()` to start the data call through the PPP pipe using LWIP sockets.
7979

8080
### Testing
8181

82-
Once you have your Mbed OS target and cellular device drivers implemented verify them by running `mbed-greentea` tests.
82+
Once you have implemented the cellular device drivers on the Mbed OS target, verify them by running `mbed-greentea` tests.
8383

8484
To run the tests:
8585

@@ -89,10 +89,10 @@ To run the tests:
8989
mbed test --compile-list
9090
```
9191
92-
1. Run Mbed OS Network interface tests, see [Network Interface test plan](https://github.com/ARMmbed/mbed-os/blob/master/TESTS/network/interface/README.md).
92+
1. Run Mbed OS Network interface tests. Please see the [Network Interface test plan](https://github.com/ARMmbed/mbed-os/blob/master/TESTS/network/interface/README.md) for more details.
9393
94-
1. Run Mbed OS Socket tests, see [Network Socket test plan](https://github.com/ARMmbed/mbed-os/blob/master/TESTS/netsocket/README.md).
94+
1. Run Mbed OS Socket tests. Please see the [Network Socket test plan](https://github.com/ARMmbed/mbed-os/blob/master/TESTS/netsocket/README.md) for more details.
9595
96-
For more information on the `mbed-greentea` test suite, please visit [its documentation](../tools/greentea-testing-applications.html).
96+
For more information on the `mbed-greentea` test suite, please visit [its documentation](../tools/greentea-testing-applications.html).
9797
98-
You may also find [mbed-os-example-cellular](https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-cellular/) useful for testing.
98+
You may also find the [Mbed OS cellular example](https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-cellular/) useful for testing.

0 commit comments

Comments
 (0)