News:

Server migration complete, Welcome to version 2.1.1

+-+-

+-User

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+-Site Stats

Members
Total Members: 15699
Latest: Nicole4Z
New This Month: 17
New This Week: 1
New Today: 0
Stats
Total Posts: 128636
Total Topics: 15831
Most Online Today: 48
Most Online Ever: 7634
(January 21, 2020, 02:14:03 AM)
Users Online
Members: 2
Guests: 22
Total: 24

FPP v6.2 Beaglebone Black/Green WiFi at startup

Started by egenoup, December 06, 2022, 08:45:48 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

egenoup

I apologize in advanced if this issue/question has been brought up before (I asked a very similar question 6 years ago, but the solution then did not solve the issue this time), but I was not able to find an answer after a few hours of searching the forums. 

I just upgraded both of my Beaglebones black/Green from v3.x to 6.2 via a full OS upgrade (SD card).  Before the upgrade the Beaglebone, cape (F4-B) and the Edimax RTL7811 were working without any issues.  The issue is when you first boot (or after a reboot) the wireless adapter is active for a brief moment (pings for about 24-25 seconds) and then stops and does not come back online on its own.  After it stops pinging, I can pull the adapter out and plug it back in to restore network connectivity until the next reboot. 

From the syslog (excerpts below), it seems that after it does the cape detection and/or configuring of eth0, the wireless driver is unable to connect.  I would venture to say that when I remove the adapter and plug it back in it is causing the driver to reload/reset.  I know just enough Linux to be very dangerous! 

Is there any fix for this?  I am sure that if this was a common issue, I would have seen more posts about it.  Maybe it is my old WiFi adapter.  Which is the "recommended" adapter (amazon link would be great) I am willing to work with the developers/anyone to troubleshoot and test.

Thanks,

Charles

Aug  3 09:23:06 BBBTree kernel: [    9.906055] usb 1-1: new high-speed USB device number 2 using musb-hdrc
Aug  3 09:23:06 BBBTree kernel: [   10.039456] usb 1-1: New USB device found, idVendor=7392, idProduct=7811, bcdDevice= 2.00
Aug  3 09:23:06 BBBTree kernel: [   10.039479] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Aug  3 09:23:06 BBBTree kernel: [   10.039486] usb 1-1: Product: 802.11n WLAN Adapter
Aug  3 09:23:06 BBBTree kernel: [   10.039493] usb 1-1: Manufacturer: Realtek
Aug  3 09:23:06 BBBTree kernel: [   10.039501] usb 1-1: SerialNumber: 00e04c000001
Aug  3 09:23:06 BBBTree kernel: [   12.712972] remoteproc remoteproc0: 4a334000.pru is available
Aug  3 09:23:06 BBBTree kernel: [   12.716585] remoteproc remoteproc1: 4a338000.pru is available
Aug  3 09:23:06 BBBTree kernel: [   13.406120] EXT4-fs (mmcblk1p1): re-mounted. Opts: (null)
Aug  3 09:23:06 BBBTree kernel: [   13.620438] cfg80211: Loading compiled-in X.509 certificates for regulatory database
Aug  3 09:23:06 BBBTree kernel: [   13.640565] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
Aug  3 09:23:06 BBBTree kernel: [   13.690875] 8192cu: loading out-of-tree module taints kernel.
Aug  3 09:23:06 BBBTree kernel: [   14.160316] usbcore: registered new interface driver rtl8192cu
Aug  3 09:23:11 BBBTree systemd-networkd[209]: wlan0: Configuring with /etc/systemd/network/10-wlan0.network.
Aug  3 09:23:11 BBBTree systemd[1]: Found device EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS].
Aug  3 09:23:11 BBBTree systemd[1]: Started WPA supplicant daemon (interface-specific version).
Aug  3 09:23:12 BBBTree wpa_supplicant[363]: Successfully initialized wpa_supplicant
Aug  3 09:23:12 BBBTree systemd-networkd[209]: wlan0: Link UP
Aug  3 09:23:12 BBBTree wpa_supplicant[363]: wlan0: CTRL-EVENT-REGDOM-CHANGE init=USER type=COUNTRY alpha2=US
Aug  3 09:23:13 BBBTree wpa_supplicant[363]: wlan0: Trying to associate with 16:02:8e:96:99:e1 (SSID='SantaWiFi' freq=2447 MHz)
Aug  3 09:23:14 BBBTree wpa_supplicant[363]: wlan0: Associated with 16:02:8e:96:99:e1
Aug  3 09:23:14 BBBTree systemd-networkd[209]: wlan0: Connected WiFi access point: SantaWiFi (16:02:8e:96:99:e1)
Aug  3 09:23:14 BBBTree wpa_supplicant[363]: wlan0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
Aug  3 09:23:14 BBBTree kernel: [   29.321067] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
Aug  3 09:23:14 BBBTree wpa_supplicant[363]: wlan0: WPA: Key negotiation completed with 16:02:8e:96:99:e1 [PTK=CCMP GTK=CCMP]
Aug  3 09:23:14 BBBTree wpa_supplicant[363]: wlan0: CTRL-EVENT-CONNECTED - Connection to 16:02:8e:96:99:e1 completed [id=0 id_str=]
Aug  3 09:23:14 BBBTree systemd-networkd[209]: wlan0: Gained carrier

Aug  3 09:23:14 BBBTree systemd[1]: Found device /dev/ttyS0.
Aug  3 09:23:15 BBBTree avahi-daemon[283]: Joining mDNS multicast group on interface wlan0.IPv6 with address fe80::76da:38ff:fe8c:1a36.
Aug  3 09:23:15 BBBTree systemd-networkd[209]: wlan0: Gained IPv6LL
Aug  3 09:23:15 BBBTree avahi-daemon[283]: New relevant interface wlan0.IPv6 for mDNS.
Aug  3 09:23:15 BBBTree avahi-daemon[283]: Registering new address record for fe80::76da:38ff:fe8c:1a36 on wlan0.*.
Aug  3 09:23:15 BBBTree systemd-networkd[209]: wlan0: DHCPv4 address 192.168.0.18/24, gateway 192.168.0.1 acquired from 192.168.0.1
Aug  3 09:23:15 BBBTree avahi-daemon[283]: Joining mDNS multicast group on interface wlan0.IPv4 with address 192.168.0.18.
Aug  3 09:23:15 BBBTree avahi-daemon[283]: New relevant interface wlan0.IPv4 for mDNS.
Aug  3 09:23:15 BBBTree avahi-daemon[283]: Registering new address record for 192.168.0.18 on wlan0.IPv4.
Aug  3 09:23:18 BBBTree systemd[1]: Reached target Hardware activated USB gadget.
Aug  3 09:23:23 BBBTree systemd[1]: Found device /dev/mmcblk0p1.
Aug  3 09:23:23 BBBTree systemd[1]: Starting File System Check on /dev/mmcblk0p1...
Aug  3 09:23:24 BBBTree systemd-fsck[476]: fsck.fat 4.2 (2021-01-31)
Aug  3 09:23:24 BBBTree systemd-fsck[476]: /dev/mmcblk0p1: 76 files, 32570/60281 clusters
Aug  3 09:23:24 BBBTree systemd[1]: Finished File System Check on /dev/mmcblk0p1.
Aug  3 09:23:24 BBBTree systemd[1]: home-fpp-media.mount: Directory /home/fpp/media to mount over is not empty, mounting anyway.
Aug  3 09:23:24 BBBTree systemd[1]: Mounting /home/fpp/media...
Aug  3 09:23:25 BBBTree systemd[1]: Mounted /home/fpp/media.
Aug  3 09:23:25 BBBTree systemd[1]: Starting FPP Cape Detection...
Aug  3 09:23:25 BBBTree detect_cape[497]: Running detect_cape
Aug  3 09:23:25 BBBTree detect_cape[497]: Running fppcapedetect
Aug  3 09:23:25 BBBTree systemd-udevd[205]: Using default interface naming scheme 'v247'.
Aug  3 09:23:26 BBBTree detect_cape[506]: Did not find 0x50 on i2c2, trying i2c1.
Aug  3 09:23:26 BBBTree detect_cape[506]: Did not find eeprom on i2c.
Aug  3 09:23:26 BBBTree detect_cape[506]: EEPROM file doesn't exist .
Aug  3 09:23:26 BBBTree detect_cape[506]: Using /home/fpp/media/config/cape-eeprom.bin
Aug  3 09:23:26 BBBTree detect_cape[506]: Found cape F4-B, Version 1.0, Serial Number: FPP-INTERNAL
Aug  3 09:23:26 BBBTree detect_cape[506]: - signature verified for key ID: fpp
Aug  3 09:23:26 BBBTree detect_cape[506]: - eeprom location is valid
Aug  3 09:23:26 BBBTree detect_cape[506]: - extracted file: /tmp/fppcuDqVUxq/tmp/cape-info.tgz
Aug  3 09:23:26 BBBTree detect_cape[497]: Done fppcapedetect
Aug  3 09:23:26 BBBTree detect_cape[497]: Done
Aug  3 09:23:26 BBBTree systemd[1]: fppcapedetect.service: Deactivated successfully.
Aug  3 09:23:26 BBBTree systemd[1]: Finished FPP Cape Detection.
Aug  3 09:23:26 BBBTree systemd[1]: Started FPP OLED Status Display.
Aug  3 09:23:27 BBBTree systemd[1]: Starting Inialization routines for FPP...
Aug  3 09:23:27 BBBTree systemd[1]: Starting FPP RTC Setup...
Aug  3 09:23:27 BBBTree piRTC[548]: FPP - Configuring RTC, None Selected
Aug  3 09:23:28 BBBTree fpp_init[544]:     - Checking SSH keys
Aug  3 09:23:28 BBBTree systemd[1]: fpprtc.service: Deactivated successfully.
Aug  3 09:23:28 BBBTree systemd[1]: Finished FPP RTC Setup.
Aug  3 09:23:29 BBBTree fppoled[543]: FPP OLED Status Display Driver
Aug  3 09:23:29 BBBTree fppoled[543]:     Led Type: 0
Aug  3 09:23:29 BBBTree fpp_init[649]: FPP - Setting up for the Falcon Player on the BeagleBone Black platform
Aug  3 09:23:29 BBBTree fpp_init[649]: FPP - Checking for required directories
Aug  3 09:23:30 BBBTree systemd[1]: fppoled.service: Control process exited, code=killed, status=15/TERM
Aug  3 09:23:30 BBBTree systemd[1]: fppoled.service: Failed with result 'signal'.
Aug  3 09:23:30 BBBTree fpp_init[649]: /opt/fpp/scripts/functions: line 461: rfkill: command not found
Aug  3 09:23:30 BBBTree fpp_init[649]: /opt/fpp/scripts/functions: line 461: rfkill: command not found
Aug  3 09:23:32 BBBTree systemd[1]: Reloading.
Aug  3 09:23:33 BBBTree haveged[218]: haveged: ver: 1.9.14; arch: generic; vend: ; build: (gcc 10.2.1 CTV); collect: 128K
Aug  3 09:23:33 BBBTree haveged[218]: haveged: cpu: (VC); data: 16K (D); inst: 16K (D); idx: 12/40; sz: 15006/57790
Aug  3 09:23:33 BBBTree haveged[218]: haveged: tot tests(BA8): A:1/1 B:1/1 continuous tests(B):  last entropy estimate 8.00164
Aug  3 09:23:33 BBBTree haveged[218]: haveged: fills: 0, generated: 0
Aug  3 09:23:36 BBBTree systemd-udevd[210]: Using default interface naming scheme 'v247'.
Aug  3 09:23:38 BBBTree systemd-udevd[205]: remoteproc1: Process '/bin/ln -sT '/sys/class/remoteproc/remoteproc1' /dev/remoteproc/pruss-core1' failed with exit code 1.
Aug  3 09:23:38 BBBTree systemd-udevd[216]: remoteproc0: Process '/bin/ln -sT '/sys/class/remoteproc/remoteproc0' /dev/remoteproc/pruss-core0' failed with exit code 1.
Aug  3 09:23:39 BBBTree systemd-networkd[209]: eth0: Configuring with /etc/systemd/network/10-eth0.network.
Aug  3 09:23:39 BBBTree kernel: [   54.946079] cpsw 4a100000.ethernet: initializing cpsw version 1.12 (0)
Aug  3 09:23:39 BBBTree kernel: [   55.015937] SMSC LAN8710/LAN8720 4a101000.mdio:00: attached PHY driver [SMSC LAN8710/LAN8720] (mii_bus:phy_addr=4a101000.mdio:00, irq=POLL)
Aug  3 09:23:39 BBBTree systemd-networkd[209]: eth0: Link UP
Aug  3 09:23:40 BBBTree systemd[1]: Reloading WPA supplicant daemon (interface-specific version)...
Aug  3 09:23:40 BBBTree systemd[1]: Reloaded WPA supplicant daemon (interface-specific version).
Aug  3 09:23:40 BBBTree fpp_init[649]: /opt/fpp/scripts/functions: line 412: [: missing `]'
Aug  3 09:23:40 BBBTree wpa_supplicant[363]: wlan0: CTRL-EVENT-DISCONNECTED bssid=16:02:8e:96:99:e1 reason=3 locally_generated=1
Aug  3 09:23:40 BBBTree systemd-networkd[209]: wlan0: Lost carrier
Aug  3 09:23:40 BBBTree wpa_supplicant[363]: wlan0: CTRL-EVENT-DSCP-POLICY clear_all

Aug  3 09:23:40 BBBTree fpp_init[649]: /opt/fpp/scripts/functions: line 412: [: missing `]'
Aug  3 09:23:40 BBBTree fpp_init[649]: net.ipv4.ip_forward = 0
Aug  3 09:23:40 BBBTree systemd[1]: Reloading Network Configuration...
Aug  3 09:23:41 BBBTree wpa_supplicant[363]: wlan0: Trying to associate with 16:02:8e:96:99:e1 (SSID='SantaWiFi' freq=2447 MHz)
Aug  3 09:23:41 BBBTree wpa_supplicant[363]: wlan0: Association request to the driver failed

Aug  3 09:23:41 BBBTree systemd-networkd[209]: wlan0: Reconfiguring with /etc/systemd/network/10-wlan0.network.
Aug  3 09:23:41 BBBTree systemd[1]: Reloaded Network Configuration.




Duramadmax

Same issue I have on my bbb/octoscroller tune-to sign. Worked great before fpp6.x...now it will not stay on wi-fi...remove and reinstall wifi dongle and it may connect for a bit then drop out....Kind of frustrating....
  

Poporacer

I would try a boot delay of like 5-10 seconds to give the devices a little more time to initialize. I am not sure if that will work, but worth a shot.
If to err is human, I am more human than most people.

egenoup

Quote from: Poporacer on December 08, 2022, 08:28:36 AMI would try a boot delay of like 5-10 seconds to give the devices a little more time to initialize. I am not sure if that will work, but worth a shot.

Just added 30 seconds to the boot delay and still nothing.  The adapter comes online for a brief moment and then goes offline until it is removed and then reinserted.

Poporacer, which Dongle are you using?

egenoup

if only there was a way to simulate the removal and reinsertion of the dongle in software...

Poporacer

Quote from: egenoup on December 08, 2022, 11:48:14 AMPoporacer, which Dongle are you using?
I am using a few different ones, but I really like the ones from Kulplights.com that support the AP mode, makes configuration and troubleshooting so much easier.
If to err is human, I am more human than most people.

egenoup

So issuing the following:

modprobe -r 8192cu && modprobe 8192cu

will reset the WiFi adapter once it stops working, but only if using the Linux Kernel drivers.  It seems that using the "External" drivers is not loading all drivers needed to run the WiFi interface.

WiFi Drivers: External

root@BBBTree:/home/fpp# lsmod                                                                                                                                             
Module                  Size  Used by                                                                                                                                     
snd_dummy              20480  0                                                                                                                                           
ti_eqep                16384  0                                                                                                                                           
counter                20480  1 ti_eqep                                                                                                                                   
nls_ascii              16384  1                                                                                                                                           
nls_cp437              16384  1                                                                                                                                           
vfat                   24576  1                                                                                                                                           
fat                    69632  1 vfat                                                                                                                                       
zram                   28672  1                                                                                                                                           
zsmalloc               28672  1 zram                                                                                                                                       
8192cu                540672  0                                                                                                                                           
cfg80211              651264  1 8192cu                                                                                                                                     
irq_pruss_intc         20480  0                                                                                                                                           
pru_rproc              28672  1                                                                                                                                           
pruss                  20480  1 pru_rproc 


WiFi Drivers: Linux Kernel


root@BBBTree:/home/fpp# lsmod                                                                                                                                             
Module                  Size  Used by                                                                                                                                     
8192cu                540672  0                                                                                                                                           
snd_dummy              20480  0                                                                                                                                           
rtl8xxxu              114688  0                                                                                                                                           
rtl8192c_common        45056  0                                                                                                                                           
rtlwifi                65536  1 rtl8192c_common                                                                                                                           
mac80211              688128  2 rtlwifi,rtl8xxxu                                                                                                                           
ti_eqep                16384  0                                                                                                                                           
counter                20480  1 ti_eqep                                                                                                                                   
nls_ascii              16384  1                                                                                                                                           
nls_cp437              16384  1                                                                                                                                           
vfat                   24576  1                                                                                                                                           
fat                    69632  1 vfat                                                                                                                                       
libarc4                16384  1 mac80211                                                                                                                                   
zram                   28672  1                                                                                                                                           
zsmalloc               28672  1 zram                                                                                                                                       
cfg80211              651264  4 mac80211,8192cu,rtlwifi,rtl8xxxu                                                                                                           
irq_pruss_intc         20480  0                                                                                                                                           
pru_rproc              28672  1                                                                                                                                           
pruss                  20480  1 pru_rproc 

These two "lsmod" commands were run on the shell from a connection to the eth0 interface right after boot.  Notice the difference in modules loaded, specifically "rtlwifi" and "rtl8192c_common". 

Now just to figure out how to run the modprobe commands after the system is done booting (Assistance would be great, but I will eventually figure it out)....

egenoup

I figured out a "bandaid" for this issue.  My two BBBs are working without a glitch now.  I will share my fix with a few requirements...



You do this at your own risk.  If you are forced to blow away your SD card and start from scratch, You have been warned! I am not responsible for any lost files or configuration settings.



This worked for both of my setups, but I was using the same dongle for both (old EDIMAX branded 2.4GHz 8192 dongle).

The key is that removing the dongle and re-inserting it will bring the WiFi module back to life.  If it does not, then you may have a different issue.  To find out if re-inserting the dongle works do the following:

   Boot up the BBB while constantly pinging the BBB WiFi interface.
   The WiFi interface should ping back for 25 to 30 seconds and then stop pinging back wait 30 seconds after it stops pinging
   remove the USB WiFi dongle and reinsert it.
   If the WiFi interface starts to ping back and remains up, then this bandaid may work for you
   If re-inserting the dongle does not work for you, you can try and switch the "WiFi drivers" (under "Network" settings) to the other setting and reboot after making the change.  There are only two settings ("Linux Kernel" and "external"), flip flop between them.
   If re-inserting the dongle in either mode of the "WiFi drivers" does not fix the issue, then this Band-Aid will NOT work for your situation.


know a bit about Linux
be able to connect via eth0 to the BBB in question
know how to use a command line editor
know or be able to find out which driver the dongle is using:
   lshw -C Network
   find the entry with "WiFi" and look for "driver=" in the "configuration:" line
      *-network:2

      description: Wireless interface
      physical id: 4
      bus info: usb@1:1
      logical name: wlan0
      serial: 74:da:38:02:1f:69
      capabilities: ethernet physical wireless
      configuration: broadcast=yes driver=rtl8192cu driverversion=5.10.109-fpp i


PROCEDURE:

Login to BBB

sudo su

Create a file under: /home/fpp/ResetWiFi.sh with the following lines (replace the "8192cu" in both cased below with your dongle driver):

   #!/bin/bash
   #script to reset WiFi Adapter
   logger "Resetting WiFi Adapter"
   modprobe -r 8192cu && modprobe 8192cu
   logger "WiFi Adapter reset"



chmod 755 ResetWiFi.sh

Create a crontab entrie for root:

crontab -e

at the end of the file add this line:

@reboot sleep 60 && sudo /home/fpp/ResetWiFi.sh

Reboot the BBB and wait between 90 to 120 seconds.  The WiFi interface should come back to life.


Support FPP

+- Recent Topics

Flexible ws2811 panels by k6ccc
Today at 05:30:59 PM

Problem with one of my Remotes - syslog always starts with "soliciting.." by Jayl
March 28, 2023, 11:03:41 PM

F48v4-NS unable to connect to WiFi Hotspot by joeyblasko
March 28, 2023, 03:18:46 PM

F/S Arduino UNO R3 with extras by StickyWicket
March 28, 2023, 09:28:23 AM

DMX to pneumatic solenoid by deanathpc
March 27, 2023, 07:54:22 AM

Libre SBC with oled by mel4853
March 24, 2023, 04:04:06 PM

K8-Pi - Random Pixels on by cybercop23
March 24, 2023, 10:44:49 AM

Limitations on Video file size? by Jayl
March 23, 2023, 11:06:14 AM

FPP 7 Kubernetes Error by Jlwright325
March 22, 2023, 11:11:59 AM

FPP Install on Raspberry Pi Zero W by k6ccc
March 21, 2023, 05:53:50 PM

Powered by EzPortal
Powered by SMFPacks Menu Editor Mod