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
IP Networking in Mbed OS is layered in three clearly defined API levels. In the diagram below,
4
-
the layers are shown next to closest matching [OSI model](https://en.wikipedia.org/wiki/OSI_model) layers.
3
+
IP Networking in Mbed OS is layered in three clearly defined API levels. The diagram below shows the layers next to the closest matching [OSI model](https://en.wikipedia.org/wiki/OSI_model) layers.
Following sections introduce the APIs and technologies implemented in each level.
7
+
The following sections introduce the APIs and technologies implemented in each level.
9
8
10
9
#### Socket API
11
10
12
-
Socket API is the common API between all IP connectivity methods. All network stacks in Mbed OS
13
-
provide the same Socket API, making applications portable between different connectivity methods
14
-
or even stacks.
11
+
The Socket API is the common API among all IP connectivity methods. All network stacks in Mbed OS provide the same Socket API, making applications portable among different connectivity methods or even stacks.
15
12
16
-
In OSI model, Socket API relates to layer 4, Transport layer. In Mbed OS Socket API supports
17
-
both [TCP](https://en.wikipedia.org/wiki/Transmission_Control_Protocol) and [UDP](https://en.wikipedia.org/wiki/User_Datagram_Protocol) protocols.
13
+
In the OSI model, the Socket API relates to layer 4, the Transport layer. In Mbed OS, the Socket API supports both [TCP](https://en.wikipedia.org/wiki/Transmission_Control_Protocol) and [UDP](https://en.wikipedia.org/wiki/User_Datagram_Protocol) protocols.
18
14
19
15
Refer to [TODO:Socket API](networksockets.md) reference for usage instructions.
20
16
21
-
#### IP Stacks
17
+
#### IP stacks
22
18
23
-
Mbed OS has three options to select for IP stack. Two build-in IP stack or external IP
24
-
stack provided by the connectivity module.
19
+
Mbed OS has three options to select for the IP stack. The connectivity modules provides two built-in IP stacks or an external IP stack.
As shown from the diagram above, all stacks implement the same Socket API and
29
-
therefore application developer rarely needs to know which stack is going to be used.
30
-
Mbed OS chooses one at the build time and usually it is LwIP.
23
+
As the diagram above shows, all stacks implement the same Socket API. Therefore, the application developer rarely needs to know which stack is going to be used. Mbed OS chooses one at the build time, and usually it is LwIP.
31
24
32
-
Some external WiFi modules and most cellular modules are in fact external IP stacks from
33
-
application point of view. In that case the network driver implements actually the full Network
34
-
stack API. These drivers are usually driving the module through AT-command type of interface.
35
-
It saves RAM and Flash to use external IP module but depending on its driver and AT-command
36
-
interface, it might not properly match the full Socket API.
25
+
Some external Wi-Fi modules and most cellular modules are in fact external IP stacks from the application point of view. In that case, the network driver implements the full Network stack API. These drivers usually drive the module through an AT-command type of interface. Using an external IP module saves RAM and Flash, but depending on the driver and AT-command interface, it might not properly match the full Socket API.
37
26
38
-
Following table summarises different stacks, usecases and their limitations.
27
+
The following table summarizes different stacks, use cases and their limitations.
|External IP module|depends on the module|(Save RAM/Flash)|Depends on the module. Usually poor match to Socket API|
33
+
|External IP module|Depends on the module|(Save RAM/Flash)|Depends on the module. Usually poor match to Socket API|
45
34
46
35
##### Configuring the IP stack interface
47
36
48
-
Depending on the Layer 3, Network layer, protocol used, there are different ways of configuring
49
-
the interface. It also depends on the stack used, which configurations are supported on each
50
-
link layer.
37
+
Depending on the Layer 3, Network layer, protocol used, there are different ways to configure the interface. It also depends on the stack used, which configurations are supported on each link layer.
51
38
52
39
|Stack|Data link layer|Network layer|Configurations supported|
|Nanostack|Ethernet|IPv6|static or [RFC 4862](https://tools.ietf.org/html/rfc4862) IPv6 Stateless Address Autoconfiguration. No DHCPv6 support|
58
45
|Nanostack|IEEE 802.15.4|6LoWPAN|Thread or 6LoWPAN-ND+RPL|
59
46
60
-
61
47
#### Network interfaces
62
48
63
-
Network inteface is the application level API where user chooses the driver, connectivity method
64
-
and IP stack. As each connectivity methods differ on how to configure them, these APIs are
65
-
noninterchangeable and requires application developer to choose one. Choosing the interface, also
66
-
automatically pulls in the network stack as a dependency.
49
+
Network intefaces are the application level APIs where users choose the driver, connectivity method and IP stack. Each connectivity methods requires different configuration,so these APIs are not interchangeable. The application developer must choose one. Choosing the interface also automatically pulls in the network stack as a dependency.
67
50
68
-
Please note that Interface API is not the same as network driver.
69
-
Interface API is the control interface for application. Network driver implements the controlling
70
-
API only if it requires configuration from application. From application point of view, there
71
-
is no difference, but network driver developer needs to be aware of that.
51
+
Please note that the interface API is not the same as the network driver. The interface API is the control interface for the application. The network driver implements the controlling API only if it requires configuration from application. From the application point of view, there is no difference, but the network driver developer needs to be aware of that.
72
52
73
-
Mbed OS implements following network interface APIs
53
+
Mbed OS implements the following network interface APIs:
74
54
75
-
* Ethernet
76
-
* WiFi
77
-
* Cellular (PPP)
78
-
* 6LoWPAN-ND mesh networking
79
-
* Thread mesh networking.
55
+
- Ethernet.
56
+
- WiFi.
57
+
- Cellular (PPP).
58
+
- 6LoWPAN-ND mesh networking.
59
+
- Thread mesh networking.
80
60
81
61
Refer to [TODO: sockets/interface API reference](api/connectivity/networkinterface.md) for usage instructions.
82
62
83
63
#### Network driver
84
64
85
-
Network driver is a generic term to describe different APIs for connecting networking device to
86
-
IP stack or Socket API. Each driver API has their own architecture described below.
65
+
The network driver is a generic term to describe different APIs for connecting networking device to the IP stack or Socket API. Below is a description of each driver API.
Ethernet drivers are implemented using stack independent EMAC API. As Ethernet driver requires
93
-
no configuration, it does not implement any controlling interface for Application.
71
+
Ethernet drivers are implemented using the stack-independent EMAC API. Because the Ethernet driver requires no configuration, it does not implement any controlling interface for the application.
There are two form of WiFi drivers in Mbed OS depending on which protocol layer it implements.
100
-
WiFi drivers are either special case of Ethernet driver or they are external IP stacks. WiFi
101
-
drivers require configuration from application, and therefore implement both, the low level EMAC API or Network stack API and high level controlling interface API called `WiFiInterface`.
77
+
There are two types of Wi-Fi drivers in Mbed OS, depending on which protocol layer it implements. Wi-Fi drivers are either a special case of Ethernet driver or external IP stacks. Wi-Fi drivers require configuration from an application and, therefore, implement both the low level EMAC API or Network stack API and the high level controlling interface API called `WiFiInterface`.
As with WiFi, cellular drivers have same two separate cases. If they use external IP stack,
108
-
driver implements the Network stack API. If they use internal IP stack, LwIP, then they
109
-
implement Serial PPP driver.
83
+
Cellular drivers have the same two separate cases as Wi-Fi. If they use an external IP stack, the driver implements the Network stack API. If they use the internal IP stack, LwIP, then they implement the Serial PPP driver.
On Mesh networks, Nanostack uses IEEE 802.15.4 radios for transmitting and receiving packets.
116
-
The RF driver implements the `NanostackRfPhy` API.
89
+
On Mesh networks, Nanostack uses IEEE 802.15.4 radios for transmitting and receiving packets. The RF driver implements the `NanostackRfPhy` API.
117
90
118
-
This driver type has not other usecases so it is implemented in C using Nanostack specific API.
91
+
This driver type has no other use cases, so it is implemented in C using a Nanostack-specific API.
119
92
120
-
See sections [Technology/6LoWPAN Mesh](quick_start_intro.md) and [Porting new RF driver for 6LoWPAN Stack](porting-new-rf-driver-for-6lowpan-stack)
121
-
for more information.
93
+
Please see the [6LoWPAN Mesh technology section](quick_start_intro.md) and [Porting a new RF driver for the 6LoWPAN stack](porting-new-rf-driver-for-6lowpan-stack) for more information.
0 commit comments