Android Things - Raspberry Pi无法连接到Wifi

eas*_*ese 2 android wifi raspberry-pi3 android-things

有几个问题有类似的问题,但没有一个解决方案有帮助.我正在尝试将Android Things Raspberry Pi连接到Wifi.我的2.4 GHz wifi ssid是'蛋糕',我甚至删除了密码,看看是否有帮助.以下是logcat中出现的内容:

09-20 01:37:00.340  1233  1233 D WifiSetupService: onStartCommand(Intent { act=WifiSetupService.Connect cmp=com.google.wifisetup/.WifiSetupService (has extras) })
09-20 01:37:00.341  1233  1233 I WifiConfigurator: Connecting to network with SSID "cake"
09-20 01:37:00.345  1233  1251 W WifiManager: com.google.wifisetup attempted call to setWifiApEnabled: enabled = false
09-20 01:37:00.346   311   546 D WifiService: setWifiEnabled: true pid=1233, uid=1000, package=com.google.wifisetup
09-20 01:37:00.349  1233  1233 V WifiWatcher: Network state changed to DISCONNECTED
09-20 01:37:01.258  1233  1251 D WifiConfigurator: Adding new network
09-20 01:37:01.873   311   380 E WifiConfigManager: Cannot find network with networkId -1 or configKey "cake"NONE
09-20 01:37:01.874   311   380 E WifiConfigManager: Cannot find network with configKey "cake"NONE
09-20 01:37:02.648   311   323 D WificondControl: Scan result ready event
09-20 01:37:03.423   311   380 D WifiConfigStore: Writing to stores completed in 1304 ms.
09-20 01:37:03.430   311   380 D WifiStateMachine: connectToUserSelectNetwork netId 0, uid 1000, forceReconnect = false
09-20 01:37:04.261   311   380 D WifiConfigStore: Writing to stores completed in 823 ms.
09-20 01:37:34.306  1233  1251 E WifiConfigurator: Wifi failed to connect in 30000 ms
09-20 01:39:49.672  1233  1233 D WifiSetupService: onStartCommand(Intent { act=WifiSetupService.Connect cmp=com.google.wifisetup/.WifiSetupService (has extras) })
09-20 01:39:49.673  1233  1233 I WifiConfigurator: Connecting to network with SSID "cake"
09-20 01:39:49.675  1233  1279 W WifiManager: com.google.wifisetup attempted call to setWifiApEnabled: enabled = false
09-20 01:39:49.676   311   322 D WifiService: setWifiEnabled: true pid=1233, uid=1000, package=com.google.wifisetup
09-20 01:39:49.681  1233  1279 D WifiConfigurator: Updating existing network 0
09-20 01:39:49.906   311   380 D WifiConfigStore: Writing to stores completed in 219 ms.
09-20 01:39:49.909   311   380 D WifiStateMachine: connectToUserSelectNetwork netId 0, uid 1000, forceReconnect = false
09-20 01:39:49.945   311   380 D WifiConfigStore: Writing to stores completed in 32 ms.
09-20 01:39:50.195   311   920 D WificondControl: Scan result ready event
09-20 01:40:19.980  1233  1279 E WifiConfigurator: Wifi failed to connect in 30000 ms
Run Code Online (Sandbox Code Playgroud)

这是我在adb shell中输入的内容

rpi3:/ $ am startservice -n com.google.wifisetup/.WifiSetupService -a WifiSetupService.Connect -e ssid cake
Run Code Online (Sandbox Code Playgroud)

dud*_*dum 8

我还有一些设置Wifi的问题.布伦德尔对我的问题的回答解决了这个问题

网络:如果以太网也连接到没有互联网接入的网络,则Wi-Fi无法连接到互联网.

https://developer.android.com/things/preview/releases.html

我不得不从Pi-3上拔下以太网线,然后连接到我的WiFi


如果您没有在Pi上安装应用程序,您可以通过使用HDMI端口连接外部显示器来观察您的连接状态(显示器可以完成工作).

你应该看到这样的屏幕:在此输入图像描述