Skip to content

Most visited

Recently visited

navigation

Raspberry Pi 3

Raspberry Pi 3 Model B is the latest iteration of the world's most popular single board computer. It provides a quad-core 64-bit ARM Cortex-A53 CPU running at 1.2GHz, four USB 2.0 ports, wired and wireless networking, HDMI and composite video output, and a 40-pin GPIO connector for physical interfacing projects.

""

See Raspberry Pi I/O for more details on the Peripheral I/O signals on this board.

Flashing the image

Before you begin flashing, you will need the following items in addition to your Raspberry Pi:

To flash Android Things onto your board, download the latest preview image in the Android Things Console (see the release notes) and follow these steps:

  1. Insert an 8 GB or larger microSD card into your development computer.
  2. Unzip the downloaded image archive on your development computer. Navigate to the unzipped image file.

  3. Follow the official Raspberry Pi instructions for writing the image to the SD card:

  4. Insert the flashed microSD card into your board.

  5. Make the following connections to your board:

    ""

    1. Connect a USB cable to J1 for power.
    2. Connect an Ethernet cable to your local network.

      • Connect the Ethernet cable to your development computer and assign the Raspberry Pi an IP address using DHCP.

      • Connect a serial cable from the Raspberry Pi to your development computer. Use a serial console to connect to Wi-Fi.

    3. Connect an HDMI cable to an external display.

  6. Verify that Android is running on the device. The Android Things Launcher shows information about the board on the display, including the IP address.

  7. Connect to this IP address using the adb tool:

    $ adb connect <ip-address>
    connected to <ip-address>:5555
    

Connecting Wi-Fi

After flashing your board, it is strongly recommended to connect it to the internet. This allows your device to deliver crash reports and receive updates.

To connect your board to Wi-Fi, first access a shell prompt on the device. You can use either of the following methods:

Once you can access a shell prompt, follow these steps:

  1. Send an intent to the Wi-Fi service that includes the SSID of your local network. Your board must support the network protocol and frequency band of the wireless network in order to establish a connection.

    $ am startservice \
        -n com.google.wifisetup/.WifiSetupService \
        -a WifiSetupService.Connect
    

    The following arguments are supported with this command:

    Argument Description
    -e ssid network_ssid Connect to the wireless network SSID specified by network_ssid. This argument is required.
    -e passphrase network_pass Optional argument to use the passcode specified by network_pass to connect to the network SSID. This argument is not necessary if your network doesn't require a passcode.
    -e passphrase64 encoded_pass Optional argument used in place of passphrase for passcodes with special characters (space, !, ", $, &, ', (, ), ;, <, >, `, or |). Use base64 encoding to specify the value for encoded_pass.
    --ez hidden true Optional argument to indicate that the SSID specified in this command is hidden. If omitted, this value defaults to false.

  2. Verify that the connection was successful through logcat:

    $ logcat -d | grep Wifi
    ...
    V WifiWatcher: Network state changed to CONNECTED
    V WifiWatcher: SSID changed: ...
    I WifiConfigurator: Successfully connected to ...
    
  3. Test that you can access a remote IP address:

    $ ping 8.8.8.8
    PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
    64 bytes from 8.8.8.8: icmp_seq=1 ttl=57 time=6.67 ms
    64 bytes from 8.8.8.8: icmp_seq=2 ttl=57 time=55.5 ms
    64 bytes from 8.8.8.8: icmp_seq=3 ttl=57 time=23.0 ms
    64 bytes from 8.8.8.8: icmp_seq=4 ttl=57 time=245 ms
    
  4. Check that the date and time are set correctly on the device:

    $ date
    

If you want to clear all of the saved networks on the board:

$ am startservice \
    -n com.google.wifisetup/.WifiSetupService \
    -a WifiSetupService.Reset

Serial debug console

The serial console is a helpful tool for debugging your board and reviewing system log information. The console is the default output location for kernel log messages (i.e. dmesg), and it also provides access to a full shell prompt that you can use to access commands such as logcat. This is helpful if you are unable to access ADB on your board through other means and have not yet enabled a network connection.

To access the serial console, connect a USB to TTL Serial Cable to the device UART pins as shown below.

""

Open a connection to the USB serial device on your development computer using a terminal program, such as PuTTY (Windows), Serial (Mac OS), or Minicom (Linux). The serial port parameters for the console are as follows:

Pin multiplexing

The Raspberry Pi has pins that are multiplexed between various board functions. Some board functions cannot be used simultaneously (for example, enabling Bluetooth and using the UART0 port for peripheral I/O). For more information, see the function mode matrix.

This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a short survey?
Help us improve the Android developer experience.
(Sep 2017 survey)