Raspberry Pi 3A+ WiFi issue

Help setting up WiFi
User avatar
KE0FHS
Posts: 1078
Joined: Wed Apr 11, 2018 8:40 pm
Location: Colorado, USA
Contact:

Re: Raspberry Pi 3A+ WiFi issue

Post by KE0FHS » Sat Oct 19, 2019 3:49 pm

KB1B wrote:
Sat Oct 19, 2019 10:01 am
Similar to raspi-config, people can run:
sudo dpkg-reconfigure locales

I set the locale in /etc/environment and also do the following the following:
sudo pistar-update
sudo locale-gen
Tried this procedure with two 4.1.0-RC6 hotspots this morning: disabled the default en_GB.UTF-8 UTF-8 and selected en_U.UTF-8 UTF-8S, and also selected en_US.UTF-8 as the default locale for the system environment.
  • The first was an RPi 4B-based one, and it worked fine.
  • The second is an RPi 3A+ hotspot, and while it changed the default locale, it failed to changed the default locale for the system environment. Tried it multiple times, but it kept hanging at the following stage, whether I ran the sudo dpkg-reconfigure locales command or the sudo locale-gen command:

Code: Select all

[email protected](ro):~$ sudo locale-gen
Generating locales (this might take a while)...
  en_US.UTF-8...
At that point, the SSH windows froze (ctrl+c didn't work), and the only way to recover was by using a hard restart on the hotspot and by quitting the SSH app. Not pretty.

Too early to say whether it had any effect on the WiFi issue.
73, Toshen, KE0FHS
Playing with Pi-Star (unofficial notes about setting up and using Pi-Star):
https://amateurradionotes.com/pi-star.htm

KB1B
Posts: 4
Joined: Sun Oct 13, 2019 11:31 pm

Re: Raspberry Pi 3A+ WiFi issue

Post by KB1B » Sat Oct 19, 2019 7:13 pm

Interesting. It takes a while but I'm not sure why this would hang.
A friend says his PiStar/RPi3A+ fails to connect to WiFi so I'm going to look at it an report what I discover.
Can you try this: and tell me what happens?
rpi-rw
sudo dpkg-reconfigure locales

I re-read this thread and perhaps the RPi3A+ just has poor quality control and produced boards with borderline-bad WiFi chips?
Several people said they take the same TF/SD-card out of a dysfunctional RPi 3A+ and put it into another RPi X+ and then it works!

User avatar
KE0FHS
Posts: 1078
Joined: Wed Apr 11, 2018 8:40 pm
Location: Colorado, USA
Contact:

Re: Raspberry Pi 3A+ WiFi issue

Post by KE0FHS » Sat Oct 19, 2019 7:25 pm

I took a different approach. I moved the microSD card from the RPi 4B hotspot that worked for resetting the locale and moved it the 3A+ hotspot, where it works fine, as expected. Then I flashed a fresh 4.1.0 image on the RPi 4B hotspot, did all the configuration, updating, and upgrading, then ran sudo dpkg-reconfigure locales, which worked. Now we'll see if that helps the underlying WiFi issue on the two hotspots (despite the title of this topic, I have had WiFi issues with my 4B hotspot, too).
73, Toshen, KE0FHS
Playing with Pi-Star (unofficial notes about setting up and using Pi-Star):
https://amateurradionotes.com/pi-star.htm

KE7FNS
Posts: 441
Joined: Wed Apr 17, 2019 11:11 pm

Re: Raspberry Pi 3A+ WiFi issue

Post by KE7FNS » Sat Oct 19, 2019 8:21 pm

KE0FHS wrote:
Sat Oct 19, 2019 3:49 pm

Code: Select all

[email protected](ro):~$ sudo locale-gen
Generating locales (this might take a while)...
  en_US.UTF-8...
That shows it was in still in RO mode and I'll bet thats why it failed. I know I've put it in RW mode and gone to compile something and in the middle of the compile, it fails with cannot write to disk. The background stuff that happens to kick it into RO can be fairly annoying when it does it when you don't want it to.
All views, comments, posts and opinions shared are entirely my own.

User avatar
KE0FHS
Posts: 1078
Joined: Wed Apr 11, 2018 8:40 pm
Location: Colorado, USA
Contact:

Re: Raspberry Pi 3A+ WiFi issue

Post by KE0FHS » Sat Oct 19, 2019 9:01 pm

I wondered about that, but whenever I ran the command successfully, starting in ro mode, it would finish in rw mode, so I figured the script must include switching to rw mode.
73, Toshen, KE0FHS
Playing with Pi-Star (unofficial notes about setting up and using Pi-Star):
https://amateurradionotes.com/pi-star.htm

ea7gwc
Posts: 25
Joined: Wed Apr 11, 2018 3:53 pm

Re: Raspberry Pi 3A+ WiFi issue

Post by ea7gwc » Sun Oct 20, 2019 9:18 pm

KB1B wrote:
Sat Oct 19, 2019 7:13 pm
I re-read this thread and perhaps the RPi3A+ just has poor quality control and produced boards with borderline-bad WiFi chips?
Several people said they take the same TF/SD-card out of a dysfunctional RPi 3A+ and put it into another RPi X+ and then it works!
I put the same microsd to a pi3 b + and there is no
wifi boot issues.
That same card in a PI3 A + sometimes has serious problems of
boot wifi. Once it starts well, the A + works perfectly and the wifi is stable, so I think my card is fine.

Also with Raspbian Buster there are no problems with the PI3 a + and
It always starts well.

So I think I think something goes wrong in PI-star.
73

ea7gwc
Posts: 25
Joined: Wed Apr 11, 2018 3:53 pm

Re: Raspberry Pi 3A+ WiFi issue

Post by ea7gwc » Thu Dec 05, 2019 5:04 pm

Any news about this annoying problem
with raspi 3A +?
73.

DB6BD
Posts: 14
Joined: Sat Aug 10, 2019 10:38 am
Location: Rosenheim, Germany
Contact:

Re: Raspberry Pi 3A+ WiFi issue

Post by DB6BD » Thu Dec 05, 2019 10:18 pm

No change. I do not use the 3A+ anymore.

kc7ngc
Posts: 22
Joined: Fri Sep 21, 2018 2:47 am

Re: Raspberry Pi 3A+ WiFi issue

Post by kc7ngc » Thu Dec 05, 2019 11:23 pm

I think there are multiple issues going on. But never narrowed it down as my stuff is working now but don't know which specific thing I did that fixed my problems. But I know these are two of the bigger things I did.

#1 3A+ and Pi Zero running out of memory
Configuring the locales using dpkg, etc on a 3A+ (or a Pi Zero) will most often run the system out of memory. Causing watchdog to start killing processes which often include killing the SSH daemon and sometimes wifi.
Fixed: I fixed this by adding a swap partition to my images. I didn't want swap on all the time, but there when installing updates etc. So I modified lines in /etc/bash.bashrc to turn swap on when I did rpi-rw and off when I did rpi-ro
In the lines below from the /etc/bash.bashrc file my swap partition is mmcblk0p3 on the sdcard. Depending how you setup your swap this could be different.

Code: Select all

alias rpi-ro='sudo mount -o remount,ro / ; sudo mount -o remount,ro /boot; sudo swapoff /dev/mmcblk0p3'
alias rpi-rw='sudo mount -o remount,rw / ; sudo mount -o remount,rw /boot; sudo swapon /dev/mmcblk0p3'
#2 Country Code kept getting reset to JP
I found that the country code in my wpa_supplicant.conf kept getting changed back to being JP. Finally narrowed it down to the dashboard script: /var/www/dashboard/admin/wifi.php kept overwriting my country code in the wpa_supplicant.conf file everytime I added a new network. Doesn't effect 2.4ghz as 1-11 channels are pretty standard everywhere but makes a big deal for 5ghz connections.
/var/www/dashboard/admin/wifi.php

Code: Select all

 if(isset($_POST['SaveWPAPSKSettings'])) {
                $config = "ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev\nupdate_config=1\nap_scan=1\nfast_reauth=1\ncountry=JP\n\n";
                $networks = $_POST['Networks'];
Can see the "country=JP" at end of the line.

I don't know why the dashboard has JP hardcoded. Maybe thought was it was the most portable across regions? Anyway I changed the JP in the code above to US in my case. Which can get overwritten if update pistar. So I keep an eye on it. If you don't add access points very often then the wifi.php script won't overwrite your current settings. But I travel and take my hotspot on the road, so took me a while to find out that the dashboard was reason why when I came home I have was all of the sudden back to JP.

I apologize to everyone as to me this is a pretty big bug, and meant to file an issue on it over on github awhile ago. But like most things, once I found a workaround, it stopped bugging me, and fell off my radar.

JP gives you:
country JP: DFS-JP
(2402 - 2482 @ 40), (N/A, 20), (N/A)
(2474 - 2494 @ 20), (N/A, 20), (N/A), NO-OFDM
(4910 - 4990 @ 40), (N/A, 23), (N/A)
(5030 - 5090 @ 40), (N/A, 23), (N/A)
(5170 - 5250 @ 80), (N/A, 20), (N/A), AUTO-BW
(5250 - 5330 @ 80), (N/A, 20), (0 ms), DFS, AUTO-BW
(5490 - 5710 @ 160), (N/A, 23), (0 ms), DFS
(59000 - 66000 @ 2160), (N/A, 10), (N/A)

US gives you:
country US: DFS-FCC
(2402 - 2472 @ 40), (N/A, 30), (N/A)
(5170 - 5250 @ 80), (N/A, 23), (N/A), AUTO-BW
(5250 - 5330 @ 80), (N/A, 23), (0 ms), DFS, AUTO-BW
(5490 - 5730 @ 160), (N/A, 23), (0 ms), DFS
(5735 - 5835 @ 80), (N/A, 30), (N/A)
(57240 - 63720 @ 2160), (N/A, 40), (N/A)

Which makes a big difference in 5ghz band.

KE7FNS
Posts: 441
Joined: Wed Apr 17, 2019 11:11 pm

Re: Raspberry Pi 3A+ WiFi issue

Post by KE7FNS » Fri Dec 06, 2019 2:35 am

kc7ngc wrote:
Thu Dec 05, 2019 11:23 pm
#2 Country Code kept getting reset to JP
I expressed my thoughts on that a while ago, Andy replied that he did it on purpose to scan for every possible network.

viewtopic.php?f=3&t=1915&hilit=country% ... t=10#p8879

I find it very annoying that it constantly forces JP no matter what setting you put in there. I just no longer use the wifi configuration area of the dashboard at all, it seems that whenever you click save, it completely erases all of your prior network settings and sets the country to JP for you.

I also have backups of my wpa_supplicant just incase the dashboard decides to nuke my custom settings for me again.
All views, comments, posts and opinions shared are entirely my own.

Post Reply