• Support
  • Wireless access point signal dropping constantly

I have made a MoodleBox v4.5.1 by downloading the image and writing to a 16 GB SanDisk microSD card. But it is practically unusable. At the rate of 10-15 seconds the signal drops.

The syslog writes messages like these roughly at the same rate:

[Time stamp] moodlebox hostapt: uap0: STA xx:xx:xx:xx:xx:xx IEEE 802.11: deauthenticated due to local deauth request
dito disassociated

It happens in a Pi 4 B and Pi 3 A+. No other models to test, but a colleague just tried, on a 3 B, run in to the same problem. He initially thought if the card is made with the writer supplied on RPi web base, then it works. But more testing showed that it is not true.

Could it have a connection to the "regulatory country"? I always use the Default Switerland and channel 11.

Edit: Found this related discusion: https://discuss.moodlebox.net/d/287-moodlebox-400-wifi-connections-drops-after-each-request/21.

    Ratna as I wrote yesterday I setup a new MoodleBox from the image 4.5.1. After I read your message I connected my old Android-Tablet Samsung Tab S2 with the MoodleBox Wifi and I switched on the Wifi Analyser.

    As you can see at the bottom of the screen the app has done 6548 scans every two seconds. This means that the scanner is running 13098 seconds = 3 h 38 min 18 s. This means also the the tablet did not loose the MoodleBox Wifi ... you can see all Wifi ssids in the left corner. The green one is the connected Wifi ... it has a thicker line and the background is filled in green.

    I often make this scan to see the Wifi stability. I connect to the Wifi I want to check and I setup "no automatically reconnect". So if the MoodleBox Wifi breaks down then the tablet does not reconnect to the MoodleBox Wifi. As you see the red line from Puavo Wifi is just down in the moment go the photo.

    My Raspberry Pi 4B has 4GB RAM. I 'm using the official power adapter 5.1V/3A. The microSD card is from SanDisk with 16 GB, class 10, A1.

    Do we need to get some special infos from the Raspberry Pi 4B?

    Ratna Could it have a connection to the "regulatory country"? I always use the Default Switerland and channel 11.

    Unlikely. Maybe a network collision. Are there other WiFi network around sharing the same channel?

      Nicolas

      Thanks for confirming that the "regulatory country" can't be the cause. It sounds illogical for me too. But that is what https://discuss.moodlebox.net/d/287-moodlebox-400-wifi-connections-drops-after-each-request/21.

      How about the "hostapt: uap0: STA xx:xx:xx:xx:xx:xx IEEE 802.11: deauthenticated due to local deauth request" messages? There are lot of them alternating with the opposite message "associated" (from memory, not at the MB as I write).

      @ralfkrause

      Interference with other wireless transmitters is the first thing I investigated. I have an app called WiFiAnalyzer installed on an Android smpart-phone and tried changing the wi-fi channel of the MB. It was a pain though, since the connection was breaking all the time. At the "site" I was trying to get this going, there was no cable Ethernet!

      And since then I have tried the same thing in many different places with widely ranging wireless landscape. Even a colleague is trying in a completely different place. I am a noob in wireless transmissions and drivers. My web searches always take me to such topics. Here are some:

      I must admit that in half of the situations I tried there was another access point in less than 1m distance. But in the other no access point in the vicinity and no wireless noise as monitored by the WiFiAnalyzer. And the MB, in fact there are two, a RPi 4 B and a 3 A+, both never works longer than a minute, then drops the connection. The client reconnects after may be 10 sec. That repeats all the time.

      BTW, my colleage and I tried different client devices.

        Ratna Please tell us what you filled into the advanced settings of the Raspberry Pi Imager before you copied the microSD card? Did you put in a SSID and password for Wifi? Will this option automatically activate the Wifi receiver? What happens when the Raspberry Pi sends the MoodleBox Wifi and tries to receive the same MoodleBox Wifi?

          ralfkrause

          When I do it, there is no (Windows) GUI. I ditched Windows 20 years ago. Since then my "desktop" (also laptops) is Linux. (Will add that to my profile.) Therefore, it goes like this:

          # dd if=moodlebox-4.5.1.img of=/dev/mmcblk0 bs=4M && sync

          My colleague has discovered the GUI program (on his Windows) though.

          We two work at two different places and on different hardware; I have a 4 B 4G and a 3 A+, he has a couple of 3 B and 3 B+. I don't know what he sets for SSID etc. But the fact is he connects an Android smpart-phone and a PC with a USB wi-fi adapter to the MN. So the SSID/Password pair must be right.

          Initially, he even claimed that SDs made with Windows (on the GUI above) work. At a closer look they didn't.

          Then he made a new set of SDs and testing one. The test being connect the MB to a router, connect the client to MBs wi-fi and watch whether wireless signal fluctuates and/or it gets disconnected and reconnected, all the time while watching a YouTube video on the client.

          Edit: Now comes to my mind, does the WPA standard setting of the client matter? There are all sorts of WPA2, WPA3 with additions like Personal, Extended, ,etc. Or put it another way, what is the correct setting for the WPA? You have no problems with MB v4.5.1, I assume.

          Sorry, it was an idea of mine. The problem of using the Raspberry Pi Imager is that it asks you for filling out the Wifi password automatically. An if you click on "yes" then the Wifi setting is activated. Bad thing for the MoodleBox!

            ralfkrause I don't know, I don't care, whether some "Imager" is bad for MB - I never used it, do not intend to use it. What I care is, why the MBs I make with that single 'dd' command plugged are unusable. Incidentally, a (Windows) colleague is not doing better.

            May be I am doing something dumb. But the area I'm searching, wireless communications, is not my department. You can be assured that I have eliminated various factors. Example the device. Together we are testing on four. SD card, together we have about seven. Wireless noise, tested in various places, including the initial village site which was absolutely queit. Clients, Linux laptop, two Android smart-phones, a couple of Windows PCs, a couple of Windows laptops.

            Characteristic are the syslog messages in my first post coinciding with losing wireless connection.

            Edit: Here is a record in WiFiAnalyzer app:

              Ratna What I care is, why the MBs I make with that single 'dd' command plugged are unusable.

              Just a supposition (may be wrong): The image is not intended to be copied on an active partition, and this could be an issue. Can you reproduce the problem when mounting your image in a USB drive? I do it usually this way with dd and cannot reproduce the problem you describe.

              Side note: for non-technical savvy users, using RPi Imager (which can be installed on Linux, MacOS and Windows) is now the recommended way to install MoodleBox.

                Ratna In your screenshot from Wifi Analyser I see three Wifi signals and all of them are running on channel 11. Your green and the blue signals seem to be extra wide to get more band width. They are using the channels 9 to 11 (or more). Please try to set your MoodleBox Wifi to channel 1 … channel 1 is far away from 9 to 11 and should not interfere with the other Wifi signals. Yes, of course you can use all channels from 1 to 5 ... the distance between the usable channels should be 4 channels. See the picture from https://en.wikipedia.org/wiki/List_of_WLAN_channels


                In my channel own overview you see my main Wifi Bertha (blue) on channel 1 and extra wide. Then I am using three MoodleBoxes with different Wifi SSIDs (brown, green, violet) and on different channels. The both other Wifi signals (orange, yellow) are coming from other rooms. In my teacher workshops I am using only a distance of 3 channels so I can work with 5 MoodleBoxes in the same room ... on channel 1, 4, 7, 10 and 13.

                  Nicolas

                  Thanks for joining! First of all, I was using that 'dd' command for years. And my colleague was using the Imager on Windows, having the same problem.

                  Let's forget all that. Installed the RPi Image from the Debian repos and rewrite a SD. (Side note: Obviously it downloaded the image again. Now OK, but not OK when I am at the site.) No big difference. Immediately I felt that the wi-fi connection was brisk. Then started disconnecting again. May be a bit slower, every minute instead of every 30 sec, but it fails, that repeatedly. (The network manager reconnects, works for less than a minute, then down.) The network manager widget tells a lot. The wireless "cone" get smaller, then vanishes and the small wheel starts to turn.

                  I debug with Conky and bmon. Sie screen-shot. The two figures 'wlan0' and 'Current' (marked red) vanish and reappear.

                  ralfkrause Changing the wi-fi channel is the first thing I did. Just now even completely switched of the router. (It is a dumb 4G router, I can not switch off the access point, have to pull the power.) Zero access points except MoodleBox as shown by the WiFiAnalyzer. No improvement.

                  13 days later

                  After further experiments through elimination the problem seems to be in my hardware, for some unexplained reason both my RPis, a 4 B and a 3 A+, have a hardware problem.

                  To make a long story short, my colleague who was testing RPi 3 B and 3 B+ got MoodleBoxes done with stable wi-fi. I borrowed a RPi 3 B and the SD card. Indeed the combination works very stable. With the only caveat that the wi-fi connection speed is only 72 Mbit/s whereas I have seen MoodleBoxes connecting at many times that speed. Other than some sporadically slow ping packets, the speed remains stable.

                  Now I insert the colleague's SD card in to my Pi 4 B, the old problem, fluctuations in the signal strength and completely dropped connection every minute or so, happens. I insert my SD card to his Pi 3 B, it works as described above.

                  But that explanation doesn't convince. It means that the 3 A+ I had is also defective. (I don't have it anymore, gave it to a third person.) And my colleague with those "good" 3 Bs, he also ran in to exactly the same problem in his initial tries. He doesn't know what he did differently to make them work.

                  Any detective work is highly welcome!

                    Ratna
                    I found that there are four versions of the Raspberry Pi 4B with 4GB and four versions for the Raspberry Pi 4B with 2GB. I can‘t say if there are differences for the Wifi part of the hardware and the software. Perhaps Nicolas knows something about this. If the hardware differences have an effect for the Wifi or other needed hardware functions then the MoodleBox plugin should show the hardware version.

                    https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#new-style-revision-codes-in-use

                      ralfkrause I found that there are four versions of the Raspberry Pi 4B with 4GB and four versions for the Raspberry Pi 4B with 2GB.

                      In fact, those are not really different hardware versions, but release revisions. The hardware specifications are the same between revisions, and I doubt it can have any effect on Wifi connectivity (but I've no internal info about this and may be wrong).

                      Side note: I'll put the revision number in the next version of MoodleBox dashboard (see https://github.com/moodlebox/moodle-tool_moodlebox/issues/111).

                        4 days later

                        Nicolas I've reduced the number of combinations to four: two RPi modles and two MoodleBox versions.

                        1. RPi 3 B
                          `# cat /proc/cpuinfo
                          processor : 3
                          model name : ARMv7 Processor rev 4 (v7l)
                          BogoMIPS : 38.40
                          Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32
                          CPU implementer : 0x41
                          CPU architecture: 7
                          CPU variant : 0x0
                          CPU part : 0xd03
                          CPU revision : 4

                        Hardware : BCM2835
                        Revision : a02082
                        Serial : 000000004be9c346
                        Model : Raspberry Pi 3 Model B Rev 1.2
                        `

                        1. MoodleBox 4.1.0
                          Raspberry Pi OS version Raspbian GNU/Linux 11 (bullseye)
                          Kernel version Linux 5.15.84-v7+ armv7l
                          MoodleBox version 4.1.0 (2022-01-05)
                          MoodleBox plugin version 2.11.1 (2021120100)
                          Moodle version 3.11.13+ (Build: 20230314)

                        1) and 2) together have stable wi-fi. The only thing, the best wi-fi connection I get, my laptop 3 m from the MB, clear line of sight, is 72.2 Mbit/s. For comparison, the wi-fi connection of my 4G router shows 300 Mbit/s!

                        I am the only user, as user 'modlebox'. Moodle is responsive.

                        1. RPi 4 B
                          `model name : ARMv7 Processor rev 3 (v7l)
                          BogoMIPS : 108.00
                          Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32
                          CPU implementer : 0x41
                          CPU architecture: 7
                          CPU variant : 0x0
                          CPU part : 0xd08
                          CPU revision : 3

                        Hardware : BCM2711
                        Revision : c03111
                        Serial : 1000000027a8d112
                        Model : Raspberry Pi 4 Model B Rev 1.1
                        The MB 4.1.0 above (item 2) with this RPi 4 B shows wi-fi fluctuations. The syslog records this pattern repeatedly:Apr 6 14:47:41 moodlebox hostapd: uap0: STA 5c:c5:d4:76:d4:a0 IEEE 802.11: associated
                        Apr 6 14:47:41 moodlebox hostapd: uap0: STA 5c:c5:d4:76:d4:a0 RADIUS: starting accounting session 38674232194BBCF6
                        Apr 6 14:47:41 moodlebox hostapd: uap0: STA 5c:c5:d4:76:d4:a0 WPA: pairwise key handshake completed (RSN)
                        Apr 6 14:47:42 moodlebox hostapd: uap0: STA 5c:c5:d4:76:d4:a0 IEEE 802.11: disassociated
                        Apr 6 14:47:42 moodlebox hostapd: uap0: STA 5c:c5:d4:76:d4:a0 IEEE 802.11: disassociated
                        Apr 6 14:47:49 moodlebox hostapd: uap0: STA 5c:c5:d4:76:d4:a0 IEEE 802.11: associated
                        Apr 6 14:47:49 moodlebox hostapd: uap0: STA 5c:c5:d4:76:d4:a0 RADIUS: starting accounting session 673EB524BAD0312A
                        `
                        Here too the best wi-fi connection I get is 72.2 Mbit/s.

                        4) MoodleBox 4.5.1
                        Raspberry Pi OS version Debian GNU/Linux 11 (bullseye)
                        Kernel version Linux 5.15.76-v8+ aarch64
                        MoodleBox version 4.5.1 (2022-12-30)
                        MoodleBox plugin version 2.14.2 (2022112000)
                        Moodle version 4.1+ (Build: 20221229)

                        Combination of 3) Pi 4 B and 4) MB 4.5.1 is also unstable.

                        This confirms that my Pi 4 B has a problem. Added all the details above, in case somebody has seen this.