Is p2p0 a wireless interface for WIFI DIRECT in Android?

when I print all interfaces on my Android device:

03-10 19:50:15.484: I/System.out(22415): lo 03-10 19:50:15.494: I/System.out(22415): upnlink0 03-10 19:50:15.504: I/System.out(22415): svnet0 03-10 19:50:15.504: I/System.out(22415): rmnet0 03-10 19:50:15.514: I/System.out(22415): rmnet1 03-10 19:50:15.524: I/System.out(22415): rmnet2 03-10 19:50:15.534: I/System.out(22415): sit0 03-10 19:50:15.544: I/System.out(22415): ip6tnl0 03-10 19:50:15.554: I/System.out(22415): p2p0 03-10 19:50:15.564: I/System.out(22415): wlan0 

i wounder if p2p0 is the actual interface for WIFI DIRECT? also how to print only the currently used INTERFACES ??

+3
source share
1 answer

Yes, p2p0 is a kind of virtual interface that will be used for Wi-Fi Direct. This (or, apparently, for me) is mutually exclusive using wlan0 to connect to the access point. In other words, it uses the same hardware as wlan0, so you can use wlan0 to connect to the AP, or you can use p2p0 for a peer-to-peer connection.

As for your other question, if you have a terminal open on your phone or (most likely) you have opened the adb shell (Android Debug Bridge), you can send the following command to display the status of all your network interfaces that are UP (connected):

$ ip link | grep "state UP"

+2
source

All Articles