AnsweredAssumed Answered

virtual p2p interface creation for android UI

Question asked by Ankur Rahi on Dec 1, 2015
Latest reply on Dec 9, 2015 by Victor Linnik

Hi all,

 

I'm using Ralink WiFi chip fr Wifi bringup. The respective driver support to create "waln0" interface and not virtual interface "p2p0" interface and when i enable Wifi from Android UI, it fails to communicate detect p2p0 interface.

root@sabresd_6dq:/ # netcfg

lo   UP                               127.0.0.1/8   0x00000049 00:00:00:00:00:00
eth0 UP                                 0.0.0.0/0   0x00001043 00:04:9f:02:cd:dd
wlan0DOWN                               0.0.0.0/0   0x00001002 7c:dd:90:85:c8:29

 

I created the virtual p2p0 interface with command-

     iw wlan0 interface add p2p0 type managed

root@sabresd_6dq:/ # netcfg                                              
lo   UP                               127.0.0.1/8   0x00000049 00:00:00:00:00:00
eth0 UP                                 0.0.0.0/0   0x00001043 00:04:9f:02:cd:dd
p2p0 DOWN                               0.0.0.0/0   0x00001002 7c:dd:90:85:c8:29
wlan0DOWN                               0.0.0.0/0   0x00001002 7c:dd:90:85:c8:29

 

Both p2p0 and wlan0 share same MAC address, but it fails to start p2p0

-----------------------------------------------------------------------------------------------

E/wpa_supplicant( 3201): nl80211: Register frame match - hexdump(len=2): 0a 07

E/wpa_supplicant( 3201): Could not set interface p2p0 flags (UP): Name not unique on network

E/wpa_supplicant( 3201): nl80211: Could not set interface 'p2p0' UP

E/wpa_supplicant( 3201): nl80211: Set mode ifindex 8 iftype 2 (STATION)

E/wpa_supplicant( 3201): nl80211: Unsubscribe mgmt frames handle 0x41a470e0 (mode change)

E/wpa_supplicant( 3201): p2p0: Failed to initialize driver interface

E/wpa_supplicant( 3201): Failed to add interface p2p0

E/wpa_supplicant( 3201): p2p0: Cancelling authentication timeout

I/wpa_supplicant( 3201): wpa_driver_set_ap_wps_p2p_ie: Entry

E/wpa_supplicant( 3201): wlan0: Removing interface wlan0

E/wpa_supplicant( 3201): wlan0: No keys have been configured - skip key clearing

E/wpa_supplicant( 3201): wlan0: State: DISCONNECTED -> DISCONNECTED

E/wpa_supplicant( 3201): wpa_driver_nl80211_set_operstate: operstate 0->0 (DORMANT)

E/wpa_supplicant( 3201): wlan0: No keys have been configured - skip key clearing

E/wpa_supplicant( 3201): wlan0: Cancelling authentication timeout

E/wpa_supplicant( 3201): nl80211: Set mode ifindex 7 iftype 2 (STATION)

E/wpa_supplicant( 3201): nl80211: Unsubscribe mgmt frames handle 0x41a37f28 (mode change)

I/wpa_supplicant( 3201): wlan0: CTRL-EVENT-TERMINATING

-------------------------------------------------------------------------------------------------

I modified the MAC address with-

ip link set dev p2p0 address 00:dd:90:85:c8:29

 

p2p0 DOWN                               0.0.0.0/0   0x00001002 00:dd:90:85:c8:29
wlan0DOWN                              

0.0.0.0/0   0x00001002 7c:dd:90:85:c8:29

 

even though it is not connecting

--------------------------------------------------------------------------------------

D/wpa_supplicant( 2839): wpa_supplicant v2.1-devel-4.4.2

D/wpa_supplicant( 2839): random: Trying to read entropy from /dev/random

I/wpa_supplicant( 2839): Successfully initialized wpa_supplicant

D/wpa_supplicant( 2839): Initializing interface 'wlan0' conf '/data/misc/wifi/wpa_supplicant.conf' driver 'nl80211' ctrl_interface 'N/A' bridge ''

D/wpa_supplicant( 2839): Configuration file '/data/misc/wifi/wpa_supplicant.conf' -> '/data/misc/wifi/wpa_supplicant.conf'

D/wpa_supplicant( 2839): Reading configuration file '/data/misc/wifi/wpa_supplicant.conf'

D/wpa_supplicant( 2839): update_config=1

D/wpa_supplicant( 2839): ctrl_interface='wlan0'

D/wpa_supplicant( 2839): eapol_version=1

D/wpa_supplicant( 2839): ap_scan=1

D/wpa_supplicant( 2839): fast_reauth=1

D/wpa_supplicant( 2839): config_methods='virtual_push_button physical_display keypad'

D/wpa_supplicant( 2839): persistent_reconnect=1

I/wpa_supplicant( 2839): rfkill: Cannot open RFKILL control device

D/wpa_supplicant( 2839): nl80211: RFKILL status not available

D/wpa_supplicant( 2839): netlink: Operstate: linkmode=0, operstate=6

E/wpa_supplicant( 2839): Could not read interface wlan0 flags: No such device

D/wpa_supplicant( 2839): nl80211: Set mode ifindex 0 iftype 2 (STATION)

D/wpa_supplicant( 2839): nl80211: Failed to set interface 0 to mode 2: -19 (No such device)

E/wpa_supplicant( 2839): wlan0: Failed to initialize driver interface

D/wpa_supplicant( 2839): Failed to add interface wlan0

D/wpa_supplicant( 2839): wlan0: Cancelling scan request

D/wpa_supplicant( 2839): wlan0: P2P: Station mode scan operation not pending anymore (sta_scan_pending=0 p2p_cb_on_scan_complete=0)

D/wpa_supplicant( 2839): wlan0: Cancelling authentication timeout

-------------------------------------------------------------------------------------------

 

I am not able to find p2p0 interface in /data/system/wpa_supplicant/wlan0 p2p0

 

 

Appreciate any help.

 

Thanks

Ankur Rahi

Outcomes