Unable to connect wifi ap

Hello,
I’m using gentoo on Rock Pi 4, every thing is OK except wifi.
sames like radio is good and detect some AP, but cannot connect to any of them.

wifi scan result

rockpi4 ~ # nmcli dev wifi
IN-USE  SSID               MODE   CHAN  RATE        SIGNAL  BARS  SECURITY  
        GL-MIFI-0f3        Infra  11    135 Mbit/s  100     ▂▄▆█  WPA1 WPA2 
        onhub              Infra  11    195 Mbit/s  94      ▂▄▆█  WPA2      
        TP-LINK_2497       Infra  11    405 Mbit/s  62      ▂▄▆_  WPA1 WPA2 
        TP-LINK602         Infra  1     405 Mbit/s  59      ▂▄▆_  WPA1 WPA2 
        onhub              Infra  149   405 Mbit/s  54      ▂▄__  WPA2      
        jin23401           Infra  1     270 Mbit/s  50      ▂▄__  WPA1 WPA2 

failed connect to onhub

rockpi4 ~ # nmcli dev wifi connect onhub password ********
Error: Connection activation failed: (0) No reason given.

system log as follows:

[ 2205.693823] dhd_stop: Enter ffffffc0ed89c000
[ 2205.705366] CFGP2P-ERROR) wl_cfgp2p_disable_discovery :  do nothing, not initialized
[ 2205.705395] CFGP2P-ERROR) wl_cfgp2p_deinit_priv : In
[ 2205.705908] wl_android_wifi_off in 1
[ 2205.705916] wl_android_wifi_off in 2: g_wifi_on=1, on_failure=1
[ 2205.706210] dhd_dbg_detach_pkt_monitor, 2204
[ 2205.706217] dhd_bus_devreset: == Power OFF ==
[ 2205.706467] bcmsdh_oob_intr_unregister: Enter
[ 2205.706495] dhd_txglom_enable: enable 0
[ 2205.706502] dhd_conf_set_txglom_params: txglomsize=0, deferred_tx_len=0, bus_txglom=-1
[ 2205.706507] dhd_conf_set_txglom_params: tx_in_rx=1, txinrx_thres=-1, dhd_txminmax=1
[ 2205.706512] dhd_conf_set_txglom_params: tx_max_offset=0, txctl_tmo_fix=5
[ 2205.706518] sdioh_set_mode: set txglom_mode to copy
[ 2205.706523] dhd_bus_devreset:  WLAN OFF DONE
[ 2205.706589] wifi_platform_set_power = 0
[ 2205.706595] ======== PULL WL_REG_ON(-1) LOW! ========
[ 2205.706601] [WLAN_RFKILL]: rockchip_wifi_power: 0
[ 2205.706618] [WLAN_RFKILL]: wifi shut off power.
[ 2205.706623] wl_android_wifi_off out
[ 2205.707314] dhd_stop: Exit
[ 2205.711473] dhd_set_mac_addr_handler: interface info not available/down 
[ 2205.812578] dhd_open: Enter ffffffc0ed89c000
[ 2205.812604] 
               Dongle Host Driver, version 1.579.77.41.2 (r)
[ 2205.812614] wl_android_wifi_on in 1
[ 2205.812622] wl_android_wifi_on in 2: g_wifi_on=0
[ 2205.812630] wifi_platform_set_power = 1
[ 2205.812637] ======== PULL WL_REG_ON(-1) HIGH! ========
[ 2205.812705] [WLAN_RFKILL]: rockchip_wifi_power: 1
[ 2205.812714] [WLAN_RFKILL]: wifi turn on power. -1
[ 2206.114066] sdio_reset_comm():
[ 2206.128905] mmc_host mmc2: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, actual 400000HZ div = 0)
[ 2206.145872] mmc_host mmc2: Bus speed (slot 0) = 200000Hz (slot req 200000Hz, actual 200000HZ div = 0)
[ 2206.197560] mmc2: queuing unknown CIS tuple 0x80 (2 bytes)
[ 2206.200884] mmc2: queuing unknown CIS tuple 0x80 (3 bytes)
[ 2206.204194] mmc2: queuing unknown CIS tuple 0x80 (3 bytes)
[ 2206.210133] mmc2: queuing unknown CIS tuple 0x80 (7 bytes)
[ 2206.217438] mmc2: queuing unknown CIS tuple 0x81 (9 bytes)
[ 2206.326738] mmc_host mmc2: Bus speed (slot 0) = 150000000Hz (slot req 150000000Hz, actual 150000000HZ div = 0)
[ 2206.482692] dwmmc_rockchip fe310000.dwmmc: Successfully tuned phase to 218
[ 2206.482905] sdioh_start: set sd_f2_blocksize 256
[ 2206.484774] 
               
               dhd_bus_devreset: == WLAN ON ==
[ 2206.485191] F1 signature read @0x18000000=0x15294345
[ 2206.497595] F1 signature OK, socitype:0x1 chip:0x4345 rev:0x9 pkg:0x2
[ 2206.500335] DHD: dongle ram size is set to 819200(orig 819200) at 0x198000
[ 2206.500540] dhd_bus_set_default_min_res_mask: Unhandled chip id
[ 2206.501837] dhd_os_open_image: /system/etc/firmware/config.txt (190 bytes) open success
[ 2206.501913] dhd_conf_read_others: ccode = ALL
[ 2206.501938] dhd_conf_read_others: regrev = 0
[ 2206.501958] dhd_conf_read_sdio_params: dhd_doflow = 1
[ 2206.501978] dhd_conf_read_others: srl = 15
[ 2206.501999] dhd_conf_read_others: lrl = 15
[ 2206.502036] Final fw_path=/system/etc/firmware/fw_bcm43456c5_ag.bin
[ 2206.502049] Final nv_path=/system/etc/firmware/nvram_ap6256.txt
[ 2206.502061] Final clm_path=/system/etc/firmware/clm_bcmdhd.blob
[ 2206.502073] Final conf_path=/system/etc/firmware/config.txt
[ 2206.502087] dhd_set_bus_params: set use_rxchain 0
[ 2206.502101] dhd_set_bus_params: set txglomsize 36
[ 2206.505312] dhd_os_open_image: /system/etc/firmware/fw_bcm43456c5_ag.bin (482927 bytes) open success
[ 2206.663190] dhd_os_open_image: /system/etc/firmware/nvram_ap6256.txt (2099 bytes) open success
[ 2206.663269] NVRAM version: AP6256_NVRAM_V1.1_08252017
[ 2206.665432] dhdsdio_write_vars: Download, Upload and compare of NVRAM succeeded.
[ 2206.742010] dhd_bus_init: enable 0x06, ready 0x06 (waited 0us)
[ 2206.742164] bcmsdh_oob_intr_register HW_OOB irq=70 flags=0x4
[ 2206.742328] dhd_get_memdump_info: File [/data/misc/wifi/.memdump.info] doesn't exist
[ 2206.742335] dhd_get_memdump_info: MEMDUMP ENABLED = 2
[ 2206.748054] dhd_preinit_ioctls: Set tcpack_sup_mode 0
[ 2206.748064] dhd_tcpack_suppress_set 352: already set to 0
[ 2206.748722] dhd_apply_default_clm: Ignore clm file /system/etc/firmware/clm_bcmdhd.blob
[ 2206.751666] Firmware up: op_mode=0x0005, MAC=6c:21:a2:37:9b:c4
[ 2206.751674] dhd_conf_set_country: set country ALL, revision 0
[ 2206.752636] CONFIG-ERROR) dhd_conf_set_bufiovar: country setting failed -2
[ 2206.753954] Country code: US (US/0)
[ 2206.754598] dhd_conf_set_intiovar: set roam_off 1
[ 2206.758450] dhd_conf_set_intiovar: set WLC_SET_SRL 32 15
[ 2206.758888] dhd_conf_set_intiovar: set WLC_SET_LRL 34 15
[ 2206.773883]   Driver: 1.579.77.41.2 (r)
                 Firmware: wl0: Jun 16 2017 12:38:26 version 7.45.96.2 (66c4e21@sh-git) (r) FWID 01-1813af84
                 CLM: 9.2.9 
[ 2206.774342] dhd_txglom_enable: enable 1
[ 2206.774351] dhd_conf_set_txglom_params: txglomsize=36, deferred_tx_len=36, bus_txglom=-1
[ 2206.774358] dhd_conf_set_txglom_params: tx_in_rx=1, txinrx_thres=-1, dhd_txminmax=1
[ 2206.774364] dhd_conf_set_txglom_params: tx_max_offset=0, txctl_tmo_fix=5
[ 2206.774371] sdioh_set_mode: set txglom_mode to copy
[ 2206.774383] dhd_conf_get_disable_proptx: fw_proptx=1, disable_proptx=-1
[ 2206.775999] dhd_wlfc_hostreorder_init(): successful bdcv2 tlv signaling, 64
[ 2206.776387] dhd_conf_set_intiovar: set ampdu_hostreorder 1
[ 2206.778317] dhd_pno_init: Support Android Location Service
[ 2206.799117] CFG80211-ERROR) wl_cfg80211_event : Event handler is not created
[ 2206.800139] rtt_do_get_ioctl: failed to send getbuf proxd iovar (CMD ID : 1), status=-23
[ 2206.800158] dhd_rtt_init : FTM is not supported
[ 2206.800174] dhd_preinit_ioctls: SensorHub diabled 0
[ 2206.801365] dhd_preinit_ioctls failed to set ShubHub disable
[ 2206.804989] wl_android_wifi_on: Success
[ 2206.856077] dhd_open: Exit ret=0
[ 2206.859280] dhd_set_mac_addr_handler: MACID is overwritten
[ 2206.992227] dhd_stop: Enter ffffffc0ed89c000
[ 2207.000731] CFGP2P-ERROR) wl_cfgp2p_disable_discovery :  do nothing, not initialized
[ 2207.000754] CFGP2P-ERROR) wl_cfgp2p_deinit_priv : In
[ 2207.002793] wl_android_wifi_off in 1
[ 2207.002800] wl_android_wifi_off in 2: g_wifi_on=1, on_failure=1
[ 2207.003190] dhd_dbg_detach_pkt_monitor, 2204
[ 2207.003197] dhd_bus_devreset: == Power OFF ==
[ 2207.003309] bcmsdh_oob_intr_unregister: Enter
[ 2207.003335] dhd_txglom_enable: enable 0
[ 2207.003341] dhd_conf_set_txglom_params: txglomsize=0, deferred_tx_len=0, bus_txglom=-1
[ 2207.003346] dhd_conf_set_txglom_params: tx_in_rx=1, txinrx_thres=-1, dhd_txminmax=1
[ 2207.003350] dhd_conf_set_txglom_params: tx_max_offset=0, txctl_tmo_fix=5
[ 2207.003355] sdioh_set_mode: set txglom_mode to copy
[ 2207.003359] dhd_bus_devreset:  WLAN OFF DONE
[ 2207.003384] wifi_platform_set_power = 0
[ 2207.003389] ======== PULL WL_REG_ON(-1) LOW! ========
[ 2207.003394] [WLAN_RFKILL]: rockchip_wifi_power: 0
[ 2207.003410] [WLAN_RFKILL]: wifi shut off power.
[ 2207.003414] wl_android_wifi_off out
[ 2207.003444] dhd_stop: Exit
[ 2207.005215] dhd_set_mac_addr_handler: interface info not available/down 
[ 2207.106208] dhd_open: Enter ffffffc0ed89c000
[ 2207.106247] 
               Dongle Host Driver, version 1.579.77.41.2 (r)
[ 2207.106266] wl_android_wifi_on in 1
[ 2207.106280] wl_android_wifi_on in 2: g_wifi_on=0
[ 2207.106294] wifi_platform_set_power = 1
[ 2207.106308] ======== PULL WL_REG_ON(-1) HIGH! ========
[ 2207.106323] [WLAN_RFKILL]: rockchip_wifi_power: 1
[ 2207.106338] [WLAN_RFKILL]: wifi turn on power. -1
[ 2207.406999] sdio_reset_comm():
[ 2207.422092] mmc_host mmc2: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, actual 400000HZ div = 0)
[ 2207.438868] mmc_host mmc2: Bus speed (slot 0) = 200000Hz (slot req 200000Hz, actual 200000HZ div = 0)
[ 2207.489026] mmc2: queuing unknown CIS tuple 0x80 (2 bytes)
[ 2207.492398] mmc2: queuing unknown CIS tuple 0x80 (3 bytes)
[ 2207.495628] mmc2: queuing unknown CIS tuple 0x80 (3 bytes)
[ 2207.501448] mmc2: queuing unknown CIS tuple 0x80 (7 bytes)
[ 2207.508502] mmc2: queuing unknown CIS tuple 0x81 (9 bytes)
[ 2207.615205] mmc_host mmc2: Bus speed (slot 0) = 150000000Hz (slot req 150000000Hz, actual 150000000HZ div = 0)
[ 2207.869579] dwmmc_rockchip fe310000.dwmmc: Successfully tuned phase to 218
[ 2207.869775] sdioh_start: set sd_f2_blocksize 256
[ 2207.870310] 
               
               dhd_bus_devreset: == WLAN ON ==
[ 2207.870463] F1 signature read @0x18000000=0x15294345
[ 2207.875276] F1 signature OK, socitype:0x1 chip:0x4345 rev:0x9 pkg:0x2
[ 2207.876238] DHD: dongle ram size is set to 819200(orig 819200) at 0x198000
[ 2207.876339] dhd_bus_set_default_min_res_mask: Unhandled chip id
[ 2207.876638] dhd_os_open_image: /system/etc/firmware/config.txt (190 bytes) open success
[ 2207.876879] dhd_conf_read_others: ccode = ALL
[ 2207.876904] dhd_conf_read_others: regrev = 0
[ 2207.876924] dhd_conf_read_sdio_params: dhd_doflow = 1
[ 2207.876945] dhd_conf_read_others: srl = 15
[ 2207.876965] dhd_conf_read_others: lrl = 15
[ 2207.877001] Final fw_path=/system/etc/firmware/fw_bcm43456c5_ag.bin
[ 2207.877014] Final nv_path=/system/etc/firmware/nvram_ap6256.txt
[ 2207.877026] Final clm_path=/system/etc/firmware/clm_bcmdhd.blob
[ 2207.877038] Final conf_path=/system/etc/firmware/config.txt
[ 2207.877052] dhd_set_bus_params: set use_rxchain 0
[ 2207.877066] dhd_set_bus_params: set txglomsize 36
[ 2207.877711] dhd_os_open_image: /system/etc/firmware/fw_bcm43456c5_ag.bin (482927 bytes) open success
[ 2207.923126] dhd_os_open_image: /system/etc/firmware/nvram_ap6256.txt (2099 bytes) open success
[ 2207.923170] NVRAM version: AP6256_NVRAM_V1.1_08252017
[ 2207.923527] dhdsdio_write_vars: Download, Upload and compare of NVRAM succeeded.
[ 2207.998872] dhd_bus_init: enable 0x06, ready 0x06 (waited 0us)
[ 2207.999027] bcmsdh_oob_intr_register HW_OOB irq=70 flags=0x4
[ 2207.999192] dhd_get_memdump_info: File [/data/misc/wifi/.memdump.info] doesn't exist
[ 2207.999198] dhd_get_memdump_info: MEMDUMP ENABLED = 2
[ 2208.004347] dhd_preinit_ioctls: Set tcpack_sup_mode 0
[ 2208.004356] dhd_tcpack_suppress_set 352: already set to 0
[ 2208.004908] dhd_apply_default_clm: Ignore clm file /system/etc/firmware/clm_bcmdhd.blob
[ 2208.007324] Firmware up: op_mode=0x0005, MAC=6c:21:a2:37:9b:c4
[ 2208.007332] dhd_conf_set_country: set country ALL, revision 0
[ 2208.008594] CONFIG-ERROR) dhd_conf_set_bufiovar: country setting failed -2
[ 2208.009883] Country code: US (US/0)
[ 2208.010530] dhd_conf_set_intiovar: set roam_off 1
[ 2208.014237] dhd_conf_set_intiovar: set WLC_SET_SRL 32 15
[ 2208.014641] dhd_conf_set_intiovar: set WLC_SET_LRL 34 15
[ 2208.029623]   Driver: 1.579.77.41.2 (r)
                 Firmware: wl0: Jun 16 2017 12:38:26 version 7.45.96.2 (66c4e21@sh-git) (r) FWID 01-1813af84
                 CLM: 9.2.9 
[ 2208.030182] dhd_txglom_enable: enable 1
[ 2208.030197] dhd_conf_set_txglom_params: txglomsize=36, deferred_tx_len=36, bus_txglom=-1
[ 2208.030208] dhd_conf_set_txglom_params: tx_in_rx=1, txinrx_thres=-1, dhd_txminmax=1
[ 2208.030218] dhd_conf_set_txglom_params: tx_max_offset=0, txctl_tmo_fix=5
[ 2208.030228] sdioh_set_mode: set txglom_mode to copy
[ 2208.030248] dhd_conf_get_disable_proptx: fw_proptx=1, disable_proptx=-1
[ 2208.032590] dhd_wlfc_hostreorder_init(): successful bdcv2 tlv signaling, 64
[ 2208.033081] dhd_conf_set_intiovar: set ampdu_hostreorder 1
[ 2208.035979] dhd_pno_init: Support Android Location Service
[ 2208.056152] CFG80211-ERROR) wl_cfg80211_event : Event handler is not created
[ 2208.057620] rtt_do_get_ioctl: failed to send getbuf proxd iovar (CMD ID : 1), status=-23
[ 2208.057633] dhd_rtt_init : FTM is not supported
[ 2208.057707] dhd_preinit_ioctls: SensorHub diabled 0
[ 2208.058888] dhd_preinit_ioctls failed to set ShubHub disable
[ 2208.062619] wl_android_wifi_on: Success
[ 2208.107244] dhd_open: Exit ret=0
[ 2208.110358] dhd_set_mac_addr_handler: MACID is overwritten
[ 2215.079203] bcmsdh_sdmmc: Failed to Write byte F1:@0x1001f=01, Err: -5
[ 2238.082444] bcmsdh_sdmmc: Failed to Write byte F1:@0x1001f=01, Err: -5

Please, if you wanna post terminal output use spoiler and format it like a code
Also, what OS you use? How are you trying to connect to AP?

I’m experiencing the same issue… New board with fresh Ubuntu Server downloaded from this site, trying to connect to my AP. nmcli commands all seem to respond as expected, but the connect command fails with “no reason given”.

If you figure it out, please post back :slight_smile:

Can you use nmtui to be sure that you properly configure the interface?

I’m also experiencing this but only for the Ubuntu Server. When using Debian Desktop it seems to work. I tried some debugging and compare both os version and even with my laptop which is running Ubuntu Desktop 18.04.

Wifi that I have is a WPA2-PSK version.

I used nmtui to setup the wifi on both my laptop and the rock pi (same setup steps on both os). My laptop started working and the rock pi didn’t. I also manually compared serveral files which nmtui setups but found no differences.
When using the graphical interface from Debian to setup the wifi is also starts working.

Another test I did on the Ubuntu Server is manually disabling the networkmanager and setting up wpasupplicant which causes my wifi to start working. This however seems to disable the0.

I still haven’t found the underlying cause. I can’t seem to find any logs of the networkmanager, let alone run it in debug and see what the issue is. I think that the networkmanager can see the network but the negotiation about the PSK is just failing. So currently my suspicion is that its just a missing package.

I did some more debugging and I found some logs about what is happening.

See picture:

For some reason it can’t initialize the driver.

Hi guys

I was experiencing the same issue with Ubuntu. My workaround is to turn the wifi radio off and then on again (The IT Crowd solution):

nmcli radio wifi off
nmcli radio wifi on

An then try to connect. I don’t know what is the real problem, but for now I’m using that solution.

Hope it helps. Regards!

1 Like

Hi ajcalderont:
I tried your workround and it works! Thank you.

Perfect, I’m glad it worked!

Hi @ajcalderont,

This does seem to work, at least for one time. After each reboot you have to do this again.

Its at least a quick fix, but now a sustainable solution. Normally I don’t have a screen attached and I access it over ssh which requires an network connection. Something with a chicken and egg comes to my mind :slight_smile:

Thnx for the tip.

Regards, Jork

Yes @jork, with every reboot you need to do that again. What I did was to add those instructions to /etc/rc.local to be executed automatically after booting, because as you, I work over SSH without a screen attached to the board. Let’s hope we find a better solution soon.

Regards

I am experiencing this as well, is this a known bug/any updates?
Image:

rockpi4b-ubuntu-bionic-minimal-20190104_2101-gpt.img

We are looking at it now.

Hi
I’m having the same issue with wifi not working on ubuntu server. I’ve tried the work around to stop and start wifi but it still I cant connect to wifi and the answer is only “Connection activation failed: (0) No reason given”
Anybody who has any further info how to solve this issue?

Hi, @pethun

Try this way to see if it helps.

Add the following lines in file, /etc/NetworkManager/NetworkManager.conf

[main]
plugins=ifupdown,keyfile

[ifupdown]
managed=false

[device]
wifi.scan-rand-mac-address=no
1 Like

Hi @Stephen

Many thanks for the advice. After modifying the file /etc/NetworkManager/NetworkManager.conf according to your instructions wifi is working for ubuntu server.
The working NetworkManager.conf are now as follows:
[main]

plugins=ifupdown,keyfile

[ifupdown]

managed=false

[device]

wifi.scan-rand-mac-address=no

[keyfile]

unmanaged-devices=*,except:type:wifi,except:type:wwan,except:type:ethernet

2 Likes

Hi, found the solutions provided by Stephen and pethun work! Thank you all!

1 Like

Hello,
I am still experiencing the same problem, radio off/on seems to be a work around but I noticed
a delay in pinging the Rockpi4 from a wired ethernet machine but did not notice a delay pinging the same wired ethernet machine from the Rockpi.

kernel logs are also filled with:
bcmsdh_sdmmc: Failed to Write byte F1:@0x1001f=01, Err: -5

I am on a rockpi 4 1.3 using a Rockpi eMMC on Armbian with kernel:
Linux rockpi4 4.4.182-rockchip64 #1 SMP Fri Jun 28 17:34:00 CEST 2019 aarch64 GNU/Linux

I am using a QC power supply

Any suggestions what this might be / fix?