3.0.78 builds
https://github.com/NonPIayerCharacter/OpenBK7231T_App/actions/runs/17167633393 Used BK7231N wpa supplicant for BK7231U/T and BK7252.
BK7231T works with it.
Last release - 510kb. This one - 497kb Removed wolfssl dependency from original libs with ar -d
Size increased by 1792 bytes, but there would be no hidden surprises that way.
A bug i've seen - on every seconds timer triggered several times instantly during OTA
There is a 'bug' in your beken_freertos_sdk_release repo.
Since you probably just unpacked newer version on top of the older one (like i did for mine), some files that were deleted/moved remained.
damn yes. I was after a nice way to see the differences between versions but actually the correct way would have been to delete the lot between branches? Hmm.
Added after 57 [minutes]:
Anyway, anything caught your interest in .78 vs .76?
>>21642035 It became possible to use mbedtls exclusively (without wolfssl) on BK7231U/T and BK7252.
That reduced binary size significantly.
Plus an idea came to me to play with mbedtls config. I removed some unneeded things to cut binary size.
Plus i tried mbedtls 2.27.0 (default is 2.6.0). Binary size was increased some, but there were more free heap, + there were more idle cycles (?) (from 140-150k to ~170k).
Great! @insmod , a question - I didn't do SSL on LWIP on any of the platforms yet, so far I only used HTTPS on ESP, but now I am wondering... would it be possible to move SSL to shared app, like you did with mqtt.c? I don't know currently how SSL is done under the hood, but isn't it just relying on LWIP raw TCP sockets, nothing more? Wouldn't it be possible to have SSL added to obk shared app once and have it working for all platforms (if enabled)?
I would rather want to have more streamlined solution for enabling SSL for MQTT (that was in PR for Beken and supposedly works, but is disabled) and for HTTP (sendGet/SendPost). If possible, in obk_config.h, but then we would need to inject it in LWIP? So probably no obk_config, but a build switch at compile time.
With HTTPS enabled, we could try to fetch OTA files directly from Github (instead of asking user to download it and drag and drop).
Of course, HTTPS would be disabled by default - just leave it as an option
BK7231T_ALT is 26512 bytes lighter
BK7231N_ALT is 18592 bytes lighter
BK7238 is 11840 bytes lighter
+ used mbedtls 2.27, instead of 2.6.
This resulted in a speed increase? (by 5-10k idle cycles on BK7238) and 2k less free heap compared to last release (most likely the result of disabling MBEDTLS_AES_ROM_TABLES to save flash size).
>>21644776 Well, it boots for me on T and 7238.
So other most likely work as well.
Plus there are new bootloaders for 7231U/7252/7238.
But they probably work fine too.
IRSend NEC-1-18-1
On RTL87X0C, it looks very similar to BK7238 in logic analyzer.
Except on BK7238 frequency is shown to be 38.1 kHz, and on RTL87X0C it is 38.46 kHz.
And some delays are different.
In ESPHome that command is decoded into "Received NEC: address=0xFE01, command=0xE718 command_repeats=1".
So, IRSend is now working on Realteks.
Added after 8 [minutes]:
I don't know if IRRecv works properly on RTL87X0C, but it somewhat recognizes my air conditioner (it shows ELECTRA_AC, same as in tasmota).
go os_addr(0x10000)..........
prvHeapInit-start addr:0x419318, size:158952
prvHeapInit-start addr:0x900000, size:262144
[Flash]id:0xb4016
--write status reg:4804,2--
[Flash]init over
QSPi_init
QSPi_init1
sctrl_sta_ps_init
SDK Rev: 3.0.78 ee8639d
OSK Rev: F-3.0.51 ee8639d
cset:0 0 0 0
No TLV header found in flash
[FUNC]rwnxl_init
chip id=7221a device id=18221020
IP Rev: W4-3.0.78-P0
txdesc flush
[FUNC]intc_init
[FUNC]calibration_main
No TLV header found in flash
rfcali_mode:1, 0
*********** finally result **********
gtx_dcorMod : 0x8
gtx_dcorPA : 0xa
gtx_pre_gain : 0x10
gtx_i_dc_comp : 0x1fd
gtx_q_dc_comp : 0x203
gtx_i_gain_comp : 0x3ff
gtx_q_gain_comp : 0x3ff
gtx_ifilter_corner over: 0x12
gtx_qfilter_corner over: 0x12
gtx_phase_comp : 0x1ea
gtx_phase_ty2 : 0x200
gbias_after_cal : 0x15
gav_tssi : 0x0
g_rx_dc_gain_tab 0 over: 0x807c807c
g_rx_dc_gain_tab 1 over: 0x80788078
g_rx_dc_gain_tab 2 over: 0x84708470
g_rx_dc_gain_tab 3 over: 0x90488c58
g_rx_dc_gain_tab 4 over: 0x904a9044
g_rx_dc_gain_tab 5 over: 0x90488f4a
g_rx_dc_gain_tab 6 over: 0x90479048
g_rx_dc_gain_tab 7 over: 0x92469147
grx_amp_err_wr : 0x20e
grx_phase_err_wr : 0x364
**************************************
NO RF TLV in flash, write def tab
calibration_main(2f455c121) over
NO TXPWR_TAB_TAB found in flash
Load default txpwr for b:0xc8d20
Load default txpwr for g:0xc8d56
fit n20 table with dist:2
Load default txpwr for n40:0xc8d64
Load default txpwr for ble:0xc8d2e
NO TXID found in flash, use lpf i&q:18, 18
NO TXID found in flash, use def xtal:16
xtal in flash is:16
xtal_cali:16
rwnx_tpc_pa_map_init
[FUNC]ps_init
int watchdog enabled, period=10000
task watchdog enabled, period=60000
[FUNC]func_init_extended OVER!!!
start_type:0
Initializing TCP/IP stack
rf_thread_inbk_wlan_app_init finished
it ok
OpenBK7252, version 1775_merge_90d1ca590908
Entering initLog()...
Commands registered!
initLog() done!
Info:MAIN:Main_Init_Before_Delay
--write status reg:a00,2--
--write status reg:a7c,2--
Error:CFG:flash_vars_valid - not our magic, erase
--write status reg:a00,2--
--write status reg:a7c,2--
--write status reg:a00,2--
--write status reg:a7c,2--
--write status reg:a00,2--
--write status reg:a7c,2--
--write status reg:a00,2--
--write status reg:a7c,2--
Info:CFG:new flash vars
--write status reg:a00,2--
--write status reg:a7c,2--
--write status reg:a00,2--
--write status reg:a7c,2--
Info:CFG:####### Boot Count 1 #######
--write status reg:a00,2--
--write status reg:a7c,2--
--write status reg:a00,2--
--write status reg:a7c,2--
--write status reg:a00,2--
--write status reg:a7c,2--
Warn:CFG:CFG_InitAndLoad: Config crc or ident mismatch. Default config will be loaded.
Info:CFG:CFG_SetDefaultLEDCorrectionTable: setting defaults
--write status reg:a00,2--
--write status reg:a7c,2--
Error:CMD:lfs is absent
Info:GEN:PIN_SetupPins pins have been set up.
Info:MAIN:Main_Init_Before_Delay done
Main_Init_Before_Delay done
Info:MAIN:Main_Init_Delay
Main_Init_Delay
It seems bootloader is not encryption ota on unpacking.
Try to flash BK7231N 1.0.1 bootloader.
Added after 2 [hours] 18 [minutes]:
@p.kaczmarek2 irRemoteESP fix can be merged (https://github.com/openshwprojects/OpenBK7231T_App/pull/1771)
BK7238 works ok
RTL87X0C works ok (both recv and send)
RTL8720D doesn't work (send pwm is always on, recv doesn't work for me.)
RTL8721DA doesn't work (send delays are too long, recv unknown, but consistent).
Disabling PWM update in PIN_ticks has no effect on smooth led transition (flag 18). Continues to work as before.
>>21645720 So that pwm is not reinitialized on every enableIROut call.
It wasn't before moving to HALs.
Plus it simplifies setting g_periods[pwmIndex], compared to what was before.
The discussion centers on the NiceMCU XH-WB3S development board featuring the BK7238 SoC, initially suspected to be BK7231T but confirmed as BK7238. Users share experiences with flashing, testing, and porting firmware, including challenges with encryption keys, flash IDs, and bootloader compatibility. The BK7238 uses 2MB flash with varying encryption keys per chip, complicating universal firmware flashing. Tools like BKFIL and Easy Flasher (EF) are used for backup and restore, with EF supporting full flash erase and restore including bootloader. Flash ID support was extended to include missing flash chips to avoid CRC errors. Arduino SDK and Beken FreeRTOS SDK (version 3.0.70.1 and newer 3.0.76) are referenced for development, with partial support for BK7238 and related chips (BK7231N, BK7231U, BK7252). Porting efforts include adapting delay functions for 160MHz BK7238, resolving flashvars alignment issues due to 64-bit time_t, and addressing HTTP server and TCP socket stability problems in LWIP. OTA updates are functional but require correct image types and bootloader versions. Power save modes and their impact on peripherals like BL0937 energy meter and DS18B20 sensors are discussed, with some instability noted under power save. SPI flashing and UART flashing methods are compared, with SPI preferred for some devices. BK7231U (CC8000 chip) support is emerging, with builds available but some undefined references and boot issues. BK7252 camera module support is experimental, with encrypted flash complicating firmware use. Users report issues with DS18B20 sensor timing on BK7238 due to delay_us inaccuracies, partially fixed by new SDK delay implementations. Logging and MQTT load affect system stability and sensor reading consistency. The community shares flash dumps, toolchain links, and SDK forks to aid development and testing. Overall, the thread provides detailed technical insights into BK7238-based NiceMCU boards' flashing, SDK porting, peripheral support, and firmware development challenges and progress. Summary generated by the language model.