[英]Android Things: connect to WiFi without cables
How to connect to WiFi my Raspberry Pi 3 with Android Things version 0.5.1. 如何使用Android Things版本0.5.1连接到我的Raspberry Pi 3 WiFi 。 I've mounted SD card and current the /misc/wifi directory is
我已经安装了SD卡,当前的/ misc / wifi目录是
wifi> ls
drwxrwx--- 2 1010 1010 4096 1970-01-01 hostapd
drwxrwx--- 2 1010 1010 4096 1970-01-01 sockets
-rw------- 1 jacek jacek 46 2009-01-01 softap.conf
-rw------- 1 jacek jacek 236 2009-01-01 WifiConfigStore.xml
drwxrwx--- 2 1010 1010 4096 10-29 15:09 wpa_supplicant
where the wpa_supplicant
, hostapd
, sockets
directories are empty. wpa_supplicant
, hostapd
, sockets
目录为空。
According to this answer https://stackoverflow.com/a/41732035 there should be a file wpa_supplicant.conf
. 根据这个答案https://stackoverflow.com/a/41732035应该有一个文件
wpa_supplicant.conf
。
I dont't have any cables so this is my last chance to get it working. 我没有任何电缆,所以这是我最后一次运行它的机会。
I think WiFi configuration is stored in WifiConfigStore.xml
, but I dont't know what fields I should add. 我认为WiFi配置存储在
WifiConfigStore.xml
,但是我不知道应该添加哪些字段。
Contents of WifiConfigStoreData.xml
is: WifiConfigStoreData.xml
内容为:
<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
<WifiConfigStoreData>
<int name="Version" value="1" />
<NetworkList />
<PasspointConfigData>
<long name="ProviderIndex" value="0" />
</PasspointConfigData>
</WifiConfigStoreData>
If you've never executed adb shell am startservice -n com.google.wifisetup...
within your RPi3
's shell
then the /misc/wifi/wpa_supplicant
directory is empty. 如果您从未在
RPi3
的shell
执行过adb shell am startservice -n com.google.wifisetup...
则/misc/wifi/wpa_supplicant
目录为空。
Simply creating a wpa_supplicant.conf
file in the mounted on your host machine SD card isn't enough as the file, similar to the /misc/wifi/wpa_supplicant
directory, should be own
ed and group
ed by the system service's process which is 1010
in your ls
command result: 仅在已安装到主机SD卡上的主机中创建
wpa_supplicant.conf
文件是不够的,因为该文件(类似于/misc/wifi/wpa_supplicant
目录)应该由系统服务进程1010
own
并group
在您的ls
命令结果中:
drwxrwx--- 2 1010 1010 4096 10-29 15:09 wpa_supplicant
Yet I recommend to connect your RPi3 either over Ethernet or USB-to-TTL cable . 但是我建议通过以太网或USB-to-TTL电缆连接RPi3 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.