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
The ``D`` letter refers to the Arduino header pins of the board denoted ``CON4``.
42
+
To ease the set-up process, The radio's pinout can be found at the following link: [PmodRF2 pinout](https://reference.digilentinc.com/reference/pmod/pmodrf2/start)
25
43
26
-
**Important!**
27
-
You can find a guide of how to setup the micro-ROS-bridge_RPI at its [repository](https://github.com/micro-ROS/micro-ROS-bridge_RPI/blob/new_bridge_tools/Readme.md).
28
-
In the micro-ROS-bridge-RPI guide, you can find everything that you need to set-up this device base.
44
+
The last step is to connect a mini-USB cable to the OTG2 USB port (The USB port next to the Ethernet port).
29
45
30
-
# Configure the board
46
+
## Set-up the software
47
+
48
+
The micro-ROS build system will be use in order to create and flash the
49
+
firmware.
50
+
51
+
Instructions are available at the following link: [Micro-ROS build system](https://github.com/micro-ROS/micro-ros-build/blob/dashing/micro_ros_setup/README.md).
52
+
For this particular guide, it is necessary to use the branch ``dashing`` and the configuration profile ``uros_6lowpan``.
53
+
54
+
### Manual patches
55
+
56
+
Due to the build system being a work in progress, some of files have to be
57
+
modified.
58
+
59
+
- Open ``uros_ws/firmware/mcu_ws/eProsima/Micro-XRCE-DDS-Client/client.config`` and modify the value of ``CONFIG_UDP_TRANSPORT_MTU`` from ``512`` to ``450``.
60
+
61
+
This is an appropiate MTU for 6LoWPAN communications on NuttX.
62
+
Also the micro-XRCE-DDS needs to be to be change to the version 1.2.5 in the docker:
63
+
64
+
```bash
65
+
cd /uros_ws/firmware/mcu_ws/eProsima/Micro-XRCE-DDS-Client
66
+
git checkout v1.2.5
67
+
```
31
68
32
-
The configuration of the board is divided into two parts: hardware and software set-up.
69
+
Once the modifications done, the binary can be compiled [as explained here](git checkout v1.2.5)
33
70
34
-
## Hardware set-up
71
+
#Configure the Linux machine
35
72
36
-
First we are going to connect the PmodRF2 radio.
73
+
The Linux machine is where is going to run the agent.
74
+
In order to setup the wireless, some settings have to be set as follow:
sudo iwpan phy phy0 set channel 0 26 # phy can be phy0 or any other phyN where N [0,1,2,3,4,5,6,7,8,9,10,...]
83
+
sudo ip link add link wpan0 name lowpan0 type lowpan
84
+
sudo ip link set wpan0 up
85
+
sudo ip link set lowpan0 up
86
+
sudo ip link set docker0 down # Necessary to not reroute everything over the docker and use the lowpan0
87
+
sudo ip neigh flush all
88
+
sudo ip neigh add to {**IPV6 of the microROS node**} dev lowpan0 lladdr {**HW 802.15.4 of the micro-controller**} # repeat it for all the device
89
+
```
48
90
49
-
To ease the set-up process, you can use the [RPi pinout](https://pinout.xyz/#) and [PmodRF2 pinout](https://reference.digilentinc.com/reference/pmod/pmodrf2/start).
91
+
It appears that depending on the PC configuration, the packets will not be able to be routed correctly from the docker to the lowpan0/wpan0 and vice-versa.
92
+
In order to forward the packet to the correct interface the following commands need to be entered:
50
93
51
-
The last step is to connect a mini-USB cable to the OTG2 USB port (this USB port next to the Ethernet port).
94
+
```bash
95
+
#Setting up the 6lowpan routing
96
+
sudo ip -6 route add {**IPV6 of the microROS node**} dev lowpan0 proto kernel metric 50 pref medium
97
+
```
52
98
53
-
## Software set-up
99
+
Once hte setup done, the docker may be run:
100
+
```bash
101
+
docker run -it --network host microros/micro-ros-agent:dashing udp6 --port 9999 -v6
54
102
55
-
To create and flash the firmware, we are going to use the micro-ROS build system.
56
-
You can find the instructions at the micro_ros_setup's [README](https://github.com/micro-ROS/micro_ros_setup/blob/dashing/micro_ros_setup/README.md).
57
-
For this particular guide, it is necessary to use the branch `dashing` and the configuration profile `uros_6lowpan`.
- The value **inet6** is the IPv6 direction of the RPi over the 6LoWPAN interface. Copy it because is necessary for the subsequent steps.
100
-
- Execute the micro-ROS 6LoWPAN application on the Olimex typing the next command:
101
132
102
133
```bash
103
-
uros_6lowpan <Agent_IP><Agent_Port><pub/sub>
104
-
```
105
-
where `Agent_IP` is the IPv6 copied previously, `Agent_PORT` is the port selected forthe Agent and `pub/sub` controls the application behavior:incase of `pub` it will act as publisher and as in case of `sub`, it will act as a subscriber.
106
134
107
-
- Once you execute the app, ti will ask you if you want to configure the 6LoWPAN network.
108
-
- This will return connection data, you should save the `inet_6_addr` and `HWaddr`.
109
-
- Note: if you want to change the ID of the radio, you can do it on the `menuconfig` of NuttX on the example configuration.
Do you want to configure the 6lowpan network? (Y/N)
114
137
ifdown wpan0...OK
115
138
i8sak: resetting MAC layer
@@ -131,11 +154,15 @@ wpan0 Link encap:6LoWPAN HWaddr 00:be:ad:de:00:de:fa:00 at UP
131
154
00000000 00000000 00000000 00000000
132
155
Total Errors: 00000000
133
156
```
157
+
- After this step, the application on the Olimex board will be blocked waiting
158
+
for a user to press any key and enter. The following output should appear.
134
159
135
-
- After this step, the application on the Olimex board will be blocked waiting for a user input confirming that the Agent on the bridge is ready to receive data.
160
+
```bash
161
+
Sent: '0'
162
+
Sent: '1'
163
+
Sent: '2'
164
+
...
165
+
```
136
166
137
-
- Go back to the bridge, now we are going to add a new 6LoWPAN device. Push `1 + enter`. (Note: this step is only necessary if you are attaching for the first time a new device).
138
-
- First, introduce the IPv6 of the Olimex board (`inet6_addr`).
139
-
- Introduce the hardware address of the Olimex board (HWaddr).
140
-
- Now the device is registered and ready to establish communication.
141
-
- The final step on the bridge is to execute the micro-ROS-Agent, to do so, push `2 + enter` and introduce the port to use.
167
+
- The same procedure needs to be followed to run the subscriber but the last
168
+
parameter of the ``uros_6lowpan``command should be ``sub``.
0 commit comments