Skip to content

Commit 1e2873b

Browse files
author
AnotherButler
committed
Fix network heading levels
Adjust network socket and interfaces heading levels, so TOC makes sense.
1 parent 245b701 commit 1e2873b

19 files changed

+120
-120
lines changed

docs/api/light-control.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
<h1 id="light-control">Light control tutorial</h1>
1+
<h2 id="light-control">Light control tutorial</h2>
22

33
The application below demonstrates a simple light control application, where devices can control the LED status of all devices in the network. You can build the application for the unsecure 6LoWPAN-ND or Thread network.
44

5-
## Download the application
5+
### Download the application
66

77
```
88
mbed import mbed-os-example-mesh-minimal
@@ -13,11 +13,11 @@ Or click `Import into Mbed IDE` in the example below:
1313

1414
[![View code](https://www.mbed.com/embed/?url=https://github.com/ARMmbed/mbed-os-example-mesh-minimal)](https://github.com/ARMmbed/mbed-os-example-mesh-minimal/blob/mbed-os-5.14/mesh_led_control_example.cpp)
1515

16-
## Change the channel settings (optional)
16+
### Change the channel settings (optional)
1717

1818
See the file `mbed_app.json` for an example of defining an IEEE 802.15.4 channel to use.
1919

20-
## Selecting optimal Nanostack configuration
20+
### Selecting optimal Nanostack configuration
2121

2222
To optimize the flash usage, select a proper configuration for Nanostack. The configuration depends mostly on the preferred use case.
2323

@@ -68,7 +68,7 @@ The following tables show the values to use in the `mbed_app.json` file for your
6868
- For a 6LoWPAN-ND based network, use `nsapi.default-mesh-type: LOWPAN`.
6969
- For a Thread-based network, use `nsapi.default-mesh-type: THREAD`.
7070

71-
### 6LoWPAN-ND
71+
#### 6LoWPAN-ND
7272

7373
**nsapi.default-mesh-type: LOWPAN**
7474

@@ -77,7 +77,7 @@ The following tables show the values to use in the `mbed_app.json` file for your
7777
|Mesh router (default) | lowpan_router | NET_6LOWPAN_ROUTER |
7878
|Nonrouting device | lowpan_host | NET_6LOWPAN_HOST |
7979

80-
### Thread
80+
#### Thread
8181

8282
**nsapi.default-mesh-type: THREAD**
8383

@@ -86,7 +86,7 @@ The following tables show the values to use in the `mbed_app.json` file for your
8686
|Mesh router (default) | thread_router | MESH_DEVICE_TYPE_THREAD_ROUTER |
8787
|Nonrouting device | thread_end_device | MESH_DEVICE_TYPE_THREAD_SLEEPY_END_DEVICE |
8888

89-
#### Thread commissioning
89+
##### Thread commissioning
9090

9191
By default, the Thread application uses the static network link configuration defined in the [mesh API configuration file](https://github.com/ARMmbed/mbed-os/blob/master/features/nanostack/mbed-mesh-api/mbed_lib.json).
9292
If you want to commission a Thread device, see [how to commission a Thread device in practice](../reference/thread-tech.html#thread-commissioning).
@@ -100,7 +100,7 @@ The Thread stack learns the network settings from the commissioning process and
100100
- Commission the device to the Thread network.
101101
- When you restart the device next time, the device reads the Thread configuration settings from the SD card and tries to attach to an existing network.
102102

103-
## Requirements for hardware
103+
### Requirements for hardware
104104

105105
The networking stack in this example requires TLS functionality to be enabled on Mbed TLS. On devices where hardware entropy is not present, TLS is disabled by default. This results in compile time failures or linking failures.
106106

@@ -110,7 +110,7 @@ See [Notes on different hardware](https://github.com/ARMmbed/mbed-os-example-mes
110110

111111
You also need to check how LEDs and buttons are configured for your hardware, and update the `.json` file accordingly.
112112

113-
## Changing the radio driver
113+
### Changing the radio driver
114114

115115
To run a 6LoWPAN-ND network, you need a working RF driver for Nanostack. This example uses the Atmel AT86RF233 by default.
116116

@@ -121,23 +121,23 @@ To change the RF driver, modify the `mbed_app.json` file by setting preferred RF
121121
"mcr20a.provide-default": true
122122
```
123123

124-
## Compile the application
124+
### Compile the application
125125

126126
```
127127
mbed compile -m K64F -t GCC_ARM
128128
```
129129

130130
A binary is generated in the end of the build process.
131131

132-
## Connect the RF shield to the board
132+
### Connect the RF shield to the board
133133

134134
This example uses the Atmel AT86RF233, which you can [purchase](https://firefly-iot.com/product/firefly-arduino-shield-2-4ghz/). Place the shield on top of your board, and power it on.
135135

136-
## Program the target
136+
### Program the target
137137

138138
Drag and drop the binary to the target to program the application.
139139

140-
## Update the firmware of the border router
140+
### Update the firmware of the border router
141141

142142
This example supports the following border router:
143143

@@ -147,7 +147,7 @@ The border router supports static and dynamic backhaul configuration. The static
147147

148148
Remember to connect the Ethernet cable between the border router and your router. Then power on the board.
149149

150-
## Testing
150+
### Testing
151151

152152
By default, the application is built for the LED control demo, in which the device sends a multicast message to all devices in the network when the button is pressed. All devices that receive the multicast message will change the LED status (red LED on/off) to the state defined in the message. Note that the Thread devices can form a network without the existence of the border router. The following applies only to the case when the border router is set up.
153153

@@ -161,31 +161,31 @@ connected. IP = 2001:db8:a0b:12f0::1
161161

162162
You can use this IP address to `ping` from your PC and verify that the connection is working correctly.
163163

164-
## Memory optimizations
164+
### Memory optimizations
165165

166166
On some limited platforms, for example NCS36510 or KW24D, building this application might run out of RAM or ROM. In those cases, you can try these instructions to optimize the memory use.
167167

168-
### Mbed TLS configuration
168+
#### Mbed TLS configuration
169169

170170
You can set the custom Mbed TLS configuration by adding `"macros": ["MBEDTLS_USER_CONFIG_FILE=\"mbedtls_config.h\""]` to the `.json` file. The [example Mbed TLS configuration](https://github.com/ARMmbed/mbed-os-example-mesh-minimal/blob/master/mbedtls_config.h) minimizes the RAM and ROM use of the application. The is not guaranteed to work on every Mbed Enabled platform.
171171

172172
This configuration file saves you 8.7 kB of RAM but uses 6.8 kB of more flash.
173173

174-
### Disabling the LED control example
174+
#### Disabling the LED control example
175175

176176
You can disable the LED control example by specifying `enable-led-control-example": false` in `mbed_app.json`.
177177

178178
This saves you about 2.5 kB of flash.
179179

180-
### Change network stack's event loop stack size
180+
#### Change network stack's event loop stack size
181181

182182
Nanostack's internal event loop is shared with Mbed Client and therefore requires lots of stack to complete the security handshakes using TLS protocols. If you're not using client functionality, you can define the following to use 2 kB of stack:
183183

184184
`"nanostack-hal.event_loop_thread_stack_size": 2048`
185185

186186
This saves you 4 kB of RAM.
187187

188-
### Change Nanostack's heap size
188+
#### Change Nanostack's heap size
189189

190190
Nanostack uses internal heap, which you can configure in the `.json`. A thread end device with commissioning enabled requires at least 15 kB to run.
191191

@@ -197,7 +197,7 @@ In `mbed_app.json`, you find the following line:
197197

198198
For 6LoWPAN, you can try 12 kB. For the smallest memory use, configure the node to be in nonrouting mode. See [module-configuration](https://github.com/ARMmbed/mbed-os/tree/master/features/nanostack/FEATURE_NANOSTACK/mbed-mesh-api#module-configuration) for more detail.
199199

200-
### Move Nanostack's heap inside the system heap
200+
#### Move Nanostack's heap inside the system heap
201201

202202
You can move Nanostack's internal heap within the system heap. This helps on devices with split RAM and on devices in which the compiler fails to fit statically allocated symbols into one section, for example, the NXP KW24D device.
203203

@@ -209,7 +209,7 @@ Add the following line to `mbed_app.json` to test:
209209
"mbed-mesh-api.use-malloc-for-heap": true
210210
```
211211

212-
### Use release profile
212+
#### Use release profile
213213

214214
For devices with small memory, we recommend using release profiles for building and exporting. Please see the documentation about [build profiles](../tools/build-profiles.html).
215215

@@ -221,6 +221,6 @@ OR
221221
$ mbed compile -m KW24D -t IAR --profile release
222222
```
223223

224-
## Troubleshooting
224+
### Troubleshooting
225225

226226
If you have problems, you can review the [documentation](../tutorials/debugging.html) for suggestions on what could be wrong and how to fix it.

docs/api/networkinterfaces/CellularInterface.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<h1 id="cellular-api">Cellular API</h1>
1+
<h2 id="cellular-api">Cellular API</h2>
22

33
<span class="images">![](https://os.mbed.com/docs/development/mbed-os-api-doxy/class_cellular_interface.png)<span>CellularInterface class hierarchy</span></span>
44

@@ -7,7 +7,7 @@
77

88
The [CellularInterface](../mbed-os-api-doxy/class_cellular_interface.html) class provides a C++ API for connecting to the internet over a Cellular device.
99

10-
## Getting started
10+
### Getting started
1111

1212
1. Choose an [Mbed board that supports cellular](https://os.mbed.com/platforms/?mbed-enabled=15&connectivity=1), such as the [UBLOX-C027](https://os.mbed.com/platforms/u-blox-C027/) or [MTS-DRAGONFLY](https://os.mbed.com/platforms/MTS-Dragonfly/).
1313

@@ -31,7 +31,7 @@ Received from echo server 4 Bytes
3131
Success. Exiting
3232
```
3333

34-
## Basic working principles
34+
### Basic working principles
3535

3636
You can use and extend a cellular interface in various different ways. For example,
3737

@@ -49,25 +49,25 @@ You can use and extend a cellular interface in various different ways. For examp
4949
- The easy cellular connection uses standard 3GPP AT 27.007 AT commands to set up the cellular modem and to register to the network.
5050
- After registration, the driver opens a PPP pipe using LWIP with the cellular modem and connects to the internet. If AT only mode is in use, then modem-specific AT commands are used for socket data control.
5151

52-
## CellularInterface class reference
52+
### CellularInterface class reference
5353

5454
[![View code](https://www.mbed.com/embed/?type=library)](https://os.mbed.com/docs/development/mbed-os-api-doxy/class_cellular_interface.html)
5555

56-
## Usage
56+
### Usage
5757

5858
To bring up the network interface:
5959

6060
1. Instantiate an implementation of the CellularInterface class.
6161
1. Call the `connect(pincode, apn)` function with a PIN code for your SIM card and an APN for your network.
6262
1. Once connected, you can use Mbed OS [network sockets](network-socket.html) as usual.
6363

64-
## Cellular example: connection establishment
64+
### Cellular example: connection establishment
6565

6666
This example establishes connection with the cellular network using Mbed OS CellularInterface.
6767

6868
[![View code](https://www.mbed.com/embed/?url=https://github.com/ARMmbed/mbed-os-example-cellular)](https://github.com/ARMmbed/mbed-os-example-cellular/blob/mbed-os-5.14/main.cpp)
6969

70-
## Related content
70+
### Related content
7171

7272
- [Network socket](network-socket.html) API reference overview.
7373
- [Cellular overview](../reference/cellular-networking.html) describes cellular architecture and its usage in more detail.

docs/api/networkinterfaces/EthInterface.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22

33
<span class="images">![](https://os.mbed.com/docs/development/mbed-os-api-doxy/class_eth_interface.png)<span>EthInterface class hierarchy</span></span>
44

5-
The `EthInterface` provides a C++ API for connecting to the internet over Ethernet.
6-
By default, this class does not require any configuration. It is able to pick up the default
7-
Ethernet driver for the target and select correct network stack.
5+
The `EthInterface` provides a C++ API for connecting to the internet over Ethernet. By default, this class does not require any configuration. It is able to pick up the default Ethernet driver for the target and select correct network stack.
86

97

108
## Usage

docs/api/networkinterfaces/MeshInterface.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
<h1 id="mesh-api">Mesh</h1>
1+
<h2 id="mesh-api">Mesh</h2>
22

33
<span class="images">![](https://os.mbed.com/docs/development/mbed-os-api-doxy/class_mesh_interface.png)<span>MeshInterface class hierarchy</span></span>
44

5-
The Arm Mbed Mesh API allows the application to use the IPv6 mesh network topologies through the [Nanostack](../reference/6LoWPAN-ND-tech.html) networking stack.
5+
The Arm Mbed Mesh API allows the application to use the IPv6 mesh network topologies through the [Nanostack](../reference/6LoWPAN-ND-tech.html) networking stack.
66

77
Mbed OS provides three types of IPv6-based mesh networks:
88

@@ -14,11 +14,11 @@ The application can use the `LoWPANNDInterface`, `WisunInterface` or `ThreadInte
1414

1515
You can configure the mesh interface by providing values in `mbed_app.json`, as the [mesh configuration](../reference/configuration-mesh.html) section documents.
1616

17-
## Mesh class reference
17+
### Mesh class reference
1818

1919
[![View code](https://www.mbed.com/embed/?type=library)](https://os.mbed.com/docs/development/mbed-os-api-doxy/class_mesh_interface.html)
2020

21-
## Mesh example
21+
### Mesh example
2222

2323
The following code snippet illustrates how you can use the MeshInterface API:
2424

@@ -48,7 +48,7 @@ int main(void)
4848

4949
```
5050
51-
## Related content
51+
### Related content
5252
5353
- [Mesh tutorial](../tutorials/mesh-tutorial.html) to start using mesh technology.
5454
- [Light control tutorial](../tutorials/light-control.html), in which devices can control the LED status of all devices in the network.

docs/api/networkinterfaces/NetworkStatus.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
<h1 id="network-status">Network status</h1>
1+
<h2 id="network-status">Network status</h2>
22

33
This interface informs you about connection state changes asynchronously. Providing a method to register a callback function to a socket accomplishes this. Each time the network interface's state changes, it triggers the callback.
44

55
![Network states](../../images/NetworkinterfaceStates.png)
66

7-
## Usage
7+
### Usage
88

99
The callback needs to handle these possible network states:
1010

@@ -74,7 +74,7 @@ Optionally, the application might want to set the `connect()` method to nonblock
7474

7575
By default, the `connect()` call blocks until `NSAPI_STATUS_GLOBAL_UP` state is reached. Some applications might require only link-local connectivity and therefore do not need to block that long. In those case monitoring the state changes is the preferred behavior.
7676

77-
## Using multiple connection status callbacks
77+
### Using multiple connection status callbacks
7878

7979
The NetworkInterface API includes two functions that the applications can use to register more than one status callback for each network interface:
8080

@@ -109,12 +109,12 @@ You must either refactor the application by replacing `NetworkInterface::attach(
109109

110110
This optional and has a small RAM and ROM increase, so applications are not required to use it. Both APIs are still supported, but use is limited to one at a time.
111111

112-
## Example
112+
### Example
113113

114114
Registering a status callback that connection state changes trigger depends on whether the network interface provides this functionality.
115115

116116
[![View code](https://www.mbed.com/embed/?url=https://os.mbed.com/teams/mbed_example/code/TCPSocket_ConnStateCb_Example/)](https://os.mbed.com/teams/mbed_example/code/TCPSocket_ConnStateCb_Example/file/c66df92cf71b/main.cpp)
117117

118-
## Related content
118+
### Related content
119119

120120
- [Network socket](network-socket.html) API reference overview.

docs/api/networkinterfaces/WifiInterface.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
# Wi-Fi
1+
## Wi-Fi
22

33
<span class="images">![](http://os.mbed.com/docs/development/mbed-os-api-doxy/class_wi_fi_interface.png)<span>WiFiInterface class hierarchy</span></span>
44

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

7-
## Wi-Fi class reference
7+
### Wi-Fi class reference
88

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

11-
## Usage
11+
### Usage
1212

1313
To bring up the network interface of an external Wi-Fi device (for example, the ESP8266Interface):
1414

@@ -28,7 +28,7 @@ To bring up the network interface of an Ethernet-like driver (for example, the O
2828
2. Ensure the network stack acquires the IP address and DNS server address.
2929
1. Once connected, you can use the WiFiInterface as a target for opening [network sockets](network-socket.html).
3030

31-
## Troubleshooting information
31+
### Troubleshooting information
3232

3333
Network interface `connect()` and `set_credential()` might return following errors:
3434

@@ -40,7 +40,7 @@ Network interface `connect()` and `set_credential()` might return following erro
4040
| `NSAPI_ERROR_AUTH_FAILURE` | Wrong password given. |
4141
| `NSAPI_ERROR_DEVICE_ERROR` | Unknown failure happened in the device. The device may not be capable of reporting more descriptive error codes. |
4242

43-
## Security
43+
### Security
4444

4545
For specifying security settings, both `connect()` and `set_credential()` have optional parameter `nsapi_security_t security`, which defines the security mode the device uses. WifiInterface supports the following security modes:
4646

@@ -54,15 +54,15 @@ For specifying security settings, both `connect()` and `set_credential()` have o
5454

5555
Please note that settings should match the security mode from the access point. Also, not all drivers support every mode. For most compatible settings, use `NSAPI_SECURITY_WPA_WPA2`, and set the Wi-Fi access point to allow only WPA2 mode.
5656

57-
## Wi-Fi example
57+
### Wi-Fi example
5858

5959
This program scans for Wi-Fi access points in the area. 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 [OdinWiFiInterface](https://github.com/u-blox/ublox-odin-w2-drivers-docs-mbed-5).
6060

6161
The ESP8266Interface uses AT commands over serial interface to connect to an external Wi-Fi device. The OdinWiFiInterface provides an Ethernet-like driver to the Mbed OS network stack. The network stack uses the driver to connect to Wi-Fi:
6262

6363
[![View code](https://www.mbed.com/embed/?url=https://github.com/ARMmbed/mbed-os-example-wifi)](https://github.com/ARMmbed/mbed-os-example-wifi/blob/mbed-os-5.14/main.cpp)
6464

65-
## Related content
65+
### Related content
6666

6767
- [Wi-Fi components](https://os.mbed.com/components/cat/wifi/).
6868
- [Network socket](network-socket.html) API overview.

0 commit comments

Comments
 (0)