AchimPieters / ESP8266-HomeKit-Motion-Sensor

ESP8266 – HomeKit Motion Sensor
MIT License
7 stars 4 forks source link

Flash main.bin without OTA #2

Open gerardwr opened 5 years ago

gerardwr commented 5 years ago

Hello Achim,

Flashing main.bin using OTA works fine, and the device works as expected. Excellent!

But OTA flashing needs quite some time, and does not work without an internet connection. So I would like to flash main.bin directly with esptool.

I erased the ESP, downloaded main.bin from Releases and flashed to the ESP using:

./esptool -p /dev/cu.wchusbserial14510 --baud 115200 write_flash -fs 1MB -fm dout -ff 40m 0x0 rboot.bin 0x1000 blank_config.bin 0x2000 main.bin

Uploading works OK, but when resetting, the LCM.... Access Point the led on the ESP blinks every second, but the LCM Access Point does not appear.

This is the log, the Esp keeps rebooting even.txt

BTW : The Ravencore code used LCM too and can be installed with and without OTA (Ref. https://github.com/RavenSystem/esp-homekit-devices/wiki/Installation). Both methods work OK for me, so I expected no trouble using the same procedure with your main.bin.

Can you see what goes wrong with my esptool command?

AchimPieters commented 5 years ago

@gerardwr

Firts do a full erase: esptool.py erase_flash

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

The reason for this problem is that the current of the power supply is insufficient.

Solution:At least 3.3V 300mA of power supply.

Also Placing a Cap will help your power issues.

furthermore the command is:

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

So remove the Dot at te beginning.

gerardwr commented 5 years ago

Thanks for your prompt reaction, is appreciated.

Hmmm, that's not it :-(

The ESP is erased.

I flash to an WemosD1Mini directly connected to my Mac. Also powering from a PowerBank after flashing does not solve the issue. Have been using the Wemos for years without any trouble so I think power is not the issue here.

After boot the ESP..... is reported in the AccessPoint list of my Mac, but the LCM.... is not.

Schermafbeelding 2019-10-03 om 14 52 58

Considering the DOT, I use the esptool executable in my working directory, so ./esptool refers to that.

Any other suggestions, maybe?

gerardwr commented 5 years ago

Addition to my message above: Uploaded just now the Ravencore main.bin with the same esptool command, and to the same WemosD1Mini and there is no issue there. Works as expected.

So the issue seems be somewhere in flashing the main.bin.

Possible I have been mixing my several main.bin files.

Will start from the top to make sure, and report back.

AchimPieters commented 5 years ago

@gerardwr

It works the same way as the Ravencore system.

Installation without OTA

Download my main.bin from my git here, You also need rboot.bin and blank_config.bin. Then, continue with Installation, replacing otaboot.bin with main.bin

esptool.py -p /dev/<your_ESPPort> --baud 115200 write_flash -fs 1MB -fm dout -ff 40m \
0x0 rboot.bin 0x1000 blank_config.bin 0x2000 main.bin

Note: It's posible when using LCM, you need to restart you deve twice before seeing the LCM-XXXX accespoint. I already placed the issue with @HomeACcessoryKid

gerardwr commented 5 years ago

UPDATE Started all over again, it's working now ;-) Must have made some error myself while gathering the required files :-(

This works for me:

After that selecting SSID and entering password you can JOIN.

The advantage for me using this procedure is:

@AchimPieters Thanks for sharing, and your support.

helfrici commented 3 years ago

@gerardwr Followed your stepbystep instruction managed to flash the motion sensor. When adding, Incorrect setup code was reported. :( Used 44245376 and 55898144, both found in AchimPieter's files. Any advise?

KiLLuuuhh commented 3 years ago

@gerardwr Followed your stepbystep instruction managed to flash the motion sensor. When adding, Incorrect setup code was reported. :( Used 44245376 and 55898144, both found in AchimPieter's files. Any advise?

Same issue here, serial monitor shows the following:

image

KiLLuuuhh commented 3 years ago

@gerardwr Followed your stepbystep instruction managed to flash the motion sensor. When adding, Incorrect setup code was reported. :( Used 44245376 and 55898144, both found in AchimPieter's files. Any advise?

Same issue here, serial monitor shows the following:

image

I was able to add the Detector using this QRcode: qrcode

helfrici commented 3 years ago

Where this QRCode is coming from????

On Tue, Nov 9, 2021 at 6:09 PM KiLLuuuhh @.***> wrote:

@gerardwr https://github.com/gerardwr Followed your stepbystep instruction managed to flash the motion sensor. When adding, Incorrect setup code was reported. :( Used 44245376 and 55898144, both found in AchimPieter's files. Any advise?

Same issue here, serial monitor shows the following:

[image: image] https://user-images.githubusercontent.com/74672908/140970090-6debdc0f-c17c-44b5-a7a2-82a65543d229.png

I was able to add the Detector using this QRcode: [image: qrcode] https://user-images.githubusercontent.com/74672908/140971338-b8287346-0682-47f0-a387-f6a62fb7f6bc.png

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/AchimPieters/ESP8266-HomeKit-Motion-Sensor/issues/2#issuecomment-964354641, or unsubscribe https://github.com/notifications/unsubscribe-auth/AODDF4LVIOF5MDUHKQDMNG3ULFIURANCNFSM4I5BZXOQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

KiLLuuuhh commented 3 years ago

Where this QRCode is coming from???? On Tue, Nov 9, 2021 at 6:09 PM KiLLuuuhh @.***> wrote: @gerardwr https://github.com/gerardwr Followed your stepbystep instruction managed to flash the motion sensor. When adding, Incorrect setup code was reported. :( Used 44245376 and 55898144, both found in AchimPieter's files. Any advise? Same issue here, serial monitor shows the following: [image: image] https://user-images.githubusercontent.com/74672908/140970090-6debdc0f-c17c-44b5-a7a2-82a65543d229.png I was able to add the Detector using this QRcode: [image: qrcode] https://user-images.githubusercontent.com/74672908/140971338-b8287346-0682-47f0-a387-f6a62fb7f6bc.png — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#2 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AODDF4LVIOF5MDUHKQDMNG3ULFIURANCNFSM4I5BZXOQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

The .bin file provided by @gerardwr pointed to another release. I downloaded the source folder and extracted the QRCode.