albfan / miraclecast

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

Issues on archlinux, P2P not supported according to wpa_supplicant #452

Closed mrchainman closed 1 year ago

mrchainman commented 1 year ago

I am running arch-linux with iwd and systemd-networkd. I excluded the my external usb wifi dongle from being managed by networkd and then configured it according to the wiki:

╰─λ sudo miracle-wifid --lazy-managed &

✦  ╰─λ sudo miracle-sinkctl 
[ADD] Link: 8
[ADD] Link: 9
[miraclectl] # list
  LINK INTERFACE                FRIENDLY-NAME                  MANAGED   
     8 wlan0                    <unknown>                      no        
     9 wlan1                    <unknown>                      no        

  LINK PEER-ID                  FRIENDLY-NAME                  CONNECTED 

 0 peers and 2 links listed.
[miraclectl] # set-managed 9 yes
[miraclectl] # WARNING: supplicant: wpa_supplicant or driver does not support P2P (supplicant_status_fn() in wifid-supplicant.c:1705)
[miraclectl] # 

although it says that there is no support for P2P, I am sure both my adapters support it, as shown by iw dev:

✦  ╰─λ iw list | grep P2P
        * P2P-client: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
        * P2P-GO: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
        * P2P-client: 0x40 0xd0
        * P2P-GO: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
        * P2P-client: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
        * P2P-GO: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
        * P2P-device: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
        * P2P-client: 0x40 0xd0
        * P2P-GO: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
        * P2P-device: 0x40 0xd0
albfan commented 1 year ago

Default config for wpa_supplicant do not enable P2P.

You need miracle-wifid to spawn a new wpa_supplicant with right configuration

mrchainman commented 1 year ago

Thats what I am doing here: ╰─λ sudo miracle-wifid --lazy-managed & Are extra steps required?

albfan commented 1 year ago

If you don't kill whatever is spawning wpa_supplicant, miraclecast just reuse that process, with wrong config

mrchainman commented 1 year ago

Since I don't use wpa_supplicant there are no other wpa_supplicant processes, also checked with ps aux | grpe wpa

albfan commented 1 year ago

if you don't have wpa_supplicant I expect this error on trying to setup miracle-wifid

https://github.com/albfan/miraclecast/blob/master/src/wifi/wifid-supplicant.c#L2494

miraclecast depends on wpa_supplicant

mrchainman commented 1 year ago

Its installed, but not running

albfan commented 1 year ago

please attach logs for support as wiki say in FAQ, it should show there what's going on

albfan commented 1 year ago

Closed until logs for support are provided