当调试android系统p2p时,发现系统wifi直连扫描不出wifi,可以查看内核,先查看是否p2p interface 有创建,
Line 851: [ 17.894313] Driver: 1.579.77.41.11 (r)\x0a Firmware: wl0: Oct 8 2016 15:31:47 version 7.46.57.4.ap.r4 (A1 Station/P2P) FWID 01-3621395e es6.c5.n4.a3\x0a CLM: 7.11.15
Line 884: [ 18.297916] P2P interface registered
Line 885: [ 18.297933] wl_cfgp2p_add_p2p_disc_if: wdev: ffffffc012036200, wdev->net: (null)
Line 885: [ 18.297933] wl_cfgp2p_add_p2p_disc_if: wdev: ffffffc012036200, wdev->net: (null)
Line 887: [ 18.354207] P2P interface started
Line 999: [ 24.365778] CFG80211-ERROR) wl_cfgp2p_down : Clean up the p2p discovery IF
Line 999: [ 24.365778] CFG80211-ERROR) wl_cfgp2p_down : Clean up the p2p discovery IF
Line 1000: [ 24.365793] wl_cfgp2p_del_p2p_disc_if: wdev: ffffffc012036200, wdev->net: (null)
Line 1000: [ 24.365793] wl_cfgp2p_del_p2p_disc_if: wdev: ffffffc012036200, wdev->net: (null)
Line 1001: [ 24.367585] CFGP2P-ERROR) wl_cfgp2p_disable_discovery : do nothing, not initialized
Line 1001: [ 24.367585] CFGP2P-ERROR) wl_cfgp2p_disable_discovery : do nothing, not initialized
Line 1002: [ 24.367598] Exit. P2P interface stopped
Line 1003: [ 24.397617] P2P interface unregistered
Line 1004: [ 24.397641] CFGP2P-ERROR) wl_cfgp2p_deinit_priv : In
Line 1004: [ 24.397641] CFGP2P-ERROR) wl_cfgp2p_deinit_priv : In
Line 1092: [ 26.312738] Driver: 1.579.77.41.11 (r)\x0a Firmware: wl0: Oct 8 2016 15:31:47 version 7.46.57.4.ap.r4 (A1 Station/P2P) FWID 01-3621395e es6.c5.n4.a3\x0a CLM: 7.11.15
Line 1265: [ 465.667659] CFGP2P-ERROR) wl_cfgp2p_disable_discovery : do nothing, not initialized
Line 1265: [ 465.667659] CFGP2P-ERROR) wl_cfgp2p_disable_discovery : do nothing, not initialized
Line 1266: [ 465.667699] CFGP2P-ERROR) wl_cfgp2p_deinit_priv : In
Line 1266: [ 465.667699] CFGP2P-ERROR) wl_cfgp2p_deinit_priv : In
Line 1496: [ 469.293586] Driver: 1.579.77.41.11 (r)\x0a Firmware: wl0: Oct 8 2016 15:31:47 version 7.46.57.4.ap.r4 (A1 Station/P2P) FWID 01-3621395e es6.c5.n4.a3\x0a CLM: 7.11.15
Line 1524: [ 469.577664] P2P interface registered
如果没有相关p2p接口创建,可以查看/vendor/etc/wifi/p2p_supplicant_overlay.conf,把no_ctrl_interface= 这段代码删除,即可强制创建p2p节点。