Skip to content

Commit b0b01f9

Browse files
Mika LeppänenSeppo Takalo
authored andcommitted
Updated ethernet and wifi interface description
1 parent 6cabaa1 commit b0b01f9

File tree

2 files changed

+31
-3
lines changed

2 files changed

+31
-3
lines changed

docs/reference/api/connectivity/networksocket/EthInterface.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ For EthernetInterface, there are two possible configurations:
4242

4343
Refer to the API below for how to set the IP addresses by calling the `set_network()` function.
4444

45+
### Troubleshooting information
46+
47+
Network interface `connect` failure causes:
48+
1. `NSAPI_ERROR_NO_CONNECTION` indicates that Ethernet link up has failed. Check that the Ethernet connection is working.
49+
1. `NSAPI_ERROR_DHCP_FAILURE` indicates that acquiring IP address has failed. Check that the IP address configuration service is working.
50+
4551
### EthInterface class reference
4652

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

docs/reference/api/connectivity/networksocket/WifiInterface.md

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,42 @@
44

55
The WifiInterface provides a simple C++ API for connecting to the internet over a Wi-Fi device.
66

7-
There are multiple [Wi-Fi components](https://os.mbed.com/components/cat/wifi/) that implement the WiFiInterface class. The example below uses the [ESP8266Interface](https://github.com/armmbed/esp8266-driver).
7+
There are multiple [Wi-Fi components](https://os.mbed.com/components/cat/wifi/) that implement the WiFiInterface class. The example below uses the [ESP8266Interface](https://github.com/armmbed/esp8266-driver) and
8+
[OdinWiFiInterface](https://github.com/u-blox/ublox-odin-w2-drivers-docs-mbed-5).
9+
10+
ESP8266Interface uses AT commands over serial interface to connect to external Wi-Fi device. OdinWiFiInterface provides Ethernet like driver to Mbed OS network stack. Network stack uses the driver to connect to Wi-Fi.
811

912
### Wi-Fi class reference
1013

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

1316
### Usage
1417

15-
To bring up the network interface:
18+
To bring up the network interface of external Wi-Fi device (for example, the ESP8266Interface):
19+
20+
1. Instantiate an implementation of the WiFiInterface class.
21+
1. Initialises AT command parser.
22+
1. Call the `connect` function with an SSID and password for the Wi-Fi network.
23+
1. Commands Wi-Fi device to connect to network.
24+
1. Once connected, the WiFiInterface can be used as a target for opening [network sockets](/docs/development/reference/network-socket.html).
25+
26+
To bring up the network interface of Ethernet like driver (for example, the OdinWiFiInterface):
1627

17-
1. Instantiate an implementation of the WiFiInterface class (for example, the ESP8266Interface).
28+
1. Instantiate an implementation of the WiFiInterface class.
29+
1. Initialises Wifi driver for the target.
30+
1. Initialises network stack (LWIP).
1831
1. Call the `connect` function with an SSID and password for the Wi-Fi network.
32+
1. Wi-Fi driver connects to Wi-Fi network.
33+
2. Network stack accuires IP address and DNS server address.
34+
1935
1. Once connected, the WiFiInterface can be used as a target for opening [network sockets](/docs/development/reference/network-socket.html).
2036

37+
### Troubleshooting information
38+
39+
Network interface `connect` failure reasons:
40+
1. Check that SSID and password are correct.
41+
1. Check that the IP address configuration service is working.
42+
2143
### Wi-Fi example
2244

2345
Here is an example of an HTTP client program. The program brings up an ESP8266 as the underlying network interface, and uses it to perform an HTTP transaction over a TCPSocket:

0 commit comments

Comments
 (0)