Skip to content

Commit 4941103

Browse files
committed
Make minor fixes and styling
1 parent 2395753 commit 4941103

1 file changed

Lines changed: 20 additions & 20 deletions

File tree

  • _docs/tutorials/advanced/6lowpan_nuttx_rpi

_docs/tutorials/advanced/6lowpan_nuttx_rpi/index.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
---
2-
title: 6LOWPAN communications between NuttX and Raspbian.
2+
title: 6LOWPAN communications between NuttX and a Raspberry Pi
33
permalink: /docs/tutorials/advanced/6lowpan_nuttx_rpi/
44
---
55

6-
# How to set 6lowpan communication between Raspbian and Nuttx.
76

87
This guide will show how to set-up a Raspberry Pi 3 (RPI) running Raspbian and an Olimex STM32 E407 board running NuttX to have 6lowpan communication between them.
98

@@ -14,7 +13,7 @@ This guide will show how to set-up a Raspberry Pi 3 (RPI) running Raspbian and a
1413
- Olimex-STM32-E407 board.
1514
- Two PMODRF2 module which are base on the MRF24J40 module.
1615
- PC with Ubuntu (It works fine with Ubuntu 16.04)
17-
16+
- NuttX source code, you can find a Docker file with all the tools [here](https://github.com/micro-ROS/docker/tree/master/Embedded/NuttX/development/stm32-e407).
1817
## How to set-up 6lowpan RPI?
1918

2019
First, we need to connect the PMODRF2 module to the RPI, so we need to set the next connections:
@@ -31,16 +30,16 @@ First, we need to connect the PMODRF2 module to the RPI, so we need to set the n
3130
| CS | 26 | 1 |
3231

3332
In the next links you can see the pinout of each board:
34-
[- Raspberry Pi 3 pinout.](https://i.pinimg.com/originals/84/46/ec/8446eca5728ebbfa85882e8e16af8507.png)
35-
[- PMODRF2 pionut.](https://reference.digilentinc.com/reference/pmod/pmodrf2/start)
33+
- [Raspberry Pi 3 pinout.](https://i.pinimg.com/originals/84/46/ec/8446eca5728ebbfa85882e8e16af8507.png)
34+
- [PMODRF2 pionut.](https://reference.digilentinc.com/reference/pmod/pmodrf2/start)
3635

37-
Once you've set all the wires, power-on the RPI and download the next repository inside the RPI.
38-
https://github.com/micro-ROS/micro-ROS-bridge_RPI
36+
Once you've set all the wires, power-on the RPI and download the next repository inside the RPI:
37+
- https://github.com/micro-ROS/micro-ROS-bridge_RPI
3938

4039
Execute the next command:
4140
```sudo ./micro-ROS-bridge_RPI/RPI_6lowpan/script.sh```
4241

43-
If everything goes fine, at the end of the script, the board should restart. After the start-up, type the next command to see if the configuration and the connection are fine:
42+
If everything goes fine, at the end of the script, the board should restart. After the start-up, type the next command to see if the configuration and the connections are fine:
4443
```dmesg | grep mrf24j40```
4544

4645
And if everything is fine, it should return the next:
@@ -61,9 +60,9 @@ The last point is to set-up the network.
6160
Now the RPI is ready to send and receive messages from a NuttX board or another RPI.
6261

6362

64-
## How to set-up 6lowpan NuttX?
63+
## How to set-up 6lowpan in NuttX?
6564

66-
First, we need to do the connections between the Olimex board and the PMODRF2 module.
65+
First, we need to do the connections between the [Olimex board](/docs/hardware_support) and the PMODRF2 module.
6766

6867
- `Board D13` -> `MRF24J40 SCLK`
6968
- `Board D12` -> `MRF24J40 MISO`
@@ -73,7 +72,7 @@ First, we need to do the connections between the Olimex board and the PMODRF2 mo
7372

7473
Once the wiring is finished, we need to compile and upload the firmware. Type the next commands:
7574

76-
o to the main folder of NuttX and type the command to configure the board:
75+
Go to the main folder of NuttX and type the command to configure the board:
7776
`./scripts/configure.sh olimex-stm32-e407 mrf24j40-6lowpan`
7877

7978
Compile:
@@ -120,9 +119,10 @@ Builtin Apps:
120119
udp_6lowpan ping6 i8sak
121120
```
122121
123-
We're going to configure the network. Execute udp_6lowpan.
122+
We're going to configure the network. Execute `udp_6lowpan`.
124123
The program will ask you if you want to configure the network. Type **Y** to start the configuration process.
125-
**Important note:** If you don't configure the network, the connection won't be possible with other boards.**
124+
125+
**Important note: If you don't configure the network, the connection won't be possible with other boards.**
126126
127127
Then will ask you if you want to set this board as a coordinator or as a node.
128128
The difference between a coordinator and a node is that the first one can work as a router, coordinating the network traffic of up to 8 nodes.
@@ -161,7 +161,7 @@ Available commands
161161

162162
```
163163
164-
** At this point the network is ready to work!**
164+
**At this point the network is ready to work!**
165165
166166
Finally type ``quit`` two times to close the app and come back to the main menu.
167167
@@ -232,7 +232,7 @@ As you can see there is two IP in this network interface. But you need to rememb
232232
`fe80::9c6e:87a5:eb60:84d0``
233233

234234
Go to the place where lives the repo that you downloaded previously. Go to ``micro-ROS-bridge_RPI/RPI_6lowpan/Examples/6lowpan_recv``
235-
Finally, execute recv_demo telling to open the 61616 port. Type this command: ``./recv_demo 61616``
235+
Finally, execute `recv_demo` telling to open the `61616` port. Type this command: ``./recv_demo 61616``
236236

237237
At this point, the RPI is ready to receive incoming packages.
238238

@@ -283,23 +283,23 @@ The Linux 6lowpan utility needs to have a ping response before sending a data pa
283283
If this does not work, do as follow:
284284
285285
Check if the Nuttx address is part within the Linux/Raspbian neighborhood table.
286-
If it is, remove it:
286+
If it is saved there, remove it:
287287
```bash
288288
$ ip neigh # a bunch of address shall appear including yours (if you send a
289289
message already)
290290
fe80::2be:adde:de:fa00 dev lowpan0 FAILED
291291
$ sudo ip neigh delete fe80::2be:adde:de:fa00 dev lowpan0 # Remove it.
292292
```
293293
294-
Then once delete add the Nuttx device it permanently (until reboot):
294+
Then, once deleted, add the Nuttx device it permanently (until reboot):
295295
296296
```bash
297297
$ sudo ip neigh add fe80::2be:adde:de:fa00 dev lowpan0 00:be:ad:de:00:de:fa:00 # Add it with the
298298
corret Hardware address.
299299
```
300300
301301
### NuttX part:
302-
First we need the ip of the board, so type ``ifconfig`` in the main menu. This should return somenthing like this:
302+
First, we need the ip of the board, so type ``ifconfig`` in the main menu. This should return somenthing like this:
303303
```bash
304304
wpan0 Link encap:6LoWPAN HWaddr 00:be:ad:de:00:de:fa:00 at UP
305305
inet6 addr: fe80::2be:adde:de:fa00/64
@@ -327,7 +327,7 @@ Sent 0000 0000 0000 0000
327327
328328
For us is important to remember the **inet6_addr** which is: ``fe80::2be:adde:de:fa00``
329329
330-
Execute ``udp_6lowpan`` app, type ``N`` to the configuration request and finally type read, to start the receiving mode.
330+
Execute ``udp_6lowpan`` app, type ``N`` to the configuration request and finally type `read`, to start the receiving mode.
331331
Type the port that you want to open, for example, the 61616. And it should look like this mean is waiting for the incoming message.
332332
333333
```bash
@@ -341,7 +341,7 @@ Listening on 61616 for input packets
341341
342342
### Raspbian Part:
343343
344-
Go to the places that lives the previous download repo. Then go to this folder: ``/micro-ROS-bridge_RPI/RPI_6lowpan/Examples/66lowpan_send``
344+
Go to the places that lives the previous download repo. Then go to this folder: ``/micro-ROS-bridge_RPI/RPI_6lowpan/Examples/6lowpan_send``
345345
346346
And execute with root privileges the next app: ``send_demo``.
347347
These demos have two arguments: The first is the port to open in the destination and the second is the destination IP. An example of this specific demo could be:

0 commit comments

Comments
 (0)