Android Things: Connect to Raspberry Pi 3

The Pi screen has a green and grey “AndroidThings” logo but says “Not Connected”.

The Not Connected message means your RPi3 is not in your local network, which most likely caused by directly connecting the RPi3 with your PC / laptop. What you should do is as follows.


Connect RPi3 to your router using Ethernet cable (1 in picture)

enter image description here

Reboot RPi3

in order to get the assigned IP address displayed.

Setup Wi-Fi settings

  • Connect to RPi3 via adb using the IP displayed:

     adb connect rpi3_ip_address
    
  • Setup Wi-fi settings as per the docs:

     adb shell am startservice -n com.google.wifisetup/.WifiSetupService -a WifiSetupService.Connect -e ssid network_SSID -e passphrase network_passcode
    

Connect to RPi3 over Wi-Fi (2 in picture)

    adb connect Android.local

Notes:

  • network_SSID and network_passcode are case sensitive,
  • remove -e passphrase network_passcode if your network doesn’t have one

What if I have neither display nor Ethernet cable?

Connect to Serial Debug Console and setup Wi-Fi settings as above, just using am startservice etc... this time.


If I connect a USB cable and use the adb devices command, nothing is detected.

Micro USB of RPi isn’t meant to transfer data over it: a credit goes to @Fabio’s comment (don’t forget to vote it up).

Leave a Comment