p.kaczmarek2 wrote: Any news? Can you redo configuration and tell me what breaks stuff?
I'd like to add some kind of failsafe, but I need to know what breaks.
But it's very, very strange, because after reboot pins are not started if more than 5 reboots fails (safe mode)
EDIT: maybe a string buffer overflow error? Have you set any lenghty names? I will double-check if all string sizes are kept at bay
Everything was great untill I tried to find which pin corespond to external switch input and tried to restore my original mac address. Marked all channels as dInput, found right config, everything was OK.
Now I see this in serial
V:BK7231N_1.0.1
REG:cpsr spsr r13 r14
SVC:000000D3 00401C1C 000033AC
IRQ:000000d2 00000010 00401e0c 85fefcfc
FIR:000000d1 00000010 00401ffc 75d79dae
SYS:000000df 0040192c 00000158
ST:00000000
J 0x10000
bk_misc_init_start_type 0 0
prvHeapInit-start addr:0x411330, size:126160
[Flash]id:0xeb6015
sctrl_sta_ps_init
cset:0 0 0 0
Entering init log...
Init log done!
Commands registered!
bandgap_calm_in_efuse=0x67
[load]bandgap_calm=0x67->0x27,vddig=4->5
[FUNC]
Device don't connect to wifi and buttons are not working anymore
After three reboots it' now on safe mod, will try further
UPD
After connecting in safe mod I've pressed button "Convert to AP" In wifi settings and this happened in serial
sta: 0, softap: 1, b/g/n
softap:ssid=OpenBK7231N_8C000000,channel=1,dhcp=1,cipher_type:OPEN
Info:MAIN:[SAFE] Time 90, free 76952, MQTT 0, bWifi 0, secondsWithNoPing 29, 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:ip=192.168.4.1,gate=255.255.255.255,mask=255.255.255.0,dns=192.168.4.1
Info:MAIN:[SAFE] Time 91, free 76952, MQTT 0, bWifi 0, secondsWithNoPing 30, socks 5/38
Info:MAIN:[SAFE] Time 92, free 76952, MQTT 0, bWifi 0, secondsWithNoPing 31, socks 5/38
Info:MAIN:[SAFE] Time 93, free 76952, MQTT 0, bWifi 0, secondsWithNoPing 32, socks 5/38
Info:MAIN:[SAFE] Time 94, free 76952, MQTT 0, bWifi 0, secondsWithNoPing 33, socks 5/38
Info:MAIN:[SAFE] Time 95, free 76952, MQTT 0, bWifi 0, secondsWithNoPing 34, socks 5/38
Info:HTTP:HTTP_ProcessPacket: generating cfg_wifi_set
Info:MAIN:[SAFE] Time 96, free 76952, MQTT 0, bWifi 0, secondsWithNoPing 35, socks 5/38
Info:MAIN:Module reboot in 2...
Info:MAIN:[SAFE] Time 97, free 76952, MQTT 0, bWifi 0, secondsWithNoPing 36, socks 5/38
Info:MAIN:Module reboot in 1...
bk_reboot
wdt reboot
V:BK7231N_1.0.1
REG:cpsr spsr r13 r14
SVC:000000D3 00401C1C 000033AC
IRQ:000000d2 00000010 00401e0c 0006d33c
FIR:000000d1 00000010 00401ffc 0006d33c
SYS:000000df 0040192c 00000158
ST:00010001
J 0x10000
bk_misc_init_start_type 1 10001
prvHeapInit-start addr:0x411330, size:126160
[Flash]id:0xeb6015
sctrl_sta_ps_init
cset:0 0 0 0
Entering init log...
Init log done!
Commands registered!
And it stuck. Rebooted it with button press
V:BK7231N_1.0.1
REG:cpsr spsr r13 r14
SVC:000000D3 00401C1C 000033AC
IRQ:000000d2 00000010 00401e0c 85fefcfc
FIR:000000d1 00000010 00401ffc 75d79dae
SYS:000000df 0040192c 00000158
ST:00000000
J 0x10000
bk_misc_init_start_type 0 0
prvHeapInit-start addr:0x411330, size:126160
[Flash]id:0xeb6015
sctrl_sta_ps_init
cset:0 0 0 0
Entering init log...
Init log done!
Commands registered!
bandgap_calm_in_efuse=0x67
[load]bandgap_calm=0x67->0x27,vddig=4->5
And stuck again
Another reboot
V:BK7231N_1.0.1
REG:cpsr spsr r13 r14
SVC:000000D3 00401C1C 000033AC
IRQ:000000d2 00000010 00401e0c 85fefcfc
FIR:000000d1 00000010 00401ffc 75d7bdae
SYS:000000df 0040192c 00000158
ST:00000000
J 0x10000
bk_misc_init_start_type 0 0
prvHeapInit-start addr:0x411330, size:126160
[Flash]id:0xeb6015
sctrl_sta_ps_init
cset:0 0 0 0
Entering init log...
Init log done!
Commands registered!
bandgap_calm_in_efuse=0x67
[load]bandgap_calm=0x67->0x27,vddig=4->5
[FUNC]rwnxl_init
Aaaaand again
Two reboots more and safe mode
Added after 10 [minutes]:
Don't understand how clear config works.
Debug:CMD:cmd [clearConfig]
Error:CMD:cmd clearConfig NOT found (args )
Info:MAIN:[SAFE] Time 103, free 76960, MQTT 0,
Added after 12 [minutes]:
So I've reflashed everything from scratch
1.full dump
2. Your FW
3. Connected to AP
4. Restored Mac
5. Rebooted
6. Set Wifi settings
7. Rebooted
8. Configured pins which I know I can use
9. Rebooted
And now everything is OK, at least all buttons work properly
I think some pins should not be touched EVER in my device, because while configuring pins with RX1 and TX1 connected I saw some activity from TX pin. God knows which registers I've touched
UPD Is there any possibility to invert condition of this toggle
It shows thai it's ON but It's OFF
And also can we disable MQTT fuction? I see it's trying to connect to some host, but I'm not planning to use MQTT(I have another realisation for metrics from my sensors - simple webpage in Prometheus format where Prometheus collects It's data)