ct-Open-Source / tuya-convert

A collection of scripts to flash Tuya IoT devices to alternative firmwares
MIT License
4.64k stars 498 forks source link

start_flash wlan kernel error #813

Open donorconohue opened 4 years ago

donorconohue commented 4 years ago

After stopping service systemd.resolved, I get a complete os crash and the following kernel dump trying to run start_flash, which is shown in my syslog:

Nov  5 17:45:06 localhost wpa_supplicant[3005]: p2p-dev-wlan0: CTRL-EVENT-TERMINATING 
Nov  5 17:45:06 localhost kernel: [  220.615710@0] [dhd] dhd_dbg_stop_pkt_monitor, 1859
Nov  5 17:45:06 localhost kernel: [  220.616813@0] [dhd-wlan0] wl_iw_event : [0 times] disconnected with f4:c1:14:f7:93:f5, event 11, reason 8
Nov  5 17:45:06 localhost kernel: [  220.616866@1] [dhd] CFG80211-ERROR) wl_is_linkdown : Link down Reason : WLC_E_LINK
Nov  5 17:45:06 localhost kernel: [  220.616873@1] [dhd] CFG80211-ERROR) wl_is_linkdown : Link down Reason : WLC_E_LINK
Nov  5 17:45:06 localhost kernel: [  220.616879@1] [dhd] CFG80211-ERROR) wl_notify_connect_status : link down--clearing disconnect IEs
Nov  5 17:45:06 localhost kernel: [  220.635973@0] [dhd-wlan0] wl_ext_iapsta_event : [S] Link down with f4:c1:14:f7:93:f5, WLC_E_DISASSOC(11), reason 8
Nov  5 17:45:06 localhost kernel: [  220.655563@0] [dhd-wlan0] wl_iw_event : Link Down with f4:c1:14:f7:93:f5, reason=2
Nov  5 17:45:06 localhost kernel: [  220.672363@0] [dhd-wlan0] wl_ext_iapsta_event : [S] Link down with f4:c1:14:f7:93:f5, WLC_E_LINK(16), reason 2
Nov  5 17:45:06 localhost kernel: [  220.694319@3] [dhd] dhd_dbg_stop_pkt_monitor, 1859
Nov  5 17:45:07 localhost wpa_supplicant[3005]: wlan0: CTRL-EVENT-DISCONNECTED bssid=f4:c1:14:f7:93:f5 reason=3 locally_generated=1
Nov  5 17:45:07 localhost NetworkManager[2980]: <warn>  [1604598307.3212] sup-iface[0x555d7150f0,wlan0]: connection disconnected (reason -3)
Nov  5 17:45:07 localhost kernel: [  221.352603@5] [dhd] CFG80211-ERROR) wl_cfg80211_disconnect : Clearing disconnect IEs 
Nov  5 17:45:07 localhost wpa_supplicant[3005]: nl80211: deinit ifname=wlan0 disabled_11b_rates=0
Nov  5 17:45:07 localhost wpa_supplicant[3005]: wlan0: CTRL-EVENT-TERMINATING 
Nov  5 17:45:07 localhost NetworkManager[2980]: <info>  [1604598307.4158] device (wlan0): supplicant interface state: completed -> down
Nov  5 17:45:07 localhost NetworkManager[2980]: <info>  [1604598307.4163] supplicant: wpa_supplicant stopped
Nov  5 17:45:07 localhost NetworkManager[2980]: <info>  [1604598307.4171] device (wlan0): state change: activated -> unavailable (reason 'supplicant-failed', sys-iface-state: 'managed')
Nov  5 17:45:07 localhost NetworkManager[2980]: <info>  [1604598307.4393] dhcp4 (wlan0): canceled DHCP transaction
Nov  5 17:45:07 localhost NetworkManager[2980]: <info>  [1604598307.4393] dhcp4 (wlan0): state changed bound -> done
Nov  5 17:45:07 localhost NetworkManager[2980]: <info>  [1604598307.4399] dhcp6 (wlan0): canceled DHCP transaction
Nov  5 17:45:07 localhost NetworkManager[2980]: <info>  [1604598307.4400] dhcp6 (wlan0): state changed bound -> done
Nov  5 17:45:07 localhost avahi-daemon[2968]: Withdrawing address record for 10.0.0.31 on wlan0.
Nov  5 17:45:07 localhost avahi-daemon[2968]: Leaving mDNS multicast group on interface wlan0.IPv4 with address 10.0.0.31.
Nov  5 17:45:07 localhost avahi-daemon[2968]: Interface wlan0.IPv4 no longer relNov  5 17:46:37 localhost kernel: [    0.000000@0] Booting Linux on physical CPU 0x0

Im running Ubuntu 20.04.1 LTS on a Khadas Vim 3. Any ideas on how to fix this?

donorconohue commented 4 years ago

I've narrowed it down to

sudo ip link set $WLAN down
sudo ip addr add $GATEWAY/24 dev $WLAN
sudo ip link set $WLAN up

in setup_ap.sh. Whenever I set wlan0 up or down it causes the kernel to spazz out. Any ideas?