maccoylton / esp-homekit-motion-sensor

A HomeKit firmware for a motion sensor infrared motion sensor - this an OTA firmware
Apache License 2.0
24 stars 10 forks source link

Booting error #1

Closed Einstein2150 closed 5 years ago

Einstein2150 commented 5 years ago

What ist the problem? Compiling worked, flashing worked ...

`ets Jan 8 2013,rst cause:2, boot mode:(3,6)

load 0x40100000, len 2292, room 16

0x40100000: _stext at ??:?

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: DIO Flash Speed: 40 MHz rBoot Option: Big flash rBoot Option: RTC data

Booting rom 0. pp_task_hdl : 3ffeff10, prio:14, stack:512 pm_task_hdl : 3ffef800, prio:1, stack:176 frc2_timer_task_hdl:0x3fff42b0, prio:12, stack:200

ESP-Open-SDK ver: 0.0.1 compiled @ Jan 3 2019 15:28:12 phy ver: 273, pp ver: 8.3

manuf='manuf_unknown' serial='60:01:94:5D:35:6D' model='model_unknown' revision='0.0.0' c#=0 mode : softAP(62:01:94:5d:35:6d) add if1 bcn 100 checkWifiTask: status = 255 HTTP post task starting... Suspending http_post_task

HomeKit: Starting server HomeKit: Using existing accessory ID: A1:4C:A2:57:8F:A6 mDNS_init: wifi opmode not station HomeKit: Configuring mDNS rtos assert /root/Homekit/esp-open-rtos/FreeRTOS/Source/queue.c 1406 abort() invoked at 0x40204a87.

0x40204a87: vAssertCalled at /root/Homekit/esp-open-rtos/FreeRTOS/Source/portable/esp8266/port.c:197

Stack: SP=0x3fff62e0 0x3fff62e0: 00000000 3fff1884 00000000 40204a8a

0x40204a8a: vAssertCalled at ??:?

0x3fff62f0: 00000000 3fff6340 00000000 402052ac

0x402052ac: xQueueSemaphoreTake at /root/Homekit/esp-open-rtos/FreeRTOS/Source/queue.c:2346

0x3fff6300: 3fff6408 00000001 3ffefe70 40205040

0x40205040: xQueueGiveMutexRecursive at /root/Homekit/esp-open-rtos/FreeRTOS/Source/queue.c:2346

0x3fff6310: ffffffff 0000000a 3fff1c5c 402108cc

0x402108cc: _lock_release_recursive at /root/Homekit/esp-open-rtos/core/newlib_syscalls.c:202

0x3fff6320: 3ffeea50 3fff6454 3fff1c5c 4023b160

0x4023b160: json_flush at ??:?

0x3fff6330: 3ffeea50 3fff1884 40235964 4021c25d

0x40235964: sdk_Uart_Init at ??:?

0x4021c25d: mdns_clear at /root/Homekit/esp-homekit-demo/examples/motion_sensor/esp-homekit-motion-sensor/components/esp-homekit/src/mdnsresponder.c:537

0x3fff6340: 3fff6330 3ffe8978 40235964 4021bacf

0x40235964: sdk_Uart_Init at ??:?

0x4021bacf: homekit_mdns_configure_finalize at /root/Homekit/esp-homekit-demo/examples/motion_sensor/esp-homekit-motion-sensor/components/esp-homekit/src/port.c:69

0x3fff6350: 00000031 3fff6234 00000000 4023b160

0x4023b160: json_flush at ??:?

Free Heap: 34624 _heap_start 0x3fff2130 brk 0x3fff78cc supervisor sp 0x40000000 sp-brk 34612 bytes arena (total_size) 22428 fordblks (free_size) 12 uordblocks (used_size) 22416

`

maccoylton commented 5 years ago

Install the release binary rather than compiling from code or pull this version https://github.com/maccoylton/esp-homekit-motion-sensor/commit/37f8a5c6a7d327686a1d04ca81a1faa70f45d02c

Einstein2150 commented 5 years ago

Where can I find the release binary for flashing?

maccoylton commented 5 years ago

Follow the steps on the WiKi, let me know how you get on

Einstein2150 commented 5 years ago

I flashed the 3 files linked in the wiki. All I got is another boot-error:

` ets Jan 8 2013,rst cause:2, boot mode:(3,7)

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: DIO Flash Speed: 40 MHz rBoot Option: Big flash rBoot Option: RTC data

Rom 0 is bad. Rom 1 is bad. No good rom available. user code done `

Einstein2150 commented 5 years ago

It's loading...

There is a bug in the wiki:

Wrong esptool.py -p /dev/cu.usbserial erase_flash esptool.py -p /dev/cu.usbserial --baud 230400 write_flash -fs 8m -fm qio -ff 40m 0x2000 otaboot.bin 0x0 rboot.bin 0x1000 blank_config.bin

Right esptool.py -p /dev/cu.usbserial erase_flash esptool.py -p /dev/cu.usbserial --baud 230400 write_flash -fs 8m -fm qio -ff 40m 0x0 rboot.bin 0x1000 blank_config.bin 0x2000 otaboot.bin

😄

Einstein2150 commented 5 years ago

Works fine.

One additional question: I build a pushbutton. Pairing worked but it looses connection very often (error in Home App that it is unreachable)

This is the file: [https://github.com/maximkulkin/esp-homekit-demo/tree/master/examples/button]

Another sample (the simple led) works fine and has no connection-problems. Have you a hint what could be wrong? The motion sensor works fine and has no connection-problems ...

maccoylton commented 5 years ago

Can you take that question over to the other forum, please. Over there can you provide a log from the device. Also if you develop on a Mac, the following set of command is useful to establish if the device is advertising, if it is paired and if it's online:-

Is it advertising? dns-sd -B _hap._tcp. Browsing for _hap._tcp. DATE: ---Fri 04 Jan 2019--- 9:25:02.682 ...STARTING... Timestamp A/R Flags if Domain Service Type Instance Name 9:25:02.693 Add 3 4 local. _hap._tcp. iSight Camera-87EC 9:25:02.693 Add 3 4 local. _hap._tcp. Wifi-Thermostat-Basic-907531 9:25:02.693 Add 3 4 local. _hap._tcp. Sonoff-S20-3840674 9:25:02.693 Add 3 4 local. _hap._tcp. Sonoff-S20-3916034 9:25:02.693 Add 3 4 local. _hap._tcp. Sonoff-S20-11519402 9:25:02.693 Add 3 4 local. _hap._tcp. Sonoff-S20-464031 9:25:02.693 Add 3 4 local. _hap._tcp. Sonoff-Basic-4112643 9:25:02.694 Add 3 4 local. _hap._tcp. Homebridge-CAD8 9:25:02.694 Add 2 4 local. _hap._tcp. Muti-Sensor-1-8510837-FAC9

is it paired ? chose the device you are interested in and issue

dns-sd -L Muti-Sensor-1-8510837-FAC9 _hap._tcp. DATE: ---Fri 04 Jan 2019--- 9:26:23.547 ...STARTING... 9:26:23.549 Muti-Sensor-1-8510837-FAC9._hap._tcp.local. can be reached at Muti-Sensor-1-8510837-FAC9.local.:5556 (interface 4) md=esp-homekit-multi-sensor pv=1.0 id=FA:C9:67:4A:92:A4 c#=1 s#=1 ff=0 sf=0 ci=8

sf=0 means it paired, sf=1 means it is not paired

Is it online? Trying pinging the device:-

ping Muti-Sensor-1-8510837-FAC9.local PING muti-sensor-1-8510837-fac9.local (192.168.1.68): 56 data bytes 64 bytes from 192.168.1.68: icmp_seq=0 ttl=255 time=12.790 ms 64 bytes from 192.168.1.68: icmp_seq=1 ttl=255 time=3.786 ms 64 bytes from 192.168.1.68: icmp_seq=2 ttl=255 time=15.387 ms 64 bytes from 192.168.1.68: icmp_seq=3 ttl=255 time=3.866 ms 64 bytes from 192.168.1.68: icmp_seq=4 ttl=255 time=4.324 ms 64 bytes from 192.168.1.68: icmp_seq=5 ttl=255 time=3.704 ms

BTW I'd recommend trying a different version of the button code. I have a slightly updated version here:- https://github.com/maccoylton/esp-homekit-multi-sensor/tree/master/libs/button and when I get time I am planning to switch cover to a newer version here:- https://github.com/RavenSystem/esp-homekit-devices/tree/master/libs/adv_button