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?
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.
I believe 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.
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 30 in 192.168.101.30 and 10.0.12.30. Each robot should have a different number.
The team’s id is indicated by the 12 in 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.
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?
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:
Our wi-fi router had address 192.168.0.1, but in netplan config robot had in wlan0 addresses 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 dhcp4 to true, if not - to false.