I'm able to start wpa_supplicant service to surf the Internet by browser without starting p2p_supplicant service in init.rc. However if I add p2p_supplicant service and android.hardware.wifi.direct to start p2p_supplicant service, the following error occurs. At the same time, wpa_supplicant service can't start too. It seems there's conflict, can anyone help please?
I/wpa_supplicant( 935): nl80211: Driver does not support authentication/association or connect commands
E/wpa_supplicant( 935): Could not read interface p2p0 flags: No such device
E/wpa_supplicant( 935): p2p0: Failed to initialize driver interface
E/wpa_supplicant( 935): Failed to add interface p2p0
In init.rc,
service p2p_supplicant /system/bin/wpa_supplicant \
-iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
-I/system/etc/wifi/p2p_supplicant_advance_overlay.conf -N \
-ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf \
-I/system/etc/wifi/wpa_supplicant_overlay.conf \
-O/data/misc/wifi/sockets -puse_p2p_group_interface=1 \
-e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
class main
socket wpa_wlan0 dgram 660 wifi wifi
disabled
oneshot
Original Attachment has been moved to: logcat-20150929.txt.zip
Hi Jackie,
That is due to the fact the p2p0 interface is not created when p2p_supplicant is called. The driver has a parameter p2pon which allows to force the creation of this interface:
linux-imx6/dhd_linux.c at boundary-imx-kk4.4.3_2.0.0-ga · boundarydevices/linux-imx6 · GitHub
It requires to have CONFIG_BRCMDBG in your kernel configuration. Then you can tell the WiFi HAL to pass the p2pon=1 argument when loading the module as done in the link below.
Hope this helps.
Regards,
Gary
Hi Gary,
I'll try it, thanks,
Jackie