Skip to content

Commit 3d1cb4b

Browse files
author
Ari Parkkila
committed
Cellular: Added description about how modem is configured
1 parent c22df90 commit 3d1cb4b

File tree

1 file changed

+22
-7
lines changed

1 file changed

+22
-7
lines changed

docs/reference/technology/connectivity/cellular.md

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,34 @@ Mbed OS already supports several Mbed Enabled boards with on-board cellular modu
2222

2323
### Quick start
2424

25-
There are two phases to Mbed OS connectivity:
25+
There are two phases to Mbed OS connectivity, in general:
2626

2727
1. Connect to a network.
2828
1. Open a socket to send or receive data.
2929

30-
The easiest way to connect your application to the internet over a cellular network is to use the `CellularConnectionFSM` class. It encapsulates most of the complexity of connecting to the cellular network and also reports any changes in connection status to your application. When connected to a cellular network, you can use Mbed OS network sockets as usual, as Figure 2 illustrates.
30+
With cellular, the easiest way to connect your application to the internet over a cellular network is to use the `CellularConnectionFSM` class. It encapsulates most of the complexity of connecting to the cellular network and also reports any changes in connection status to your application. When connected to a cellular network, you can use Mbed OS network sockets as usual, as Figure 2 illustrates.
3131

3232
<span class="images">![](https://s3-us-west-2.amazonaws.com/mbed-os-docs-images/api-cellular-quick-start.png)<span>Figure 2. Connect to cellular network and open a socket</span></span>
3333

34-
If you want to see code, you can go to our [cellular example](https://github.com/ARMmbed/mbed-os-example-cellular) or
35-
our [advanced cellular example](https://github.com/ARMmbed/mbed-os-example-cellular-advanced).
34+
If you want to see code, you can go to our [cellular example](https://github.com/ARMmbed/mbed-os-example-cellular).
3635

37-
### Cellular connection management
36+
### Cellular Module
3837

39-
Applications can use cellular APIs to fine-control the cellular connection. Cellular APIs are structured based on main functionalities:
38+
If you are using an Mbed OS target that has a supported on-board (mounted) cellular module then cellular framework decides the correct cellular module at compile-time. You can run `mbedls` to find out your current Mbed OS target and then match that to the supported targets in the `CellularTargets.h` file, where a CELLULAR_DEVICE macro is defined based on the Mbed OS target definition and can be used as a C++ class type to instantiate a driver class (inherited from `CellularDevice.h`).
39+
40+
Some Mbed OS target boards may have several different kind of cellular modules on-board. In that case, the cellular module driver detects at runtime the actual module that is currently mounted and adapts to that specific cellular module during runtime.
41+
42+
If you use an Mbed OS target and a separate cellular module via a serial line (UART), you need to configure in your `mbed_app.json` configuration file which cellular module to use and which UART pins are connected between the Mbed OS target board and the cellular module:
43+
44+
`"CELLULAR_DEVICE=<manufacturer-module>", "MDMRXD=<rx-pin-name>", "MDMTXD=<tx-pin-name>"`
45+
46+
You can browse `CellularTargets.h` file to find out if your <manufacturer-module> is already supported, or if you can adapt some existing driver for your needs. You need to change the pin-names above to actual pins, such as D0 and D1, according to your Mbed target. You may also need to define MDMRTS and MDMCTS pins if you have RTS/CTS connected on UART.
47+
48+
### Cellular APIs
49+
50+
As an application developer, you should use and refer only to classes located under API folder. All the other classes have implementation details which are expected to change frequently.
51+
52+
Cellular APIs are structured based on main functionalities:
4053

4154
- `CellularNetwork` for cellular network features, such as preferred operator and APN.
4255
- `CellularPower` for cellular module power control, such as enabling power save.
@@ -74,7 +87,7 @@ You can enable PPP mode and also configure LWIP features in the application conf
7487

7588
#### AT mode with the IP stack on the modem
7689

77-
In AT mode, the modem's internal IP stack is used over an AT link. Sockets are part of the IP stack, so AT commands are used to control sockets. Socket AT commands are modem specific, and need to be implemented on the Mbed OS side. You can browse ``CellularStack`` under the ``cellular/targets`` folder to find out how your hardware supports AT sockets.
90+
In AT mode, the modem's internal IP stack is used over an AT link. Sockets are part of the IP stack, so AT commands are used to control sockets. Socket AT commands are modem specific, and need to be implemented on the Mbed OS side. You can browse `CellularStack` under the `cellular/targets` folder to find out how your hardware supports AT sockets.
7891

7992
The AT mode is enabled when the PPP mode is not enabled:
8093

@@ -137,6 +150,8 @@ Non-IP is a new option for communication over NB-IoT. The device sends messages
137150

138151
For DTLS and TLS transport security, even if the device maintains its own IP address during power save periods, the address may be changed in the network due to Network Address Translation (NAT). NAT is a mechanism to share the few IPv4 addresses among more users. The NAT address change necessitates renegotiation of the (D)TLS security session. The TLS and DTLS protocols support session ID and session ticket mechanisms to optimize the renegotiation. Both device and (D)TLS server must support the used mechanism.
139152

153+
To read more about security, see [Arm Mbed TLS](https://os.mbed.com/docs/latest/reference/tls.html).
154+
140155
### Class reference
141156

142157
[![View code](https://www.mbed.com/embed/?type=library)](https://os-doc-builder.test.mbed.com/docs/development/mbed-os-api-doxy/classmbed_1_1_cellular_device.html)

0 commit comments

Comments
 (0)