Hi,
I refer to the article (https://community.freescale.com/docs/DOC-94045) to enable Intel iwl4965 WiFi module on our own i.MX6 devices for JB4.3_1.0.0 BSP. The basic wireless functions are OK, but it fails when I enable p2p feature.
The wpa supplicant configurations are below. The only one difference between these two cases is p2p setting (-ip2p0). One can work, but the other doesn't.
[WiFi OK]
service intel_suppl_con /system/bin/intel_wpa_supplicant \
-iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf
class late_start
socket wpa_wlan0 dgram 660 wifi wifi
disabled
oneshot
[WiFi failed]
service intel_suppl_con /system/bin/intel_wpa_supplicant \
-ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf -N \
-iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf
class late_start
socket wpa_wlan0 dgram 660 wifi wifi
disabled
oneshot
Here is my log message.
==================
[WiFi OK]
01-08 01:03:44.730 D/CommandListener( 2239): Setting iface cfg
01-08 01:03:44.730 D/CommandListener( 2239): Trying to bring down wlan0
01-08 01:03:44.760 E/WifiHW ( 2527): wifi_start_supplicant p2p=1
01-08 01:03:44.760 E/WifiHW ( 2527): Wi-Fi will ensure config file exist
01-08 01:03:44.760 D/WifiHW ( 2527): start supplicant cmd=intel_suppl_con
01-08 01:03:44.900 E/WifiHW ( 2527): Unable to open connection to supplicant on "/data/system/wpa_supplicant/wlan0": No such file or directory
01-08 01:03:44.910 I/wpa_supplicant( 2715): rfkill: Cannot open RFKILL control device
01-08 01:03:45.900 E/wpa_supplicant( 2715): Could not get interface wlan0 hwaddr: Not a typewriter
01-08 01:03:45.900 E/WifiConfigStore( 2527): Error parsing configurationjava.io.FileNotFoundException: /data/misc/wifi/ipconfig.txt: open failed: ENOENT (No such file or directory)
01-08 01:03:45.980 E/WifiP2pService( 2527): Unable to change interface settings: java.lang.IllegalStateException: command '11 interface setcfg p2p0 0.0.0.0 0 up' failed with '400 11 Failed to set address (No such device)'
01-08 01:03:45.990 E/WifiHW ( 2527): Unable to open connection to supplicant on "/data/system/wpa_supplicant/p2p0": No such file or directory
01-08 01:03:51.000 E/WifiP2pService( 2527): P2p socket connection failed
[WiFi failed]
01-07 23:22:00.990 D/CommandListener( 2252): Setting iface cfg
01-07 23:22:00.990 D/CommandListener( 2252): Trying to bring down wlan0
01-07 23:22:01.000 E/WifiHW ( 2546): wifi_start_supplicant p2p=1
01-07 23:22:01.000 E/WifiHW ( 2546): Wi-Fi will ensure config file exist
01-07 23:22:01.000 D/WifiHW ( 2546): start supplicant cmd=intel_suppl_con
01-07 23:22:01.030 E/WifiHW ( 2546): Unable to open connection to supplicant on "/data/system/wpa_supplicant/wlan0": No such file or directory
01-07 23:22:01.060 I/wpa_supplicant( 2653): Successfully initialized wpa_supplicant
01-07 23:22:01.060 I/wpa_supplicant( 2653): rfkill: Cannot open RFKILL control device
01-07 23:22:01.060 E/wpa_supplicant( 2653): nl80211: Could not configure driver to use managed mode
01-07 23:22:01.060 E/wpa_supplicant( 2653): Could not read interface p2p0 flags: No such device
01-07 23:22:01.060 E/wpa_supplicant( 2653): p2p0: Failed to initialize driver interface
01-07 23:22:02.030 E/WifiHW ( 2546): Supplicant not running, cannot connect
01-07 23:22:06.040 E/WifiHW ( 2546): Supplicant not running, cannot connect
01-07 23:22:06.040 E/WifiStateMachine( 2546): Failed to setup control channel, restart supplicant
==================
This issue is similar with the discussion thread below. No p2p device node is generated. However, it still cannot work after I tried the methods in the thread. (howto - Linux Wireless & 802.11: Part 1: P2P aka WiFi Direct - Introduction and Configuration of wpa_supplicant in Linux kern...)
https://community.freescale.com/thread/315617
Please help me to enable WiFi p2p function for miracast. Thanks!
Best regards,
Daniel
Hi,
1. When enable wifi in the "settings" you can use "netcfg" on the uart console to check whether there is p2p interface besides wlan0.
2. From the logcat there is no “p2p0" interface for HAL layer to open.
3. I don't use 4965. But it seems use the iwlegacy which doesn't support p2p0.
BRs
Hi Haoran,
Thanks for reply. Yes. I can not see p2p interface in netcfg.
From you suggestion # 3, I will try to change the kernel driver from iwlegacy to iwlwifi firstly.
Indeed, it shows a p2p kconfig in iwlwifi driver.
config IWL_P2P
bool "iwlwifi experimental P2P support"
depends on IWLAGN
help
This option enables experimental P2P support for some devices
based on microcode support. Since P2P support is still under
development, this option may even enable it for some devices
now that turn out to not support it in the future due to
microcode restrictions.
To determine if your microcode supports the experimental P2P
offered by this option, check if the driver advertises AP
support when it is loaded.
Say Y only if you want to experiment with P2P.
Thanks,
Daniel
Hi Daniel,
One more thing is JB 4.3 BSP support Atheros AR6003 series SDIO wifi module which has Miracast support in driver.
If you are trying to enable Miracast Sink for JB4.3 the wifi driver should support it.
BRs
Haoran