Pages: [1]   Go Down
Author Topic: Accessing Arduino USB remotely  (Read 849 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have a Mega 2560 + ethernet shield installed at a remote location running as a web server to monitor the temperature and so I can control the heating at the remote house from my home via internet.
This works fine but I can't do any development work remotely so I'm looking for a solution to access the USB connection the arduino via internet to upload sketches and debug.

Is there any way to do this so that I can run the IDE on my PC at home, upload sketches to the remote arduino and debug via the IDE console?

I've been looking at equipment such as USB network hubs but I'm not sure how this could be used. The local PC running the IDE would need to see the remote com port.

The only other approach would be a remote PC and remote desktop but that's overkill and not feasible in my case.
Logged

Westbrook, CT
Offline Offline
Full Member
***
Karma: 2
Posts: 139
"Why should I bother with made-up games when there are so many real ones going on." (c) Kurt Vonnegut
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You could program your Arduino wirelessly using the the Xbee. They come in different configurations, ranges and price.

https://www.sparkfun.com/categories/111
Logged

Arduino Uno R3
Mac OSX Lion


Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Wireless is not an issue because the ethernet hub is close by. The question is how to access the arduino via the ide remotely. I prefer to avoid using the ethernet shield which is already handling the web server 
Logged

Switzerland
Offline Offline
Faraday Member
**
Karma: 96
Posts: 4745
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Do you know that Arduino TFTP bootloader?

http://playground.arduino.cc/Code/TFTPBootloader1

The only drawback: you cannot use the IDE directly, although, at least on a *nix-like OS like Linux or Mac OS X, you can use a script instead of avrdude to do that.
Logged

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 115
Posts: 5390
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Conditionally, yes. I can. I use a RB433UAH router with a Mega2560/ethernet shield. The ethernet shield connects to one of the ethernet ports, and the Mega usb connects to one of the two usb ports on the router.
http://routerboard.com/RB433UAH
The MikroTik O.S. allows you to log in to the router using ssh with a special user/password, and connect to the usb port like a telnet connection. It also provides good clean power over the usb port, so that eliminates another headache. You can power the router with a 12v solar/battery setup for really remote locations.

It isn't easy, and it isn't cheap.
Logged

Ayer, Massachusetts, USA
Offline Offline
Edison Member
*
Karma: 50
Posts: 1767
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

One way to solve this is to put a low cost Linux computer next to the remote device, with its own ethernet support.  You log into the computer via SSH with X-forwarding, and then run the IDE on the remote computer with the display on your computer.  I think I read that some people have compiled the Arduino IDE so it works on the Raspberry Pi, but it is fairly slow (on the other hand, the R-PI doesn't have much in terms of footprint, and it can run headless without a monitor).

Or you can use one of the various VNC versions, and run the graphics through vncserver, and connect to it via vncviewer.  I'm at work right now, but I have a work at home laptop that connects on the corporate VPN system, and from my laptop at work, I can connect to the VNC server on the remote system, and run whatever graphics program I want.  Note, I don't get sound, but that is usually not an issue.

For that matter, I got a Kindle Fire for Christmas, and it can support both VNC and SSH, and I have tried out the local systems in the house.  If I was going to use a tablet for remote graphics all of the time, I would want to get one that supports a bluetooth keyword, which the Kindle Fire does not (Kindle Fire HD does support bluetooth I think).

Under Windows, you could use VNC (which was painful when I used it years ago), or I think Remote Desktop.  Since I rarely use Windows, it isn't an issue for me.

Obviously the further away you are from the system, the more network latency becomes an issue.  But in the past, when my local network was down, and I needed to get something done for work, I have used a modem (remember those?) and dialed into the California office from Massachusetts and setup networking and did remote graphics (slowly) that way.

If the speed of your connection would make graphics an issue, you could go through the steps to build Arduino objects outside of the IDE, and then ship the .hex file to a remote computer, and then log on with ssh and use avrdude directly.  If you aren't comfortable with make, command lines, etc. it can be a long learning curve to get up to speed.
« Last Edit: March 18, 2013, 02:51:44 pm by MichaelMeissner » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Reading the replies here, I've been thinking; I already have an nslu2 NAS that I modified and on which I installed Debian on a USB stick for a different "non-arduino" project. I have another one of these devices that perhaps I could configure to provide a link to the arduino. The nslu2 ethernet port is connected to the network and it has a spare USB port for the tty.

Any ideas?

 
Logged

Pages: [1]   Go Up
Jump to: