The purpose of this Instructable is to illustrate how to set up and use IPC (interprocess communication) between a Python script and the executing sketch on the Intel Galileo board. In addition to providing the source code I will be going over the code in detail and pointing out the rationale behind several decisions. The hope is that this will make it easier for you if something breaks or you want to extend the code's functionality. It wouldn't really be very instructional if I mailed you a finished product therefore this Instructable isn't complete without a solid walk-through of the code.

I recommend downloading the files in the /sketch, /python, and /examples from my GitHub (https://github.com/bunneydude/IPCBuffer). The readme files contain instructions on how to install them. Also, download the nrf24.zip file below (the slightly modified radio library for porting to Galileo from here). Instead of posting the code in the Instructable you can follow along with the source code itself.

That being said, documentation is not complete without examples. After the code walk-through there are instructions on how to use this IPC library to decrypt data the Galileo receives wirelessly from a MSP430.


The following skills will be somewhat assumed for this Instructable:

  • Ability to breadboard a circuit from a schematic
  • Basic Linux knowledge (sudo, source)
  • Basic Python knowledge (import, strings vs ints in v2.7.3)
  • Intermediate C knowledge (pointers, pass by reference)
  • Basic familiarity w/ Arduino IDE
  • Ubuntu or other Linux development environment
  • Ability to program a MSP430

Materials needed

  • Intel Galileo board (available at Mouser)
  • SD card
  • 2 nRF24L01 modules (multiple locations, I got mine from eBay)
  • MSP430G2553 (or similar - just needs more than 5kb flash)
  • Breadboard
  • Assorted wires
  • 2kOhm resistor
  • LED
  • LM2937-3.3 voltage regulator
  • 10uF capacitor
  • 0.1uF capacitor

Step 1: Communication and File Transfer With Galileo

Terminology Overview The Intel Galileo's main chip is the Quark (a 32-bit single-threaded single-core x86 microprocessor) running a Yocto Linux distro. When you program the Galileo through the Arduino IDE you are actually creating a user-level process for the Linux OS to run. The Galileo code libraries are set up such that you don't have to be totally aware of the Linux OS running in the background. This way, the Linux OS is abstracted away allowing the user to focus on writing the sketch as if it's running on a regular Arduino.

For this project you will want to get Galileo up and running with an external SD card. Steps for this are in a document on the Intel Makers Community site.
  Communicating With Galileo There are two main ways to communicate with the Galileo: Telnet (Ethernet) and serial (USB). The Telnet connection provides you a command prompt within the Linux OS while the serial connection allows you to communicate directly with the running sketch. For the specifics of setting up Ethernet, see this post on the Intel Makers Community site.
  File transfer with Galileo To transfer files while the Galileo is on, you need some version of a file transfer system. For Windows, you can download WinSCP and connect using the same host name you provided for the Telnet connection, port 22, and protocol SCP. It will prompt you for login information so just enter 'root' and you should see the picture above appear. WinSCP allows you to easily browse Galileo's files and your own side-by-side. Copying files is as easy as clicking and dragging.  This way you don't have to power off the board and eject the SD card every time you want to move a file.
<p>I&rsquo;m working on a project which is about making a rescue <br>robot . I have struggling with it for 4 months and now all the mechanical works <br>had been done . but I&rsquo;m facing difficulty in make the robot to work with rf <br>module can u plzz help me&hellip;</p><p>I want make transmitter and receiver that can control the <br>motion&hellip;I mean that receiver should have control 8 dc gear motor and each dc <br>motor should have a forward and backward botton to control the motion &hellip;&hellip;can u <br>kindly help me with this project &hellip;.if u can make the circuit board diagram for <br>the PCB &hellip;.or any other suggestion plz reply&hellip;&hellip;mail me at &ldquo;sunny1995gagan@gmail.com&rdquo;</p>
<h4>I wound up here looking for info to solve my communication problems with the Intel Galileo board. My impression was it was an Arduino Uno compatible and I would be able to run a sketch and be able to trade it out for Uno where I needed the 12 bit resolution adc. NOT. According to what I found out here, the Arduino IDE which compiles for the UNO is not the same as the Intel Arduino IDE for the Galileo which converts the sketch to statements which are used by the environment which MUST be running on the Galileo before the sketch is downloaded. My Galileo is recognized by the W7 running on my laptop as being on com7 usb port, but will not communicate as there is no system to boot into as there is no sim card. The tools menu can get no communication on port 7 to upgrade. The Intel IDE comes up with an error compiling a sketch '\arduino-1.5.3/hardware/tools/x86/i586-poky-linux-uclibc: No such file or directory'</h4><p>So it appears I need to debug the Intel arduino IDE installation on my laptop AND get Linux on a bootable sim card on the Galileo. This is not clear in the Intel 'Getting Started Guide'. So much for the 'easy' swap out. </p><p>Thanks for the wireless encryption instructable, it will enable communication between my heliostats when I get these Galileo's communicating, and it has been more informative than other articles.</p>

About This Instructable




More by bunneydude:Intel Edison Data Oriented Gateway Engine Using IPC for Wireless Encryption with Intel Galileo 
Add instructable to: