This page (revision-21) was last changed on 2021-11-10 04:19 by Murray Altheim

This page was created on 2020-05-10 03:58 by Murray Altheim

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Page revision history

Version Date Modified Size Author Changes ... Change note
21 2021-11-10 04:19 7 KB Murray Altheim to previous

Page References

Incoming links Outgoing links

Version management

Difference between version and

At line 8 removed 27 lines
! How to Find Out What Address Your Robot Is Using
First, let's see what address it currently has. Type the {{ifconfig}} command and then hit __Enter__:
{{{
% ifconfig
}}}
The result will be a lot of stuff, most of which you can avoid. It comes in sections, one of which
will be named {{wlan0}} or something similar (with "''wlan''" meaning "wireless local area network").
In that section there's one string of characters you're looking for, what follows "inet" on the second line of that section:
%%(font-family: 'Source Code Pro', monospace; font-size:smaller; white-space: pre;)
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
__inet 192.168.1.74__ netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::6849:3b23:1365:745 prefixlen 64 scopeid 0x20<link>
inet6 fd48:3c0c:41d9:3100:b1b7:99fc:7136:b0f3 prefixlen 64 scopeid 0x0<global>
ether 16:8b:34:0f:08:6f txqueuelen 1000 (Ethernet)
RX packets 14174 bytes 1782568 (1.6 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 8959 bytes 2536988 (2.4 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
%%
The "192.168.1.74" above (four decimal numbers separated by dots) is the __ipv4__ IP address of the robot. Yours will likely start with the same first three "192.168.1" (this is common on local area networks at home but not always true), with the last number "74" being unique to your robot.
If you don't see a ''traditional'' ipv4 IP address then you're likely seeing an __ipv6__ address. These look something like "inet6 fe80::7d5c:3d4a:cd06:bdc2" or "inet6 fd48::3e0c:41c9:3100:700:33ac:dda7:6045", etc., basically colon-delimited groups of hexadecimal characters. If that's the case you can disable ipv6 and use only ipv4. To do that, see the next section.
At line 37 removed 4 lines
%%information
I won't get into the history of ipv6 or the reasons for or against using it here. If you want to search the Web about ipv6, please do... I'm just showing you how to disable it on your robot.
%%
At line 49 removed 2 lines
That on its own might work. Reboot to see. If you still see 'inet6' then continue with the following steps.
At line 57 removed 4 lines
If this fails to disable ipv6 (and on later Raspberry Pi OS it seems to be true), edit “/etc/sysctl.conf”:
{{{
sudo nano /etc/sysctl.conf
}}}
At line 62 changed one line
Add this to the end:
! How to Find Out What Address Your Robot Is Using
First, let's see what address it currently has. Type the {{ifconfig}} command and then hit __Enter__:
At line 64 changed 4 lines
net.ipv6.conf.all.disable_ipv6=1
net.ipv6.conf.default.disable_ipv6=1
net.ipv6.conf.lo.disable_ipv6=1
net.ipv6.conf.eth0.disable_ipv6 = 1
% ifconfig
At line 31 added 2 lines
The result will be a lot of stuff, most of which you can avoid. It comes in sections, one of which
will be named {{wlan0}} or something similar (with "''wlan''" meaning "wireless local area network").
At line 70 changed one line
Save and close the file, then reboot.
In that section there's one string of characters you're looking for, what follows "inet" on the second line of that section:
%%(font-family: 'Source Code Pro', monospace; font-size:smaller; white-space: pre;)
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
__inet 192.168.1.74__ netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::6829:3b23:1365:745 prefixlen 64 scopeid 0x20<link>
inet6 fd48:3c0c:41c9:3100:b1b7:99fc:7136:b0f3 prefixlen 64 scopeid 0x0<global>
ether 16:8b:34:0e:08:6f txqueuelen 1000 (Ethernet)
RX packets 14174 bytes 1782568 (1.6 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 8959 bytes 2536988 (2.4 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
%%
At line 72 removed one line
If you __still__ have ipv6 active I'd suggest just giving up. For some reason ipv6 is like a virus: once there, hard to get rid of. This has to be one of the more stubborn "features" that developers have been telling us is going to happen, never has happened, and has polluted our user space now for years (*grumble*).
At line 74 changed 3 lines
%%information
One thing that has caught me out a few times: If you don't see an "inet6" line you have successfully managed to disable ipv6. That doesn't mean you will see an "inet" line. If your local router has previously allocated an IP address then your attempt to assign your Pi that address will fail. You need to choose an address the router will permit you to use. The best way to do this is choose the address that your router has dynamically assigned that particular device, then make __that__ address static (as you know ''it can be assigned to that device'').
%%
The "192.168.1.74" above (four numbers separated by dots) is the IP address of the robot. Yours will likely start with the same first three "192.168.1" (this is common on local area networks at home but not always true), with the last number "74" being unique to your robot.
At line 95 changed one line
sudo nano /etc/dhcpcd.conf
% sudo nano /etc/dhcpcd.conf
At line 101 changed 5 lines
~# set a static IP address for this Pi
interface wlan0
static ip_address=__192.168.1.74__/24
static routers=192.168.1.254
static domain_name_servers=192.168.1.254
# set a static IP address for this Pi
interface wlan0
static ip_address=__192.168.1.74__/24
static routers=192.168.1.254
static domain_name_servers=192.168.1.254
At line 108 removed one line
After modifying the file you'll need to reboot for the changes to take effect.
At line 117 removed 2 lines
* [How to find Raspberry PI’s IP|https://peppe8o.com/how-to-find-raspberry-pis-ip/]
* [How to Directly Connect to a Raspberry Pi Without Internet|https://www.makeuseof.com/tag/directly-connect-raspberry-pi-without-internet/amp/]