weixin_39602615
weixin_39602615
2020-12-30 03:43

Upload sketch, Configuration and reset pin...lose the configuration

I'm starting to learn this awesome framework, but I have some problems...

I would like edit, upload and try/test my sketch on esp8366 many times.

But each time I upload a new sketch I lose the configuration and I have to restart the procedure (post the JSON)...I would like don't use OTA in this phase (understanding/debugging)

My Upload sketch procedure: * set IO0 (pin 18) to low (flash mode) * touch reset (pin 1) with ground...I have also try to turn off power * upload the sketch * set IO0 (pin 18) to high (run mode)

该提问来源于开源项目:homieiot/homie-esp8266

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

5条回答

  • weixin_39710003 weixin_39710003 4月前

    IF you hold flash for 5seconds while it is running you will reset Homie. See: https://homie-esp8266.readme.io/docs/resetting

    You should be ok if you do reset low->hold flash->release reset. The point is to have flash held when the device resets to activate the bootloader, once that happens your fine.

    点赞 评论 复制链接分享
  • weixin_39602615 weixin_39602615 4月前

    Thanks for the answer!

    Now I cannot test your solution, but hold flash don't erase the configuration (following the documentation)? I need to upload the new sketch WITHOUT lose the config...

    Anyway for well understand: * Esp8266 in normal mode * set reset (pin 1) to LOW * set IO0 (pin 18) to HIGH (flash mode)...about 5 seconds * set reset (pin 1) to HIGH

    Now I have ESP8266 in flash mode and I can upload the sketch, right? After? How can I go in run mode with the new sketch uploaded and with the "old" configuration?

    thanks

    点赞 评论 复制链接分享
  • weixin_39980347 weixin_39980347 4月前

    There is a known problem with disappearing config on some devices. Have a look at the issue #64. What I do is:

    
    ...
    Homie.disableLedFeedback();
    Homie.disableResetTrigger();
    ...
    Homie.setup()
    
    点赞 评论 复制链接分享
  • weixin_39602615 weixin_39602615 4月前

    mhh....ok, I'll try.

    A question: If I disable Reset

    Homie.disableResetTrigger()
    , how can reset config? Only by calling
    Homie.reset();
    ?
    点赞 评论 复制链接分享
  • weixin_39980347 weixin_39980347 4月前

    Have a look here and here.

    点赞 评论 复制链接分享