Remote deploying of sketches

57 views
Skip to first unread message

fra87

unread,
Mar 11, 2016, 5:28:34 AM3/11/16
to Developers
Hello
Last day I was developing for arduino on a remote machine using remote desktop and.. well, it was quite uncomfortable. Laggy connections can make it quite frustrating.
So I came up with this idea: what if I can write the code on my machine, compile it locally and then just transfer the compiled file to the remote machine for programming? Ok, I can just transfer the source code and then compile it remotely, but this involves some more steps (write, save, synchronize between the two pcs, move on the remote one, start compiling and deploying).
I think that this procedure is fairly easy to implement in the current arduino infrastructure. Now, AFAIK, when you push the compile and flash button the system:

1) creates the c files from the sketches ones, adding the required headers and converting the arduino project to the atmel one
2) compiles the resulting c files with avr-gcc, getting the hex file
3) programs the hex file on the board with avrdude, and reports on the ide the various errors it gives

The remote deploy function, should just insert another step:

1) creates the c files from the sketches ones, adding the required headers and converting the arduino project to the atmel one
2) compiles the resulting c files with avr-gcc, getting the hex file
3) transfers the hex to the remote machine (direct tcp connection?)
4) programs the hex file on the board with avrdude on the remote host, and reports back through the tcp connection the various errors it gives

Practically in the infrastructure you should just call another program (let's call it avrdudeRemote which, instead of calling avrdude on the local machine, connects to the remote daemon who calls avrdude.

From the IDE point of view, you (user) will just need to add a "virtual" serial port, which is instead a configuration for that avrdudeRemote (e.g. IP address of the remote machine, port, possibly a simple authentication). And on the remote machine you should just enable the "accept remote connections" which, in turn, starts the daemon.

What do you think about this? Is this a good idea or it's just stupid? Or it is a good idea but too difficult/time consuming to be implemented?

Best regards

PS. I already added this message some days ago, but since it didn't appear I'm afraid I messed up when I submitted it. If, on the other hand, the original one was still in the queue and so this is a double post, I sincerely apologize.

q2dg2b .

unread,
Mar 13, 2016, 5:22:38 PM3/13/16
to Arduino Developers
Maybe you want something similar to this?
https://github.com/codebendercc/Ariadne-Bootloader

--
You received this message because you are subscribed to the Google Groups "Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@arduino.cc.

Vorms Thierry

unread,
Mar 14, 2016, 2:06:17 AM3/14/16
to devel...@arduino.cc

Very nice idea !

 

I will use it with a GSM connection !

 

Best regards

 

 

Thierry Vorms

 

De : devel...@arduino.cc [mailto:devel...@arduino.cc] De la part de q2dg2b .
Envoyé : dimanche, 13 mars 2016 22:22
À : Arduino Developers
Objet : Re: [Developers] Remote deploying of sketches


Cet e-mail a été envoyé depuis un ordinateur protégé par Avast.
www.avast.com

fra87

unread,
Mar 14, 2016, 6:26:03 AM3/14/16
to Developers
Uhm, never heard of that bootloader and... That looks awesome!
Anyway that has some limitations:
  1. It needs more steps to load a sketch (convert to binary, manually transfer file, reset board)
  2. No auto reset
  3. It has a bigger bootloader
  4. It requires that the arduino is connected to the lan
  5. (less important) you will have to manually change the bootloader (and you will need one bootloader for each board)
What I had in mind, however, was a simpler approach. Instead of changing the arduino board behavior and/or hardware equipment, you just have to split the deploy phase. Simple, automatically integrates with all the boards you already have in your develpment pc, no need for hardware or bootloader changes...

Paul Duke

unread,
Mar 15, 2016, 12:18:07 AM3/15/16
to devel...@arduino.cc
I have never used it but avrdude apparently has the feature. The documentation for the -P (port option) says:

"For programmers that attach to a serial port using some kind of higher level protocol (as opposed to bit-bang style programmers), port can be specified as net:host:port. In this case, instead of trying to open a local device, a TCP network connection to (TCP) port on host is established. The remote endpoint is assumed to be a terminal or console server that connects the network stream to a local serial port where the actual programmer has been attached to. The port is assumed to be properly configured, for example using a transparent 8-bit data connection without parity at 115200 Baud for a STK500."

fra87

unread,
Mar 29, 2016, 6:33:30 AM3/29/16
to Developers
I could not find info about that "transparent 8-bit data connection"; anyway if avrdude already supports it, well, that's good; Why can't the Arduino IDE support this feature? Because even if the avrdude program already supports it, you should call it from the command line if you want to use this feature..
Reply all
Reply to author
Forward
0 new messages