1

I've been trying to connect my raspberry pi3 running android things to my wifi.

Using the command:

am startservice \
    -n com.google.wifisetup/.WifiSetupService \
    -a WifiSetupService.Connect \
    -e ssid YOURWIFINAME \
    -e passphrase YOURWIFIPASSWORD

These are the logs after the connection is initiated, untill the error:

11-05 06:54:20.992 1233-1233/? D/WifiSetupService: onCreate
11-05 06:54:21.027 1233-1233/? D/WifiSetupService: onStartCommand(Intent { act=WifiSetupService.Connect cmp=com.google.wifisetup/.WifiSetupService (has extras) })
11-05 06:54:21.028 1233-1233/? I/WifiConfigurator: Connecting to network with SSID "OnePlus3"
11-05 06:54:21.032 1233-1250/? W/WifiManager: com.google.wifisetup attempted call to setWifiApEnabled: enabled = false
11-05 06:54:21.033 317-542/system_process D/WifiService: setWifiEnabled: true pid=1233, uid=1000, package=com.google.wifisetup
11-05 06:54:21.035 1233-1233/? V/WifiWatcher: Network state changed to DISCONNECTED
11-05 06:54:21.048 1233-1250/? D/WifiConfigurator: Updating existing network 0
11-05 06:54:21.050 317-328/system_process I/addOrUpdateNetwork:  uid = 1000 SSID null nid=0
11-05 06:54:21.104 317-386/system_process D/WifiConfigStore: Writing to stores completed in 47 ms.
11-05 06:54:21.105 317-386/system_process D/WifiStateMachine: connectToUserSelectNetwork netId 0, uid 1000, forceReconnect = false
11-05 06:54:21.156 317-386/system_process D/WifiConfigStore: Writing to stores completed in 46 ms.
11-05 06:54:21.575 317-329/system_process D/WificondControl: Scan result ready event
11-05 06:54:29.209 317-327/system_process I/zygote: Background concurrent copying GC freed 41194(1934KB) AllocSpace objects, 9(180KB) LOS objects, 42% free, 4MB/8MB, paused 505us total 150.687ms
11-05 06:54:44.139 317-331/system_process E/memtrack: Couldn't load memtrack module
11-05 06:54:44.139 317-331/system_process W/android.os.Debug: failed to get memory consumption info: -1
11-05 06:54:51.187 1233-1250/com.google.wifisetup E/WifiConfigurator: Wifi failed to connect in 30000 ms

I have checked my password, and ssid. I know that they are case sensitive so that's not the issue. I have also tried it on different networks; using my phone as a hotspot and the wireless router in my house. No luck..

Running ifconfig results in the following:

wlan0     Link encap:Ethernet  HWaddr b8:27:eb:8a:1d:30  Driver brcmfmac_sdio
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:41 errors:0 dropped:41 overruns:0 frame:0 
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 
          collisions:0 txqueuelen:1000 
          RX bytes:19216 TX bytes:0 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0 
          inet6 addr: ::1/128 Scope: Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:19 errors:0 dropped:0 overruns:0 frame:0 
          TX packets:19 errors:0 dropped:0 overruns:0 carrier:0 
          collisions:0 txqueuelen:1 
          RX bytes:2242 TX bytes:2242 

eth0      Link encap:Ethernet  HWaddr b8:27:eb:df:48:65  Driver smsc95xx
          inet addr:192.168.1.100  Bcast:192.168.1.255  Mask:255.255.255.0 
          inet6 addr: fe80::ba27:ebff:fedf:4865/64 Scope: Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:954 errors:0 dropped:0 overruns:0 frame:0 
          TX packets:1107 errors:0 dropped:0 overruns:0 carrier:0 
          collisions:0 txqueuelen:1000 
          RX bytes:284187 TX bytes:509953 

I have also reflashed the image to the sd car.

Running : am startservice \ -n com.google.wifisetup/.WifiSetupService \ -a WifiSetupService.Reset

results in :

11-05 07:16:40.461 1233-1233/com.google.wifisetup D/WifiSetupService: onStartCommand(Intent { act=WifiSetupService.Reset cmp=com.google.wifisetup/.WifiSetupService })
11-05 07:16:40.461 1233-1233/com.google.wifisetup I/WifiConfigurator: Disabling access point
11-05 07:16:40.461 1233-1233/com.google.wifisetup W/WifiManager: com.google.wifisetup attempted call to setWifiApEnabled: enabled = false
11-05 07:16:40.461 1233-1233/com.google.wifisetup E/WifiConfigurator: Failed to disable access point
11-05 07:16:40.461 1233-1233/com.google.wifisetup I/WifiConfigurator: Clearing configurations
11-05 07:16:40.515 317-386/system_process D/WifiConfigStore: Writing to stores completed in 48 ms.
11-05 07:16:40.565 317-386/system_process D/WifiConfigStore: Writing to stores completed in 49 ms.
11-05 07:16:40.566 1233-1233/com.google.wifisetup I/WifiConfigurator: Disconnecting from network
11-05 07:16:40.570 428-428/? E/wpa_supplicant: nl80211: Failed to open /proc/sys/net/ipv4/conf/wlan0/drop_unicast_in_l2_multicast: No such file or directory
11-05 07:16:40.570 428-428/? E/wpa_supplicant: nl80211: Failed to set IPv4 unicast in multicast filter

If anyone has any ideas, please share.. I'm running out of ideas to fix this

2

I finally found a solution to the problem. It was a combination of multiple issues.

To anyone struggling with the same issue, here is what solved it for me:

First of all, reset all the previous wifi connections by calling:

adb shell am startservice -n com.google.wifisetup/.WifiSetupService -a WifiSetupService.Reset

Then run the command to set the wifi connection: (in my case, the wifi SSID was "De Buurman" and password was "test1234")

the important thing here, is to use " around your password and ssid

which makes the connection command look like this:

adb shell am startservice -n com.google.wifisetup/.WifiSetupService -a WifiSetupService.Connect -e ssid "De\ Buurman" -e passphrase "test1234"

Note that the connection still has not changed and you still receive the error that the connection failed.

Now, unplug the raspberry pi from it's power source, and remove your ethernet connection from the pi. Then plug the pi back into it's power source and when it boots, you should be connected to your network wirelessly, as stated in this answer

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.