ophub / amlogic-s9xxx-armbian

Support for Armbian in Amlogic, Rockchip and Allwinner boxes. Support a311d, s922x, s905x3, s905x2, s912, s905d, s905x, s905w, s905, s905l, rk3588, rk3568, rk3399, rk3328, h6, etc.
GNU General Public License v2.0
6.23k stars 2k forks source link

ZTE b860h v1 kernel 5.15.103 unable to connect to a WiFi network #1199

Closed Sandwichkat closed 1 year ago

Sandwichkat commented 1 year ago

Standard chat template, no routine, no chat. 标准聊天模板,无套路不聊天。

Device Information | 设备信息

Armbian Version | 系统版本

Describe the bug | 问题描述 Describe the problem in detail and attach screenshots if necessary. 详细描述问题,并在必要时附上屏幕截图。

After burning the HG680P bootloader to the box and burning the "Armbian_23.05,0_amlogic_s905x_jammy_5.15.103_server_2023.03.21.img" image to an USB drive and using that to boot, the system booted but no wifi device are detected. After changing the DTB in the uEnv.txt file to "/dtb/amlogic/meson-gxl-s905x-b860h.dtb", wifi is detected but resulted in a kernel panic when trying to connect to a wifi network.

note: i am using the serial console to communicate to the device

uname -a: image

iwconfig before DTB is changed: image

iwconfig after DTB is changed: image

When trying to connect to a wifi network using wpa_supplicant:


root@armbian:\~# wpa_supplicant -B -c /etc/wpa_supplicant.conf -i wlan0
Successfully initialized wpa_supplicant
[  477.035460] RTL871X: cfg80211_rtw_get_txpower
[  477.041847] RTL871X: cfg80211_rtw_get_txpower
[  477.048695] RTL871X: cfg80211_rtw_get_txpower
[  477.054777] RTL871X: cfg80211_rtw_get_txpower
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports[  477.066150] RTL871X: cfg80211_rtw_get_txpower
: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match alread[  477.099056] RTL871X: cfg80211_rtw_flush_pmksa(wlan0)
y configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
nl80211: kernel reports: Match already configured
root@armbian:\~# [  477.207817] RTL871X: cfg80211_rtw_scan(wlan0)
[  477.209680] RTL871X: _rtw_pwr_wakeup call ips_leave....
[  477.213582] RTL871X: ==>ips_leave cnts:13
[  477.217538] RTL871X: ===>  rtw_ips_pwr_up..............
[  477.222706] RTL871X: ===> ips_netdrv_open.........
[  477.227602] RTL871X: FW does not exist before power on!!
[  477.233286] RTL871X: SetHwReg8188F: hci_sus_state=1
[  477.239161] RTL871X: SetHwReg8188F: bMacPwrCtrlOn=1
[  477.242379] RTL871X: SetHwReg8188F: hci_sus_state=2
[  477.247405] RTL871X: PowerOnCheck: val_mix:0x0000063f, res:0x0000063f
[  477.253578] RTL871X: PowerOnCheck: 0x100 the result of cmd52 and cmd53 is the same.
[  477.261221] RTL871X: PowerOnCheck: 0x1B8 test Pass.
[  477.266020] RTL871X: Power on ok!
[  477.269448] RTL871X: rtl8188f_FirmwareDownload(wlan0) tmp_ps=3
[  477.275065] RTL871X: rtl8188f_FirmwareDownload fw: FW_NIC, size: 21020
[  477.281532] RTL871X: rtl8188f_FirmwareDownload: fw_ver=4 fw_subver=0000 sig=0x88f1, Month=08, Date                                                                                                                                        =22, Hour=17, Minute=36
[  477.292393] RTL871X: rtl8188f_FirmwareDownload(): Shift for fw header!
[  477.298866] RTL871X: rtl8188f_FirmwareDownload by IO write!
[  477.412822] RTL871X: polling_fwdl_chksum: Checksum report OK! (1, 0ms), REG_MCUFWDL:0x00050505
[  477.419216] RTL871X: _8051Reset8188: Finish
[  477.432733] RTL871X: _FWFreeToGo: Polling FW ready OK! (155, 13ms), REG_MCUFWDL:0x000505c6
[  477.438698] RTL871X: rtl8188f_FirmwareDownload: DLFW OK !
[  477.444044] RTL871X: rtl8188f_FirmwareDownload success. write_fw:1, 146ms
[  477.450817] RTL871X:  <=== rtl8188f_FirmwareDownload()
[  477.455866] RTL871X: HalDetectPwrDownMode(): PDN=0
[  477.460611] RTL871X: Set RF Chip ID to RF_6052 and RF type to 3.
[  477.947156] RTL871X: #### hw_var_set_opmode() -4815 iface_type(0) mode = 2 ####
[  477.950751] RTL871X: rtw_rf_get_kfree_tx_gain_offset path:0, ch:6, bb_gain_sel:0, kfree_offset:3
[  477.959679] RTL871X: kfree gain_offset 0x55:0x82060
[  477.960230] RTL871X:  after :0x8e070
[  477.968035] RTL871X: <===  rtw_ips_pwr_up.............. in 750ms
[  477.973798] RTL871X: nolinked power save leave
[  477.978298] RTL871X: ==> ips_leave.....LED(0x01028282)...
[  477.983552] RTL871X: rtw_cfg80211_set_probe_req_wpsp2pie(wlan0) listen channel - country:XX, class                                                                                                                                        :81, ch:1
[  479.571212] RTL871X: survey done event(f) band:0 for wlan0
[  479.577738] RTL871X: rtw_indicate_scan_done(wlan0)
[  479.590468] RTL871X: =>cfg80211_rtw_connect(wlan0) - Start to Connection
[  479.593517] RTL871X: ==>rtw_ps_processor .fw_state(8)
[  479.598063] RTL871X: privacy=1, key=0000000000000000, key_len=0, key_idx=0, auth_type=0
[  479.604579] RTL871X: ==>ips_enter cnts:14
[  479.604591] RTL871X: nolinked power save enter
[  479.604598] RTL871X: ===> rtw_ips_pwr_down...................
[  479.604604] RTL871X: ====> rtw_ips_dev_unload...
[  479.617415] RTL871X: SetHwReg8188F: bMacPwrCtrlOn=0
[  479.647023] RTL871X: SetHwReg8188F: hci_sus_state=3
[  479.654903] RTL871X: SetHwReg8188F: hci_sus_state=0
[  479.661422] RTL871X: <=== rtw_ips_pwr_down..................... in 56ms
[  479.668836] RTL871X: _rtw_pwr_wakeup call ips_leave....
[  479.675230] RTL871X: ==>ips_leave cnts:14
[  479.681570] RTL871X: ===>  rtw_ips_pwr_up..............
[  479.687864] RTL871X: ===> ips_netdrv_open.........
[  479.694294] RTL871X: FW does not exist before power on!!
[  479.701470] RTL871X: SetHwReg8188F: hci_sus_state=1
[  479.709659] RTL871X: SetHwReg8188F: bMacPwrCtrlOn=1
[  479.715388] RTL871X: SetHwReg8188F: hci_sus_state=2
[  479.721468] RTL871X: PowerOnCheck: val_mix:0x0000063f, res:0x0000063f
[  479.728009] RTL871X: PowerOnCheck: 0x100 the result of cmd52 and cmd53 is the same.
[  479.735913] RTL871X: PowerOnCheck: 0x1B8 test Pass.
[  479.741639] RTL871X: Power on ok!
[  479.747610] RTL871X: rtl8188f_FirmwareDownload(wlan0) tmp_ps=3
[  479.753403] RTL871X: rtl8188f_FirmwareDownload fw: FW_NIC, size: 21020
[  479.759886] RTL871X: rtl8188f_FirmwareDownload: fw_ver=4 fw_subver=0000 sig=0x88f1, Month=08, Date                                                                                                                                        =22, Hour=17, Minute=36
[  479.775812] RTL871X: rtl8188f_FirmwareDownload(): Shift for fw header!
[  479.782293] RTL871X: rtl8188f_FirmwareDownload by IO write!
[  479.900529] RTL871X: polling_fwdl_chksum: Checksum report OK! (1, 0ms), REG_MCUFWDL:0x00050505
[  479.907720] RTL871X: _8051Reset8188: Finish
[  479.921248] RTL871X: _FWFreeToGo: Polling FW ready OK! (155, 13ms), REG_MCUFWDL:0x000505c6
[  479.927763] RTL871X: rtl8188f_FirmwareDownload: DLFW OK !
[  479.933109] RTL871X: rtl8188f_FirmwareDownload success. write_fw:1, 150ms
[  479.939883] RTL871X:  <=== rtl8188f_FirmwareDownload()
[  479.944934] RTL871X: HalDetectPwrDownMode(): PDN=0
[  479.949689] RTL871X: Set RF Chip ID to RF_6052 and RF type to 3.
[  480.430464] RTL871X: #### hw_var_set_opmode() -4815 iface_type(0) mode = 2 ####
[  480.434215] RTL871X: rtw_rf_get_kfree_tx_gain_offset path:0, ch:6, bb_gain_sel:0, kfree_offset:3
[  480.443152] RTL871X: kfree gain_offset 0x55:0x82060
[  480.443700] RTL871X:  after :0x8e070
[  480.451507] RTL871X: <===  rtw_ips_pwr_up.............. in 770ms
[  480.457268] RTL871X: nolinked power save leave
[  480.461732] RTL871X: ==> ips_leave.....LED(0x01028282)...
[  480.467013] RTL871X: ssid=ZTE_2.4G_xQ3Psu, len=15
[  480.471685] RTL871X: bssid=04:20:84:da:76:e1
[  480.475891] RTL871X: rtw_cfg80211_set_wpa_version, wpa_version=2
[  480.481848] RTL871X: rtw_cfg80211_set_auth_type, nl80211_auth_type=0
[  480.488138] RTL871X: cfg80211_rtw_connect, ie_len=41
[  480.493063] RTL871X: set wpa_ie(length:41):
[  480.497192] RTL871X: 0x30 0x14 0x01 0x00 0x00 0x0f 0xac 0x04
[  480.502892] RTL871X: 0x01 0x00 0x00 0x0f 0xac 0x04 0x01 0x00
[  480.508578] RTL871X: 0x00 0x0f 0xac 0x02 0x00 0x00 0x7f 0x0b
[  480.514278] RTL871X: 0x00 0x00 0x0a 0x02 0x00 0x40 0x40 0x00
[  480.519963] RTL871X: 0x00 0x01 0x20 0x3b 0x04 0x51 0x51 0x53
[  480.525663] RTL871X: 0x54 0x00 0x00 0x00 0x00 0x00 0x00 0x00
[  480.531350] RTL871X: got wpa2_ie, wpa2_ielen:20
[  480.535921] RTL871X: SetHwReg8188F, 5958, RCR= 700060ca
[  480.541015] RTL871X: rtw_cfg80211_set_cipher, ucast=1, cipher=0xfac04
[  480.547400] RTL871X: rtw_cfg80211_set_cipher, ucast=0, cipher=0xfac04
[  480.553774] RTL871X: rtw_cfg80211_set_key_mgt, key_mgt=0xfac02
[  480.559573] RTL871X: rtw_set_802_11_connect(wlan0)  fw_state=0x00000008
[  480.566111] RTL871X: [by_bssid:1][assoc_ssid:ZTE_2.4G_xQ3Psu][to_roam:0] new candidate: ZTE_2.4G_x                                                                                                                                        Q3Psu(04:20:84:da:76:e1, ch7) rssi:-66
[  480.578281] RTL871X: rtw_select_and_join_from_scanned_queue: candidate: ZTE_2.4G_xQ3Psu(04:20:84:d                                                                                                                                        a:76:e1, ch:7)
[  480.588365] RTL871X: link to new AP
[  480.591827] RTL871X: [HT] HAL Support STBC = 0x01
[  480.596470] RTL871X: [HT] Declare supporting RX STBC = 1
[  480.601761] RTL871X: set ssid:dot11AuthAlgrthm=2, dot11PrivacyAlgrthm=4, dot118021XGrpPrivacy=4
[  480.601764] RTL871X: rtw_chk_start_clnt_join(wlan0) req: 7,0,0
[  480.601772] RTL871X: rtw_chk_start_clnt_join(wlan0) union: 7,0,0
[  480.610359] RTL871X: <=cfg80211_rtw_connect, ret 0
[  480.674032] RTL871X: OnBeacon: beacon keys ready
[  480.675955] RTL871X: link to new AP
[  480.678389] RTL871X: start auth
[  480.681500] RTL871X: issue_auth
[  480.690681] RTL871X: OnAuthClient
[  480.692474] RTL871X: auth success, start assoc
[  480.694557] RTL871X: network.SupportedRates[0]=82
[  480.699216] RTL871X: network.SupportedRates[1]=84
[  480.703862] RTL871X: network.SupportedRates[2]=8B
[  480.708526] RTL871X: network.SupportedRates[3]=96
[  480.713177] RTL871X: network.SupportedRates[4]=12
[  480.717841] RTL871X: network.SupportedRates[5]=24
[  480.722492] RTL871X: network.SupportedRates[6]=48
[  480.727154] RTL871X: network.SupportedRates[7]=6C
[  480.731806] RTL871X: network.SupportedRates[8]=0C
[  480.736469] RTL871X: network.SupportedRates[9]=18
[  480.741122] RTL871X: network.SupportedRates[10]=30
[  480.745871] RTL871X: network.SupportedRates[11]=60
[  480.750610] RTL871X: bssrate_len = 12
[  480.764007] RTL871X: OnAssocRsp
[  480.765450] RTL871X: report_join_res(10)
[  480.766891] RTL871X: rtw_joinbss_update_network
[  480.771314] RTL871X: +rtw_update_ht_cap()
[  480.775296] RTL871X: rtw_alloc_macid(wlan0) if1, hwaddr:04:20:84:da:76:e1 macid:0
[  480.782696] RTL871X: rtw_joinbss_update_stainfo
[  480.787192] RTL871X: supp_mcs_set = ff, 00, 00, rf_type=3, tx_ra_bitmap=00000000000fffff
[  480.795203] RTL871X: rtw_get_tx_nss: 1 SS, rf_type=3
[  480.800125] RTL871X: ### Set STA_(0) info ###
[  480.804434] RTL871X: rtw_cfg80211_indicate_connect(wlan0)
[  480.809821] RTL871X: assoc success
[  480.811204] RTL871X: cfg80211_rtw_get_txpower
[  480.818104] RTL871X: cfg80211_rtw_get_txpower
[  480.818235] RTL871X: HW_VAR_BASIC_RATE: 0x15f -> 0x15f -> 0x15f
[  480.827852] RTL871X: WMM(0): 0, a42b
[  480.831235] RTL871X: WMM(1): 0, a44f
[  480.834781] RTL871X: WMM(2): 0, 5e4322
[  480.838495] RTL871X: WMM(3): 0, 2f3222
[  480.842184] RTL871X: wmm_para_seq(0): 0
[  480.845925] RTL871X: wmm_para_seq(1): 1
[  480.849720] RTL871X: wmm_para_seq(2): 2
[  480.853543] RTL871X: wmm_para_seq(3): 3
[  480.857322] RTL871X: HTOnAssocRsp
[  480.860666] RTL871X: ODM_Get_Rate_Bitmap ==> rssi_level:0x00, WirelessMode:0x0b, rate_bitmap:0x000                                                                                                                                        ff005
[  480.869962] RTL871X: UpdateHalRAMask8188F => mac_id:0, networkType:0x0b, mask:0x000fffff
[  480.869962]   ==> rssi_level:0, rate_bitmap:0x000ff005
[  480.883026] RTL871X: rtl8188f_set_FwMacIdConfig_cmd(): mac_id=0 raid=0x3 bw=0 mask=0xff005
[  480.891296] RTL871X: recv eapol packet
[  480.895190] RTL871X: UpdateHalRAMask8188F(): mac_id=0 raid=0x3 bw=0 mask=0xff005 init_rate=0x13
[  480.895699] RTL871X: send eapol packet
[  480.904551] RTL871X: SetHwReg8188F(wlan0): [HW_VAR_MACID_WAKEUP] macid=0, org reg_0x4d4=0x00000000
[  480.907263] Unable to handle kernel paging request at virtual address ffffffc00853edbc
[  480.916325] RTL871X: +rtl8188f_download_rsvd_page(wlan0): iface_type=0 mstatus(1)
[  480.916494] RTL871X: cfg80211_rtw_scan(wlan0)
[  480.916527] RTL871X: cfg80211_rtw_scan(wlan0): scan deny
[  480.923984] Mem abort info:
[  480.923993]   ESR = 0x0000000096000021
[  480.923998]   EC = 0x25: DABT (current EL), IL = 32 bits
[  480.931597] RTL871X: rtw_hal_set_fw_rsvd_page PageSize: 128, RsvdPageNUm: 8
[  480.935702]   SET = 0, FnV = 0
[  480.935706]   EA = 0, S1PTW = 0
[  480.935709]   FSC = 0x21: alignment fault
[  480.940970] RTL871X: LocPsPoll: 2
[  480.940978] RTL871X: LocNullData: 3
[  480.943712] Data abort info:
[  480.947436] RTL871X: LocQosNull: 4
[  480.952697]   ISV = 0, ISS = 0x00000021
[  480.959595] RTL871X: rtw_hal_set_fw_rsvd_page PageNum(5), pktlen(578)
[  480.962613]   CM = 0, WnR = 0
[  480.962621] swapper pgtable: 4k pages, 39-bit VAs, pgdp=0000000002423000
[  480.962628] [ffffffc00853edbc] pgd=1000000037fff003
[  480.965812] RTL871X: rtw_hal_set_fw_rsvd_page: Set RSVD page location to Fw ,TotalPacketLen(578),                                                                                                                                         TotalPageNum(5)
[  480.969685] , p4d=1000000037fff003, pud=1000000037fff003
[  480.972962] RTL871X: RsvdPageLoc: ProbeRsp=0 PsPoll=2 Null=3 QoSNull=4 BTNull=0
[  480.976415] , pmd=100000000352c003
[  480.979340] RTL871X: wlan0: 1 DL RSVD page success! DLBcnCount:1, poll:1
[  480.982621] , pte=00680000046f1703
[  480.982628] Internal error: Oops: 96000021 [#1] PREEMPT SMP
[  481.048767] Modules linked in: cpufreq_powersave cpufreq_conservative cpufreq_userspace sunrpc zra                                                                                                                                        m 8189fs hci_uart btqca btrtl btintel btbcm cfg80211 bluetooth sg meson_vdec(C) lima videobuf2_dma_co                                                                                                                                        ntig rfkill snd_soc_meson_gx_sound_card snd_soc_meson_card_utils gpu_sched v4l2_mem2mem snd_soc_meson                                                                                                                                        _aiu meson_ir snd_soc_meson_codec_glue meson_gxbb_wdt tcp_bbr sch_fq ip_tables x_tables
[  481.089122] CPU: 0 PID: 1752 Comm: wpa_supplicant Tainted: G         C        5.15.103-flippy-82+o                                                                                                                                         #218
[  481.098435] Hardware name: ZTE B860H (DT)
[  481.102404] pstate: 40000005 (nZcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[  481.109302] pc : rtw_is_list_empty+0x4/0x1c [8189fs]
[  481.114221] lr : rtw_xmit_classifier+0xb4/0x154 [8189fs]
[  481.119481] sp : ffffffc008f13840
[  481.122758] x29: ffffffc008f13840 x28: ffffffc00a606248 x27: 0000000000001790
[  481.129830] x26: 0000000000000000 x25: ffffffc00830579a x24: ffffffc008302790
[  481.136902] x23: ffffffc00853ed7c x22: 0000000000000002 x21: ffffff80047e0500
[  481.143975] x20: ffffffc00853edbc x19: ffffffc00838d000 x18: 0000000000000008
[  481.151047] x17: 0000000000cdcdcd x16: 0000000000000001 x15: 0000000000000001
[  481.158120] x14: 0000000000000020 x13: 000000000000e176 x12: 000000000000e176
[  481.165192] x11: 0000000000000000 x10: 0000000000000403 x9 : 0000000000000001
[  481.172265] x8 : 0000000000000001 x7 : 8e88b29e3bf65f58 x6 : 5f58e176da842004
[  481.179337] x5 : ffffffc008f138f6 x4 : ffffff80082b6410 x3 : ffffffc00853ed7c
[  481.186410] x2 : 0000000000000001 x1 : 0000000000000201 x0 : ffffffc00853edbc
[  481.193484] Call trace:
[  481.195974]  rtw_is_list_empty+0x4/0x1c [8189fs]
[  481.200470]  rtl8188fs_hal_xmit+0x88/0xdc [8189fs]
[  481.205214]  rtw_xmit+0xa74/0xabc [8189fs]
[  481.209268]  _rtw_xmit_entry+0x144/0x1cc [8189fs]
[  481.213926]  rtw_xmit_entry+0x20/0x38 [8189fs]
[  481.218325]  dev_hard_start_xmit+0x108/0x1a0
[  481.222549]  sch_direct_xmit+0x178/0x204
[  481.226430]  __qdisc_run+0x2d8/0x98c
[  481.229966]  __dev_queue_xmit.llvm.4218582727913625779+0x3cc/0xad8
[  481.236090]  dev_queue_xmit+0x14/0x20
[  481.239713]  packet_sendmsg+0xf58/0x131c
[  481.243594]  __sys_sendto+0x11c/0x18c
[  481.247217]  __arm64_sys_sendto+0x28/0x38
[  481.251184]  invoke_syscall+0x40/0x100
[  481.254892]  el0_svc_common.llvm.8496550273537362780+0xbc/0x188
[  481.260758]  do_el0_svc+0x24/0x78
[  481.264035]  el0_svc+0x20/0x78
[  481.267054]  el0t_64_sync_handler+0x84/0xe4
[  481.271194]  el0t_64_sync+0x1a0/0x1a4
[  481.274822] Code: f9000400 d50323bf d65f03c0 d503233f (c8dffc08)
[  481.280857] ---[ end trace 8d0b2d8610b9c655 ]---
[  481.285427] Kernel panic - not syncing: Oops: Fatal exception in interrupt
[  481.292240] SMP: stopping secondary CPUs
[  481.296128] Kernel Offset: disabled
[  481.299570] CPU features: 0x00002001,00000846
[  481.303883] Memory Limit: none
[  481.306904] ---[ end Kernel panic - not syncing: Oops: Fatal exception in interrupt ]---
ophub commented 1 year ago

There is no way to solve a certain version of kernel panic. You can only update to other versions of the kernel test to see which kernel can be used normally.

taotao108 commented 1 year ago

数码视讯Q7 nand版使用5.15.103内核还是无法使用armbian-config连接WiFi,连接就内核崩溃(kernel panic)

ophub commented 1 year ago

遇到某个版本内核恐慌,只能换其他版本,等修复。可能降低频率可以稳定。

Sandwichkat commented 1 year ago

There is no way to solve a certain version of kernel panic. You can only update to other versions of the kernel test to see which kernel can be used normally.

i have previously tried the kernel version 5.15.100, however that version also have the wifi bug problem. and since i have only been recently installing armbian to this box, i have no way of getting older version of the kernel.

is there a way to get older kernels than 5.15.100?

ophub commented 1 year ago

I used to always roll delete old kernels, no historical versions kept. Today I added actions to the kernel repository. From now on, historical versions can be downloaded from releases and kept for a long time.

https://github.com/ophub/kernel/blob/main/.github/workflows/compile-kernel.yml

https://github.com/ophub/kernel/releases/tag/kernel_stable

Sandwichkat commented 1 year ago

Update: WiFi is working on kernel 5.4.238. Though i haven't tested 5.10.176 due to the box not booting using that.

Thanks for the help @ophub .

ophub commented 1 year ago

ok