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/api/connectivity/networksocket/networkinterface.md
+20-18Lines changed: 20 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -13,15 +13,16 @@ Network interface is also the controlling API for application to specify network
13
13
14
14
### Network status updates
15
15
16
-
Application may choose to registed callback for monitoring status changes from network interfaces. This is done by using following API.
16
+
An application may choose to register a callback to monitoring status changes from network interfaces. The application can do this by using the following API:
17
17
18
18
-[Network status](network-status.html): API for monitoring network status changes.
19
19
20
20
### Default network interface
21
21
22
-
In Mbed OS, targets that provide network connectivity, provide also default network interface. This can be either Ethernet, WiFi, mesh or cellular. Using default interface allows applications to be easily ported to different targets and different connectivity options.
22
+
In Mbed OS, targets that provide network connectivity also provide a default network interface. This can be Ethernet, Wi-Fi, mesh or cellular. Using a default interface allows you to port applications to different targets and connectivity options.
23
+
24
+
The following example uses a default interface to connect to the network:
23
25
24
-
Following example uses default interface for connecting to network:
This example works on all IP based connectivity options supported by Mbed OS. Configuration for default interface is provided by the Mbed OS configuration system on the build time, so on a run time you can just call `connect()` without any parameters.
37
+
This example works on all IP-based connectivity options that Mbed OS supports. The Mbed OS configuration system provides configuration for the default interface at build time, so at run time, you can just call `connect()` without any parameters.
38
+
39
+
For example, when providing Wi-Fi SSID and password, you may use the following `mbed_app.json`:
37
40
38
-
For example, when providing WiFi SSID and password, following `mbed_app.json` may be used:
39
41
```
40
42
{
41
43
"target_overrides": {
@@ -49,26 +51,26 @@ For example, when providing WiFi SSID and password, following `mbed_app.json` ma
49
51
}
50
52
```
51
53
52
-
Please see [Selecting the default network interface](configuration-connectivity.html#selecting-the-default-network-interface) for information of how to supply required configuration parameters on different connections.
54
+
Please see [Selecting the default network interface](configuration-connectivity.html#selecting-the-default-network-interface) for information about how to supply required configuration parameters on different connections.
53
55
54
-
For targets that provide more than one type of connectivity, you may choose the default by overriding `target.network-default-interface-type` configuration variable.
56
+
For targets that provide more than one type of connectivity, you may choose the default by overriding the `target.network-default-interface-type` configuration variable.
55
57
56
-
Applications may also ask for specific type of connection, as shown in following table:
58
+
Applications may also ask for a specific type of connection, as the following table shows:
57
59
58
60
|Method|What connectivity is returned| Requirements |
|`*EthInterface::get_default_instance()`| Wired Ethernet interface, not WiFi.| none |
62
-
|`*MeshInterface::get_default_instance()`| Returns either `LoWPANNDInterface` or `ThreadInterface` depending on which is set to default | Target provides a driver or macro `DEVICE_802_15_4_PHY` is enabled |
|`*EthInterface::get_default_instance()`| Wired Ethernet interface, not Wi-Fi| none |
64
+
|`*MeshInterface::get_default_instance()`| Returns either `LoWPANNDInterface` or `ThreadInterface`, depending on which is set to default | Target provides a driver or macro `DEVICE_802_15_4_PHY` is enabled |
0 commit comments