0

I am new to IoT technology and I am trying to run a hello word project from android studio to a raspberry pi.

I followed the steps from this tutorial: Hello World com Raspberry Pi 3 usando Android Things. But I am stuck at the step in which I have to connect the raspberry pi with adb.

The connection failed all the time. I connected the raspberry pi with an USB cable to my laptop and with an Ethernet cable for the wired network.

Did anyone had the same problem?

I put here an image with the errors

image

Onik
  • 19,396
  • 14
  • 68
  • 91
Mirela
  • 11
  • 4
  • 1
    You cannot have [ADB over USB on Raspberry Pi 3B](https://stackoverflow.com/a/44249334/3290339) – Onik Nov 07 '18 at 12:58
  • 1
    Also take a look at the [official documentation](https://developer.android.com/things/hardware/raspberrypi). – Onik Nov 07 '18 at 13:01
  • 1
    Tried `adb kill-server` and `adb start-server` on the host machine? – Onik Nov 07 '18 at 13:11
  • I did the steps with the android-things-setup-utility as in the link you mentioned, but at some point it doesn't work. This is the error: Failed connecting to Android device: unable to connect to Android.local:5555: cannot resolve host 'Android.local' and port 5555: No such host is known. (11001) – Mirela Nov 07 '18 at 13:12
  • Might be a router issue. Try connecting Pi over LAN directly (if possible), not WiFi. – Onik Nov 07 '18 at 13:14
  • Yes, I also tried with adb kill-server and adb start-server. I put the raspberry pi ip address in the command adb connect , but still it doesn't work. – Mirela Nov 07 '18 at 13:15
  • If utility can't connect using Android.local (for me it never worked) the error message should look like the following: "Failed connecting to Android device: unable to connect to Android.local:5555: Operation timed out Could not automatically find your Raspberry Pi. We will need you to enter its IP address. One way to find it is to plug your Raspberry Pi to a monitor and reboot. Once it has booted, it will show its IP. Once you are ready, enter the IP of your Raspberry Pi:" – Shamm Nov 09 '18 at 08:45
  • if the Android Things is connected to ethernet and in the same network as your laptop, you should be able to use adb connect anf then the ip. The simplest way of knowing the IP of your Android Things is to connect a monitor and mouse and check it on the device. Hope this helps. – shalafi Nov 09 '18 at 16:01

1 Answers1

1

First of all there is an official documentation how to start with the Raspberry PI https://developer.android.com/things/hardware/raspberrypi

I guess that you haven't set up your raspberry properly. The key points there are:

  • flash the SD-card using utility
  • setup wifi using utility The utility could be found here

After that you are going to be able to connect over wifi

Shamm
  • 1,004
  • 7
  • 9