Ardinuo and WebOS RS232C communication

Hello!

I have a project that uses LG WebOS and we have bi-directional communication over RS232C between the Arduino nano and WebOS operating system.

I am receiving data great and that part is working awesome.

I want to be able to update Arduino from our javascript application from WebOS.

I have a compiled hex file and believe I need to send it in 128 byte chunks.

I'm not sure what the commands are to initiate this and then send it over for it to update Arduino.

Does anyone have any ideas on this and can point me in the right direction?

Thank you for your help!!

This is usually done by avrdude. More or less current Nanos use the optiboot bootloader so you use the arduino specific upload protocol (a slightly extended stk500 protocol). The source code of the optiboot bootloader should give you enough hints of how to upload, otherwise the source of the avrdude is also available online.

Microchip (new Atmel owner) has a documentation for it: http://ww1.microchip.com/downloads/en/Appnotes/doc2525.pdf