openshwprojects / OpenBK7231T_App

Open source firmware (Tasmota/Esphome replacement) for BK7231T, BK7231N, BL2028N, T34, XR809, W800/W801, W600/W601 and BL602
https://openbekeniot.github.io/webapp/devicesList.html
1.39k stars 240 forks source link

Spectrum Smart E27 1500 lm 13 W takes long to connect to WiFi - BK7231T #588

Open Kosygor opened 1 year ago

Kosygor commented 1 year ago

Describe the bug Hello, Device is slowly reconnecting to WiFi after swtching it on by Zigbee switch. It takes about 3-5 min to reconnect. When I pulled BK outside and connected it to serial terminal it reconnects to WiFi in acceptable 12s. WiFi Signal should not be an issue since router is 3 m and 1 25cm wall from both of them. I have two Spectrum Smart E27 1500 lm 13 W with Is thare any way to save log when BK is inside the bulb ? Can reason of this can be that I have Loaded configuration for BK7231N instead of T ? It seems like this is only responsible for Pinout mapping. I just assume that W2BL is BK7231T because i was not able to read chip marks after removing putty. Firmware:

To Reproduce Well apparently no other devices have problems.

Screenshots IMG_20230106_203004 Ripped one pad so had to solder wires directly to one of bulbs chips. IMG_20230106_202941

Additional context Log - not sure where it starts and i do not want to cut it.:

Info:MAIN:[SAFE] Time 5, idle 171361/s, free 98320, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
Info:MAIN:no flash configuration, use default
Info:MAIN:set ip info: 192.168.4.1,255.255.255.0,192.168.4.1
Info:MAIN:ssid:KuchniaOpenBK7231T  key: mode:0
[bk]tx_txdesc_flush
me_set_ps_disable:840 0 0 0 572573 792676
------beacon_int_set:100 TU
set_active param 0
[msg]APM_STOP_CFM
update_ongoing_1_bcn_update
update_ongoing_1_bcn_update
enter low level!
mac 10:d5:61:7d:7e:3f
leave low level!

configuring interface uap (with Static IP)WARN: TCPIP mutex is NOT locked (1) caller 515AF

sending broadcast_deauth:5
Info:MAIN:[SAFE] Time 6, idle 169847/s, free 90600, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
Info:MAIN:[SAFE] Time 7, idle 172206/s, free 90600, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
Info:MAIN:[SAFE] Time 8, idle 172690/s, free 90600, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
Info:MAIN:[SAFE] Time 9, idle 172694/s, free 90600, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
do td cur_t:292--last:idx:13,t:283 -- new:idx:14,t:295 
--0xc:08, shift_b:0, shift_g:0, X:2
Info:MAIN:[SAFE] Time 10, idle 345135/s, free 90600, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
Info:GEN:dhcp=0 ip=0.0.0.0 gate=0.0.0.0 mask=0.0.0.0 mac=00:00:00:00:00:00 
Info:GEN:sta: 0, softap: 1, b/g/n
Info:GEN:softap:ssid=KuchniaOpenBK7231T,channel=1,dhcp=1,cipher_type:OPEN
Info:GEN:ip=192.168.4.1,gate=192.168.4.1,mask=255.255.255.0,dns=192.168.4.1
Info:MAIN:[SAFE] Time 11, idle 166448/s, free 90600, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
Info:MAIN:[SAFE] Time 12, idle 171629/s, free 90600, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
Info:MAIN:[SAFE] Time 13, idle 172611/s, free 90600, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
Info:MAIN:[SAFE] Time 14, idle 172700/s, free 90600, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
Info:MAIN:[SAFE] Time 15, idle 169868/s, free 90600, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
Info:MAIN:[SAFE] Time 16, idle 172559/s, free 90600, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
Info:MAIN:[SAFE] Time 17, idle 172651/s, free 90600, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
Info:MAIN:[SAFE] Time 18, idle 172625/s, free 90600, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
do td cur_t:303--last:idx:14,t:295 -- new:idx:15,t:307 
--0xc:08, shift_b:0, shift_g:0, X:1
Info:MAIN:[SAFE] Time 19, idle 171909/s, free 90600, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
Info:MAIN:[SAFE] Time 20, idle 253325/s, free 90600, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
Info:GEN:dhcp=0 ip=0.0.0.0 gate=0.0.0.0 mask=0.0.0.0 mac=00:00:00:00:00:00 
Info:GEN:sta: 0, softap: 1, b/g/n
Info:GEN:softap:ssid=KuchniaOpenBK7231T,channel=1,dhcp=1,cipher_type:OPEN
Info:GEN:ip=192.168.4.1,gate=192.168.4.1,mask=255.255.255.0,dns=192.168.4.1
Info:MAIN:[SAFE] Time 21, idle 260773/s, free 90600, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
Info:MAIN:[SAFE] Time 22, idle 172635/s, free 90600, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
Info:MAIN:[SAFE] Time 23, idle 172540/s, free 90600, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
Info:MAIN:[SAFE] Time 24, idle 172228/s, free 90600, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
Info:MAIN:[SAFE] Time 25, idle 171705/s, free 90600, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
Info:MAIN:[SAFE] Time 26, idle 171746/s, free 90600, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
Info:MAIN:[SAFE] Time 27, idle 172489/s, free 90600, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
Info:MAIN:[SAFE] Time 28, idle 172120/s, free 90600, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
Info:MAIN:[SAFE] Time 29, idle 172643/s, free 90600, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
Info:MAIN:[SAFE] Time 30, idle 171655/s, free 90600, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
Info:GEN:dhcp=0 ip=0.0.0.0 gate=0.0.0.0 mask=0.0.0.0 mac=00:00:00:00:00:00 
Info:GEN:sta: 0, softap: 1, b/g/n
Info:GEN:softap:ssid=KuchniaOpenBK7231T,channel=1,dhcp=1,cipher_type:OPEN
Info:GEN:ip=192.168.4.1,gate=192.168.4.1,mask=255.255.255.0,dns=192.168.4.1
rc_init: station_id=0 format_mod=0 pre_type=0 short_gi=581301 max_bw=793187
rc_init: nss_max=0 mcs_max=0 r_idx_min=255 r_idx_max=581343 no_samples=793254
ctrl_port_hdl:1
WARN: TCPIP mutex is NOT locked (1) caller 4F6A7

WARN: TCPIP mutex is NOT locked (1) caller 50671

WARN: TCPIP mutex is NOT locked (1) caller 4F6CD

WARN: TCPIP mutex is NOT locked (1) caller 4F6A7

WARN: TCPIP mutex is NOT locked (1) caller 50671

WARN: TCPIP mutex is NOT locked (1) caller 4F6CD

Info:MAIN:[SAFE] Time 31, idle 160691/s, free 90408, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
Info:MAIN:Boot complete time reached (30 seconds)
Info:CFG:####### Set Boot Complete #######
rc_init: station_id=0 format_mod=0 pre_type=0 short_gi=581301 max_bw=793187
rc_init: nss_max=0 mcs_max=0 r_idx_min=255 r_idx_max=581343 no_samples=793254
ctrl_port_hdl:1
rc_init: station_id=0 format_mod=0 pre_type=0 short_gi=581301 max_bw=793187
rc_init: nss_max=0 mcs_max=0 r_idx_min=255 r_idx_max=581343 no_samples=793254
ctrl_port_hdl:1
WARN: TCPIP mutex is NOT locked (1) caller 4F6A7

WARN: TCPIP mutex is NOT locked (1) caller 50671

WARN: TCPIP mutex is NOT locked (1) caller 4F6CD

Info:MAIN:[SAFE] Time 32, idle 155826/s, free 90408, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
Info:MAIN:[SAFE] Time 33, idle 166196/s, free 90408, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
do td cur_t:316--last:idx:15,t:307 -- new:idx:16,t:319 
--0xc:08, shift_b:0, shift_g:0, X:0
Info:MAIN:[SAFE] Time 34, idle 198091/s, free 90408, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
Info:MAIN:[SAFE] Time 35, idle 170706/s, free 90408, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
Info:MAIN:[SAFE] Time 36, idle 171219/s, free 90408, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
Info:MAIN:[SAFE] Time 37, idle 171610/s, free 90408, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
Info:MAIN:[SAFE] Time 38, idle 171923/s, free 90408, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
Info:MAIN:[SAFE] Time 39, idle 171920/s, free 90408, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
Info:MAIN:[SAFE] Time 40, idle 170991/s, free 90408, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
Info:GEN:dhcp=0 ip=0.0.0.0 gate=0.0.0.0 mask=0.0.0.0 mac=00:00:00:00:00:00 
Info:GEN:sta: 0, softap: 1, b/g/n
Info:GEN:softap:ssid=KuchniaOpenBK7231T,channel=1,dhcp=1,cipher_type:OPEN
Info:GEN:ip=192.168.4.1,gate=192.168.4.1,mask=255.255.255.0,dns=192.168.4.1
Info:MAIN:[SAFE] Time 41, idle 167416/s, free 90408, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
Info:MAIN:[SAFE] Time 42, idle 172192/s, free 90408, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
Info:MAIN:[SAFE] Time 43, idle 171790/s, free 90408, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
Info:MAIN:[SAFE] Time 44, idle 172133/s, free 90408, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
rc_init: station_id=0 format_mod=0 pre_type=0 short_gi=581301 max_bw=793187
rc_init: nss_max=0 mcs_max=0 r_idx_min=255 r_idx_max=581343 no_samples=793254
ctrl_port_hdl:1
WARN: TCPIP mutex is NOT locked (1) caller 4F6A7

WARN: TCPIP mutex is NOT locked (1) caller 50671

WARN: TCPIP mutex is NOT locked (1) caller 4F6CD

Info:MAIN:[SAFE] Time 45, idle 241300/s, free 90392, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
Info:MAIN:[SAFE] Time 46, idle 185425/s, free 90392, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
Info:MAIN:[SAFE] Time 47, idle 179169/s, free 87936, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
do td cur_t:333--last:idx:16,t:319 -- new:idx:17,t:331 
--0xc:08, shift_b:0, shift_g:0, X:0
Info:MAIN:[SAFE] Time 48, idle 177149/s, free 90392, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
Info:MAIN:[SAFE] Time 49, idle 173517/s, free 90392, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
Info:MAIN:[SAFE] Time 50, idle 171791/s, free 90392, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
Info:GEN:dhcp=0 ip=0.0.0.0 gate=0.0.0.0 mask=0.0.0.0 mac=00:00:00:00:00:00 
Info:GEN:sta: 0, softap: 1, b/g/n
Info:GEN:softap:ssid=KuchniaOpenBK7231T,channel=1,dhcp=1,cipher_type:OPEN
Info:GEN:ip=192.168.4.1,gate=192.168.4.1,mask=255.255.255.0,dns=192.168.4.1
rc_init: station_id=0 format_mod=0 pre_type=0 short_gi=581301 max_bw=793187
rc_init: nss_max=0 mcs_max=0 r_idx_min=255 r_idx_max=581343 no_samples=793254
ctrl_port_hdl:1
Info:MAIN:[SAFE] Time 51, idle 165665/s, free 90408, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
Info:MAIN:[SAFE] Time 52, idle 387438/s, free 90408, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
rc_init: station_id=0 format_mod=0 pre_type=0 short_gi=581301 max_bw=793187
rc_init: nss_max=0 mcs_max=0 r_idx_min=255 r_idx_max=581343 no_samples=793254
ctrl_port_hdl:1
rc_init: station_id=0 format_mod=0 pre_type=0 short_gi=581301 max_bw=793187
rc_init: nss_max=0 mcs_max=0 r_idx_min=255 r_idx_max=581343 no_samples=793254
ctrl_port_hdl:1
WARN: TCPIP mutex is NOT locked (1) caller 4F6A7

WARN: TCPIP mutex is NOT locked (1) caller 50671

WARN: TCPIP mutex is NOT locked (1) caller 4F6CD

Info:MAIN:[SAFE] Time 53, idle 169148/s, free 90176, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
Info:MAIN:[SAFE] Time 54, idle 175908/s, free 90408, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
rc_init: station_id=0 format_mod=0 pre_type=0 short_gi=581301 max_bw=793187
rc_init: nss_max=0 mcs_max=0 r_idx_min=255 r_idx_max=581343 no_samples=793254
ctrl_port_hdl:1
WARN: TCPIP mutex is NOT locked (1) caller 4F6A7

WARN: TCPIP mutex is NOT locked (1) caller 50671

WARN: TCPIP mutex is NOT locked (1) caller 4F6CD

Info:MAIN:[SAFE] Time 55, idle 177428/s, free 78696, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 6/38
rc_init: station_id=0 format_mod=0 pre_type=0 short_gi=581301 max_bw=793187
rc_init: nss_max=0 mcs_max=0 r_idx_min=255 r_idx_max=581343 no_samples=793254
ctrl_port_hdl:1
WARN: TCPIP mutex is NOT locked (1) caller 4F6A7

WARN: TCPIP mutex is NOT locked (1) caller 50671

WARN: TCPIP mutex is NOT locked (1) caller 4F6CD

Info:MAIN:[SAFE] Time 56, idle 179588/s, free 78696, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 6/38
rc_init: station_id=0 format_mod=0 pre_type=0 short_gi=581301 max_bw=793187
rc_init: nss_max=0 mcs_max=0 r_idx_min=255 r_idx_max=581343 no_samples=793254
ctrl_port_hdl:1
rc_init: station_id=0 format_mod=0 pre_type=0 short_gi=581301 max_bw=793187
rc_init: nss_max=0 mcs_max=0 r_idx_min=255 r_idx_max=581343 no_samples=793254
ctrl_port_hdl:1
rc_init: station_id=0 format_mod=0 pre_type=0 short_gi=581301 max_bw=793187
rc_init: nss_max=0 mcs_max=0 r_idx_min=255 r_idx_max=581343 no_samples=793254
ctrl_port_hdl:1
WARN: TCPIP mutex is NOT locked (1) caller 4F6A7

WARN: TCPIP mutex is NOT locked (1) caller 50671

WARN: TCPIP mutex is NOT locked (1) caller 4F6CD

Info:MAIN:[SAFE] Time 57, idle 348271/s, free 90392, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
Info:MAIN:[SAFE] Time 58, idle 176274/s, free 85256, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
do td cur_t:340--last:idx:17,t:331 -- new:idx:18,t:343 
--0xc:08, shift_b:0, shift_g:0, X:0
Info:MAIN:[SAFE] Time 59, idle 376206/s, free 90392, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
do td cur_t:333--last:idx:18,t:343 -- new:idx:17,t:331 
--0xc:08, shift_b:0, shift_g:0, X:0
Info:MAIN:[SAFE] Time 60, idle 171962/s, free 90392, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
Info:GEN:dhcp=0 ip=0.0.0.0 gate=0.0.0.0 mask=0.0.0.0 mac=00:00:00:00:00:00 
Info:GEN:sta: 0, softap: 1, b/g/n
Info:GEN:softap:ssid=KuchniaOpenBK7231T,channel=1,dhcp=1,cipher_type:OPEN
Info:GEN:ip=192.168.4.1,gate=192.168.4.1,mask=255.255.255.0,dns=192.168.4.1
rc_init: station_id=0 format_mod=0 pre_type=0 short_gi=581301 max_bw=793187
rc_init: nss_max=0 mcs_max=0 r_idx_min=255 r_idx_max=581343 no_samples=793254
ctrl_port_hdl:1
rc_init: station_id=0 format_mod=0 pre_type=0 short_gi=581301 max_bw=793187
rc_init: nss_max=0 mcs_max=0 r_idx_min=255 r_idx_max=581343 no_samples=793254
ctrl_port_hdl:1
WARN: TCPIP mutex is NOT locked (1) caller 4F6A7

WARN: TCPIP mutex is NOT locked (1) caller 50671

WARN: TCPIP mutex is NOT locked (1) caller 4F6CD

Info:MAIN:[SAFE] Time 61, idle 159871/s, free 90392, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
rc_init: station_id=0 format_mod=0 pre_type=0 short_gi=581301 max_bw=793187
rc_init: nss_max=0 mcs_max=0 r_idx_min=255 r_idx_max=581343 no_samples=793254
ctrl_port_hdl:1
rc_init: station_id=0 format_mod=0 pre_type=0 short_gi=581301 max_bw=793187
rc_init: nss_max=0 mcs_max=0 r_idx_min=255 r_idx_max=581343 no_samples=793254
ctrl_port_hdl:1
WARN: TCPIP mutex is NOT locked (1) caller 4F6A7

WARN: TCPIP mutex is NOT locked (1) caller 50671

WARN: TCPIP mutex is NOT locked (1) caller 4F6CD

Info:MAIN:[SAFE] Time 62, idle 187999/s, free 88072, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
do td cur_t:343--last:idx:17,t:331 -- new:idx:18,t:343 
--0xc:08, shift_b:0, shift_g:0, X:0
Info:MAIN:[SAFE] Time 63, idle 216751/s, free 78712, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 6/38
Info:MAIN:[SAFE] Time 64, idle 178273/s, free 78712, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 6/38
do td cur_t:335--last:idx:18,t:343 -- new:idx:17,t:331 
--0xc:08, shift_b:0, shift_g:0, X:0
Error:HTTP:TCP Client is disconnected, fd: 5
Info:MAIN:[SAFE] Time 65, idle 178310/s, free 90408, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
Info:MAIN:[SAFE] Time 66, idle 172110/s, free 90408, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
Info:HTTP:HTTP_ProcessPacket: generating cfg_wifi_set 
Info:MAIN:[SAFE] Time 67, idle 174692/s, free 85680, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 5/38
Info:MAIN:Module reboot in 2...
do td cur_t:341--last:idx:17,t:331 -- new:idx:18,t:343 
--0xc:08, shift_b:0, shift_g:0, X:0
Info:MAIN:[SAFE] Time 68, idle 184700/s, free 78712, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 6/38
Info:MAIN:Module reboot in 1...
[00]

V:BK7231S_1.0.5

CPSR:000000D3

R0:00000000

R1:0E330001

R2:00000100

R3:00000000

R4:000A70D4

R13:00402E78

R14(LR):0007D9C8

ST:00000001

J 0x10000

prvHeapInit-start addr:0x420928, size:128728
Entering initLog()...
Commands registered!
initLog() done!
Info:MAIN:Main_Init_Before_Delay
Info:CFG:####### Boot Count 51 #######
Warn:CFG:CFG_InitAndLoad: Correct config has been loaded with 10 changes count.
Error:CMD:lfs is absent
Info:GEN:PIN_SetupPins pins have been set up.
Info:CFG:####### Flash Save LED #######
Info:MAIN:Main_Init_Before_Delay done

Main_Init_Before_Delay done
Info:MAIN:Main_Init_Delay

Main_Init_Delay
[bk]tx_txdesc_flush
[rx_iq]rx_amp_err_rd: 0x03f
[rx_iq]rx_phase_err_rd: 0xfffffffd
[rx_iq]rx_ty2_rd: 0x000
*********** finally result **********
gtx_dcorMod            : 0x8
gtx_dcorPA             : 0xa
gtx_pre_gain           : 0x0
gtx_i_dc_comp          : 0x1fc
gtx_q_dc_comp          : 0x209
gtx_i_gain_comp        : 0x3ff
gtx_q_gain_comp        : 0x3f1
gtx_ifilter_corner over: 0x11
gtx_qfilter_corner over: 0x11
gtx_phase_comp         : 0x200
gtx_phase_ty2          : 0x200
gbias_after_cal        : 0x18
gav_tssi               : 0x21
g_rx_dc_gain_tab 0 over: 0x80808080
g_rx_dc_gain_tab 1 over: 0x82808080
g_rx_dc_gain_tab 2 over: 0x84828480
g_rx_dc_gain_tab 3 over: 0x87888c88
g_rx_dc_gain_tab 4 over: 0x87847b88
g_rx_dc_gain_tab 5 over: 0x8c88888c
g_rx_dc_gain_tab 6 over: 0x89868b88
g_rx_dc_gain_tab 7 over: 0x868b7183
grx_amp_err_wr         : 0x1e2
grx_phase_err_wr       : 0x3ff
**************************************
ble use fit!
temp in flash is:283
lpf_i & q in flash is:16, 17
xtal in flash is:32
-----pwr_gain:12, g_idx:12, shift_b:0, shift_g:0
-----[pwr_gain]12
Initializing TCP/IP stack
Info:MAIN:Main_Init_Delay done

Main_Init_Delay done
Info:MAIN:Main_Init_After_Delay
Info:MAIN:Using SSID [PiachWoczy]
Info:MAIN:Using Pass [X]
Info:MQTT:MQTT_RegisterCallback called for bT BKKuchnia/ subT BKKuchnia/+/set
Info:MQTT:MQTT_RegisterCallback called for bT cmnd/BKKuchnia/ subT cmnd/BKKuchnia/+
Error:CMD:lfs is absent
Info:MAIN:Main_Init_After_Delay done
Info:MAIN:Time 1, idle 237871/s, free 94208, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
do td cur_t:332--last:idx:13,t:283 -- new:idx:17,t:331 
--0xc:08, shift_b:0, shift_g:0, X:0
Info:MAIN:Time 2, idle 239208/s, free 94208, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
Info:MAIN:Time 3, idle 243137/s, free 94208, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
Info:MAIN:Time 4, idle 241296/s, free 94208, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
Info:MAIN:Time 5, idle 242803/s, free 94208, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
Info:MAIN:ssid:PiachWoczy key:X
fast_connect
[bk]tx_txdesc_flush
bssid 9c-9d-7e-75-19-90
security2cipher 2 3 24 8 security=6
cipher2security 2 3 24 8
enter low level!
mac 10:d5:61:7d:7e:3e
leave low level!
Info:MAIN:wl_status 3
Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTING - 1
ssid:PiachWoczy, 1
ht in scan
scan_start_req_handler
found scan rst rssi -71 < -50
dis ht_support
me_set_ps_disable:840 0 0 0 572573 792676
sm_auth_send:1
sm_auth_handler
ht NOT in assoc req
sm_assoc_rsp_handler
sm_assoc_rsp_handler status=41
SM_DISCONNECTING status=41
Info:MAIN:wl_status 8
Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_DISCONNECTED - 2
recover ht_support:1 
ht in scan
scan_start_req_handler
Info:MAIN:Time 6, idle 241130/s, free 88624, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
Info:MAIN:Time 7, idle 238774/s, free 88192, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
Info:MAIN:wl_status 3
Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTING - 1
ssid:PiachWoczy, 1
found scan rst rssi -70 < -50
dis ht_support
no ht in scan
scan_start_req_handler
Info:MAIN:Time 8, idle 236774/s, free 85488, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
me_set_ps_disable:840 0 0 0 572573 792676
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=581301 max_bw=793187
rc_init: nss_max=0 mcs_max=0 r_idx_min=255 r_idx_max=581343 no_samples=793254
__l2_packet_send: ret 0
__l2_packet_send: ret 0
sta_mgmt_add_key
ctrl_port_hdl:1
me_set_ps_disable:840 0 0 0 572573 792676
Info:MAIN:wl_status 10
Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTED - 4

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

WARN: TCPIP mutex is NOT locked (1) caller 515AF

new ie: 0 : 50 69 61 63 68 57 6f 63 7a 79 
new ie: 1 : 82 84 8b 96 c 12 18 24 
new ie: 3 : b 
new ie: 2d : ef 19 3 ff ff 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 
new ie: 30 : 1 0 0 f ac 4 1 0 0 f ac 4 2 0 0 f ac 2 0 f ac 8 8c 0 

Info:MAIN:Time 9, idle 232600/s, free 87912, MQTT 0(0), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:MAIN:wl_status 11
Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTED - 4
Info:MAIN:Time 10, idle 237635/s, free 87952, MQTT 0(0), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:GEN:dhcp=0 ip=192.168.0.245 gate=192.168.0.1 mask=255.255.255.0 mac=10:d5:61:7d:7e:3e 
Info:GEN:sta: 1, softap: 0, b/g/n
Info:GEN:sta:rssi=-70,ssid=PiachWoczy,bssid=9c:9d:7e:75:19:90 ,channel=11,cipher_type:MIXED
Info:MQTT:mqtt_userName mqtt
mqtt_pass X
mqtt_clientID BKKuchnia
mqtt_host X
Info:MAIN:Time 11, idle 233276/s, free 87864, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:MQTT:mqtt_connection_cb: Successfully connected
Info:MQTT:mqtt_subscribed to BKKuchnia/+/set
Info:MQTT:mqtt_subscribed to cmnd/BKKuchnia/+
Error:MQTT:MQTT client "BKKuchnia" request cb: err 0
do td cur_t:339--last:idx:17,t:331 -- new:idx:18,t:343 
--0xc:08, shift_b:0, shift_g:0, X:0
Error:MQTT:MQTT client "BKKuchnia" request cb: err 0
Info:MQTT:Publishing val BKKuchnia to BKKuchnia/host retain=0
Info:MQTT:[g_bPublishAllStatesNow] item -13 result 0
Info:MAIN:Time 12, idle 239407/s, free 87864, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:MQTT:Publishing val Build on Dec 30 2022 14:54:21 version 1.15.263 to BKKuchnia/build retain=0
Info:MQTT:[g_bPublishAllStatesNow] item -12 result 0
Info:MAIN:Time 13, idle 242881/s, free 87864, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:MQTT:Publishing val 10:d5:61:7d:7e:3e  to BKKuchnia/mac retain=0
Info:MQTT:[g_bPublishAllStatesNow] item -11 result 0
Info:MAIN:Time 14, idle 241879/s, free 87624, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:MQTT:Publishing val 2 to BKKuchnia/sockets retain=0
Info:MQTT:[g_bPublishAllStatesNow] item -8 result 0
Info:MAIN:Time 15, idle 251687/s, free 87864, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:MQTT:Publishing val -71 to BKKuchnia/rssi retain=0
Info:MQTT:[g_bPublishAllStatesNow] item -7 result 0
Info:MAIN:Time 16, idle 250367/s, free 87864, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:MQTT:Publishing val 16 to BKKuchnia/uptime retain=0
Info:MQTT:[g_bPublishAllStatesNow] item -6 result 0
Info:MAIN:Time 17, idle 242808/s, free 87632, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:MQTT:Publishing val 87864 to BKKuchnia/freeheap retain=0
Info:MQTT:[g_bPublishAllStatesNow] item -5 result 0
Info:MAIN:Time 18, idle 247757/s, free 87632, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:MQTT:Publishing val 192.168.0.245 to BKKuchnia/ip retain=0
Info:MQTT:[g_bPublishAllStatesNow] item -4 result 0
Info:MAIN:Time 19, idle 242634/s, free 87624, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:MQTT:Publishing val 1 to BKKuchnia/led_enableAll/get retain=0
Info:MQTT:[g_bPublishAllStatesNow] item -3 result 0
Info:MAIN:Time 20, idle 241967/s, free 87536, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:GEN:dhcp=0 ip=192.168.0.245 gate=192.168.0.1 mask=255.255.255.0 mac=10:d5:61:7d:7e:3e 
Info:GEN:sta: 1, softap: 0, b/g/n
Info:GEN:sta:rssi=-65,ssid=PiachWoczy,bssid=9c:9d:7e:75:19:90 ,channel=11,cipher_type:MIXED
Info:MQTT:Publishing val 220 to BKKuchnia/led_temperature/get retain=0
Info:MQTT:[g_bPublishAllStatesNow] item -2 result 0
Info:MAIN:Time 21, idle 238976/s, free 87448, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:MQTT:Publishing val 100 to BKKuchnia/led_dimmer/get retain=0
Info:MQTT:[g_bPublishAllStatesNow] item -1 result 0
Info:MAIN:Time 22, idle 261637/s, free 87600, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:MAIN:Time 23, idle 242029/s, free 87600, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:MAIN:Time 24, idle 245928/s, free 87600, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:MAIN:Time 25, idle 244485/s, free 87600, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:MAIN:Time 26, idle 256513/s, free 87600, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:MAIN:Time 27, idle 248208/s, free 87600, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:MAIN:Time 28, idle 244408/s, free 87600, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:MAIN:Time 29, idle 246136/s, free 87600, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:MAIN:Time 30, idle 246872/s, free 87600, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:GEN:dhcp=0 ip=192.168.0.245 gate=192.168.0.1 mask=255.255.255.0 mac=10:d5:61:7d:7e:3e 
Info:GEN:sta: 1, softap: 0, b/g/n
Info:GEN:sta:rssi=-73,ssid=PiachWoczy,bssid=9c:9d:7e:75:19:90 ,channel=11,cipher_type:MIXED
Info:MAIN:Time 31, idle 241415/s, free 87600, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:MAIN:Boot complete time reached (30 seconds)
Info:CFG:####### Set Boot Complete #######
Info:MAIN:Time 32, idle 240016/s, free 87600, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:MAIN:Time 33, idle 246792/s, free 87600, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:MAIN:Time 34, idle 245194/s, free 87600, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:MAIN:Time 35, idle 244807/s, free 87600, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:MAIN:Time 36, idle 248579/s, free 87600, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:MAIN:Time 37, idle 246124/s, free 87600, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:MAIN:Time 38, idle 245242/s, free 87600, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:MAIN:Time 39, idle 246862/s, free 87600, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:MAIN:Time 40, idle 245060/s, free 87600, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:GEN:dhcp=0 ip=192.168.0.245 gate=192.168.0.1 mask=255.255.255.0 mac=10:d5:61:7d:7e:3e 
Info:GEN:sta: 1, softap: 0, b/g/n
Info:GEN:sta:rssi=-72,ssid=PiachWoczy,bssid=9c:9d:7e:75:19:90 ,channel=11,cipher_type:MIXED
Info:MAIN:Time 41, idle 239605/s, free 87600, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:MAIN:Time 42, idle 263812/s, free 87600, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:MAIN:Time 43, idle 244714/s, free 87600, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
do td cur_t:351--last:idx:18,t:343 -- new:idx:19,t:355 
--0xc:08, shift_b:0, shift_g:0, X:0
Info:MAIN:Time 44, idle 244645/s, free 87600, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:MAIN:Time 45, idle 246571/s, free 87600, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:MAIN:Time 46, idle 247175/s, free 87600, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:MAIN:Time 47, idle 256001/s, free 87600, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:MAIN:Time 48, idle 247242/s, free 87600, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:MAIN:Time 49, idle 245330/s, free 87600, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:MAIN:Time 50, idle 243906/s, free 87600, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:GEN:dhcp=0 ip=192.168.0.245 gate=192.168.0.1 mask=255.255.255.0 mac=10:d5:61:7d:7e:3e 
Info:GEN:sta: 1, softap: 0, b/g/n
Info:GEN:sta:rssi=-67,ssid=PiachWoczy,bssid=9c:9d:7e:75:19:90 ,channel=11,cipher_type:MIXED
Info:MAIN:Time 51, idle 241255/s, free 87600, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:MAIN:Time 52, idle 246699/s, free 87600, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:MAIN:Time 53, idle 245079/s, free 87600, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:MAIN:Time 54, idle 492075/s, free 87600, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
openshwprojects commented 1 year ago

Dziękuję, thank you, for the report.

So basically this one single device has problems with WiFi and others work?

Would you be able to submit a full 2MB flash dump of that device for analysis?

I suspect that it may be possible to fix by clearing the BK7231 RF section, but it's a risky operation, don't try doing it yourself, I will give specific instructions when ready.

Btw, @btsimonh , thoughts on that?

Kosygor commented 1 year ago

Well I have to admit that yesterday update of BK7231 GUI Flash Tool let me read that without an isse. Before I had to use python uartprogram and there was no go without using CEN or RST, on controary what manuals said (pretty usefull to have reminder now in Flash Tool while getting serial). I am not sure if FW dump containts any credentials (probably not but ... ) so I just have sent it directly to Your email. I am really proud to see Elektroda's (so I assume Polish) fighting with China's pursuance to wrap everyone in their Tuya world ;)

openshwprojects commented 1 year ago

Obviously FW dump contains SSID and password, it has too, as it's the full memory of the device.

We're from Elektroda and you can contribute as well by creating a teardown or a review for us: https://openbekeniot.github.io/webapp/devicesList.html As long as you are from within Poland, you can also get a free SD card for submitting a teardown (status of shipping outside of PL is not clear yet): https://www.elektroda.pl/rtvforum/topic3550170.html

Your case seems very rare for me and I really flashed lots of devices. Currently I can only suggest you one risky operation: image Restore RF Config

You can also download it first, but the whole operation is up to you, I am not sure yet if it can help or worsen the issue.

Try that now, but only if you are willing to take small risk.

The another way to fix it might be to just copy whole flash dump from another BK and just change mac, again, don't try it yourself yet because there is a risk of overwriting the bootloader.

Kosygor commented 1 year ago

Ok I got it, thanks for clarification about FW.

I can share teardown of course, but shouldn't I wait for it to be working like it should ? Yep I am from Poland I can make PL and EN teardown`s ( but I am laking writng skill in both - so do not expect much).

About my problem I think it is worth to notice that I have counted it took about 20 min for device to connect and this is exactly what Online for filed said in http://IP/index Webui. So device seems to start without an issue.

Sure I have tried it, whole HA journey is trial and error. After resetting Restore RF Config It did not make much change it took 5 min to reconnect. It seems like these re-connection times are random 5-20 min. Only diffrence that I have noticed is that after this operation device sends less data trough mqtt. I have sent You before and after RF blocks.

One Idea that I have is because of that particular bulb RF antenna is on the level of aluminium plate with LED`s so I think that maybe rising whole WB2l can help. Is it worth giving a try ? I may fail because I have damaged few pads on first and second bulb but I will try to make one for teardown from both of them. Edit: I have tried moving antenna up. first startup was promising and took approx. 10 seconds. But another one was slow.