logo elektroda
logo elektroda
X
logo elektroda

[Solved] Openbeken BK7231N Chip: Smart Switch WiFi Connection Failure - SSID and Password Correct

btmerz 7350 36
Best answers LABEL_AI_GENERATED

Why does my BK7231N smart switch show the correct SSID and password in OpenBeken but fail to connect to my Wi‑Fi router?

The connection problem was caused by the Wi‑Fi mesh setup in the Fritz!Box network; after resetting the repeaters and rebuilding the mesh, all devices connected normally [#20593364][#20593442] During troubleshooting, the module was confirmed to work with a mobile hotspot but not with the router/guest WLAN, which pointed away from OpenBeken or the BK7231N firmware itself [#20581563][#20581859] The thread also suggested checking that the network is really 2.4 GHz, trying the device very close to the router, and verifying channel/security settings and MAC filtering [#20587967][#20588978][#20586384]
AI summary based on the discussion. May contain errors.
ADVERTISEMENT
  • Wi-Fi scan starts but connection never completes

    #1 20578696
    btmerz
    Level 4  
    Posts: 18
    Rate: 1
    Hello,
    I have successfully flashed the newest Version in my smart switch with BK7231N chip. After connecting to the AP I was able to configure wifi.
    Unfortunately the module doesn't connect to my router. I've already tried other wifi networks, with the same negative result,
    After connecting a converter to the UART 2 pins I was able to get the startup-log. The SSID and password are correct there, but I get no connection. Can you check the log and give me a hint how to get it to work? Thanks in advance...

    Info:MAIN:Time 1, idle 282566/s, free 77832, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 2, idle 191149/s, free 77832, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 3, idle 190353/s, free 77832, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 4, idle 190465/s, free 77832, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    supplicant_main_exiting
    supplicant_exit_done
    [sa_sta]MM_RESET_REQ
    [bk]tx_txdesc_flush
    [sa_sta]ME_CONFIG_REQ
    [sa_sta]ME_CHAN_CONFIG_REQ
    [sa_sta]MM_START_REQ
    hapd_intf_add_vif,type:2, s:0, id:0
    wpa_dInit
    wpa_supplicant_req_scan
    Setting scan[retry16] request: 0.100000 sec
    MANUAL_SCAN_REQ
    enter low level!
    mac c8:47:8c: 0: 0: 0
    leave low level!
    net_wlan_add_netif done!, vif_idx:0
    Info:MAIN:Time 5, idle 191300/s, free 77832, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:ssid:Galaxy Bernd key:xxxxx
    wpa_supplicant_scan
    wpa_drv_scan
    wpa_send_scan_req
    ht in scan
    scan_start_req_handler
    Info:MAIN:Time 6, idle 182548/s, free 72488, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Boot complete time reached (5 seconds)
    Info:CFG:####### Set Boot Complete #######
    Info:MAIN:Time 7, idle 182438/s, free 72488, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    wpa_driver_scan_cb
    wpa_get_scan_rst:1
    cipher2security 2 2 16 16
    Info:MAIN:Time 8, idle 85971/s, free 72728, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 9, idle 0/s, free 72728, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 10, idle 0/s, free 72728, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:GEN:dhcp=0 ip=0.0.0.0 gate=0.0.0.0 mask=0.0.0.0 mac=c8:47:8c:00:00:00
    Info:GEN:sta: 0, softap: 0, b/g/n
    wpa_supplicant_connect
    Cancelling scan request
    wpa_driver_associate
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTING - 1
    ssid:Galaxy Bernd, 1
    found scan rst rssi -33 > -50
    ht in scan
    scan_start_req_handler
    aready open
    aready open
    me_set_ps_disable:840 0 0 1 0 3
    sm_auth_send:1
    sm_deauth_handler
    sm_deauth_handler reason=1,vif=0
    Info:MAIN:Time 11, idle 111310/s, free 71208, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    SM_DISCONNECTING status=1
    sm_deauth_handler
    sm_deauth_handler reason=1,vif=0
    sm_deauth_handler
    sm_deauth_handler reason=1,vif=0
    ---------SM_CONNECT_IND_fail
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_AUTH_FAILED - 3
  • ADVERTISEMENT
  • #2 20578737
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14770
    Help: 659
    Rate: 12913
    Hm, first thing you can try is to do a 2MB flash backup in flasher and then use "Restore RF" button. In worst case you can always return to original version from your backup. Check if it helps.
    https://github.com/openshwprojects/BK7231GUIFlashTool
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • Association failure despite correct SSID and password

    #3 20579879
    btmerz
    Level 4  
    Posts: 18
    Rate: 1
    Thanks for your suggestion. Unfortunately I had no success, while trying several times. There is always the same result...

    I've flashed another wifi switch with the same firmare / wifi / tools, without any connection problem.

    
    supplicant_main_exiting
    supplicant_exit_done
    [sa_sta]MM_RESET_REQ
    [bk]tx_txdesc_flush
    [sa_sta]ME_CONFIG_REQ
    [sa_sta]ME_CHAN_CONFIG_REQ
    [sa_sta]MM_START_REQ
    hapd_intf_add_vif,type:2, s:0, id:0
    wpa_dInit
    wpa_supplicant_req_scan
    Setting scan[retry16] request: 0.100000 sec
    MANUAL_SCAN_REQ
    enter low level!
    mac 38:1f:8d:f0:74:51
    leave low level!
    net_wlan_add_netif done!, vif_idx:0
    Info:MAIN:Time 5, idle 191632/s, free 77792, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:ssid:FRITZ!Box 7490 key: xxxxx
    wpa_supplicant_scan
    wpa_drv_scan
    wpa_send_scan_req
    ht in scan
    scan_start_req_handler
    Info:GEN:dhcp=0 ip=0.0.0.0 gate=0.0.0.0 mask=0.0.0.0 mac=38:1f:8d:f0:74:51 
    Info:GEN:sta: 0, softap: 0, b/g/n
    wpa_supplicant_connect
    Cancelling scan request
    wpa_driver_associate
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTING - 1
    ssid:FRITZ!Box 7490, 1
    found scan rst rssi -44 > -50
    ht in scan
    scan_start_req_handler
    aready open
    aready open
    SM_DISCONNECTING status=1
    ---------SM_CONNECT_IND_fail
  • #4 20580587
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14770
    Help: 659
    Rate: 12913
    btmerz wrote:

    I've flashed another wifi switch with the same firmare / wifi / tools, without any connection problem.

    So you have only one problematic switch that doesn't want to connect to AP, even after doing RF restore, and the other one is working 100% OK?
    Helpful post? Buy me a coffee.
  • #5 20580832
    btmerz
    Level 4  
    Posts: 18
    Rate: 1
    Yes, that is correct.
  • #6 20580936
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14770
    Help: 659
    Rate: 12913
    If you really did Restore RF, or even Erase All, then I have totally no idea what we could try next. Was this device even working with Tuya?
    Helpful post? Buy me a coffee.
  • #7 20580966
    btmerz
    Level 4  
    Posts: 18
    Rate: 1
    I didn't want to install the tuya app, so I didn't test it before flashing.
    As I mentioned, I tried Restore RF and even erase all several times.
    So, it seems, that I have to scrap that part, unfortunately...

    Thanks for your support...
  • #8 20581012
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14770
    Help: 659
    Rate: 12913
    Which module is inside? Do you have original 2MB flash backup?
    Helpful post? Buy me a coffee.
  • #9 20581033
    btmerz
    Level 4  
    Posts: 18
    Rate: 1
    I think it is a cb2s module with a bk7231N chip.
    Before flashing, I made a backup of the original firmware.
  • #10 20581040
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14770
    Help: 659
    Rate: 12913
    Can I see that backup?

    Do you know that you can replace CB2S with ESP module cheaply?
    Helpful post? Buy me a coffee.
  • #11 20581054
    btmerz
    Level 4  
    Posts: 18
    Rate: 1
    I will send you the backup as soon as I'm at home.

    To use Tasmota and an ESP was something I already considered.
  • ADVERTISEMENT
  • Suggesting RF restore and Tuya backup test

    #12 20581065
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14770
    Help: 659
    Rate: 12913
    If you are from Germany, you can also consider sending me this broken CB2S module physically. I am from Poland, so we are close neighbours. I could do some more tests on that and check if it is really dead and not connecting to my AP. Just for research purposes. We had few (maybe 3 so far?) similar reports, but they were mostly solved by "Restore RF" button. I am curious what might went wrong on that CB2S.

    You can also first try restoring Tuya backup (2MB) and checking if it works in Tuya App.
    Helpful post? Buy me a coffee.
  • #13 20581493
    btmerz
    Level 4  
    Posts: 18
    Rate: 1
    OK.
    First I will send you the original firmware.
    Then I try to get the module to work several times again.
    If I'm still not successful, I get in contact with you and send you the module...
  • #14 20581561
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14770
    Help: 659
    Rate: 12913
    How many OBK devices do you have? Only those two - first with connect problem, second working?
    Helpful post? Buy me a coffee.
  • Hotspot works, Fritz!Box guest network fails

    #15 20581563
    btmerz
    Level 4  
    Posts: 18
    Rate: 1
    So, in the meantime I got some success.
    I set up a mobile hotspot on my mobile phone and was able to connect the CB2S module to it!

    So, in principal it works. Then I set up a guest network on my fritz!box with the same SSID and the same simple and short password (12345678) ;-)
    The connection again failed.

    Perhaps this could give you a hint, to find the error...
    Thanks again for your support.

    Hinzugefügt nach 1 [Minuten]:

    >>20581561
    Yes, currently I only have these two.
    Three more will come within a few weeks...
  • Different MAC addresses required after clearing flash

    #16 20581702
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14770
    Help: 659
    Rate: 12913
    Very strange... but also good that there is a progress. Can you try setting a longer password for your WiFi and retry?

    btmerz wrote:

    Perhaps this could give you a hint, to find the error...
    Thanks again for your support.

    I am still very confused. If the password length is the issue, then both of devices should not connect. And whole program logic is in flash... but one works and second doesn't... so I really don't know right now what may be wrong...

    Just a word of warning - make sure that devices have different MAC addresses. Otherwise they will not work well. Keep it in mind, because you might have used "Clear flash" button already but forgot to restore RF.
    Helpful post? Buy me a coffee.
  • #17 20581776
    btmerz
    Level 4  
    Posts: 18
    Rate: 1
    My standard wifi password is 20 digits long. and it worked on the other device without problems.

    For my mobile hotspot (where it worked) and after that the guest wifi, I used the same SSID and password (doesn't work on the router).

    After erasing all I made also a restore RF run.
  • Suggesting MAC address duplication as Wi-Fi cause

    #18 20581808
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14770
    Help: 659
    Rate: 12913
    btmerz wrote:
    My standard wifi password is 20 digits long. and it worked in the other device without problems.

    This also confuses me greatly. From what I can tell, all logic of WiFi is inside Flash memory, and OBK build is the same on both devices (we don't change wiFi code at all), so it's all very strange.

    Well, so now, does the problematic device works if you... if you change the password/SSID to be like on your hot spot?

    Or.... maybe please double check, maybe you have just a MAC address duplication and that's the cause of the problems? Maybe your both devices have the same MAC? MAC duplication can prevent one device from joining WiFi that has already another device with the same MAC.... hmm..

    EDIT: but still, it would be strange, because, as far as I know, RF restore does RANDOMIZE the generated MAC....
    Helpful post? Buy me a coffee.
  • Guest wifi scan fails despite matching SSID and channel

    #19 20581859
    btmerz
    Level 4  
    Posts: 18
    Rate: 1
    In the menu you are able to change the mac adress. There I've changed some numbers randomly. ==> No positive change
    I now have the guest wifi set to the exact values as my hotspot. I can connect to the hotspot, but not to the guest wifi.

    In my router I also changed the wifi channel to the same as in my hotspot. Also not working...

    I made two logs of both versions:

    guest wifi (not working):
    Info:MAIN:Time 2, idle 191508/s, free 77792, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 3, idle 190426/s, free 77792, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    temp_code:38 - adc_code:323 - adc_trend:[15]:330->[16]:320
    Info:MAIN:Time 4, idle 189880/s, free 77792, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    supplicant_main_exiting
    supplicant_exit_done
    [sa_sta]MM_RESET_REQ
    [bk]tx_txdesc_flush
    [sa_sta]ME_CONFIG_REQ
    [sa_sta]ME_CHAN_CONFIG_REQ
    [sa_sta]MM_START_REQ
    hapd_intf_add_vif,type:2, s:0, id:0
    wpa_dInit
    wpa_supplicant_req_scan
    Setting scan[retry16] request: 0.100000 sec
    MANUAL_SCAN_REQ
    enter low level!
    mac 38:1f:8d:53:a9:91
    leave low level!
    net_wlan_add_netif done!, vif_idx:0
    Info:MAIN:Time 5, idle 393245/s, free 77792, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:ssid:Bernd key:12345678
    wpa_supplicant_scan
    wpa_drv_scan
    wpa_send_scan_req
    ht in scan
    scan_start_req_handler
    Info:MAIN:Time 6, idle 183300/s, free 73056, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Boot complete time reached (5 seconds)
    Info:CFG:####### Set Boot Complete #######
    Info:MAIN:Time 7, idle 181966/s, free 73056, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    wpa_driver_scan_cb
    get_scan_rst_null
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_DISCONNECTED - 2
    RL_STATUS_STA_SCAN_VAIN
    Failed to get scan results - try scanning again, retry cnt = 15.
    wpa_supplicant_req_scan
    Setting scan[retry15] request: 1.000000 sec
    Info:MAIN:Time 8, idle 187703/s, free 73832, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    wpa_supplicant_scan
    wpa_drv_scan
    wpa_send_scan_req
    ht in scan
    scan_start_req_handler
    Info:MAIN:Time 9, idle 189965/s, free 73056, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 10, idle 199864/s, free 73056, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:GEN:dhcp=0 ip=0.0.0.0 gate=0.0.0.0 mask=0.0.0.0 mac=38:1f:8d:53:a9:91
    Info:GEN:sta: 0, softap: 0, b/g/n
    wpa_driver_scan_cb
    get_scan_rst_null
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_DISCONNECTED - 2
    RL_STATUS_STA_SCAN_VAIN
    Failed to get scan results - try scanning again, retry cnt = 14.
    wpa_supplicant_req_scan
    Setting scan[retry14] request: 1.000000 sec
    Info:MAIN:Time 11, idle 186059/s, free 73832, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    wpa_supplicant_scan
    wpa_drv_scan
    wpa_send_scan_req
    ht in scan
    scan_start_req_handler
    Info:MAIN:Time 12, idle 190639/s, free 73056, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 13, idle 194724/s, free 73056, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 14, idle 189972/s, free 73056, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    wpa_driver_scan_cb
    get_scan_rst_null
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_DISCONNECTED - 2
    RL_STATUS_STA_SCAN_VAIN


    Hotspot (working):

    Info:MAIN:Time 2, idle 189235/s, free 77792, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 3, idle 188258/s, free 77792, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 4, idle 189091/s, free 77792, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    supplicant_main_exiting
    supplicant_exit_done
    [sa_sta]MM_RESET_REQ
    [bk]tx_txdesc_flush
    [sa_sta]ME_CONFIG_REQ
    [sa_sta]ME_CHAN_CONFIG_REQ
    [sa_sta]MM_START_REQ
    hapd_intf_add_vif,type:2, s:0, id:0
    wpa_dInit
    wpa_supplicant_req_scan
    Setting scan[retry16] request: 0.100000 sec
    MANUAL_SCAN_REQ
    enter low level!
    mac 38:1f:8d:53:a9:91
    leave low level!
    net_wlan_add_netif done!, vif_idx:0
    Info:MAIN:Time 5, idle 189434/s, free 77792, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:ssid:Bernd key:12345678
    wpa_supplicant_scan
    wpa_drv_scan
    wpa_send_scan_req
    ht in scan
    scan_start_req_handler
    Info:MAIN:Time 6, idle 180378/s, free 73056, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Boot complete time reached (5 seconds)
    Info:CFG:####### Set Boot Complete #######
    Info:MAIN:Time 7, idle 182217/s, free 72520, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    wpa_driver_scan_cb
    wpa_get_scan_rst:1
    cipher2security 2 2 16 16
    Info:MAIN:Time 8, idle 84631/s, free 72816, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 9, idle 0/s, free 72816, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 10, idle 0/s, free 72816, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:GEN:dhcp=0 ip=0.0.0.0 gate=0.0.0.0 mask=0.0.0.0 mac=38:1f:8d:53:a9:91
    Info:GEN:sta: 0, softap: 0, b/g/n
    wpa_supplicant_connect
    Cancelling scan request
    wpa_driver_associate
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTING - 1
    ssid:Bernd, 1
    found scan rst rssi -60 < -50
    dis ht_support
    no ht in scan
    scan_start_req_handler
    aready open
    aready open
    me_set_ps_disable:840 0 0 1 0 3
    sm_auth_send:1
    sm_auth_handler
    ht NOT in assoc req
    sm_assoc_rsp_handler
    rc_init: station_id=0 format_mod=0 pre_type=0 short_gi=0 max_bw=0
    rc_init: nss_max=0 mcs_max=255 r_idx_min=0 r_idx_max=11 no_samples=10
    rc_init: nss_max=0 mcs_max=255 r_idx_min=0 r_idx_max=11 no_samples=10
    ---------SM_CONNECT_IND_ok
    wpa_driver_assoc_cb
    Cancelling scan request
    new dtim period:2

    new ie: 0 : 42 65 72 6e 64
    new ie: 1 : 82 84 8b 96
    new ie: 3 : 6
    new ie: 30 : 1 0 0 f ac 4 1 0 0 f ac 4 1 0 0 f ac 2 c 0
    new ie: 2d : ad 1 13 ff ff 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0

    __l2_packet_send: ret 0
    __l2_packet_send: ret 0
    hapd_intf_add_key CCMP
    add sta_mgmt_get_sta
    sta:0, vif:0, key:0
    sta_mgmt_add_key
    add hw key idx:24
    hapd_intf_add_key CCMP
    add is_broadcast_ether_addr
    sta:255, vif:0, key:1
    add hw key idx:1
    ctrl_port_hdl:1
    me_set_ps_disable:840 0 0 0 0 3
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTED - 4
    sta_ip_start

    configuring interface mlan (with DHCP client)WARN: TCPIP mutex is NOT locked (1) caller 57B27

    WARN: TCPIP mutex is NOT locked (1) caller 57B27

    ip_addr: 7185a8c0
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTED - 4
    Info:MAIN:Time 11, idle 93747/s, free 72976, MQTT 0(0), bWifi 1, secondsWithNoPing -1, socks 2/38
    temp_code:34 - adc_code:332 - adc_trend:[14]:340->[15]:330
    Info:MAIN:Time 12, idle 187534/s, free 73016, MQTT 0(0), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:MQTT:mqtt_host empty, not starting mqtt
    Info:MAIN:Time 13, idle 188428/s, free 73016, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 14, idle 187404/s, free 73016, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 15, idle 183812/s, free 73016, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 16, idle 188964/s, free 73016, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 17, idle 187400/s, free 73016, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 18, idle 186958/s, free 73016, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 19, idle 188023/s, free 73016, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 20, idle 187850/s, free 73016, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:GEN:dhcp=0 ip=192.168.133.113 gate=192.168.133.223 mask=255.255.255.0 mac=38:1f:8d:53:a9:91
    Info:GEN:sta: 1, softap: 0, b/g/n

    Hinzugefügt nach 5 [Minuten]:

    I have compared the two logs. They start to differ at the line:

    not working:
    wpa_driver_scan_cb
    get_scan_rst_null

    working:
    wpa_driver_scan_cb
    wpa_get_scan_rst:1

    It may be have something to do with the wpa authentification...
  • Check router and AP security settings match

    #20 20582079
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14770
    Help: 659
    Rate: 12913
    If you are saying that password lenght somehow affects it, then the first thing to try would be to set the same password (and SSID?) on your router as you set on mobile phone AP and check if it works. Do both access points have the same security settings?

    The log messages you've shown come deep from BK7231 SDK:
    https://github.com/search?q=repo%3Aopenshwpro...%2FOpenBK7231T%20wpa_driver_scan_cb&type=code
    https://github.com/search?q=repo%3Aopenshwprojects%2FOpenBK7231T+get_scan_rst_null&type=code
    The error seem to say that no AP of given SSID was found.
    Openbeken BK7231N Chip: Smart Switch WiFi Connection Failure - SSID and Password Correct
    Maybe, just maybe, it's just a typo, after all?
    Helpful post? Buy me a coffee.
  • Hotspot connects but router WiFi still fails

    #21 20585638
    btmerz
    Level 4  
    Posts: 18
    Rate: 1
    I've used exactly the same SSID (Bernd) and Password (12345678) on my mobile hotspot and on the guest WiFi on my Fritz!Box.
    I checked several times for a typo. Everything is the same.

    I also used the SSID and password (20 digits) of my standard WiFi in my mobile hotspot and was able to connect to it.
    But it doesn't connect to the router WiFi after switching off the hotspot...

    I have no clue what to do next...
  • #22 20585642
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14770
    Help: 659
    Rate: 12913
    Wait, so now... the same SSID+Password works on your Phone but does not work on Router?
    Helpful post? Buy me a coffee.
  • #23 20586333
    btmerz
    Level 4  
    Posts: 18
    Rate: 1
    Exactly...
  • #24 20586384
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14770
    Help: 659
    Rate: 12913
    So what are the encryption settings on both networks? WPA, WPA2, something else?

    Added after 7 [minutes]:

    EDIT: Does one of the networks feature MAC filtering?
    Helpful post? Buy me a coffee.
  • #25 20586420
    btmerz
    Level 4  
    Posts: 18
    Rate: 1
    Both are at wpa2...
  • #26 20587860
    btmerz
    Level 4  
    Posts: 18
    Rate: 1
    Yesterday I received another three switches. After successfully flashing one device, I have the same problem connecting to WiFi 😩
  • ADVERTISEMENT
  • #27 20587909
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14770
    Help: 659
    Rate: 12913
    Have you managed to successfully connect to that WiFi with Tasmota?

    How far is the router?

    Are you 100% sure that there is no MAC filtering/anything running on your router?

    Can you check with another router?

    I have never heard so far about WPA2 implementations being different between themselves, but something just has to be different...
    Helpful post? Buy me a coffee.
  • #28 20587911
    btmerz
    Level 4  
    Posts: 18
    Rate: 1
    With my Tasmota Devices connections no Problem at all. And I definitely have no MAC filter activated.
  • #29 20587951
    torrijo
    Level 6  
    Posts: 4
    Help: 2
    Rate: 8
    It works well for me
  • #30 20587959
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14770
    Help: 659
    Rate: 12913
    @btmerz does problem appear for both T and N chips?
    @torrijo yes, same here, and same for my testers... so we need to figure out what is the difference in @btmerz setup... maybe he has some kind of setting enabled on router or smth
    Helpful post? Buy me a coffee.

Topic summary

LABEL_AI_GENERATED
The discussion revolves around a user experiencing WiFi connection issues with a smart switch utilizing the BK7231N chip after flashing the latest firmware. Despite correct SSID and password configurations, the device fails to connect to the router, although it successfully connects to a mobile hotspot. Various troubleshooting steps are suggested, including restoring RF settings, checking MAC address duplication, and ensuring the WiFi network operates on the 2.4GHz band. Ultimately, the user resolves the issue by reconfiguring their WiFi mesh setup, which had caused connectivity problems, while other devices like ESPs and Tasmota were unaffected.
AI summary based on the discussion. May contain errors.

FAQ LABEL_AI_GENERATED

TL;DR: For 5 OpenBeken BK7231N/CB2S switches, “same SSID+Password” worked on a phone hotspot but failed on a Fritz!Box router; the fix was resetting 3 Fritz!Box mesh repeaters and rebuilding the mesh. This FAQ helps smart-switch users diagnose correct-credential WiFi failures after flashing. [#20593364]

Why it matters: Correct SSID and password do not prove the router, mesh, RF data, or scan path is healthy.

Alternative Result in the thread Key difference
Phone hotspot Connected Same SSID Bernd, password 12345678, channel 6 in one test
Fritz!Box guest WiFi Failed Same SSID and password, scan returned get_scan_rst_null
Rebuilt Fritz!Box mesh Connected 3 Fritz!Box devices reset and re-added to mesh

Key insight: If OpenBeken connects to a hotspot but not to a Fritz!Box using identical credentials, investigate the router or mesh before scrapping the BK7231N module.

Quick Facts

  • The failing device used a CB2S module with a BK7231N chip, and the user had a 2 MB original firmware backup before flashing. [#20581033]
  • The UART log showed WIFI_STA_AUTH_FAILED - 3 after sm_deauth_handler reason=1, even though the SSID and password appeared correctly. [#20578696]
  • The working hotspot log reached WIFI_STA_CONNECTED - 4 and received IP 192.168.133.113 with gateway 192.168.133.223. [#20581859]
  • The router-side failure showed get_scan_rst_null and RL_STATUS_STA_SCAN_VAIN, meaning the scan returned no matching AP result. [#20581859]
  • The final fix was rebuilding a mesh of 3 Fritz!Box devices; after that, all OpenBeken devices connected normally. [#20593442]

Why does an OpenBeken BK7231N smart switch show the correct SSID and password in the UART log but still fail to connect to WiFi?

The SSID and password can be correct while the device still fails at scan, authentication, or router mesh handling. In the first log, OpenBeken printed the SSID and key, then reached WIFI_STA_AUTH_FAILED - 3. Later tests proved the same credentials worked on a phone hotspot. The router mesh, not the typed password, caused the final failure. The user fixed all devices by resetting 3 Fritz!Box mesh nodes and rebuilding the mesh. [#20593364]

How do I use the BK7231GUIFlashTool Restore RF button after flashing OpenBeken on a BK7231N or CB2S module?

Make a 2 MB flash backup first, then use Restore RF in BK7231GUIFlashTool.
  1. Create a full 2 MB backup in the flasher.
  2. Flash OpenBeken, then press Restore RF.
  3. If needed, restore the original backup or test Tuya again.
    The thread expert warned that the backup lets you return to the original version. Restore RF did not solve this case, but it solves similar reports. [#20578737]

What does the OpenBeken log message WIFI_STA_AUTH_FAILED mean on a BK7231N smart switch?

WIFI_STA_AUTH_FAILED means the station tried to join WiFi but failed during authentication or association. In the first log, it followed sm_auth_send:1, repeated sm_deauth_handler reason=1, and SM_CONNECT_IND_fail. The failure appeared at status code 3. This does not prove the password is wrong, because the same device later connected to a phone hotspot with valid WPA2 credentials. [#20578696]

What does get_scan_rst_null mean in BK7231N WiFi logs when connecting to a Fritz!Box router?

get_scan_rst_null means the BK7231N scan returned no usable result for the target SSID. The thread expert interpreted it as “no AP of given SSID was found.” In the failing Fritz!Box guest WiFi log, get_scan_rst_null appeared with RL_STATUS_STA_SCAN_VAIN. In the working hotspot log, the same point showed wpa_get_scan_rst:1, then association succeeded. [#20582079]

How can a Fritz!Box WiFi Mesh setup prevent OpenBeken BK7231N devices from connecting while ESP/Tasmota devices still work?

A misconfigured Fritz!Box mesh can block OpenBeken BK7231N scanning or association while ESP/Tasmota still connects. The user had 3 Fritz!Box units in a mesh and saw OpenBeken fail against the router. ESP/Tasmota devices had no connection problem. After resetting all repeaters and adding them back to the mesh, all OpenBeken devices connected. The exact mesh fault was not identified. [#20593364]

What WiFi settings should I check on a Fritz!Box when OpenBeken connects to a mobile hotspot but not to the router?

Check 2.4 GHz mode, WPA2 security, MAC filtering, channel, SSID, password, and mesh state. The thread tested WPA2 on both networks, disabled MAC filtering, tried the same SSID Bernd, and used password 12345678. It also compared router channel settings with the phone hotspot. The final fix was not a password change; it was rebuilding the Fritz!Box mesh. [#20581859]

How do I troubleshoot OpenBeken devices that connect to a phone hotspot but fail on a WPA2 2.4 GHz router network?

Treat the phone hotspot as proof that the module and firmware can work. First, copy the same SSID and password to the router. Second, verify 2.4 GHz, WPA2, channel, and MAC filtering. Third, rebuild router mesh or test another router. In the thread, the same SSID and password worked on a phone but failed on Fritz!Box until 3 mesh devices were reset. [#20585638]

What is a CB2S module, and how is it related to the BK7231N chip used in Tuya smart switches?

A CB2S module is the small WiFi module inside the smart switch that carried the BK7231N chip in this case. “CB2S is a WiFi module that hosts the BK7231N chip, providing the wireless microcontroller platform used by some Tuya smart switches.” The user identified the module as CB2S and had made an original firmware backup before flashing OpenBeken. [#20581033]

What is RF calibration data or Restore RF in BK7231 flashing, and why can losing it break WiFi connectivity?

RF calibration data stores radio-specific settings, including values tied to WiFi operation and MAC handling. “Restore RF is a flasher function that restores radio-frequency calibration data, preserving device-specific wireless settings after erase or flash operations.” The expert suggested Restore RF after a 2 MB backup. He also warned that clearing flash without restoring RF can cause MAC-related problems. [#20581702]

What is UART logging, and how can it help diagnose OpenBeken WiFi connection failures?

UART logging is serial output from the device that exposes boot and WiFi driver messages. “UART logging is a serial diagnostic method that reads startup and runtime logs through UART pins, showing scan, authentication, DHCP, and WiFi status transitions.” In this thread, UART 2 revealed WIFI_STA_AUTH_FAILED, get_scan_rst_null, and the working IP 192.168.133.113. [#20578696]

What is WPA2, and which WPA2 router settings can affect BK7231N or Tuya smart switch connectivity?

WPA2 is the WiFi security mode used on both tested networks. “WPA2 is a WiFi security standard that authenticates clients and encrypts traffic, but router implementation, MAC filtering, band, channel, and mesh behavior can still affect joins.” The thread checked WPA2 on phone and router, verified 2.4 GHz, and ruled out MAC filtering. Mesh reset fixed the issue. [#20586420]

What is a WiFi mesh network, and why can resetting Fritz!Box repeaters fix smart home device connection problems?

A WiFi mesh network uses multiple access points under one coordinated network name. “A WiFi mesh network is a multi-node wireless setup that extends coverage by coordinating routers or repeaters, while presenting one roaming network to clients.” In this case, 3 Fritz!Box mesh devices had a bad state. Resetting the repeaters and reconnecting them to the mesh restored OpenBeken connectivity. [#20593442]

OpenBeken vs Tasmota on smart switches: which is better for BK7231N, CB2S, and ESP-based modules?

Use OpenBeken for BK7231N/CB2S modules and Tasmota for ESP modules. The thread used OpenBeken on CB2S with BK7231N. The user already had ESP/Tasmota devices that connected without trouble. The expert also noted that replacing CB2S with an ESP module was possible, which would enable Tasmota instead of OpenBeken. [#20581040]

How can I replace a CB2S BK7231N module with an ESP module for Tasmota in a smart switch?

Replace the CB2S only if you can map power, relay, button, LED, and sensor pins safely. The thread expert said a CB2S could be replaced cheaply with an ESP module. The user had already considered ESP and Tasmota. The thread did not provide wiring diagrams, voltage values, or pin mappings for the replacement, so use the original backup and board tracing before removal. [#20581040]

How do I configure pins for switches, relays, LEDs, and a BL0942 power sensor on an Aubess mini power monitor switch in OpenBeken?

Configure each OpenBeken pin by matching the Aubess switch functions to relay, switch, LED, and BL0942 roles. The thread confirms the device was an Aubess mini power monitor switch and that the switches plus BL0942 power sensor were eventually working. It does not list the exact GPIO map. Use UART logs and board tracing to verify every pin before applying mains power. [#20593364]
AI summary based on the discussion. May contain errors.
ADVERTISEMENT