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: docs/reference/technology/connectivity/cellular.md
+22-7Lines changed: 22 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -22,21 +22,34 @@ Mbed OS already supports several Mbed Enabled boards with on-board cellular modu
22
22
23
23
### Quick start
24
24
25
-
There are two phases to Mbed OS connectivity:
25
+
There are two phases to Mbed OS connectivity, in general:
26
26
27
27
1. Connect to a network.
28
28
1. Open a socket to send or receive data.
29
29
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.
31
31
32
32
<spanclass="images"><span>Figure 2. Connect to cellular network and open a socket</span></span>
33
33
34
-
If you want to see code, you can go to our [cellular example](https://github.com/ARMmbed/mbed-os-example-cellular) or
If you want to see code, you can go to our [cellular example](https://github.com/ARMmbed/mbed-os-example-cellular).
36
35
37
-
### Cellular connection management
36
+
### Cellular Module
38
37
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:
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:
40
53
41
54
-`CellularNetwork` for cellular network features, such as preferred operator and APN.
42
55
-`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
74
87
75
88
#### AT mode with the IP stack on the modem
76
89
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.
78
91
79
92
The AT mode is enabled when the PPP mode is not enabled:
80
93
@@ -137,6 +150,8 @@ Non-IP is a new option for communication over NB-IoT. The device sends messages
137
150
138
151
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.
139
152
153
+
To read more about security, see [Arm Mbed TLS](https://os.mbed.com/docs/latest/reference/tls.html).
0 commit comments