I tried different times to use socat and ser2net in order to upload a sketch to an Arduino Uno (connected to a PC) from my laptop, unsuccessfully. Can anyone teach me how to achieve this goal? I use Linux.
I've been searching through the net for some days, in order to discover how I could easily upload a sketch to an Arduino that is not phisically connected to my PC, but instead that is connected to an another one, that belongs to the same LAN. I mean:
PC1-SERVER Arduino Uno is connected to this PC with classic USB cable. This PC is running Ubuntu linux, and sees Arduino as a serial port /dev/ttyACM0.
PC2-CLIENT This is the PC where I create and compile the sketch. I want to upload the sketch to the Arduino Uno described above (so, connected to SERVER, port /dev/ttyACM0)
SOLUTION: server-side commands:
sudo apt-get install ssh-server ser2net sudo passwd root (to set the root password) sudo reboot
client-side commands (assuming 192.168.0.7 as IP address of SERVER):
ssh -L 8086:localhost:8086 email@example.com \ '/usr/sbin/ser2net -d -C "8086:raw:600:/dev/ttyACM0:115200 NONE 1STOPBIT \ 8DATABITS -XONXOFF LOCAL -RTSCTS HANGUP_WHEN_DONE "'
you can then upload sketches to arduino doing this:
avrdude -C /path/to/avrdude.conf -p atmega328p -c arduino -P net:localhost:8086 -U flash:w:/path/to/file.hex:i
NOTE: In Eclipse, if you are using the arduino plugin, just place "net:localhost:8086" in the configuration panel, where "port:" field is required.
This solution was also posted on arduino forum.
You can use an ethernet to ttl adapter and then install a virtual com software.
What i did was the following.
I used an ethernet to 232 converter, and tweaked the board as you can see in the attached photo, I removed the 232 chip and jumpered the ttl directly to the output.
Then I installed USR-VCOM and set a virtual com port that shows in the arduino ide, it works without any software /boot changes
I am not sure how to remote reset the arduino.... Probably someone else knows.
Basically it would require another bootloader.
You might want to check this out: http://playground.arduino.cc/Code/TFTPBootloader1
Programming through serial
I don't have the intention to advertise a product, but I worked with an Lantronix xport which was able to receive serial information (or a telnet session) over ethernet. You might want to look into cheaper models of other manufacturers (that do not use modem like commands) you should look for ethernet to serial converters. It should be compatible with: http://blog.solutions-cubed.com/programming-the-arduino-uno-with-a-serial-port/
You might also connect to another PC over ethernet which then programs the arduino
This would require another PC, but can be fairly easy to set up, but cumbersome to use. You could use teamviewer or another remote desktop. Find a way to send your code (or completely program it at the other pc) and then execute the program command. You might even check if it's possible to use an raspberry PI instead of a full PC (always wanted to try this).
Use an arduino to program your arduino
You might use an arduino that receives code and then uploads it to another arduino. Not sure how that works out. Or how to get the code on the first arduino. Should work fine if you've got something like a modificated arduino webserver running.
Also details on programming arduino can be found here: http://www.arduino.cc/en/Tutorial/ArduinoISP