While upgrading Charlie running a Raspberry Pi-4 to GPGOS 3.0.1, I ran into an interesting intermittent network issue:
In Access Point mode: (the default)
The access point would randomly fail at about 15-30 second intervals and remain gone for 30 seconds to a minute or so.
I could open my wifi monitor app on my cell phone and watch it go away and come back.
This made it virtually impossible to connect to the access-point connection. (i.e. Out of fifteen or twenty attempts, two and only two succeeded, and then were almost immediately dropped. The rest were, “Could not connect to this network” failures.)
The antenna LED was solid green the entire time.
I tried the “ipv6.disable=1” in the cmdline.txt file, no change.
The only thing that seems to work is:
(aside from a hard-wired connection, which is not always possible)
- Connect directly to the robot with a monitor, keyboard, and mouse.
- Use the Pi’s browser to connect to
- Using the browser interface, switch to networked mode and verify a connection is made to the network.
- Minimize the browser.
- Go to wifi settings by right-clicking on the WiFi/network icon in the top right and go to each interface, (not SSID!), in turn and make sure “disable IPv6” is checked, hitting “Apply” after each change.
See the important qualifying note at the bottom of this post.
This should be the default setup for new images.
Apparently this can be set by editing /etc/sysctl.conf and adding. . .
net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1
. . .to the end of the file and rebooting.
Apparently this is Linux version specific.
GPGOS Buster apparently does not see the cmdline flag and needs the sysctrl fix.
Various people on the internet mentioned that later versions of Linux don’t use the sysctrl parameter and need the cmdline flag instead.
Maybe we should set both?
Why does this happen in the first place?
The result is a very brittle IPv4 network connection.
I do not know this for a fact, but I suspect that somewhere in the grand scheme of things, the Raspberry Pi’s implementation of the IPv6 protocol is not quite ready for prime time and results in a very brittle network. Supposedly, later updates to Buster seriously broke IPv6 networking.
In any event it is my experience that IPv6 is more trouble than it’s worth at this point and it’s best left disabled.
Important Qualifying Note
In this particular case, I am running a brand-new installation of GoPiGo OS 3.0.1, on a fresh SD card to verify everything’s working correctly with the minimum number of modifications, prior to installing it on my big SD card and completing the configuration there.
Since GoPiGo OS starts up, by default, in access point mode, it’s not possible to make a back-door connection, except, (perhaps), with a hard-wired Ethernet connection. Even then, with IPv6 trying to ruin everyone’s life, the connection can be “interesting”.
What I ultimately did was to connect using a monitor, keyboard, and mouse directly to the 'bot, (my right-angle micro-HDMI connector to the rescue!), use the browser built into GPGOS to connect back to itself, change the network mode, (you cannot access the WiFi properties in Access Point mode!), and then disable IPv6 everywhere I could.
A reboot demonstrated that things were much better.