How do I connect my Raspberry Pi 3 running Android Things to a wifi network?

流过昼夜 提交于 2019-12-19 10:13:39

问题


I have flashed my Raspberry Pi 3 with the Android Things image, I have not been able to connect it to my wifi network. I have run adb devices but I get no response.


回答1:


Take a look at this question: connect to Raspberry Pi 3 using adb

The Raspberry Pi isn't a USB device, the USB connection is just for power, so it won't show up in adb devices. You have to connect it to a network first then use adb connect.




回答2:


In short, you have to connect it to network using Ethernet and then follow the instructions using adb command to connect it to Wifi. Yeah, I know it is dumb but it is just the way it works at the moment.

And adb devices won't show anything until it is connected with TCP. RPi3 won't work as a USB slave device.

Check the details here and other stuffs.

http://pierrchen.blogspot.com.au/2017/01/a-hands-on-of-android-things-on-rpi3.html




回答3:


If you are trying to connect to wifi, you can connect your pi with a laptop through USB to TTL module, after that you can use putty to run the following

am startservice \
    -n com.google.wifisetup/.WifiSetupService \
    -a WifiSetupService.Connect \
    -e ssid YOURWIFINAME \
    -e passphrase YOURWIFIPASSWORD

if you do it successfully you should be able to see your pi's ip address after running:

ifconfig wlan0

like this:

inet addr: 192.168.1.104 Bcast: 192.168.1.255  Mask 255.255.255.0


来源:https://stackoverflow.com/questions/41145671/how-do-i-connect-my-raspberry-pi-3-running-android-things-to-a-wifi-network

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!