Android Things - Raspberry Pi无法连接到Wifi

时间:2017-09-20 01:49:04

标签: android wifi raspberry-pi3 android-things

有一些问题存在类似问题,但没有一个解决方案有帮助。我正在尝试将Android Things Raspberry Pi连接到Wifi。我的2.4 GHz wifi ssid是' cake'我甚至删除了密码,看看是否有帮助。以下是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

以下是我在adb shell中输入的内容

rpi3:/ $ am startservice -n com.google.wifisetup/.WifiSetupService -a WifiSetupService.Connect -e ssid cake

1 个答案:

答案 0 :(得分:8)

我还有一些设置Wifi的问题。 Blundell对我question的回答解决了问题

  

网络:如果以太网也无法连接到互联网   连接到没有互联网接入的网络。

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

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

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

您应该看到如下屏幕:enter image description here