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 19 changed 10 lines
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
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
At line 30 added one line
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.
At line 32 changed one line
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.
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 34 added 44 lines
! How to Disable ipv6 on a Pi
%%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.
%%
When viewing the results from typing {{ifconfig}} you see only "inet6" output and no "inet" then ipv6 has been enabled. If you want to use ipv4 style IP addresses (e.g., 192.168.1.85) then you'll need to disable ipv6.
If you're using Raspbian (i.e., earlier versions of the Raspberry Pi operating system), add the following to the end of the single line of text in the file /boot/cmdline.txt:
{{{
ipv6.disable=1
}}}
This has the advantage that you can edit it by mounting it to your desktop before you boot the Pi, since the boot partition is readable under desktop operating systems. ([source|https://www.raspberrypi.org/forums/viewtopic.php?t=256349#p1563399])
That on its own might work. Reboot to see. If you still see 'inet6' then continue with the following steps.
If you're using the current "Raspberry Pi OS" then edit/create the file {{/etc/modprobe.d/ipv6.conf}} to either contain the following single line, otherwise add to the existing file the line :
{{{
blacklist ipv6
}}}
Then reboot.
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
}}}
Add this to the end:
{{{
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
}}}
Save and close the file, then reboot.
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*).
%%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'').
%%
At line 80 added 2 lines
__NOTE:__ this currently doesn't seem to work on a Raspberry Pi 4 due to ipv6 (?), but has worked reliably for the Raspberry Pi 3 B+.
At line 49 changed one line
% sudo nano /etc/dhcpcd.conf
sudo nano /etc/dhcpcd.conf
At line 55 changed 6 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 added one line
After modifying the file you'll need to reboot for the changes to take effect.
At line 111 added one line
! References
At line 66 changed 2 lines
This information is derived from from
[How to set a Raspberry Pi with a static ip address?|https://www.ionos.com/digitalguide/server/configuration/provide-raspberry-pi-with-a-static-ip-address/], where you may find more information.
This information is derived from from pages like:
At line 115 added 4 lines
* [How to set a Raspberry Pi with a static ip address?|https://www.ionos.com/digitalguide/server/configuration/provide-raspberry-pi-with-a-static-ip-address/]
* [Setting up Raspberry Pi WiFi with Static IP on Raspbian Stretch Lite|https://electrondust.com/2017/11/25/setting-raspberry-pi-wifi-static-ip-raspbian-stretch-lite/]
* [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/]
At line 120 added one line
...where there's a lot more detail than here if you get stuck. If you mess things up just comment out the lines you added by putting a "{{#}}" at the beginning of those lines.
At line 122 added one line