remote sketches uploading using ser2net or socat

Hi,

I want to upload sketches from my regular laptop to arduino attached to XO-1 (OLPC) or Linksys WRT-350N router with OpenWRT.

I installed ser2net on XO and tried to connect with HW Virtual Serial Port on Windows XP. When I try to upload sketch i got this error:

avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

VSP counter says:

    VSP LAN
RX    8    0
TX    0    8

This is my /est/ser2net.conf

#3000:telnet:600:/dev/ttyUSB0:remctl
3001:raw:6000:/dev/ttyUSB0:19200 8DATABITS NONE 1STOPBIT

I tried both configurations.

I also tried socat on XO
socat tcp-l:3001,reuseaddr,fork file:/dev/ttyUSB0,nonblock,waitlock=/var/run/tty0.lock Of course I stopped ser2net before that. There was exactly the same error.

I also tried socat on Ubuntu as client:

sudo socat PTY,link=/dev/ttyUSB0,raw,echo=1,waitslave tcp4:192.168.1.110:3001

but i get fallowing error:

Binary sketch size: 1774 bytes (of a 14336 byte maximum)

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding

Any ideas how to do that correctly? Is this possible?

TIA for help
regards,
Maciej

Well, I wasted a day trying the same stuff you did, with the same results...
I tried both socat and ser2net with no luck, I also tried a tcl script http://www.evilbitz.com/2008/07/21/bridging-the-serial-port-to-tcp-sockets-using-tcl/

The TCL script kept hanging when it was trying to open the port. I used OSX 10.5 for all my stuff.

Have you tried the functionality built into avrdude?

--Phil.

Hi!

  • Compile the sketch with the arduino IDE.
  • Get the .hex file and try to upload it with avrdude -P <host_ip>: option. See avrdude manual.

Tell us if it worked.

Greetings.

coLe.

has anyone worked in this area recently?

Ideas how to remotely upload sketches?

I always get an error with avrdude from linux. I think you have avrdude patch for this.

What have you tried?

cole.