Posts: 11
Joined: Thu Apr 02, 2015 10:54 am

wpa_supplicant is unable to detect disconnection of hotspot.

Mon May 30, 2016 2:29 pm

Hello everyone,
I am in the trouble with wifi connectivity of rpi with windows hotspot.
I have bought 2 wifi dongle (TP-Link-823wn) and a raspberry pi.
I have configured raspberry pi to be connected to a wifi network having a ssid and my wpa_supplicant.conf file in /etc/wpa_supplicant/wpa_supplicant.conf is as below:

Code: Select all

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

and /etc/network/interfaces file is as:

Code: Select all

auto lo
auto eth0
allow-hotplug eth0
iface lo inet loopback
iface eth0 inet dhcp

auto wlan0
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
Then i am creating the hotspot on my windows system by using netsh commands
netsh wlan set hostednetwork mode=allow ssid=TP02Network key=xxxxxxxx
and starting it using :
netsh wlan start hosted network
also setting it's ip as :
netsh interface ip set address name="MY VIRTUAL WIFI ADAPTER NAME" source=static addr= mask=
It is allowing my Pi to be connected to the hotspot i've created on windows.
When i see the status of wifi using wpa_cli status , it shows the status as Completed.

The main problem is that when i disconnect my hotspot (on windows) using netsh wlan stop hostednetwork then wpa_supplicant on pi is unable to detect this state and showing status as Completed

It is able to detect the disconnection when i remove the hotspot dongle from windows pc manually.
Is this the problem of wpa_supplicant or something else, if anybody have his views then guide me further. I don't know much about wpa_supplicant.
wifiStatusonRpi.JPG (36.44 KiB) Viewed 534 times

Return to “Advanced users”