Program from Windows to networked device.

Expand the capabilities of your Raspberry Pi quickly and easily using expansion boards. [Product list]
Post Reply
Joined:Sun May 17, 2015 5:13 am
Program from Windows to networked device.

Post by aharonc » Sun May 17, 2015 5:26 am


I would like to know if at all possible, programming the PiLeven from a windows computer.
Particularly, programming over a transparent serial com port. Maybe?

My ideal scenario would be to code in AtmelStudio on a windows machine and upload to the PiLeven while it is connected to the RPi. Both devices, the RPi and the WinPC are on the same network.

Hope that's clear enough :D


Freetronics Staff
Freetronics Staff
Joined:Tue Apr 09, 2013 11:19 pm
Location:Melbourne, Australia

Re: Program from Windows to networked device.

Post by angusgr » Mon May 18, 2015 5:19 am

Hi aharon,

The way we'd usually recommend to program the PiLeven from a PC is to use a serial cable. A 5V FTDI cable, or the Freetronics USBSerial, can connect to the serial port header on the end of the PiLeven and communicate directly with the onboard microcontroller. You can even power the PiLeven via this connection, if it's removed from the Pi.

If you need to use a network connection instead, I think this should be possible but with some caveats. There are some tools available such as ser2net for Linux (on the Pi) and Com0Com on the Windows PC. Here's a post that shows roughly how to use these two to make a connection between a Pi serial port and a Windows PC. There are some more instructions here.

Because the TCP network socket doesn't have the concept of a baud rate, you'll need to set it using ser2net to the bootloader's baud rate - 115200 bps - and use this speed for any Serial communications in the sketch as well.

It's possible that the auto-reset to start the bootloader will work (I don't know if ser2net will assert the correct DTR signal when someone connects over the network, or if it asserts it permanently). But it might now, in which case you'll need to press the 'reset' button manually on the Pi each time you upload.

There are some other possibilities for remote programming of a PiLeven. I'll have a think about other possible techniques, and see if I can come up with another recommendation.


Post Reply