albfan / miraclecast

Connect external monitors to your system via Wifi-Display specification also known as Miracast
Other
3.86k stars 414 forks source link

does this support Group Owner? #491

Open docterling opened 1 year ago

docterling commented 1 year ago

cause i must use my wifi module as p2p and sta the same time in buildroot linux,so i complie my driver to support both,and after insmod the ko,i can see both p2p0 and wlan0,but when my phone connect it report some errors:

**p2p0: Control interface command 'P2P_CONNECT 92:2b:d2:22:fe:7c pbc'
p2p0: Determining shared radio frequencies (max len 1)
p2p0: Shared frequencies (len=0): completed iteration
p2p0: Shared frequencies (len=0): valid for P2P
p2p0: Determining shared radio frequencies (max len 1)
p2p0: Shared frequencies (len=0): completed iteration
p2p0: P2P: num_unused_channels: 1
P2P: Setup freqs: freq=0 num_MCC=1 shared_freqs=0 num_unused=1
P2P: best_freq=0, go=0
P2P: No preferred frequency list available
P2P: Current operating channels are not available for P2P. Try to use another channel
P2P: Own frequency preference: 0 MHz
P2P: Create a new interface p2p-p2p0-0 for the group
nl80211: Create interface iftype 8 (P2P_CLIENT)
Failed to create interface p2p-p2p0-0: -19 (No such device)
P2P: Failed to create new group interface
P2P: Failed to allocate a new interface for the group**

so how to create the "p2p-p2p0-0" device?

and if my driver don't complie with p2p0 interface i works fine as group client.any suggestions?

albfan commented 1 year ago

miracle-dhcp is in charge of manage connections as GO. But it doesn't work. We need some expert able to review that part to fix it.

I tried to find documentation about dhcp to create at least a failed test. Any help appreciate

docterling commented 1 year ago

in src/wifi/wifid.c file,func manager_add_udev_link,why ignored device start with "p2p-"? my realtek driver compile with CONFIG_CONCURRENT_MODE and RTW_P2P_GROUP_INTERFACE=1,it will use virtual p2p-dev-xxx0 devcie,and if i in wpa_cli exec p2p_group_add,it will create another virtual p2p-xxx0-0 device,in this situation,what interface_name in wifid.c should i use?

albfan commented 1 year ago

p2p- is the prefix for any internal interface miraclecast creates, so cannot be the wifi interface to start a wifi direct connection