Closed AchimPieters closed 5 years ago
I highly suspect that using the V in the version is what is wrong. My code expects x.y.z and not Vx.y.z
Please try and see?
On 11 Aug 2019, at 18:09, Achim Pieters notifications@github.com wrote:
user_repo='AchimPieters/ESP8266-Update' user_version='V0.0.1' user_file='main.bin'
@HomeACcessoryKid
Thank you for your quick reply!
I have changed my git .bin versions numbers from v0.0.1 to 0.0.1( see my git here: https://github.com/AchimPieters/ESP8266-Update/releases) Then to be sure I starten the whole process from he beginning as described above. Unfortnally it wasn't the fix..
HomeKit Device > Restarting...
Reset Wifi
set temp rom
rm match
del if0
usl
sul 0 0
!!! HomeKit: [Client 4] Error reading data from socket (code 113). Disconnecting
>>> HomeKit: [Client 4] Closing client connection
ets Jan 8 2013,rst cause:2, boot mode:(3,6)
load 0x40100000, len 2292, room 16
tail 4
chksum 0x57
load 0x3ffe8000, len 772, room 4
tail 0
chksum 0x0b
csum 0x0b
rBoot v1.4.0 - richardaburton@gmail.com
Flash Size: 8 Mbit
Flash Mode: DOUT
Flash Speed: 40 MHz
rBoot Option: Big flash
rBoot Option: RTC data
Booting temp rom.
Booting rom 1.
WA⸮l|⸮⸮⸮l⸮⸮⸮n⸮n⸮⸮<⸮n⸮⸮#⸮n⸮⸮!⸮8n⸮⸮⸮ ⸮|⸮r⸮⸮⸮⸮⸮;r⸮ r⸮blrpp_task_hdl : 3ffefac8, prio:14, stack:512
pm_task_hdl : 3ffef530, prio:1, stack:176
frc2_timer_task_hdl:0x3fff4780, prio:12, stack:200
ESP-Open-SDK ver: 0.0.1 compiled @ Jan 5 2019 17:14:12
phy ver: 273, pp ver: 8.3
user-init-start
>>> wifi_config: Initializing WiFi config
>>> wifi_config: wifi_config_station_connect: No configuration found
user-init-done
mode : sta(5c:cf:7f:b8:d6:1d)
add if0
LifeCycleManager version 1.0.0
Will start Wifi AP for config if no input in 5 seconds
Press <enter> to begin
Too Late, Typo? Just restart
scandone
add 0
aid 3
cnt
connected with AirPort Network, channel 1
dhcp client start...
ip:192.168.178.27,mask:255.255.255.0,gw:192.168.178.1
>>> wifi_config: wifi_config_station_connect: No configuration found
>>> wifi_config: Starting AP mode
mode : sta(5c:cf:7f:b8:d6:1d) + softAP(5e:cf:7f:b8:d6:1d)
add if1
bcn 100
Function called without core lock
>>> wifi_config: wifi_config_softap_start: Starting AP SSID=LCM-B8D61D
bcn 0
del if1
add if1
bcn 100
>>> wifi_config: Starting WiFi scan
>>> wifi_config: Starting DHCP server
>>> wifi_config: Starting DNS server
>>> wifi_config: Starting HTTP server
scandone
beacon timeout
rm match
scandone
add 0
aid 1
cnt
connected with AirPort Network, channel 11
dhcp client start...
ip:192.168.178.27,mask:255.255.255.0,gw:192.168.178.1
add 1
aid 1
station: 3c:15:c2:bd:6f:9e join, AID = 1
>>> wifi_config: http_task: Got 64 incoming data
!!! wifi_config: Unknown endpoint: GET /hotspot-detect.html
>>> wifi_config: http_task: Got 64 incoming data
>>> wifi_config: http_task: Got 4 incoming data
>>> wifi_config: wifi_config_server_on_message_complete: Unknown endpoint
>>> wifi_config: client_send_redirect: Redirecting to http://192.168.4.1/settings
>>> wifi_config: Client disconnected
>>> wifi_config: http_task: Got 64 incoming data
>>> wifi_config: http_task: Got 51 incoming data
>>> wifi_config: Client disconnected
>>> wifi_config: http_task: Got 64 incoming data
!!! wifi_config: Unknown endpoint: GET /hotspot-detect.html
>>> wifi_config: http_task: Got 64 incoming data
>>> wifi_config: http_task: Got 64 incoming data
>>> wifi_config: http_task: Got 64 incoming data
>>> wifi_config: http_task: Got 64 incoming data
>>> wifi_config: http_task: Got 27 incoming data
>>> wifi_config: wifi_config_server_on_message_complete: Unknown endpoint
>>> wifi_config: client_send_redirect: Redirecting to http://192.168.4.1/settings
>>> wifi_config: Client disconnected
>>> wifi_config: http_task: Got 64 incoming data
>>> wifi_config: http_task: Got 64 incoming data
>>> wifi_config: http_task: Got 64 incoming data
>>> wifi_config: http_task: Got 64 incoming data
>>> wifi_config: http_task: Got 64 incoming data
>>> wifi_config: http_task: Got 10 incoming data
scandone
>>> wifi_config: Client disconnected
>>> wifi_config: http_task: Got 64 incoming data
!!! wifi_config: Unknown endpoint: GET /hotspot-detect.html
>>> wifi_config: http_task: Got 64 incoming data
>>> wifi_config: http_task: Got 4 incoming data
>>> wifi_config: wifi_config_server_on_message_complete: Unknown endpoint
>>> wifi_config: client_send_redirect: Redirecting to http://192.168.4.1/settings
>>> wifi_config: Client disconnected
>>> wifi_config: http_task: Got 64 incoming data
>>> wifi_config: http_task: Got 51 incoming data
>>> wifi_config: Client disconnected
scandone
>>> wifi_config: http_task: Got 64 incoming data
>>> wifi_config: http_task: Got 64 incoming data
>>> wifi_config: http_task: Got 64 incoming data
>>> wifi_config: http_task: Got 64 incoming data
>>> wifi_config: http_task: Got 64 incoming data
>>> wifi_config: http_task: Got 64 incoming data
>>> wifi_config: http_task: Got 64 incoming data
>>> wifi_config: http_task: Got 62 incoming data
>>> wifi_config: wifi_config_server_on_settings_update: Update settings, body = ssid=AirPort+Network&password=XXXXXXXXXXXX
>>> wifi_config: Found configuration, connecting to AirPort Network
station: 3c:15:c2:bd:6f:9e leave, AID = 1
rm match
bcn 0
del if1
mode : sta(5c:cf:7f:b8:d6:1d)
Function called without core lock
scandone
reconnect
rm match
scandone
beacon timeout
scandone
add 0
aid 3
cnt
connected with AirPort Network, channel 1
dhcp client start...
ip:192.168.178.27,mask:255.255.255.0,gw:192.168.178.1
>>> wifi_config: wifi_config_sta_connect_timeout_callback: Successfully connected
wifiready-done
--- ota_boot...1
OTAMAIN VERSION: 1.0.0
--- ota_init
userbeta='0' otabeta='0'
Function called without core lock
Function called without core lock
Function called without core lock
Function called without core lock
Function called without core lock
Function called without core lock
Function called without core lock
Function called without core lock
Function called without core lock
Function called without core lock
Function called without core lock
active_sector: 0xfa000
--- ota_set_verify...OFF
--- DNS: done!
active_cert_sector: 0xfa000
--- ota_get_pubkey
04 94 30 cc 5c 4e 50 29 15 ff 3d 41 da e9 e5 e3 64 27 b3 96 07 61 36 a4 83 28 4d fd f9 05 4f 0d 82 fa 57 26 06 b7 e8 1f 22 2d 2b 8a d2 ff 6e ac 59 73 00 b5 e4 9c 5f 68 ab 31 d3 9f ad bb 3d c8 4f 6d 38 e6 6f b8 b3 f7 22 21 b7 f2 e4 b7 75 ed 09 2c 87 2b 00 56 5b 81 e8 64 5c 2c 84 85 c0 3c 34
ret: 0
--- ota_get_privkey
--- ota_boot...1
--- ota_load_user_app
user_repo='AchimPieters/ESP8266-Update' user_version='V0.0.1' user_file='main.bin'
--- ota_boot...1
--- entering the loop
--- ota_get_pubkey
04 94 30 cc 5c 4e 50 29 15 ff 3d 41 da e9 e5 e3 64 27 b3 96 07 61 36 a4 83 28 4d fd f9 05 4f 0d 82 fa 57 26 06 b7 e8 1f 22 2d 2b 8a d2 ff 6e ac 59 73 00 b5 e4 9c 5f 68 ab 31 d3 9f ad bb 3d c8 4f 6d 38 e6 6f b8 b3 f7 22 21 b7 f2 e4 b7 75 ed 09 2c 87 2b 00 56 5b 81 e8 64 5c 2c 84 85 c0 3c 34
ret: 0
--- ota_set_verify...OFF
--- ota_get_version
--- ota_connect LocalPort=f271 DNS IP:140.82.118.4 local..OK remote..OK SSL..OK set_fd to github.com port 443..failed, return [-0x1]
wolfSSL_send error = -112
--- ota_boot...1
HomeACcessoryKid/life-cycle-manager@version:"Fatal exception (28):
epc1=0x402c3940
epc2=0x00000000
epc3=0x402d0da8
excvaddr=0x00000000
depc=0x00000000
excsave1=0x4029d921
Registers:
a0 4029d921 a1 3fffdf90 a2 00000000 a3 00000000
a4 ffffffff a5 401065b4 a6 3fffe040 a7 0000002d
a8 3fffe023 a9 000000b0 a10 402c4a27 a11 0000000a
a12 00000000 a13 3fff23dc SAR 00000019
Stack: SP=0x3fffdf90
Free Heap: 12528
_heap_start 0x3fff2600 brk 0x3fffffc0 supervisor sp 0x40000000 sp-brk 64 bytes
arena (total_size) 55744 fordblks (free_size) 12464 uordblocks (used_size) 43280
ets Jan 8 2013,rst cause:2, boot mode:(3,6)
load 0x40100000, len 2292, room 16
tail 4
chksum 0x57
load 0x3ffe8000, len 772, room 4
tail 0
chksum 0x0b
csum 0x0b
rBoot v1.4.0 - richardaburton@gmail.com
Flash Size: 8 Mbit
Flash Mode: DOUT
Flash Speed: 40 MHz
rBoot Option: Big flash
rBoot Option: RTC data
Booting rom 0.
pp_task_hdl : 3ffeff50, prio:14, stack:512
pm_task_hdl : 3ffef840, prio:1, stack:176
frc2_timer_task_hdl:0x3fff3eb0, prio:12, stack:200
ESP-Open-SDK ver: 0.0.1 compiled @ Aug 11 2019 14:49:09
phy ver: 273, pp ver: 8.3
>>> wifi_config: Initializing WiFi config
>>> wifi_config: Found configuration, connecting to AirPort Network
Button example
mode : sta(5c:cf:7f:b8:d6:1d)
add if0
scandone
add 0
aid 3
cnt
connected with AirPort Network, channel 1
dhcp client start...
ip:192.168.178.27,mask:255.255.255.0,gw:192.168.178.1
>>> wifi_config: wifi_config_sta_connect_timeout_callback: Successfully connected
>>> HomeKit: Starting server
>>> HomeKit: Using existing accessory ID: C8:34:82:BD:F0:61
>>> HomeKit: Found admin pairing with D8738893-A2E2-4AA2-8E70-AC3C7ED75F9D, disabling pair setup
>>> HomeKit: Configuring mDNS
mDNS announcement: Name=Switch-B8D61D-C834 md=Basic Switchpv=1.0id=C8:34:82:BD:F0:61c#=1s#=1ff=0sf=0ci=8sh=lkk02g== Port=5556 TTL=4500
Any other suggestions :neutral_face:
The issue concentrates on this part
--- ota_get_version --- ota_connect LocalPort=f271 DNS IP:140.82.118.4 local..OK remote..OK SSL..OK set_fd to github.com http://github.com/ port 443..failed, return [-0x1] wolfSSL_send error = -112 --- ota_boot...1 HomeACcessoryKid/life-cycle-manager@version:"Fatal exception (28):
ota_get_version calls ota_connect and because ota_connect did not deliver a ota_version the next step
"if (ota_boot() && ota_compare(version,OTAVERSION)<0) { //this acts when setting up a new version”
is going to have a NULL version pointer but ota_boot prevents ota_compare to happen but next
"UDPLGP("%s@version:\"%s\"\n",repo,version); “ will crash on that
Now the question is what makes this error -112 happen?
The wolfssl error given is this: -112 mp_exptmod error state
Can you indicate since when you have this, how often you could reproduce it, over which amount of time etc…
I actually had an issue where “it” all didn’t work and then 3 hours laters, no more issue Maybe Github servers are having a bad day...
Another line of brainstorming is that I never actually tried to do what you seem to do which is to combine the Wifi setup with the OTAMAIN running from boot1. Maybe there is some memory issue which otherwise never occurs. This is what I have for now. What do you say?
for the record, your 0.0.2 version is still pre-release so the test is not a new test but then, the issue is not there ;-)
@HomeACcessoryKid
okay let's sum it up:
Can you indicate since when you have this, how often you could reproduce it, over which amount of time etc… I can reproduce it every time, over and over again.
I actually had an issue where “it” all didn’t work and then 3 hours laters, no more issue Maybe Github servers are having a bad day... I'll gonna try tomorrow evening after work, to see if anything has changed.
Another line of brainstorming is that I never actually tried to do what you seem to do which is to combine the Wifi setup with the OTAMAIN running from boot1. Maybe there is some memory issue which otherwise never occurs. _So if I understand right, your advise is to remove #include <wifi_config.h>
and try again, to see if anything changes?_
your 0.0.2 version is still pre-release. Yes, I changed that for testing purpose. :grin:
So I'm going to test some of these options tomorrow, I'll keep you updated!
@HomeACcessoryKid
Let's refraise my question: how would you do it in the code above? :flushed:
Just for completeness: In one2one contact it was revealed that the source of the issue was based on missing instructions how to apply this in a esp-homekit repository.
I have created a folder with such instructions which led to the closure of the issue... enjoy
@HomeACcessoryKid at first great job on this LCM :+1:
But unfortunately I have a question about the update when releasing a new versions of my software. let's go step by step;
esptool.py erase_flash
esptool.py -p /dev/cu.usbserial-A50285BI --baud 115200 write_flash -fs 1MB -fm dout -ff 40m 0x0 rboot.bin 0x1000 blank_config.bin 0x2000 otaboot.bin
Now I have added the code necessary to update the firmware when I release a new one on my git(see code below).
The reset of the Wifi is going as it should. I can access LCMXXX to select my Wifi and add the Password. (monitor output: see below )
when this is done I can see this in the monitor:
and I'm back where I started... :astonished:
I can't figure out what I'm doing wrong, can or would you help solving this puzzle please :pray: