We’ve done the following.
We’ve connected NAO to Wi-Fi router via Ethernet cable and using administrator interface of router we’ve found its IP address [IP_address].
Then we’ve connected to the robot via nao@[IP_address], using login-password nao:nao, but we have the problem with Wi-Fi driver on robot. What should we do to install NAO Wi-Fi driver correctly on Ubuntu 20.04?
What’s the exact problem with the Wi-Fi driver? Did you succesfully ssh into the robot? Is there an error message?
Quoting a response from Aaron (Team Nao Devils),
Both logins root:root and nao:nao should work in my initial version of the image. (Password authentication for root via SSH may be disabled by default.)
However, without an error message, it is hard to help. Wifi should work out of the box, but it needs configuration of cause.
We’ve configured etc/wpa_supplicant.conf (see Screenshot 1). How should we configure etc/network/interfaces, if its basic configuration is at it shown on Screenshot 2. At the moment the IP address of the robot is 192.168.0.194.
Connect throw ssh to nao
sudo apt install vim
sudo chmod 777 wpa_supplicant.conf
netplan is used to configure networking in recent Ubuntu versions, rather than manually configuring wpa_supplicant. Some code related to this (although you have to modify it) seems to be included in the NaoDevils’ NaoImage you downloaded in Install Ubuntu20.04 on NAO.
Below is the method from NaoImage’s scripts, to setup static ip addresses as the RoboCup SPL rule enforces.
dhcp4: false #eth0
dhcp6: false #eth0
where you should replace
SPL_5GHz with your wifi’s ssid, and
Nao?!Nao?! with your wifi’s password.
The robot’s id is indicated by the
10.0.12.30. Each robot should have a different number.
The team’s id is indicated by the
10.0.12.30. SPL GameController’s teams.cfg has a list of team ids. The team id
12 corresponds to NaoDevils. You must change this to your team’s id.
And then run the following to apply the changes:
i don’t know about naoimage/netplan, but on debian i use:
iface spl inet static
iface wlan3 inet manual
Quoting a response from Aaron (Team Nao Devils),
Ubuntu does not use /etc/network/interfaces anymore by default, so configuring netplan as described by @ijnek is the way to go
@semendyaevsergey Did you get this working?
According to the instruction we made netplan settings. We’ve run “netplan apply” and the robot stopped responding. We’ve reinstalled Ubuntu 20.04 and after making netplan settings we’ve decided to check with “sudo netplan --debug generate” and we had as on screenshot. We again tried “netplan apply” but had the same no responding. After rebooting robot and checking its IP via router we had the following - see on screenshot. Router sees its MAC address but the IP address as on screenshot.
Just to make sure, did you try pinging, or trying to ssh into the new IP address? If the IP addresses have changed, I assume the terminal session will stop responding.
Also, there’s the option of using
sudo netplan –d apply if you haven’t tried it yet.
Yes, we have successfully ssh to new IP address.
There was some mistake with extra spaces in our netplan file, we’ve fixed this mistake.
Then we did the following.
- sudo netplan apply
- reboot robot, pressing chest button
- via admin page of wi-fi router we’ve found new IP address (now IP address in IPv6 format). We have: fd01::2a24:ffff:fe46:23e2
- ssh nao@fd01::2a24:ffff:fe46:23e2
- this ssh was successful
Then we are trying to install ROS2.
Is that OK that we are doing it via IPv6?
With previous netplan settings robot has no connection to the internet.
We’ve changed netplan adding to dhcp4 “true” value.
After that we did with installation of ROS2 Base Install with instruction:
We’ve succesfully installed ROS2!
Great that you’ve got it working.
You can use IPv6 or IPv4 in your lab, but at competition, in an SPL game you will need to use IPv4 according to SPL rules.
Hmmm… but something is wrong.
After setting up netplan for another robot with different address (10.0.48.28/16) we see the same IP address for it - 192.168.0.5.
Why is it so? What should we change?
ifconfig shows this:
It seems like the changes are being applied for
wlan0 correctly (as it has the right ip address), but not for
Did you try rebooting the robot after
netplan apply? if not, it may be worth trying.
In your previous post, you said you set
dhcp4 to true to make it work, but that seems a bit strange too…
We’ve solved the problem.
Our wi-fi router had address
192.168.0.1, but in
netplan config robot had in
10.0.[team_number].[robot_number]/16. We’ve configured router to have the address
10.0.0.1 and now it correctly corresponds to
10.0.[team_number].[robot_number]/16. So, first two numbers of wi-fi router address and robot’s
wlan0 addresses must be the same (in our case 10.0…), and
dhcp4 must be
false so that router doesn’t assign address dynamically.
If we need to download something from the internet on robot we switch
true, if not - to
After that we’ve installed ROS2 and NAO LoLA according to Installation — Nao Lola documentation
Then we will try to do next steps.