【问题标题】:Android Things - Raspberry Pi Fails to Connect to WifiAndroid Things - Raspberry Pi 无法连接到 Wifi
【发布时间】:2023-03-13 09:30:02
【问题描述】:

有一些问题有类似的问题,但没有一个解决方案有帮助。我正在尝试将 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

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

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

【问题讨论】:

    标签: android wifi raspberry-pi3 android-things


    【解决方案1】:

    我在设置 Wifi 时也遇到了一些问题。 Blundell 对我的question 的回答解决了这些问题

    网络:如果同时有以太网,则 Wi-Fi 无法连接到互联网 连接到无法访问互联网的网络。

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

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


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

    你应该会看到这样的屏幕:

    【讨论】:

    • 是的,但是在拔下以太网电缆后,您是如何发现 IP 地址的?
    • 最简单的方法:你可以通过hdmi连接你的树莓派到显示器
    • 做到了!谢谢...在文档中不要提及如此荒谬的事情。
    • 这个技巧也适用于 NXP i.MX7D Android Things 开发套件。谢谢!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-04-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-12-08
    • 1970-01-01
    相关资源
    最近更新 更多