Facing an error while connecting to WiFi using WiFiClient service


#1

Hi

I have created one sample app to connect to WiFi , For this I am using USB WiFi Adaptor of Realtek
In code,
first I have started WiFi client service and then event handler as per the sample code and then tried to get the AP
then I have created ssid by giving ssid name and password as a parameter to api and called api for wifi connection.

In logs , the ssid get created but not getting connected to it.
It gives error as follows :

Jun 13 10:29:50 |  INFO | wifiService[532] |     WIFICLIENT_CONNECT_SECURITY_WPA2_PSK_PERSONAL mode
Jun 13 10:29:50 |  INFO | wifiService[532] | wpa_supplicant v2.1-devel random: Trying to read entropy from /dev/random Successfully initialized wpa_supplicant Initializing interface 'wlan0' conf '/tmp/wpa_supplicant.conf' driver 'nl80211' ctrl_i
Jun 13 10:29:50 |  INFO | wifiService[532] | _supplicant.conf' -> '/tmp/wpa_supplicant.conf' Reading configuration file '/tmp/wpa_supplicant.conf' update_config=1 ctrl_interface='/var/run/wpa_supplicant' eapol_version=1 ap_scan=1 fast_reauth=1 d
Jun 13 10:29:50 |  INFO | wifiService[532] |  model_number='wl18xx' serial_number='12345' driver_param='use_multi_chan_concurrent=1 use_p2p_group_interface=1' p2p_go_max_inactivity=60 p2p_go_ht40=1 disassoc_low_ack=1 concurrent_sched_scan=1 p2p_
Jun 13 10:29:50 |  INFO | wifiService[532] | button keypad' Priority group 0    id=0 ssid='Connect' Could not read interface wlan0 flags: No such device nl80211: Driver does not support authentication/association or connect commands nl80211: Rem
Jun 13 10:29:50 |  INFO | wifiService[532] | nkmode=0, operstate=6 Could not read interface wlan0 flags: No such device nl80211: Set mode ifindex 0 iftype 2 (STATION) nl80211: Failed to set interface 0 to mode 2: -19 (No such device) wlan0: Fail
Jun 13 10:29:50 |  INFO | wifiService[532] | e wlan0 wlan0: Cancelling scan request wlan0: P2P: Station mode scan operation not pending anymore (sta_scan_pending=0 p2p_cb_on_scan_complete=0) wlan0: Cancelling authentication timeout wlan0: cancel
Jun 13 10:29:50 | wifiService[532]/daemon T=main | pa_wifi_client_ti.c pa_wifiClient_Connect() 932 | WiFi Client Command /legato/systems/current/apps/wifiService/read-only/pa_wifi.sh wlan0 WIFICLIENT_CONNECT_SECURITY_WPA2_PSK_PERSONAL "% 

Is there any problem regarding device driver installation ? OR
any problem related to WIFICLIENT_CONNECT_SECURITY_WPA2_PSK_PERSONAL

and also I have tried normal commands in command prompt as
wifi client start and wifi client scan
it gave me error as

root@swi-mdm9x15:~# wifi client scan
starting scan.
DEBUG: le_wifiClient_GetFirstAccessPoint ERROR

Kindly give solution if anyone knows this issue. I have stuck with it.


#2

Hi,

In the case if you are using USB Wifi dongle you can follow the instructions in the below link to use the wifi service:

kindly check if you have installed the USB wifi dongle drivers correctly.

the wifi client service is supposed to be used with the Adaptor card. so obviously it gives error.

Thanks & Regards,

Pankaj