Skip to content

w800 + berry #1629

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

NonPIayerCharacter
Copy link
Contributor

changes are what previously discussed on the forum
plus:
Unified makefiles for all platforms except esp, ln882, bl602 and default bekens.
OBK_VARIANT is now defined for all platforms bar esp, ln882 and bl602.
Wire library instead of i2c functions for berry.
Flash can be read on W600/W800.
Berry prebuild generation fixed (done in makefile, + fixed rebuilding)
XR806 and XR872 don't suffer from calibration file problems, so removed build retrying.
XR809 and XR872 now use BK7231T gcc, instead of downloading it from external server.

@openshwprojects
Copy link
Owner

Thank you, it seems very good at the first glance. Just to be sure - no breaking changes? I see EasyFlash, but that's still not used for OBK config, correct?

Unified makefile is also great, I would like to have it unified futher.

One concert - why remove retry for XRadio? As far as I know, the partition config calibration retry may be required at random point of time when one of the partition grows too big to fit current layout. So, if in the future we add much more code to, let's say, app partition of XR872, it may require config rearrangement. That's why retry cfg is here.

Apart from that, if no breaking changes, then I can merge it even today.

@NonPIayerCharacter
Copy link
Contributor Author

EF currently only for flash vars on W800. I thought about adding it to W600 - but it is already constipated in flash.
Unified makefile breaks W600 for some reason, gcc links generic hals (mostly, flash config links correctly, but there are no mentions of hal_wifi_w800 in map file). So i mostly reverted it on W600. I don't know why it happens.

And regarding XRadio, it can be fixed more neatly, by replacing this line:
https://github.com/openshwprojects/OpenXR809/blob/cbe84cb187fbf33a17a581e68709dbba33b41d94/project/project.mk#L266
with this:

	($(IMAGE_TOOL) $(IMAGE_TOOL_OPT) -c $(IMAGE_CFG) -o $(IMAGE_NAME).img || true) && \
	$(IMAGE_TOOL) $(IMAGE_TOOL_OPT) -c $(IMAGE_CFG) -o $(IMAGE_NAME).img

I don't know how it is done in 806 and 872, but it can probably be solved the same way.

Also added lfs to w600

@openshwprojects
Copy link
Owner

Hm ok, so, if you are disabling retry then add this line in PR. Apart from that, I think I can merge this PR as is today, if there are no breaking changes/broken ota/worse WiFi quality/etc.

@MaxineMuster
Copy link
Contributor

@NonPIayerCharacter is OTA working for you with this version?
It won't for me. Using 1629_merge_365dcc027b6f trying to do OTA to last release starts, long until W800 is online again, but the version is unchanged. Need to flash by UART for now.

Starting OTA shows no change in LOG, it simply continues, and after about one minute it's showing many watchdog entries and later reboots:

Info:MAIN:Time 290, idle 0/s, free 62616, MQTT 0(18), bWifi 1, secondsWithNoPing 219, socks 3/8 
Info:SENSOR:DS1820[37] - Starting conversion
Info:MAIN:Time 291, idle 0/s, free 62616, MQTT 0(18), bWifi 1, secondsWithNoPing 220, socks 3/8 
Info:SENSOR:DS1820[37] - Temp=22.75
Info:MAIN:Time 292, idle 0/s, free 62616, MQTT 0(18), bWifi 1, secondsWithNoPing 221, socks 3/8 
Info:MAIN:Time 293, idle 0/s, free 62616, MQTT 0(18), bWifi 1, secondsWithNoPing 222, socks 3/8 
Info:MAIN:Time 294, idle 0/s, free 62616, MQTT 0(18), bWifi 1, secondsWithNoPing 223, socks 3/8 
WDG IRQ
WDG IRQ
WDG IRQ
WDG IRQ
WDG IRQ
WDG IRQ
WDG IRQ
WDG IRQ
WDG IRQ
WDG IRQ
WDG IRQ
WDG IRQ
WDG IRQ
WDG IRQ
WDG IRQ
WDG IRQ
WDG IRQ
WDG IRQ
WDG IRQ
WDG IRQ

@NonPIayerCharacter
Copy link
Contributor Author

@MaxineMuster
It works fine for me, successfully downgraded from 1629_merge_365dcc027b6f to 1629_merge_f584e77bd4d9.

Debug:OTA:Downloaded 399354 / 411292
Debug:OTA:Downloaded 401400 / 411292
Debug:OTA:Downloaded 403446 / 411292
Debug:OTA:Downloaded 405492 / 411292
Debug:OTA:Downloaded 407538 / 411292
Debug:OTA:Downloaded 409584 / 411292
Debug:OTA:Downloaded 409600 / 411292
Entering initLog()...
Commands registered!
initLog() done!
EasyFlash V4.1.0 is initialize success.
You can get the latest version on https://github.com/armink/EasyFlash .
Main_Init_Before_Delay done
Main_Init_Delay
Main_Init_Delay done
Info:MAIN:Main_Init_Before_Delay
Info:CFG:####### Boot Count 13 #######
Info:CFG:####### HAL_FlashVars_GetBootFailures= 1
Warn:CFG:CFG_InitAndLoad: Correct config has been loaded with 26 changes count.
Error:CMD:no file early.bat err -2
Info:GEN:PIN_SetupPins pins have been set up.
Info:MAIN:Main_Init_Before_Delay done

@MaxineMuster
Copy link
Contributor

MaxineMuster commented May 5, 2025

Strange, I just retried:

Flashing latest release 1.18.98
OTA to 1629_merge_365dcc027b6f: - OTA messages shown, OTA successfull
OTA back to release: - no OTA messages, reboot after approx a minute, no change in version.

Could I do something wrong?

Tried with HLK-W801-KIT -V1.1

@openshwprojects
Copy link
Owner

Can running drivers affect OTA? I am not sure if we disable drivers tick during OTA already

@NonPIayerCharacter
Copy link
Contributor Author

Do not merge yet, for some reason on BK7238 situation is like on W600 - generic wifi hals are linked

@NonPIayerCharacter NonPIayerCharacter force-pushed the _w800 branch 2 times, most recently from b61fec9 to f52cf36 Compare May 6, 2025 11:02
@NonPIayerCharacter
Copy link
Contributor Author

Solved, the problem was that OBK objs were archived into static library and then linked without --whole-archive.
Pull requests are open in all XR's, W600 and W800

@divadiow
Copy link
Contributor

divadiow commented May 7, 2025

Strange, I just retried:

Flashing latest release 1.18.98 OTA to 1629_merge_365dcc027b6f: - OTA messages shown, OTA successfull OTA back to release: - no OTA messages, reboot after approx a minute, no change in version.

Could I do something wrong?

Tried with HLK-W801-KIT -V1.1

UART 1.18.98 -> 1629_merge_365dcc027b6f also fine. 1629_merge_365dcc027b6f -> 1.18.98 OTA seems to work but the console output is different, no flash progress before reboot:

Info:MAIN:Time 118, idle 0/s, free 75232, MQTT 0(7), bWifi 1, secondsWithNoPing 53, socks 2/8 
Info:MAIN:Time 119, idle 0/s, free 75232, MQTT 0(7), bWifi 1, secondsWithNoPing 54, socks 2/8 

towrite 340352 writelen=0
magic_no=2701131679, img_type=1, zip_type=1, signature=0
Network info:
	sta:rssi=63, SSID=test, BSSID=3a:7a:0e:e3:6b:7e, channel=1, encr=WPA2_PSK_CCMP
	IP=192.168.137.82, GW=192.168.137.1, MASK=255.255.255.0, MAC=28:6d:cd:ce:90:78, DNS=192.168.137.1
Info:MQTT:mqtt_host empty, not starting mqtt
Info:MAIN:Time 120, idle 0/s, free 68576, MQTT 0(8), bWifi 1, secondsWithNoPing 55, socks 3/8 
Info:MAIN:Time 121, idle 0/s, free 68472, MQTT 0(8), bWifi 1, secondsWithNoPing 56, socks 3/8 
Info:MAIN:Time 122, idle 0/s, free 68576, MQTT 0(8), bWifi 1, secondsWithNoPing 57, socks 3/8 
Info:MAIN:Time 123, idle 0/s, free 68576, MQTT 0(8), bWifi 1, secondsWithNoPing 58, socks 3/8 

 user task 
Entering initLog()...
Commands registered!
initLog() done!

with 1.18.98 to OTA other:

Downloaded 374692 / 411304
Downloaded 378876 / 411304
Downloaded 383986 / 411304
Downloaded 389096 / 411304
Downloaded 393216 / 411304
Downloaded 398326 / 411304
Downloaded 403436 / 411304
Downloaded 408546 / 411304
etc

this is with HLK-W801 ~60cm away from NIC with ext aerial/Windows hotspot (Wifi RSSI: Fair (-63dBm))

@NonPIayerCharacter
Copy link
Contributor Author

Check the log i posted earlier, progress is now reported via ADDLOG_DEBUG, not just in console.
To see progress you must set log level to debug.

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

Successfully merging this pull request may close these issues.

4 participants