logo elektroda
logo elektroda
X
logo elektroda

WA2 module BEKEN BK7231QN40 / Beken/HLK-B30 WA2 does not work with openbk7231

anderson007104 4353 42
ADVERTISEMENT
  • #31 20905668
    Scip
    Level 1  
    >>20602793
    Unfortunately, AliExpress still sells WA2 modules based on the BK7231Q chip. Here are two dumps from the relay module.

    [I/FAL] Fal(V0.4.0)success
    [I/OTA] RT-Thread OTA package(V0.2.4) initialize success.
    [Flash]id:0xc84015
    app:403d08-403d00:4096:5
    extended_app:4045d0-4045c8:2048:4
    idle:404a40-404a38:1024:0
    timer_thd:405780-405778:3000:2
    sys_timer:4082f8-4082f0:3072:5
    cmmod:409418-409410:4096:4
    [01-01 00:00:00 TUYA Debug]wk_th-0:409fe8-409fe0:2[uni_thread.c:214] Thre560:3
    wk_th-1:40aab0-4ad:sys_timer Exec Start0aaa8:2560:3
    . Set to Running Status
    [01-01 00:00:00 TUYA Debug][tuya_device.c:142] < TUYA IOT SDK V:2.0.0 BS:30.01_PT:2.2_LAN:3.3_CAD:1.0.1_CD:1.0.0 >
    < BUILD AT:2018_12_05_17_03_30 BY tuya_iot_team FOR rtlbn_tls_common AT 8710_2M >
    IOT DEFS < WIFI_GW:1 DEBUG:1 KV_FILE:0 SHUTDOWN_MODE:0 [01-01 00:00:00 TUYA Debug][tuya_device.c:143] oem_bk7321_bk_1_switch:1.0.4
    [01-01 00:00:00 TUYA Debug][hw_table.c:336] initialize hardware...
    [01-01 00:00:00 TUYA Notice][hw_table.c:150] IO - relay[0]:	pin-18	type high
    [01-01 00:00:00 TUYA Notice][hw_table.c:150] IO - button[0]:	pin-6	type low
    [01-01 00:00:00 TUYA Debug][hw_table.c:239] key_cfg.low_level_detect:true
    [01-01 00:00:00 TUYA Debug][hw_table.c:246] pbutton->key_cfg.lp_tp:LP_ONCE_TRIG
    [01-01 00:00:00 TUYA Notice][hw_table.c:369] CH[0],    DPID[1]
    [01-01 00:00:00 TUYA Notice][hw_table.c:370] CH[0],    CDDPID[102]
    [01-01 00:00:00 TUYA Notice][hw_table.c:371] CH[0],    RSDPID[101]
    [01-01 00:00:00 TUYA Notice][hw_table.c:150] IO - wifi_stat:	pin-7	type low
    [01-01 00:00:00 TUYA Debug][tuya_device.c:1315] all_ch_num:1
    [01-01 00:00:00 TUYA Debug][uf_flash_file.c:785] len 1
    [01-01 00:00:00 TUYA Debug][uf_flash_file.c:787] [0] 0x3
    [01-01 00:00:00 TUYA Err][uf_flash_file_app.c:201] uf_open default_stat_save err 8
    [01-01 00:00:00 TUYA Err][tuya_device.c:1119] cannot open file
    [01-01 00:00:00 TUYA Err][tuya_device.c:1325] fast read def mode is error:relay_stat:1
    [01-01 00:00:00 TUYA Debug][tuya_device.c:1329] relay_stat:1
    [01-01 00:00:00 TUYA Debug][hw_table.c:492] hw_set_channel :1,channel_no :0
    [01-01 00:00:00 TUYA Debug][tuya_led.c:107] port = 7
    [01-01 00:00:00 TUYA Notice][simple_flash.c:428] key_addr: 0x1eb000   block_sz 4096
    [01-01 00:00:00 TUYA Notice][simple_flash.c:496] get key:
    0xcb 0x4e 0x3e 0xa4 0x0 0x30 0x9d 0xab 0x65 0x6d 0x8d 0xbf 0xe4 0xb9 0x3f 0x35 
    [FUNC]rwnxl_init
    [FUNC]intc_init
    [FUNC]calibration_main
    DPLL Unlock
    temp in flash is:315
    init temp pwr table: mod:8, pa:8, tmp:315, idx:7, dist:20
    set flag to 1
    open set pwr flag for the first time: 1
    temp_detct:40b1a8-40b1a0:1024:3
    [FUNC]ps_init
    rl_init
    [FUNC]func_init_extended OVER!!!
    
    kmsgbk:40c2e0-40c2d8:4096:6
    init_thread:40cb20-40cb18:2000:5
    Initializing TCP/IP stack
    tcp/ip:40d518-40d510:2048:7
    wpas_thread:40e3b8-40e3ac:3500:4
    app_init finished
    core_thread:40f080-40f078:2048:7
    mf_test:4109d8-4109d0:2048:4
    [01-01 00:00:00 TUYA Notice][tuya_main.c:187] mf_init succ
    [01-01 00:00:00 TUYA Notice][tuya_device.c:1035] don't support get reset reason
    [01-01 00:00:00 TUYA Notice][tuya_device.c:1041] rst_cnt:1
    [01-01 00:00:01 TUYA Notice][tuya_main.c:112] current product ssid name:tuya_mdev_test1
    [sa_sta]MM_RESET_REQ
    [sa_sta]ME_CONFIG_REQ
    [sa_sta]ME_CHAN_CONFIG_REQ
    [sa_sta]MM_START_REQ
    scan_start_req_handler
    cal dpll!
    set_tmp_pwr: indx:5, mod:6, pa:8, tmp:287, shift:0
    [01-01 00:00:03 TUYA Notice][tuya_main.c:116] wf_assign_ap_scan failed(-1)
    rw_ieee80211_set_country code:
    code: CN
    channel: 1 - 13
    mode: MANUAL
    bk_wlan cca closed
    [01-01 00:00:03 TUYA Notice][gw_intf.c:2272] gw_cntl.gw_wsm.stat:1
    [01-01 00:00:03 TUYA Notice][tuya_device.c:848] device_init ok  free_mem_size:65888
    net_wlan_add_netif not vif idx found
    [01-01 00:00:04 TUYA Notice][tuya_device.c:784] state:0
    [01-01 00:00:04 TUYA Notice][hw_table.c:567] wifi_stat:0
    
  • ADVERTISEMENT
  • ADVERTISEMENT
  • #33 20953721
    BDFp
    Level 3  

    There are a couple of things that I have not tried yet:
    1. Shortening the cables.
    2. Switching to another type of the ftdi flasher.
    3. Powering 3.3V not from ftdi 3.3V but from some other 3.3V source, separate source.
    I remember someone doing something else than above, soldering to 3.3V might not be enough so we could try to use the 5V on the board and power 3.3V indirectly for a more stable 3.3V.
    4. Desoldering the chip and flashing it separately.
    5. For some chips, people reported that using only tx and rx was enough, no power, but this one is unlikely to work.
  • #34 20965277
    chernyaevan
    Level 5  

    Third option with separate power supply does not help. I had tried it.
  • #35 21201645
    divadiow
    Level 35  
    I've been trying random odd chip firmwares with these BK7231S modules https://www.elektroda.com/rtvforum/topic4071547.html SPI flashing from 0x0. I've tried all the complete factory dumps in this thread with no result.

    Mildly relevant to this thread I thought,

    The only firmwares I've got to boot so far is the AliOS fw that came with the module. Bootloader:

    Code: Text
    Log in, to see the code

    and the RT-Threads fw from the HLK-B30/C-Chip C8000/BK7231U dev board
    Code: Text
    Log in, to see the code
  • #36 21508313
    divadiow
    Level 35  
    got any BK7231Q modules @insmod ?
  • ADVERTISEMENT
  • #37 21508353
    insmod
    Level 26  
    >>21508313 Nope, i did search for wa2 module on ali, but haven't found anything.
  • ADVERTISEMENT
  • #39 21596913
    divadiow
    Level 35  
    I wonder if it's worth @anderson007104 @ferbulous @aleksnet36 @4139ggn @BDFp @Hollako @Scip @chernyaevan giving OpenBK7231U a go if they still have their BK7231Q modules
  • #40 21596923
    insmod
    Level 26  
    >>21596913
    It won't work, BK7231Q is a different chip.
    If compiles, situation would be the same as in LT - no wifi.
  • #41 21596924
    divadiow
    Level 35  
    ah righto :(
    cheers

    Added after 11 [hours] 53 [minutes]:

    for lols I thought I'd flash a WA2 Moes backup to the HLK-B30 to see if it did anything

    560000 baud seems to be at which I get the most legible and extensive output
    Code: Text
    Log in, to see the code


    no sign of BL log though.

    Kinda interesting I thought
  • #42 21612663
    insmod
    Level 26  
    Received MS-101 switch today, but no luck for me.
    Got ESP8285N08 instead of WA2.
  • #43 21612665
    divadiow
    Level 35  
    insmod wrote:
    but no luck for me.

    boo :(

    Added after 3 [minutes]:

    I wonder if anyone that had WA2 in the past still has it/them and would be willing to donate 🤔

Topic summary

The WA2 module based on the BEKEN BK7231QN40 chip does not function correctly when flashed with OpenBK7231 firmware despite successful flashing attempts. Diagnostic efforts include verifying the visibility of the OpenBeken access point, UART log capture via TX2 pin at 115200 baud, and confirming correct binary files and flash offsets for different chip variants (T or N). Logs show repeated initialization messages but no functional Wi-Fi or device operation. The module appears to use a different BK7231Q chip variant with a distinct bootloader and unencrypted flash, incompatible with standard T and N SDKs and lacking Bluetooth and some peripherals. Attempts to read and dump the bootloader using BKwriter and hid_download_py tools yield partial or corrupted data, with CRC mismatches during flashing. Flash protection and power supply stability issues complicate flashing success. Alternative firmware approaches include using AliOS SDK and LibreTiny ESPhome builds, though Wi-Fi functionality remains broken and flashing errors persist. Community efforts focus on extracting bootloader dumps, comparing firmware, and exploring different flashing methods, but a fully working OpenBK7231 image for WA2 remains unavailable. The LibreTiny documentation provides pinout and memory mapping but lacks a ready-to-flash image. Users report similar issues with CRC errors and unsuccessful booting after flashing. Suggestions include using separate power supplies, shortening cables, and desoldering chips for external flashing. The WA2 module is also associated with devices like MOES MS-101/MS-104 and HLK-B30 relay modules. Overall, the WA2 BK7231Q variant requires specialized firmware and flashing procedures distinct from BK7231T/N devices, and community support and development are ongoing but incomplete.
Summary generated by the language model.
ADVERTISEMENT