Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade from .105 to .106 seems to break something - BK7231T #387

Closed
mariusbach opened this issue Nov 1, 2022 · 18 comments
Closed

Upgrade from .105 to .106 seems to break something - BK7231T #387

mariusbach opened this issue Nov 1, 2022 · 18 comments

Comments

@mariusbach
Copy link

mariusbach commented Nov 1, 2022

I have upgraded 4 wifi sockets from .105 to .108.

3 have BL942, Periodic Energy Statistics and NTP drivers enabled - all of them are not reachable after the upgrade. No ping possible, not even a reaction to a button press on the device itself.

However, I can unplug/plug a few times until they start in AP mode; I can connect and use the menus, but I cannot downgrade the firmware because the web app doesn't open. Also I cannot toggle the relais of the plug, not via software and not via hardware device button.

1 socket has no driver enabled - upgrade went through but MQTT connection results in error. I was able to downgrade to .105 though.

@valeklubomir
Copy link
Contributor

BK7231T. My device is Light Bulb. I am running NTP without problems.

@openshwprojects
Copy link
Owner

openshwprojects commented Nov 1, 2022

First I would like to note that in Safe Mode, the pins are disabled, so it's normal that you can't toggle relays. The idea is that in Safe Mode, you can revert breaking changes and then put back device in normal mode. Same goes for "can't open the Web App". Safe Mode has only basic features enabled, otherwise it wouldnt' be "Safe"

Maybe it's LFS related? Was your autoexec.bat lost?

@mariusbach
Copy link
Author

mariusbach commented Nov 1, 2022

in Safe Mode, the pins are disabled, so it's normal that you can't toggle relays

Yes, that's what I thought as well. Fair enough.

I'm not sure how to proceed and downgrade via OTA, when I only can connect in AP mode. I don't have an http-server in that AP-mode-network. Only way would be to open up the plugs again and flash via UART/serial.

@mariusbach
Copy link
Author

Maybe it's LFS related? Was your autoexec.bat lost?

I don't use the LFS or autoexec.bat. Also I usually press the "quick OTA" button because I don't need to preserve the LFS.

@btsimonh
Copy link
Collaborator

btsimonh commented Nov 1, 2022

remove mqtt and ntp config in safe mode. disable other drivers if present? ensure it's run for >30s, then reboot and see if it comes back on normal wifi?

@openshwprojects
Copy link
Owner

openshwprojects commented Nov 1, 2022

@mariusbach are you on T platform or N? @btsimonh is it possible that N platform packs config struct differently than T? Just a wild guess.
EDIT: title states BK7231T so maybe not... strange

@mariusbach
Copy link
Author

@openshwprojects I'm using the T platform.

remove mqtt and ntp config in safe mode. disable other drivers if present? ensure it's run for >30s, then reboot and see if it comes back on normal wifi?

This worked! It's back online. I'll try to re-enable the drivers one by one.

@mariusbach
Copy link
Author

mariusbach commented Nov 1, 2022

I did setup the MQTT server as a first step, no driver enabled. Return:

Wifi RSSI: Excellent (-49dBm)
MQTT State: disconnected RES: -6(ERR_VAL)
MQTT ErrMsg: mqtt_client_connect connect failed

Device behaves normal otherwise.

@mariusbach
Copy link
Author

Once I enable backlog startDriver BL0942;, I cannot connect anymore.

@btsimonh
Copy link
Collaborator

btsimonh commented Nov 1, 2022

we'll need someone who has BL0942 + serial logs. Or to comb source code changes....
for serial logs, use
logdelay 100
to ensure you see the last log before death.

@btsimonh
Copy link
Collaborator

btsimonh commented Nov 1, 2022

also, try
startdriver BL0942
without backlog, and not in startup command line.

@mariusbach
Copy link
Author

Did some testing:

MQTT settings always empty.

backlog startDriver NTP; ntp_timeZoneOfs 1 results in no problem.
backlog startDriver NTP; ntp_timeZoneOfs 1; SetupEnergyStats 1 30 120 1; results in no problem.
backlog startDriver BL0942; SetupEnergyStats 1 30 120 1; startDriver NTP; ntp_timeZoneOfs 1 results in being unable to connect.

@mariusbach
Copy link
Author

@btsimonh

also, try
startdriver BL0942
without backlog, and not in startup command line.

I did execute this as custom command: Device immediately is offline.

@mariusbach
Copy link
Author

I did use the webapp for logging and sent command startdriver BL0942 from the webapp, result:

Debug:CMD:cmd [startdriver BL0942]
Info:EnergyMeter:Read ENERGYMETER status values. sizeof(ENERGY_METERING_DATA)=32
Debug:CMD:Adding command EnergyCntReset
Debug:CMD:Adding command SetupEnergyStats
Debug:CMD:Adding command ConsumptionThresold
Debug:CMD:Adding command PowerSet
Debug:CMD:Adding command VoltageSet
Debug:CMD:Adding command CurrentSet
Debug:CMD:Adding command PREF
Debug:CMD:Adding command VREF
Debug:CMD:Adding command IREF
Info:NTP:Started BL0942.
Info:GEN:9 Button_OnLongPressHold
Info:GEN:9 Button_OnLongPressHold
Debug:MQTT:MQTT deduper sent 0, culled duplicates 0, culled too fast 0
Info:MAIN:Time 26, idle 700254/s, free 96544, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38

@openshwprojects
Copy link
Owner

@mariusbach there is a "TESTPOWER" driver which acts like a BL0937/BL0942 device.

Can you try again but with "startDriver TESTPOWER" instead of BL0942 and see what happens?

@mariusbach
Copy link
Author

@openshwprojects Ok, done, result:

Debug:CMD:cmd [startDriver TESTPOWER]
Info:EnergyMeter:Read ENERGYMETER status values. sizeof(ENERGY_METERING_DATA)=32
Debug:CMD:Adding command EnergyCntReset
Debug:CMD:Adding command SetupEnergyStats
Debug:CMD:Adding command ConsumptionThresold
Info:NTP:Started TESTPOWER.
Info:GEN:9 Button_OnLongPressHold
Info:GEN:9 Button_OnLongPressHold
Debug:MQTT:MQTT deduper sent 0, culled duplicates 0, culled too fast 0
Info:MAIN:Time 19680, idle 718739/s, free 96952, MQTT 0(1230), bWifi 1, secondsWithNoPing -1, socks 2/38
Info:GEN:dhcp=0 ip=192.168.110.153 gate=192.168.110.1 mask=255.255.255.0 mac=cc:8c:bf:8f:dc:1c 
Info:GEN:sta: 1, softap: 0, b/g/n
Info:GEN:sta:rssi=-41,ssid=wifi_marius,bssid=74:83:c2:73:91:90 ,channel=13,cipher_type:
Info:GEN:9 Button_OnLongPressHold
Info:GEN:9 Button_OnLongPressHold

@mariusbach mariusbach changed the title Upgrade from .105 to .108 seems to break something - BK7231T Upgrade from .105 to .106 seems to break something - BK7231T Nov 1, 2022
@mariusbach
Copy link
Author

I did an downgrade to .105, all working nicely. Upgraded to .106 and the issue is present. I changed the title of this issue accordingly.

@mariusbach
Copy link
Author

I just noticed the new issue, I propose to continue there: #389

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants