2

I've the following working wpa_supplicant.conf to connect my raspberry pi b+ 3.18.12+ to the wifi:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={  
  ssid="my_wifi_ssid"  
  psk="my_wifi_psk"  
  proto=WPA  
  key_mgmt=WPA-PSK  
  pairwise=TKIP  
  auth_alg=OPEN  
}

Now, I'm trying to configure my raspberry to connect it to an Android hotspot. I believed that the same configuration will works for an Android hotspot but it's not the case.

I then tried a simpler configuration knowing that in most cases wpa_supplicant choose the best configuration:

network={ 
  ssid="my_hotspot_ssid"  
  psk="my_hotspot_psk"  
  key_mgmt=WPA-PSK #I've also tried without this line
}

But nothing works. How can I connect my pi connect to an Android hotspot ?

I don't know if it can help but I've tried these configurations with a Samsung galaxy grand Android 4.4.4 and an Iphone 6. Moreover, this is the content of my /etc/network/interfaces files:

auto lo

iface lo inet loopback
iface eth0 inet dhcp

allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
  • The accepted solution worked for me, but first I had to switch my hotspot network to 2.4GHz instead of 5GHz. – brain_bacon Oct 23 '17 at 7:52
2

Finaly I've found the good configuration for my Android 4.4.4:

network={
  ssid="my_ssid"
  psk="my_passwd"
  proto=RSN
  key_mgmt=WPA-PSK
  pairwise=CCMP
  auth_alg=OPEN
}

It also works for an Iphone 6.

2

The answer's settings worked for me, but I would like to add a simple (incredibly frustrating) alternative: check for a space at the end of your phone's Hotspot name. On a lot of phones, your keyboard (which may be custom, like Swiftkey or Swype) will automatically add a space at the end of a word. This is a totally valid SSID: "hotspot" and "hotspot " are different things.

However, if you run: iwlist scan > network.txt, have a look at the ESSIDs that show up. In my case I saw "Myhotspot ".

You won't notice this on almost any other platform because typically you select the name in a graphical menu and the trailing space will be invisible.

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.