This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
restart wlan9
#1
Hi everybody, 

how do i re-enable wlan9?

I need to connect to two Wifis, so the interface wlan0 is connected to my "main" network, and wlan9 provides an AP for some devices.
After several hours, wlan9 is gone.

is there a way to re-enable wlan9? My Linux is a little rusty, ifup wlan9 did not work.  

I am not sure if these errors are related:



Code:
root@openplotter:~# dmesg | tail -40
[   21.073203]  MAI: soc_pcm_open() failed (-19)
[   24.232136] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[   31.699843] cam-dummy-reg: disabling
[   59.832513] uart-pl011 fe201000.serial: no DMA platform data
[ 1829.955040] ieee80211 phy0: brcmf_run_escan: error (-52)
[ 1829.955061] ieee80211 phy0: brcmf_cfg80211_scan: scan error (-52)
[14783.193102] ieee80211 phy0: brcmf_run_escan: error (-52)
[14783.193138] ieee80211 phy0: brcmf_cfg80211_scan: scan error (-52)
[27436.486025] ieee80211 phy0: brcmf_run_escan: error (-52)
[27436.486045] ieee80211 phy0: brcmf_cfg80211_scan: scan error (-52)
[40089.903233] ieee80211 phy0: brcmf_run_escan: error (-52)
[40089.903276] ieee80211 phy0: brcmf_cfg80211_scan: scan error (-52)
[46373.891829] ieee80211 phy0: brcmf_fw_crashed: Firmware has halted or crashed
[46374.289295] ieee80211 phy0: brcmf_netdev_start_xmit: xmit rejected state=0
[46374.417147] ieee80211 phy0: brcmf_fil_cmd_data: bus is down. we have nothing to do.
[46374.417164] ieee80211 phy0: brcmf_cfg80211_stop_ap: SET SSID error (-5)
[46374.417171] ieee80211 phy0: brcmf_fil_cmd_data: bus is down. we have nothing to do.
[46374.417175] ieee80211 phy0: brcmf_cfg80211_stop_ap: BRCMF_C_DOWN error -5
[46374.417180] ieee80211 phy0: brcmf_fil_cmd_data: bus is down. we have nothing to do.
[46374.417184] ieee80211 phy0: brcmf_cfg80211_stop_ap: setting AP mode failed -5
[46374.417189] ieee80211 phy0: brcmf_fil_cmd_data: bus is down. we have nothing to do.
[46374.417193] ieee80211 phy0: brcmf_fil_cmd_data: bus is down. we have nothing to do.
[46374.417197] ieee80211 phy0: brcmf_cfg80211_stop_ap: BRCMF_C_UP error -5
[46374.417207] ieee80211 phy0: brcmf_fil_cmd_data: bus is down. we have nothing to do.
[46374.417212] ieee80211 phy0: brcmf_set_mpc: fail to set mpc
[46374.417217] ieee80211 phy0: brcmf_fil_cmd_data: bus is down. we have nothing to do.
[46374.417221] ieee80211 phy0: brcmf_fil_cmd_data: bus is down. we have nothing to do.
[46374.953043] ieee80211 phy0: brcmf_fil_cmd_data: bus is down. we have nothing to do.
[46374.953060] ieee80211 phy0: brcmf_cfg80211_get_tx_power: error (-5)
[46375.565681] brcmfmac: brcmf_sdiod_probe: Failed to set F1 blocksize
[46375.565717] brcmfmac: brcmf_sdio_bus_reset: Failed to probe after sdio device reset: ret -123
[46375.565991] mmc1: card 0001 removed
[46375.676733] mmc1: new high speed SDIO card at address 0001
[46375.677532] brcmfmac: F1 signature read @0x18000000=0x15264345
[46375.682522] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[46375.934768] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[46375.938885] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Nov  1 2021 00:37:25 version 7.45.241 (1a2f2fa CY) FWID 01-703fd60
[46385.880223] brcmfmac: brcmf_cfg80211_set_power_mgmt: power save enabled
[46391.337783] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[47336.175710] TCP: request_sock_TCP: Possible SYN flooding on port 8080. Sending cookies.  Check SNMP counters.

Best regards, 
Tobias
Reply
#2
Can you tell us a little more about your set up:
Openplotter version?
OS version?
Hardware - Pi3/Pi4/something else?
Which network adapters are wlan0 an wlan9 associated with? onboard/usb?
Reply
#3
I am using openplotter3, the most recent image with all updates on a raspberry 4. Both WLAN9 and WLAN0 are associated to the onboard wifi.

I guess my question boils down to: how do I bring a network interface up or down in openplotter via command line?

Best regards,
Tobias
Reply
#4
try:
sudo ifconfig wlan9 up

ifup doesn't work because it looks for the content of /etc/network/interfaces which is not used in Openplotter.
Reply
#5
Hi Tobias

Did this work or are you still having problems?

Thanks
Chris
Reply
#6
This line is the culprit: brcmfmac: brcmf_cfg80211_set_power_mgmt: power save enabled
The WLAN goes to sleep after some time, google for "rasperry wlan sleep disable".
But it may help also to send some periodic data via wlan...

& tell us afterwards.

Holger
Reply
#7
generally, ifconfig wlan9 up works, but not in my special case:

I use the onboard wifi both to connect to the internet ( wlan0, 192.168.0.0/24 at least here at home) and to provide an AP ( wlan9, 10.10.10.0/24), where for example the wind sensor (10.10.10.72)  is connected.

after some time, wlan0 still works fine, but wlan9 is gone, and i cannot restart it.  I booted the Pi last evening, and it was recording wind data via wlan9 for ~ 10h, but then it stopped around 0605 this morning. 

The windsensor (yachta) is just fine, and switched back to internal AP mode, when it lost the connection to the PI.

Code:
root@openplotter:~# ping -c 3 10.10.10.72
PING 10.10.10.72 (10.10.10.72) 56(84) bytes of data.
^C
--- 10.10.10.72 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2055ms

root@openplotter:~# ifconfig wlan9
wlan9: error fetching interface information: Device not found
root@openplotter:~# ifconfig wlan9 up
wlan9: ERROR while getting interface flags: No such device
root@openplotter:~# ping -c 3 192.168.0.1
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
64 bytes from 192.168.0.1: icmp_seq=1 ttl=64 time=5.31 ms
64 bytes from 192.168.0.1: icmp_seq=2 ttl=64 time=3.93 ms
64 bytes from 192.168.0.1: icmp_seq=3 ttl=64 time=7.35 ms

--- 192.168.0.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 3.925/5.529/7.354/1.408 ms
root@openplotter:~# ifconfig wlan0
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
       inet 192.168.0.234  netmask 255.255.255.0  broadcast 192.168.0.255
       inet6 2a02:8070:4280:b620:dea6:32ff:fef6:2b71  prefixlen 64  scopeid 0x0<global>
       inet6 fe80::dea6:32ff:fef6:2b71  prefixlen 64  scopeid 0x20<link>
       ether dc:a6:32:f6:2b:71  txqueuelen 1000  (Ethernet)
       RX packets 16528  bytes 1502361 (1.4 MiB)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 9004  bytes 2029363 (1.9 MiB)
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

root@openplotter:~#

[Image: wind-gone.png]
Reply
#8
(2022-12-02, 07:28 AM)tobias.e Wrote: generally, ifconfig wlan9 up works, but not in my special case:

I use the onboard wifi both to connect to the internet ( wlan0, 192.168.0.0/24 at least here at home) and to provide an AP ( wlan9, 10.10.10.0/24), where for example the wind sensor (10.10.10.72)  is connected.

after some time, wlan0 still works fine, but wlan9 is gone, and i cannot restart it.  I booted the Pi last evening, and it was recording wind data via wlan9 for ~ 10h, but then it stopped around 0605 this morning. 

The windsensor (yachta) is just fine, and switched back to internal AP mode, when it lost the connection to the PI.

Code:
root@openplotter:~# ping -c 3 10.10.10.72
PING 10.10.10.72 (10.10.10.72) 56(84) bytes of data.
^C
--- 10.10.10.72 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2055ms

root@openplotter:~# ifconfig wlan9
wlan9: error fetching interface information: Device not found
root@openplotter:~# ifconfig wlan9 up
wlan9: ERROR while getting interface flags: No such device
root@openplotter:~# ping -c 3 192.168.0.1
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
64 bytes from 192.168.0.1: icmp_seq=1 ttl=64 time=5.31 ms
64 bytes from 192.168.0.1: icmp_seq=2 ttl=64 time=3.93 ms
64 bytes from 192.168.0.1: icmp_seq=3 ttl=64 time=7.35 ms

--- 192.168.0.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 3.925/5.529/7.354/1.408 ms
root@openplotter:~# ifconfig wlan0
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
       inet 192.168.0.234  netmask 255.255.255.0  broadcast 192.168.0.255
       inet6 2a02:8070:4280:b620:dea6:32ff:fef6:2b71  prefixlen 64  scopeid 0x0<global>
       inet6 fe80::dea6:32ff:fef6:2b71  prefixlen 64  scopeid 0x20<link>
       ether dc:a6:32:f6:2b:71  txqueuelen 1000  (Ethernet)
       RX packets 16528  bytes 1502361 (1.4 MiB)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 9004  bytes 2029363 (1.9 MiB)
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

root@openplotter:~#

[Image: wind-gone.png]
Using the internal WiFi adaptor for both connecting to network and create ap wasn't stable enough I found, usb/WiFi adaptor solved this.
Reply
#9
I agree with PaddyB and I always use a separate USB dongle so each interface has just one function however that doesn't immediately help you Tobias.

It is puzzling that although you are passing regular traffic it still stops working. I've set up my system here to mimic yours and I don't lose wlan9 but maybe I haven't left it running long enough yet.

A post above from holgerw suggests that maybe it's a power management issue but that's hard  to understand as wlan0 remains active and it is the same physical device. However you can check is power management is enabled or not, I get the following:

Code:
pi@dolly:/etc $ iw wlan9 get power_save
Power save: on
pi@dolly:/etc $ sudo iw wlan9 set power_save off
pi@dolly:/etc $ iw wlan9 get power_save
Power save: off
pi@dolly:/etc $

I am very doubtful whether this is going to help because wlan0 also shows that power saving is enabled yet that doesn't disappear. Is it worth a try?

Note that this is not persistent, after a reboot it will revert to power saving enabled.

Are there any relevant messages in dmesg?

Code:
dmesg | grep wlan9

Maybe the real answer is that using one interface for both client and AP is, at the moment, too flakey!

Good luck
Chris
Reply
#10
So I disabled power power management, and it has been running for over a day without problems. Correlation? Coincidence? I'll wait and see....
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)