Czy wolisz polską wersję strony elektroda?
Nie, dziękuję Przekieruj mnie tamModerated By p.kaczmarek2:
Thanks, but this should be (and it is now) in the separate topic, so I will just leave a link here:
https://www.elektroda.com/rtvforum/topic4054847.html
Tilator wrote:Now it does not update itself by OTA.
Debug:OTA:Writelen 1460 at 123759
Debug:OTA:write at flash: 0x00151000
Debug:OTA:Writelen 4380 at 125219
Debug:OTA:Writelen 1460 at 129599
Debug:OTA:write at flash: 0x00152000
Firmware name: wifi_mcu_basic_example, hardware version: HW_V1.0, software version: SW_V1.0
Fault on thread HTTP Clie
===== Thread stack information =====
addr: 20033a10 data: 0001fff3
addr: 20033a14 data: 20019274
addr: 20033a18 data: 20034570
addr: 20033a1c data: fffffef1
addr: 20033a20 data: 0000ff06Info:MAIN:Time 73, idle 0/s, freeInfo:MAIN:Time 73, idle 0/s, free 78480, MQTT 1(2), bWifi 1, secondsWithNoPing 8, socks 0/0
Info:MAIN:Time 74, idle 0/s, free 69968, MQTT 1(2), bWifi 1, secondsWithNoPing 9, socks 0/0
(HTTP Clie)StackOverFlow
Firmware name: wifi_mcu_basic_example, hardware version: HW_V1.0, software version: SW_V1.0
Fault on thread HTTP Clie
===== Thread stack information =====
addr: 20033988 data: 0002ef7b
addr: 2003398c data: 20019274
addr: 20033990 data: 20034980
addr: 20033994 data: ffffff69
addr: 20033998 data: 0000ff06
78480, MQTT 1(2), bWifi 1, secondsWithNoPing 8, socks 0/0
Info:MAIN:Time 74, idle 0/s, free 69968, MQTT 1(2), bWifi 1, secondsWithNoPing 9, socks 0/0
(HTTP Clie)StackOverFlow
Firmware name: wifi_mcu_basic_example, hardware version: HW_V1.0, software version: SW_V1.0
Fault on thread HTTP Clie
===== Thread stack information =====
addr: 20033988 data: 0002ef7b
addr: 2003398c data: 20019274
addr: 20033990 data: 20034980
addr: 20033994 data: ffffff69
addr: 20033998 data: 0000ff06--- ota.vue 2024-11-19 13:24:54.000000000 +0100
+++ ota_own.vue 2024-11-23 16:12:25.954693401 +0100
@@ -297,7 +297,7 @@
this.bOTAstarted = true;
this.status += '<br/>starting OTA...';
console.log('start ota ');
- let url = window.device+'/api/ota';
+ let url = 'http://10.42.0.1:88/api/ota';
if (this.otadata){
fetch(url, {
method: 'POST',
sudo nc -l -p 88 > p88.outmax@max-PC:~/LN882H/OTA_issues$ cat -n p88.out | head -n 18
1 POST /api/ota HTTP/1.1
2 Host: 10.42.0.1:88
3 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:132.0) Gecko/20100101 Firefox/132.0
4 Accept: */*
5 Accept-Language: de,en-US;q=0.7,en;q=0.3
6 Accept-Encoding: gzip, deflate
7 Referer: http://10.42.0.159/
8 Content-Length: 363813
9 Origin: http://10.42.0.159
10 DNT: 1
11 Sec-GPC: 1
12 Connection: keep-alive
13 Priority: u=0
14 Pragma: no-cache
15 Cache-Control: no-cache
16
17
� %��������u�k��]
� �R��Z����&�
18 ,b�́~��i�y�ɝX�OTg|s��o
max@max-PC:~/LN882H/OTA_issues$ tail -n +17 p88.out > p88-17.out
max@max-PC:~/LN882H/OTA_issues$
max@max-PC:~/LN882H/OTA_issues$ ls -l p88-17.out
-rw-rw-r-- 1 max max 363813 Nov 23 16:38 p88-17.out
max@max-PC:~/LN882H/OTA_issues$ ls -l ~/Downloads/OpenLN882H_1.17.772_OTA.bin
-rw-rw-r-- 1 max max 363813 Nov 22 11:15 /home/max/Downloads/OpenLN882H_1.17.772_OTA.binmax@max-PC:~/LN882H/OTA_issues$ cmp ~/Downloads/OpenLN882H_1.17.772_OTA.bin p88-17.out
max@max-PC:~/LN882H/OTA_issues$ md5sum ~/Downloads/OpenLN882H_1.17.772_OTA.bin
f2d53e1f34037709196a9823828240a6 /home/max/Downloads/OpenLN882H_1.17.772_OTA.bin
max@max-PC:~/LN882H/OTA_issues$ md5sum p88-17.out
f2d53e1f34037709196a9823828240a6 p88-17.out
max@max-PC:~/LN882H/OTA_issues$ max@max:~/LN882H/OTA_issues$ cat -n temp.out | head -n 14
1 POST /api/ota HTTP/1.1
2 Host: 10.42.0.1:88
3 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:132.0) Gecko/20100101 Firefox/132.0
4 Accept: */*
5 Accept-Language: de,en-US;q=0.7,en;q=0.3
6 Accept-Encoding: gzip, deflate
7 Referer: http://10.42.0.159/
8 Content-Length: 363813
9 Origin: http://10.42.0.159
10 Connection: keep-alive
11 Priority: u=0
12
13
� %��������u�k��]
� �R��Z����&�
14 ,b�́~��i�y�ɝX�OTg|s��o
max@max:~/LN882H/OTA_issues$ tail -n +13 temp.out > temp-17.out
max@max:~/LN882H/OTA_issues$ md5sum temp-17.out
f2d53e1f34037709196a9823828240a6 temp-17.out
max@max:~/LN882H/OTA_issues$ md5sum ~/Downloads/OpenLN882H_1.17.772_OTA.bin
f2d53e1f34037709196a9823828240a6 /home/max/Downloads/OpenLN882H_1.17.772_OTA.bin
max@max:~/LN882H/OTA_issues$
max@max:~/LN882H/OTA_issues$ docker cp ota.vue $(docker ps | grep closed | sed "s/[ ]*closed.*//"):/usr/src/app/vue/ota.vue
Successfully copied 18.9kB to edf816d08a79:/usr/src/app/vue/ota.vue
max@max:~/LN882H/OTA_issues$ Info:MAIN:Time 4420, idle 0/s, free 98296, MQTT 1(17), bWifi 1, secondsWithNoPing 4355, socks 0/0
Info:MAIN:Time 4421, idle 0/s, free 78376, MQTT 1(17), bWifi 1, secondsWithNoPing 4356, socks 0/0
Firmware name: wifi_mcu_basic_example, hardware version: HW_V1.0, software version: SW_V1.0
Fault on thread HTTP Clie
===== Thread stack information =====
addr: 20033a18 data: 0001ffdf
addr: 20033a1c data: 20019274
addr: 20033a20 data: 200345e0
addr: 20033a24 data: ffffff05cat p88.out | nc 10.42.0.159 80Info:MAIN:Time 112, idle 0/s, free 78496, MQTT 1(2), bWifi 1, secondsWithNoPing 47, socks 0/0
Firmware name: wifi_mcu_basic_example, hardware version: HW_V1.0, software version: SW_V1.0
Fault on thread HTTP Clie
===== Thread stack information =====
addr: 20033a28 data: 0001afdf
addr: 20033a2c data: 20019274
addr: 20033a30 data: 200345f0
addr: 20033a34 data: ffffff05
addr: 20033a38 data: 0000ff06
addr: 20033a3c data: 1004221f
addr: 20033a40 data: 200206a0
addr: 20033a44 data: 00000014
addr: 20033a48 data: a5a5a5a5
max@max:~/LN882H/OTA_issues$ head -n 12 p88_chromium.out
POST /api/ota HTTP/1.1
Host: 10.42.0.1:88
Connection: keep-alive
Content-Length: 363813
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36
Accept: */*
Origin: http://10.42.0.159
Referer: http://10.42.0.159/
Accept-Encoding: gzip, deflate
Accept-Language: de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7
� %��������u�k��]
� �R��Z����&�
max@max:~/LN882H/OTA_issues$
max4elektroda wrote:(in fact, it could be ==, for the offset should not be > SECTOR_SIZE_4KB, meaning we wrote outside allocated memory)
part_len = temp4k_offset + buf_len - SECTOR_SIZE_4KB;
memcpy(temp4K_buf + temp4k_offset, buf, buf_len - part_len);
hal_flash_program(flash_ota_start_addr + flash_ota_offset, SECTOR_SIZE_4KB, (uint8_t *)temp4K_buf);max4elektroda wrote:my conclusion is, that line 1318 should read: if (temp4k_offset >= SECTOR_SIZE_4KB) {
max4elektroda wrote:called twice with buffers of length 8 and 14
XJ_ wrote:Written is always just delta, there is no oveflowpart_len = temp4k_offset + buf_len - SECTOR_SIZE_4KB; memcpy(temp4K_buf + temp4k_offset, buf, buf_len - part_len);
if (part_len > 0) {
memcpy(temp4K_buf + temp4k_offset, buf + (buf_len - part_len), part_len);
temp4k_offset += part_len;
}XJ_ wrote:this routine should not be called with buf_len > SECTOR_SIZE_4KB (as in your example, 14>10)
Debug:OTA:write at flash: 0x00135000
Debug:OTA:Writelen 4380 at 9819
Debug:OTA:Writelen 1460 at 14199
Debug:OTA:write at flash: 0x00136000
Debug:OTA:Writelen 4380 at 15659
Debug:OTA:write at flash: 0x00137000
max4elektroda wrote:And 4380 is bigger than 4096, so buffer is filled e.g. to 4000, the original code will write one 4k slice to flash and later try to copy the remaining 4284 bytes to the 4096 byte memory.
So I made it work in this case, too (at least I tried).
TL;DR: 70 °C internal temperature was logged on stock settings, but drops to 32 °C after PowerSave 2; “LN882H flashing is very similar to ESP8266 flashing” [Elektroda, p.kaczmarek2, post #20923772] Use 115 200 baud and keep BOOT (A9) low for reliable uploads [Elektroda, voodoopt, post #20958664]
Why it matters: Correct wiring, speed and power rules prevent bricked modules and overheating.
• Flash size: 2 MB NOR, dump script trimmed to 0x200000 bytes [Elektroda, divadiow, post #21284784] • Stable upload speed: 115 200 baud; 2 Mbit/s often fails [Elektroda, voodoopt, post #20958664] • BOOT=A9 must stay at GND from power-on until flashing ends [Elektroda, p.kaczmarek2, post #20905518] • PowerSave 2 cuts idle current from ≈55 mA to 35 mA (-36 %) [Elektroda, max4elektroda, post #21064064] • OTA bug fixed in releases ≥1.17.789; Firefox now works [Elektroda, divadiow, post #21332121]