LiamC (Customer) asked a question.

Best way to do OTA updates.

I'm looking to be able to somehow publish code to a running P1AM in the field, maybe along the lines of this.

 

Anyone have experience doing this or have other recommendations if we'd like to be able to update this thing without sending out a tech? Maybe I should just put another device in the box along with it and update over USB/Serial?


  • FACTS_TimR (AutomationDirect)

    Hello, Does your P1AM-100 have a P1AM-ETH shield and is it

    connected to the network?

  • Linuxdept (Customer)

    This can be done through Ethernet as FACTS_TimR stated above. if you want to perform this Action from your Facility to there's i would suggest a Strong VPN on both Sides but this can be done very effectively.

  • FACTS_TimR (AutomationDirect)

    Here a link to an Arduino library to upload sketches over the ethernet.

    https://github.com/jandrassy/ArduinoOTA

     

    Update: After looking into this deeper this isn't supported out of the box. If you follow the instructions under OTA Upload from IDE without 'network port' it might work for you.

  • LiamC (Customer)

    Thank you gentleman!

     

    I had looked at that library before but was worried it wasn't going to work for me. After your suggestion I tried it and it worked like a charm! I'm having the controller go fetch the code from a server rather than use the IDE, and doing so did in fact work right out of the box. Thanks again for pointing me back in that direction!

     

    @Linuxdept (Customer)​ I am still slightly confused about the need for VPNs. If I have the controller go out and fetch from a known URL (say an AWS S3 bucket) shouldn't I be safe? I'm thinking that I'd rather not have to force customers to set up VPNs.

    Expand Post
  • Linuxdept (Customer)

    well it's just me Personally , our Company sets up the VPN'S for our Customers, i wouldn't go anywhere near and AWS S3 bucket , too much control in AWS hands. but that's just us. but it would work

  • Jorge Guerrero (Customer)

    Hello, I have the P1AM-200, and I am trying to follow the above steps. However, after programming via Ethernet, the IDE tells "Sketch uploaded successfully", but the P1AM-200 becomes unresponsible, and the serial port disappeared. I have to do the double reset tap to restore the bootloader.

    Is the above solution exclusively for P1AM-100 PLCs?