2

Total newbie, I have a Raspberry Pi and have put the Android Things disk image on and booted it up, but I can't connect to it from a Windows 10 PC running Android Studio, adb.exe via Ethernet or USB? The Pi screen has a green and grey "androidthings" logo, but says "Not Connected".

If I connect a USB cable and use the adb devices command, nothing is detected. If I connect an Ethernet cable and use adb connect android.local command it says unable to connect to android.local:5555?

I have tried two Pi's with the same result.

2

2 Answers 2

5

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).

1
  • 2
    I've had success connecting to android.local with lower case, but usually it won't work with either upper or lower case (reboot helps in some cases). After months struggling I bought myself a screen so now I always get the IP - it always works. I'm still very curious to why that happens. Even commands that show IP for android.local like dns-sd -Q Android.local will fail me. The only option pending is scanning IP from Mac address, I'm very curious if somebody knows how to do it quickly for either Linux or Mac.
    – Fabio
    Aug 6, 2017 at 9:08
0

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

  • AndroidThing device (Rpi3) will not connect through usb adb connection. see not connect to adb using USB. Either you have to connect it through network adb i.e through ethernet or following way

Another way of connect to wifi is using serial cable.Connect serial cable to RPis GPIO.(see this connect serial cable to RPi3) and obtain serial console.and give the following command on terminal.

>> su 
>>am startservice \
    -n com.google.wifisetup/.WifiSetupService \
    -a WifiSetupService.Connect \
    -e ssid <Network_SSID> \
    -e passphrase <Network_Passcode>
4
  • No need to be su.
    – Onik
    Feb 2, 2017 at 16:51
  • not any evidence but you can verify it.and most of the usb accessories are not supported in developer preview .see this plus.google.com/112090467711235891544/posts/78pNQa52Li2 Feb 3, 2017 at 8:21
  • There is official documentation, I'm not sure whether it's in preview 1 docs or Raspberry pi's, I'll have a look and try to find it. I faintly remember it wa related to not having the wires running from the connector to anywhere else. Also, I can confirm that my laptop can power the device and still adb won't work.
    – Fabio
    Feb 11, 2017 at 9:36
  • 3
    Micro usb port (J1) can't handle data. Here's the rpi 3 b schematic where you can see the J1 connector with only power and gnd wired in raspberrypi.org/documentation/hardware/raspberrypi/schematics/….
    – Fabio
    Feb 11, 2017 at 14:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.