albfan / miraclecast

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

Cannot find pc sink in my android phone #290

Open hechengjie opened 6 years ago

hechengjie commented 6 years ago
hcj@hcj-OptiPlex-380:~$ sudo miracle-wifid &
[1] 1901
hcj@hcj-OptiPlex-380:~$ sudo miracle-sinkctl 
[ADD] Link: 3
[miraclectl] # run 3
now running on link 3
[ADD] Peer: 3a:aa:3c:c2:75:a7@3

i open my android phone to "screen mirroring" fun, and it cannot find any available devices. but miracle-sinkctl can find the peer of the phone. Do I need set something for wpa_supplicant?

albfan commented 6 years ago

If miracle-sinkctl find a peer everything seems to work on

See the wiki to provide logs for support https://github.com/albfan/miraclecast/wiki/FAQ#log-for-support

albfan commented 6 years ago

Feel free to reopen issue if you collect and upload the logs

hechengjie commented 6 years ago

I think the problem is my wifi usb device. So i try to connect the ubuntu to my android phone by p2p_connect, and get go neg fail. My wifi usb device is rtl8192eu, so i use the rtl-wpa_supplicant which is modify by rtl. Then the go neg is success, but i get CTRL-EVENT-EAP-FAILURE...... Maybe it is not a problem. This is my p2p-connect log. wpa_supplicant.log

albfan commented 6 years ago

Just can recommend to try several times. It is known that Miracast handshaking just fails sometimes. Switching on/off WiFi on both devices could help before try again

hechengjie commented 6 years ago

I try again, it seem connect success. but i cannot see video....

wifid.log sink.log

then i use vlc open a windows

hcj@hcj-OptiPlex-380:~/work/miraclecast/res$ vlc rtp://@:1991
VLC media player 2.2.2 Weatherwax (revision 2.2.2-0-g6259d80)
[00000000009bae38] core interface error: no suitable interface module
[00000000008ac098] core libvlc error: interface "globalhotkeys,none" initialization failed
[00000000009bae38] dbus interface error: Failed to connect to the D-Bus session daemon: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
[00000000009bae38] core interface error: no suitable interface module
[00000000008ac098] core libvlc error: interface "dbus,none" initialization failed
[00000000008ac098] core libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
[00000000009bae38] qt4 interface error: Could not connect to X server
[00000000009bae38] skins2 interface error: cannot initialize OSFactory
[00000000009bae38] [cli] lua interface: Listening on host "*console".
VLC media player 2.2.2 Weatherwax
Command Line Interface initialized. Type `help' for help.
> 

no video! please help me check.

albfan commented 6 years ago

All seems correct. Maybe the problem would be seen in journalctl.log. What's your environment (OS and version)

Further checks you can do:

https://github.com/albfan/miraclecast/blob/master/res/test-viewer.sh

After that something like

gst-launch-1.0 -v videotestsrc pattern=snow ! video/x-raw,width=1280,height=720 ! autovideosink

should work.

echo $XDG_SESSION_TYPE 
wayland

if you're under wayland https://github.com/albfan/miraclecast/issues/183#issuecomment-291012571 should help