Title: wpa_supplicant.conf for android hotspot
Tags: wifi;wireless
Question: 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
Comment: The accepted solution worked for me, but first I had to switch my hotspot network to 2.4GHz instead of 5GHz.

Here is the accepted answer: 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.

Here is another answer: 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 &gt; 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.

{'source': 'StackExchangeDataset', 'subset': 'raspberrypi.stackexchange.com', 'metadata': {'AnswerCount': 2, 'CommentCount': 1, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2015:00:05/05/15', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<wifi><wireless>', 'Title': 'wpa_supplicant.conf for android hotspot', 'ViewCount': 8607, 'id': 30236, 'user_AboutMe': None, 'user_AccountId': 2850073.0, 'user_DisplayName': 'Jérémy Pouyet', 'user_Reputation': 153.0, 'user_Views': 13.0, 'user_id': 29554.0}}