Getting Started with the Intel® Galileo Board on MacOS*

Published: 03/11/2020, Last Updated: 09/09/2015

This guide contains steps to set up your Intel® Galileo board, including steps to setup a serial terminal, connect over Wi-Fi*, and install your preferred integrated development environment (IDE) for general development in JavaScript*, C/C++, or Python*. If you want to get going quickly in Arduino*, skip to installing the Arduino IDE.

If you want to work with another operating system, see the getting started books for Linux* or Windows*.

OS Requirements

The steps include instructions that are compatible with the following versions of the OS X* system:

  • OS X 10.10.x (or later)
  • OS X 10.9.x (or later)

Material Requirements

Here is a list of all the requirements you'll need in order to assemble and set up either your Gen 1 or Gen 2 board:

  • A micro-SD card. The card must be at least 2 GB and can be up to 32 GB
  • An SD card reader for your system
  • Intel® Galileo Gen 1 board needs:
    • A 5-V power supply
    • A DB-9-to-3.5mm audio cable
    • A serial-to-USB cable
  • Intel® Galileo Gen 2 board needs:
    • 6-pin Serial to Type A USB cable (FTDI cable # TTL-232R-3V3 is recommended)
    • A 7-15-V DC power supply
  • If you want to set up your board for Wi-Fi, you'll need one of these adapters:
    • Intel® Centrino® Wireless-N 135
    • Intel® Centrino® Advanced –N 6205

If you want to get going quickly in Arduino, skip to installing the Arduino IDE.

Step 1: Make a Bootable Micro SD Card

You must boot your Intel® Galileo board using a micro SD card that contains the latest Intel® IoT Developer Kit version of the Yocto*-built Linux image.

Linux is the operating system that powers the Intel® Galileo board. While there is already a version of Linux built into your board, the developer-kit version of Yocto-built Linux includes even more libraries and resources to help developers create applications in their favorite programming language. This version includes GCC, Python, Node.js, OpenCV, to name a few.

In addition, sketches that you upload to the Intel® Galileo board are erased when the board is powered down. To be able to resume the sketch even after powering down your board, you must boot from a micro SD card.

Requirements

You must have a few things to begin. The steps below are for creating a micro SD card with a Mac* OS X* host system. There are separate instructions for Windows, Mac OS X, and Linux.

Download and Extract the Image

This section contains steps to download and extract the latest developer kit version of the Linux image.

  1. Download the latest Intel® Galileo Board microSD Card Linux* Operating System Image from the Intel® Galileo Board Downloads page.
  2. Double-click the .bz2 file to start the extraction process.
  3. Wait for Archive Utility to finish expanding the file. You should now have a file called iot-devkit-version-mmcblkp0.direct alongside the original .bz2 file, where version is either latest or a date in the YYYYMMDDHHMM format.

    Extract the .bz2 file to a .direct file.

Format Your Card

This section contains steps to format and name your micro SD card.

  1. Run Disk Utility, as follows:
    • Go to Applications on your Mac.
    • Open Utilities.
    • Run Disk Utility.app.
  2. Insert the micro SD card into your computer.
  3. In the left hand sidebar of Disk Utility, select the card. In this case, the card has never been formatted before and is called NO NAME.

    In Disk Utility, select the SD card.

  4. Click the Erase tab.
  5. From the Format drop-down list, select MS DOS (FAT). In the Name field, type yocto to make it easier to identify in the steps below.
  6. Click Erase to confirm your settings.
  7. Click Erase in the confirmation message to erase the contents of your card.

    Click Erase to erase the SD card.

  8. Wait for Disk Utility to finish formatting your card. It should only take a moment. Once done, you will see a card named YOCTO mounted and displayed.

    Verify that your SD card is mounted.

Write the Image to Your Card

This section contains steps to write the Linux image to the micro SD card.

  1. Run Terminal, as follows:
    1. Go to Applications on your system.
    2. Open Utilities.
    3. Run Terminal.app.
  2. Navigate to the location of the .direct file that you extracted earlier. For example, if your .direct file is on your Desktop, enter the command:

    cd ~/Desktop/

  3. Enter the following command to list all mounted drives:

    diskutil list

  4. Look for a drive named YOCTO. Note the disk number of the drive, which should have a name similar to disk1. Be sure not to confuse the disk name with the partition name, which should have a name similar to disk1s1.

    Note the disk name of the SD card.

  5. Use the diskutil command to unmount the SD card. Replace # with the disk number you noted in the previous step:

    Caution: Ensure that you have the correct disk name, as described earlier. Copying and pasting the command below with the wrong disk name could result in your data being erased from the wrong drive.

    diskutil unmountDisk disk#

    If successful, you will see an unmount confirmation message.

    Note: Unmounting is necessary since the following step will partition the card and copy files.

    Unmount the SD card and view the confirmation message.

  6. Use the dd command to write the image to the SD card. Replace version with the version you are using, either latest or a date in the YYYYMMDDHHMM format. Replace # with the disk number you noted earlier.

    Caution: Ensure that you have the correct disk name, as described earlier. Copying and pasting the command below with the wrong disk name could result in your data being erased from the wrong drive.

    sudo dd bs=8m if=iot-devkit-version-mmcblkp0.direct of=/dev/disk#

  7. When prompted, type your user password and press Enter.
  8. Wait for the write process to finish. Please be patient as this may take up to 5 minutes. If the command is working properly, you should see flashing lights on your card reader. Once the lights stop flashing, you will see Terminal output confirming records in and out.

    Verify that the Terminal output contains records in and out.

    Once the write process is complete, you will have a bootable micro SD card named Untitled with the following contents:

    Verify that your bootable SD card contains the correct contents.

  9. Eject the card using Finder or the diskutil command in Terminal, replacing # with the disk number you noted earlier:

    diskutil eject disk#

    If successful, you will see a disk ejected message.

    Eject the SD card.

You can now insert the card into the micro SD card slot on your Intel Galileo board. When you power up your board, the board automatically boots using the image on the card.

Now that you have created your bootable card, continue to assemble and power your board. If you want to get going quickly in Arduino, skip to installing the Arduino IDE.

Step 2: Assemble and power your board

This section walks you through assembling your Intel® Galileo board. Start with one of the following options:

Assemble the Intel® Galileo Gen 1 board

Requirements

  • An Intel® Galileo Gen 1 board

    Example of the Intel® Galileo Gen 1 board
  • A 5-V power supply (should have come with your board)

    A 5-V power supply

  • A DB-9 to 3.5mm audio cable

    A DB-9 to 3.5mm audio cable

  • A serial to USB cable

    A serial to USB cable

  • A 2-GB to 32-GB micro-SD card

    A micro-SD card with 2GB or greater

Set Up the Intel® Galileo Gen 1  board

This section walks you through assembling your board.

  1. Confirm flashed SD card is inserted in your board properly.
  2. Plug in the power supply to your board. Plug the other end into your wall socket. You should see the LED in the lower left-hand corner light up.

    Galileo Gen 1 with power cable

  3. Plug the DB-9 to 3.5mm audio cable in to your board.

    Galileo Gen 1 with audio cable

  4. Connect the DB-9 end of the cable to the serial to USB converter.
  5. Plug the other end of the serial to USB converter in to a USB port on your computer.

    Galileo with all cables

Now that your board is ready, set up a serial connection to your board. If you want to get going quickly in Arduino, skip to installing the Arduino IDE.

Assemble Intel® Galileo Gen 2 board

Requirements

  • An Intel® Galileo Gen 2 board
  • A 7-15V DC power supply

    A 7-15V power supply

  • 6 pin Serial to Type A USB cable (FTDI cable # TTL-232R-3V3 is recommended)

    A DB-9 to 3.5mm audio cable

  • A 2-GB to 32-GB micro-SD card; see Step 1: Make a bootable SD card for setup prior to assembling your board.

    A micro-SD card with 2GB or greater

Set up Galileo Gen 2 board

  1. Confirm flashed SD card is inserted in your board properly.
  2. Plug the DC power supply in to your board. Plug the other end into your wall socket.

    Plug the power supply in to the board

  3. Wait for two green LEDs to light up.

    Wait for the two green LEDs to light up

  4. Plug in the 6 pin Serial (FTDI) to USB cable.

    Plug in the FTDI cable

  5. Plug the other end of the FTDI cable in to a USB port on your computer.

    Plug the FTDI cable in to your computer

Now that your board is ready, set up a serial connection to your board. If you want to get going quickly in Arduino, skip to installing the Arduino IDE.

Step 3: Set up a serial terminal

This page describes how to set up a terminal emulator on a Mac system to use with the Intel® Galileo board.

Install drivers

Intel® Galileo Gen 1 board

Your computer should already have the USB converter drivers installed. If you have trouble establishing a connection, refer to the documentation provided by the manufacturer of the USB converter.

Intel® Galileo Gen 2 board

Your computer should already have the FTDI and USB drivers installed. If the FTDI drivers are not installed, we recommend following Sparkfun’s helpful tutorial.

Communicate

At the end of this section you will have connected to the board through a terminal, and checked whether your firmware is up to date.

  1. Launch the Terminal by:
    1. Launch Spotlight by typing Cmd+Space.
    2. Type terminal.
    3. Select the Terminal app.
  2. Enter ls /dev/tty.* (note the .*at the end) command to list all connected devices.
  3. Look for a device that contains cu.usbserial or tty.usbserial. In this case, the device found was /dev/tty.usbserial-A402YSYU.

    Troubleshooting Tip: If you don’t see a usbserial device listed, verify the power and USB connection to your Intel Galileo board in the Connect section above.

  4. Connect to the USB serial device using the Terminal screen utility by typing:

    screen /dev/xx.usbserial-XXXXXXXX 115200 –L where /dev/xx.usbserial-XXXXXXXX is replaced by your device’s unique name. Using the example above, the command would be: screen /dev/tty.usbserial-A402YSYU 115200 –L

    Note: 115200 indicates the baud rate. Always use 115200. -L turns on output logging so you can see what the result of your commands are.

  5. When you see a blank screen, press the Enter key twice.
  6. You should see a login screen.
  7. At the login prompt, type root and press Enter.
  8. The password is empty, so just press Enter.
  9. Now it should look similar to this:

    login

Note: By default the root password is blank. You can set the root password by entering the command passwd.

Testing your SD Card Image

Now that your serial terminal is connected, verify the SD card image by checking the version of the image:

  1. Open a serial connection session with your board. Enter the following:

    cat /etc/version

  2. The image version is displayed in YYYYMMDDHHMM format. If your board is booting from its default image instead of the image you just downloaded, the version reflects an older date, such as 201410101603. You should see a more recent image version, such as 201502260041. Type cat /etc/version to check the version of your image.

    Type cat /etc/version to check the version of your Yocto image.Type cat /etc/version to check the version of your Yocto image.

Congratulations! You’ve set up the terminal communication to your Intel Galileo board. To get familiar with the system, you can try out some common Linux commands by searching basic linux commands in your web browser.

Next Steps

Now that you have set up serial communication with your board, continue to connecting to a network.

Step 4: Connect over Wi-Fi*

You will need a network connection to use the Intel® XDK or Intel® System Studio IoT Edition. In this guide you’ll set up network access to your Intel® Galileo Board and obtain an IP address using Wi-Fi*. To connect using Ethernet, follow the steps in the article Connecting your Intel® Galileo board using Ethernet.

Install your Wi-Fi adaptor

For the purpose of this tutorial we are using the Intel® Centrino® Wireless-N 135.

  1. Assemble the wireless card with the aluminum plate, to help keep the wireless card in place on the board.

    assemble the wireless card

  2. Connect the antennas to the wireless card.

    connect the antennas

  3. Insert wireless card in the mini PCI Express slot. Once the wireless card is inserted into the Mini PCI Express slot, press the wireless card gently towards the board until it locks in place.

    insert the wireless card in the mini PCI Express slot

Establish Communication

  1. Once the Intel® Galileo Board is powered up, you should verify the Wi-Fi adaptor is connected and working. To do this, run the following Linux commands on your board, via the serial session described into Step 3: Set up a serial terminal.
  2. At the command prompt, type lspci -k | grep -A 3 -i "network" to verify your Wi-Fi adaptor.
    root@galileo:# lspci -k | grep -A 3 -i "network"
    01:00.0 Network controller: Intel Corporation Centrino Wireless-N 135 (rev c4)
                    Subsystem: Intel Corporation Centrino Wireless-N 135 BGN
                    Kernel driver in use: iwlwifi
  3. The IoTDK contains the embedded connection manager connman, which we will use here to establish the Wi-Fi connection. Enter the command connmanctl to manage the Wi-Fi settings.
  4. Enter enable wifi to verify that Wi-Fi has been enabled.
  5. Enter scan wifi. This returns Scan completed for wifi.
  6. Enter services. This command lists the networks found, followed by the MAC address and other key information of that network necessary to make a connection. MyNet1 is the network in this example.
    connmanctl> services
            *AO Wired  ethernet_000000000000_cable    
          MyNET1     wifi_dc85de828967_38303944616e69656c74_managed_psk
            OtherNet2  wifi_dc85de828967_3257495245363836_managed_wep
          [...]
  7. After running these commands, you’ll see your wireless network name (in place of MyNET1). Note that in case of a hidden network, the network will be listed without a name preceding it. If MyNET1 was hidden, the output could be:
      connmanctl> services
            *AO Wired  ethernet_000000000000_cable    
            wifi_dc85de828967_38303944616e69656c74_hidden_managed_psk
          [...]
  8. To connect to a secure Wi-Fi network, turn on the agent that allows user interaction on the console by typing agent on. Then type in connect and the wifi string starting with wifi_ and ending in managed_psk. Your specific Wi-Fi string may vary.
      connmanctl> agent on
            Agent registered
      connmanctl> connect wifi_dc85de828967_38303944616e69656c74_managed_psk 
            Agent RequestInput wifi_0cd2926de3ae_486f6d65574c414e_managed_psk
  9. Enter the passphrase for MyNet1, then wait for the connection to be established (the link becomes ready message).
     Passphrase = [ Type=psk, Requirement=mandatory ]
            Connected wifi_dc85de828967_38303944616e69656c74_managed_psk 
            Passphrase? <passphrase goes here>
    [  928.015714] wlp1s0: authenticate with aa:bb:cc:dd:ee:ff
    [  928.060155] wlp1s0: capabilities/regulatory prevented using AP HT/VHT configuration, downgraded
    [  928.079977] wlp1s0: send auth to aa:bb:cc:dd:ee:ff (try 1/3)
    [  928.087854] wlp1s0: authenticated
    [  928.100157] wlp1s0: associate with aa:bb:cc:dd:ee:ff (try 1/3)
    [  928.116202] wlp1s0: RX AssocResp from aa:bb:cc:dd:ee:ff (capab=0x431 status=0 aid=3)
    [  928.129111] wlp1s0: associated
    [  928.132339] IPv6: ADDRCONF(NETDEV_CHANGE): wlp1s0: link becomes ready
  10. Exit the connman console by typing in quit. Then verify that a successful connection has been made with the display of a valid IP address by typing in ip a .
    connmanctl> quit
    root@galileo:# ip a
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
        inet 127.0.0.1/8 scope host lo
        inet6 ::1/128 scope host
           valid_lft forever preferred_lft forever
    2: enp0s20f6: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
        link/ether 00:13:20:ff:14:43 brd ff:ff:ff:ff:ff:ff
        inet 169.254.5.1/16 brd 169.254.255.255 scope link enp0s20f6:avahi
        inet6 fe80::213:20ff:feff:1443/64 scope link
           valid_lft forever preferred_lft forever
    3: wlp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq qlen 1000
        link/ether aa:bb:cc:dd:ee:ff brd ff:ff:ff:ff:ff:ff
        inet 192.168.0.2/24 brd 192.168.0.255 scope global wlp1s0
        inet6 fe80::ed2:92ff:fe6d:f1d2/64 scope link
           valid_lft forever preferred_lft forever

Next Steps

Now that you have connected to and obtained an IP address for your board, you can install your preferred IDE and begin programming the board.

Step 5: Set up your IDE

Now that you have set up your Intel® Galileo board, you can install your preferred integrated development environment (IDE) and begin programming your board.

Which programming language will you use?

The IDE you use to program your board depends on the programming language you want to develop in. The choices are:

  • Arduino*: Arduino is an easy-to-learn, open source C++ based programming environment. It's convenient for quickly adding sensors since there is a lot of available sensor code out there. Since the Intel® Edison and Intel® Galileo boards are Arduino-pin compatible, there are also plenty of shields to choose from. The Arduino IDE is the application of choice for programming with Arduino. For steps to install the Arduino IDE, see Installing the Arduino IDE.

  • JavaScript* and Node.js*: These languages are great for creating web interfaces and also work well in cloud connectivity and getting devices talking to one another. We provide the Intel® XDK to program in JavaScript and Node.js. It comes with easy-to-use project templates to jumpstart your IoT projects. For steps to install the Intel XDK, see Installing the Intel® XDK.

  • C++: Alternatively, using C++ tends to be very powerful, giving you full control of the system while simultaneously taking advantage of a lot of available libraries. Intel® System Studio IoT Edition comes with a built-in capability to easily integrate sensors from our GitHub library. For steps to install the Intel System Studio IoT Edition, see Installing the Intel® System Studio IoT Edition.

  • Java: Java is an accessible language newly supported by the Intel System Studio IoT Edition. For steps to install the Intel System Studio IoT Edition, see Installing the Intel® System Studio IoT Edition.

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804