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
#11
Well that's promising, a bit surprising but positive.

I wonder if it is worth making the same change for wlan0? Nothing to lose.

I hope it continues to work for you.

Regards
Chris
Reply
#12
actually, the chage can only be made for wlan0: 

Code:
root@openplotter:~# iwconfig wlan0 power off
root@openplotter:~# iwconfig wlan9 power off
Error for wireless request "Set Power Management" (8B2C) :
   SET failed on device wlan9 ; Invalid argument.


Maybe, the problem was, that wlan0 is idle and "real" device goes into powersave, and the "virtual" device wlan9 doesn't like that ;-)
Reply
#13
Tobias

I can certainly set power mode for both

Code:
pi@dolly:/etc $ sudo iw wlan0 set power_save off
pi@dolly:/etc $ sudo iw wlan9 set power_save off
pi@dolly:/etc $ sudo iw wlan9 set power_save on
pi@dolly:/etc $ sudo iw wlan0 set power_save on
pi@dolly:/etc $ iw wlan9 get power_save
Power save: on
pi@dolly:/etc $ iw wlan0 get power_save
Power save: on
pi@dolly:/etc $
I note you are using iwconfig, I'm not sure if that makes a difference, I use iw.


I also sudo the commands, again not sure if that is actually required. << forget that, I see you are logged in as the ROOT user for some reason.

I'd be interested to know how you get on.

Chris
Reply
#14
Hi Chris, 

as i said, my Linux is a little rusty. I just learned that iwconfig is deprecated since 2015  Wink . iw works for both interfaces.

With power management on  it was running for a couple of hours, but now i have 50h uptime without any problems: 

Code:
root@openplotter:~# iw wlan9 get power_save
Power save: off
root@openplotter:~# iw wlan0 get power_save
Power save: off


pi@openplotter:~ $ uptime; ping -c 1 10.10.10.72
08:37:08 up 2 days,  2:02,  3 users,  load average: 0.18, 0.12, 0.09
PING 10.10.10.72 (10.10.10.72) 56(84) bytes of data.
64 bytes from 10.10.10.72: icmp_seq=1 ttl=255 time=1.64 ms

--- 10.10.10.72 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 1.644/1.644/1.644/0.000 ms
Reply
#15
That good news Tobias, let's hope others find the answer useful

We should thank holgerw really as he identified the cause. After that it was just using the right commands.

Have you thought about how you would make the change persistent, that is, so it will work after a reboot without needing to issue the commands?

Thanks
Chris
Reply
#16
And its gone.  Angry   The scan error seem harmless, they happened every now and then while it was working, but at 1434 hours "Firmware has halted or crashed" does not sound good. 15 seconds after that, wlan0 is restarted, but wlan9 is not. Which brings me back to my original question: how do i re-enable wlan9 in AP mode? 



Code:
pi@openplotter:~ $ dmesg -e | tail -40
[Dec 4 08:41] brcmfmac: brcmf_cfg80211_set_power_mgmt: power save disabled
[Dec 4 11:37] ieee80211 phy0: brcmf_run_escan: error (-52)
[  +0.000021] ieee80211 phy0: brcmf_cfg80211_scan: scan error (-52)
[Dec 4 14:34] ieee80211 phy0: brcmf_fw_crashed: Firmware has halted or crashed
[  +0.493328] ieee80211 phy0: brcmf_fil_cmd_data: bus is down. we have nothing to do.
[  +0.000017] ieee80211 phy0: brcmf_cfg80211_stop_ap: SET SSID error (-5)
[  +0.000007] ieee80211 phy0: brcmf_fil_cmd_data: bus is down. we have nothing to do.
[  +0.000005] ieee80211 phy0: brcmf_cfg80211_stop_ap: BRCMF_C_DOWN error -5
[  +0.000005] ieee80211 phy0: brcmf_fil_cmd_data: bus is down. we have nothing to do.
[  +0.000004] ieee80211 phy0: brcmf_cfg80211_stop_ap: setting AP mode failed -5
[  +0.000005] ieee80211 phy0: brcmf_fil_cmd_data: bus is down. we have nothing to do.
[  +0.000004] ieee80211 phy0: brcmf_fil_cmd_data: bus is down. we have nothing to do.
[  +0.000004] ieee80211 phy0: brcmf_cfg80211_stop_ap: BRCMF_C_UP error -5
[  +0.000010] ieee80211 phy0: brcmf_fil_cmd_data: bus is down. we have nothing to do.
[  +0.000004] ieee80211 phy0: brcmf_set_mpc: fail to set mpc
[  +0.000005] ieee80211 phy0: brcmf_fil_cmd_data: bus is down. we have nothing to do.
[  +0.000004] ieee80211 phy0: brcmf_fil_cmd_data: bus is down. we have nothing to do.
[  +0.207322] ieee80211 phy0: brcmf_netdev_start_xmit: xmit rejected state=0
[  +0.324839] ieee80211 phy0: brcmf_fil_cmd_data: bus is down. we have nothing to do.
[  +0.000035] ieee80211 phy0: brcmf_cfg80211_get_tx_power: error (-5)
[  +0.613070] brcmfmac: brcmf_sdiod_probe: Failed to set F1 blocksize
[  +0.000065] brcmfmac: brcmf_sdio_bus_reset: Failed to probe after sdio device reset: ret -123
[  +0.000648] mmc1: card 0001 removed
[  +0.110569] mmc1: new high speed SDIO card at address 0001
[  +0.001023] brcmfmac: F1 signature read @0x18000000=0x15264345
[  +0.005486] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[  +0.274671] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[  +0.005238] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Nov  1 2021 00:37:25 version 7.45.241 (1a2f2fa CY) FWID 01-703fd60
[ +10.108822] brcmfmac: brcmf_cfg80211_set_power_mgmt: power save enabled
[  +5.551233] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
pi@openplotter:~ $



Whatever fixes this, will be put into rc.local - or it will become a cron job: check whether wlan9 is up, and if not, re-enable it.

update: I did some more digging, and tried restarting hostapd, which complains:

Code:
Dec 04 16:38:47 openplotter hostapd[217076]: Configuration file: /etc/hostapd/hostapd.conf
Dec 04 16:38:47 openplotter hostapd[217076]: Could not read interface wlan9 flags: No such device
Dec 04 16:38:47 openplotter hostapd[217076]: nl80211: Driver does not support authentication/association or connect commands
Dec 04 16:38:47 openplotter hostapd[217076]: nl80211: deinit ifname=wlan9 disabled_11b_rates=0
Dec 04 16:38:47 openplotter hostapd[217076]: Could not read interface wlan9 flags: No such device
Dec 04 16:38:47 openplotter hostapd[217076]: nl80211 driver initialization failed.
Dec 04 16:38:47 openplotter hostapd[217076]: wlan9: interface state UNINITIALIZED->DISABLED
Dec 04 16:38:47 openplotter hostapd[217076]: wlan9: AP-DISABLED
Dec 04 16:38:47 openplotter hostapd[217076]: wlan9: CTRL-EVENT-TERMINATING
Dec 04 16:38:47 openplotter hostapd[217076]: hostapd_free_hapd_data: Interface wlan9 wasn't started
Dec 04 16:38:47 openplotter systemd[1]: hostapd.service: Control process exited, code=exited, status=1/FAILURE
Reply
#17
Don't you love technology, having solved one problem you just uncover the next one.

I very much doubt there is any way of overcoming a firmware crash other than a reboot. I have never seen another way. The device is essentially screwed so cannot be expect to respond to the normal command set.

As the errors suggest it is highly likely to be a firmware issue to be solved with an update or downgrade of the current version.

rpi-eeprom-update should show if an update is available but there is always a risk when making any update of course.

Good luck
Chris


UPDATE

I see from your update that wlan0 has recovered but not wlan9.

sudo ifconfig wlan9 up doesn't work I assume?
Reply
#18
i still ty to figure out, what exactly happens during startup, how wlan9 is created. After all, wlan0 which shares the same hardware, comes back to life a few seconds after the firmware crash. 


P.S.: i actually do love technology, as it is a fun thin to play with in winter, when the boat is not in the water. And after all, the boat sails just fine without any technology ....
Reply
#19
Tobias

When next in its failing state it will be interesting to see what messages the command "sudo ifconfig wlan9 up" shows.

Also it might be worth trying:
sudo sh /home/pi/.openplotter/Network/.openplotter/start1.sh

You might want to double check that path in case it is different on your system

Good luck
Chris
Reply
#20
Hi Chris, 


in the failed state, i get 
Code:
root@openplotter:~# ifconfig wlan9 up
wlan9: ERROR while getting interface flags: No such device

 whereas after a reboot,  ifconfig wlan9 down; sleep10; ifconfig wlan9 up works. 
/home/pi/.openplotter/Network is a great hint! Until now, i was only searching in /etc but grep -ir wlan9 /etc/* did not turn up any usable results.

This part from /home/pi/.openplotter/Network/.openplotter/start1.sh should do the trick: 
Code:
#before adding an access point to the same device it must be turned off
ifconfig wlan0 down
#adding wlan9 as access point to wlan0"
iw dev wlan0 interface add wlan9 type __ap
#enable turned off wlan9
ifconfig wlan9 up

I'll try that after the next crash.



Best regards, Tobias
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)