Announcement

Collapse
No announcement yet.

Upload API sketch over ethernet - works only the first time

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Upload API sketch over ethernet - works only the first time

    Hi,

    I've been trying to upload a sketch over ethernet using the Ariadne bootloader as explained here: http://loathingkernel.github.io/ariadne-bootloader/

    I got it to work, but only once: the API sketch does run after uploading, but after a reset the Arduino hangs and it does not even respond to a ping command anymore. I suspect that the (standard) API sketch does create a problem somewhere with the bootloader but have no idea why / where (presumably with the EEPROM commands).

    Anyone tried the same thing and got it to work, or any suggestions what the problem could be?

    Regards,
    Jan

    #2
    Just to confirm, you are downloading the exact same sketch as you did via the initial USB download? Since the ethernet configuration is stored in the sketch any mistakes there will appear as if the Arduino has gone offline. The best way to debug this is to enable some kind of logging to serial and then connect the Arduino IDE to the Arduino via USB with the serial monitor activated. Then program the Arduino via ethernet/WiFi and see what happens on the serial port. This should give you enough info to determine if the sketch is loading (your first program statement should be a log statement to the serial port).

    To debug your process you really download your sketch via USB, confirm everything then download the exact same sketch via WiFi/Ethernet and validate everything works. Minimizing the changes is super helpful to figuring out what the problem is. Not saying you're not doing that just trying to validate.

    Comment


      #3
      BTW - not sure I was clear in my last posting. The link you posted on how you enabled remote install of sketches *might* be overly complex. If the device you are using is enabled for remote sketch install (OTA - Over-The-Air) via TCP (NodeMCU, etc.) then the important part is to ensure that the appropriate libraries are included in the build and that you initialize the OTA libraries as part of your sketch initialization. For example: http://blog.flynnmetrics.com/applica...es-wirelessly/

      Note that the OTA typically includes a password such that pushing a new version via OTA (typically via the Arduino IDE) will prompt for the password. Not all boards work well with OTA and thus you should verify that aspect first. I can state that NodeMCU work very well with OTA. YMMV.

      Comment

      Working...
      X