Android Things:连接到Raspberry Pi 3
总的新手,我有一个 Raspberry Pi ,并已放置 Android Things 磁盘映像并启动了它,但是我无法通过 Windows 10通过以太网或USB运行 Android Studio ,adb.exe
的PC? Pi 屏幕上有绿色和灰色的"androidthings"徽标,但显示 未连接" .
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".
如果我连接USB电缆并使用adb devices
命令,则不会检测到任何东西.如果我连接了以太网电缆并使用adb connect android.local
命令,它会显示unable to connect to android.local:5555
?
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
?
我尝试了两个具有相同结果的 Pi .
I have tried two Pi's with the same result.
Pi屏幕上有绿色和灰色的"AndroidThings"徽标,但显示未连接".
The Pi screen has a green and grey "AndroidThings" logo but says "Not Connected".
"Not Connected
" 消息表示您的 RPi3 不在本地网络中,这很可能是直接连接 RPi3 引起的用您的 PC/笔记本电脑.您应该做的如下.
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.
,以便显示分配的 IP 地址.
in order to get the assigned IP address displayed.
-
使用显示的 IP 通过
adb
连接到 RPi3 :
adb connect rpi3_ip_address
按照文档设置根据文档:
adb shell am startservice -n com.google.wifisetup/.WifiSetupService -a WifiSetupService.Connect -e ssid network_SSID -e passphrase network_passcode
adb connect Android.local
注释:
-
network_SSID
和network_passcode
区分大小写,
如果您的网络没有 - 删除
-e passphrase network_passcode
-
network_SSID
andnetwork_passcode
are case sensitive, - remove
-e passphrase network_passcode
if your network doesn't have one
连接到串行调试控制台并如上所述设置 Wi-Fi 设置,只需使用这次是am startservice etc...
.
Connect to Serial Debug Console and setup Wi-Fi settings as above, just using am startservice etc...
this time.
如果我连接了 USB 电缆并使用
adb devices
命令,则不会检测到任何东西.
If I connect a USB cable and use the
adb devices
command, nothing is detected.
RPi 的微型 USB 并不意味着要通过它传输数据:@Fabio的评论(别忘了投票).
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).