3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Telnet to your Arduino/AVR!

Telnet to your Arduino/AVR!
The other day I was wanting to check on one of my AVR's but I was upstairs and god knows it was too much of a hassle to go downstairs to where the microcontroller was. But, there were two idle computers sitting upstairs next to my lazy butt, so I had a half-day from work and decided to write an application that binds two ports: a serial port to connect to the Arduino/AVR and a TCP/IP port that I could telnet into from my wireless network or over the Internet. The application then act as a proxy between the TCP/IP network and the AVR.

To see the video better, click twice and bring it up in its own window and enlarge.  Otherwise, squint and you can see what's being typed.



So, I ended up modifying the AVR Terminal serial connection application that I had already written, and I added TCP/IP support to it. To go along with it, I wrote some firmware that provides something like a UNIX shell, giving me remote access to all the pins, fuse settings, etc. You can turn on LED's and all that stuff remotely. It even supports adjusting the clock speed in real-time and has a pseudo-password system that gives the framework for Access Control Lists or authentication for root-level commands (like powering down subsystems, etc). Here are some of the things it can do:
  • Display your cpu frequency
  • Set any pin to input or output
  • Read the state of any pin
  • Send logic 1 and 0 to any pin to turn on LED's, etc
  • Power down and power up the SPI, TWI, USART, and ADC peripherals
  • Read the lower fuse, higher fuse, external fuse and lock bits in real-time
  • Start timers for automatically timing events and things.
  • A framework for an authentication system into EEPROM
  • Establish any available clock prescaler in real-time
  • Written in C++ and compiled for an ATmega328P

This instructable details how you can download the software (and firmware, if you like), install it, and start accessing your AVR from your wireless home network or over the Internet.
 
Remove these adsRemove these ads by Signing Up
 

Step 1What You'll Need

  • An stand-alone AVR or Arduino/clone (for detailed instructions on how to make your own, fairly complete stand-alone AVR system including an external crystal, decoupling capacitors, and a regulated power source, see my other instructable).
  • A serial or USB connection to your host PC
  • The AVR Terminal version that has the embedded TCP/IP server
  • Optionally, the AVR Shell (avrsh) if you want to run firmware on your target AVR/Arduino to get access to your peripherals.

The TCP/IP gateway works with whatever firmware you may be using or want to write as long as it communicates via the UART to the PC. Unfortunately, there is not a Java version, so the AVR Terminal only runs on Windows at the moment.
« Previous StepDownload PDFView All StepsNext Step »
5 comments
Apr 3, 2012. 2:18 PMRalphxyz says:
So far this is going PC to ATmega which is great, how about going the other way?

Say I wanted to contact a time server?

Thanks for posting this.

Ralph
Jan 14, 2011. 10:51 AMGoosen says:
Looks really good. Have you submitted this to the arduino forums yet?
Jan 14, 2011. 11:01 AMGoosen says:
Is this windows only? If so can you port it to linux? If not can you post the source code?

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
63
Followers
22
Author:nevdull(The Bold Scientist)
Gian is the VP Research & Development at Open Design Strategies and holds a BA in Molecular/Cellular Biology and an MS in Computer Science. He has a collection of 8-bit microcontrollers and a room fu...
more »