Communicating with the Intel Galileo

Developers have confusing array of ways to communicate with the Intel Galileo embedded board.  This is partially because the board wants to look like an Arduino while at the same time letting developers make use of the much larger hardware provided by the Intel platform.  There are probably 4 main areas for communication

  1. Programming the board with the IDE.
  2. Communication between the board and a host computer using the Arduino library.
  3. Administration  and monitoring of the board's embedded Linux operating system.
  4. Communicating between the board and other systems using network or other Linux level capabilities.
This chart describes the main channels of communication.  The Arduino IDE and Arduino Serial device are mapped to the USB port. The USB port does not support any type of multi-channel composite device.  This means you can only communicate with the underlying Linux system if you build a custom serial port cable or connect via Ethernet.  The embedded Linux does not start telnetd or sshd.  The SD card Linux does not start telnetd or sshd by default.



Intel expects folks to communicat using /dev/ttys1 with a serial to phono jack cable. I'm not sure why they didn't just leave the port as a 3.3v/5v signal level that could be used with an FTDI style USB to serial adapter. That is the way most folks connect to routers, and other embedded systems.  Most modern laptops don't have real serial ports so the Virtual COM USB adapters would have been perfect.

The Simplest Way: Connecting via Ethernet

Ethernet is the simplest way to communicate with an Intel Galileo board without making or buying any type of custom cabling. You will need an Ethernet cable to connect the Galileo to your laptop or your network hub/router.  I prefer to use my hub because that leaves my development machine connected to the main network in case I need to look stuff up on the Internet.


My network is all DHCP for address 192.168.1.100 - 192.168.1.150.  This means I can put embedded devices at fixed addresses if I want to talk to them without using some kind of zeroconf tooling.  The following script enables telnet and configures the Ethernet port to 192.168.1.5.

void setup() {
  system("telnetd -l /bin/sh");
  system("ifconfig eth0 192.168.1.5 netmask 255.255.255.0 up");
}
void loop() {
  // Put the rest of your sketch here.
 
}

Connecting from a Windows Machine

Download and install Putty.  It provides nice terminal services that let you communicate to the Intel Galileo via Ethernet or over the virtual com port created when the board's USB is connected to your computer. Putty also supports SSH if that is what you enabled with your script above instead of telnet.



Caveats

You have to reload and re-run the sketch every time you power on the Galileo board unless you have saved it to the optional SD card.  

Credits

Telnet and ifconfig for Intel Galileo http://garretlabs.wordpress.com/tag/ifconfig/
Great serial port discussion https://communities.intel.com/thread/48048


Last Edited 3/30/2014

Comments

Popular posts from this blog

Installing the RNDIS driver on Windows 11 to use USB Raspberry Pi as network attached

Understanding your WSL2 RAM and swap - Changing the default 50%-25%

Almost PaaS Document Parsing with Tika and AWS Elastic Beanstalk