Closed ghost closed 1 year ago
must have something to do with https://github.com/albfan/miraclecast/issues/79 :( my rpi3 and so on.. I don't want to shutdown all interfaces just to bring miracast up.. This stuff is kind of hacky :P
Did you test all the gst plugins are installed with:
https://github.com/albfan/miraclecast/blob/master/res/test-viewer.sh
I guess that is the problem
I had everything installed. and tested with http://localhost:1991, when i am back home i send you some logs.
So you can see screen mirroring using other player?
Are you running from a laptop or from a raspberry pi? (doubth from your comments about #79).
Meanwhile #87 is released adding --uibc
to miracle-sinkctl
you can try the gst python viewer implementation
My specs: Nexus 5 (Android 6.0.1) not seeing the device Windows PC sees the device and can connect... Hadware: rpi3 with Benq Screen running on xterm with an xserver.. Will try uibc
I have an archarm with mate desktop (gtk2) vnc ssh and miraclecast ready to go. I'm planning to release it to community.
Are you avaliable as beta tester. (It should work out of the box, but maybe other eyes see things I forgot)
Yes, i would really like to be betatester .. and please send me your PayPal adress, i want to send 20€ to you for your support.. thank you But I need to get it running first on my ArchLinux ARMrapberry tommorw.. i looked a little at the source, maybe I need to set the resolution in sinkctl.. :P
Terrific!
Here is the image
Install with (check your sdcard dev with df -h
)
$ sudo gzip -dc ~/archarm230716.gz | dd bs=4M of=/dev/mmcblk0
More instructions on https://www.raspberrypi.org/forums/viewtopic.php?f=91&t=46911
It must run out of the box
I would use funds in research (I want to explore the touch screen for easy setup raspberry)
If this get traction, my intention is create an individual project to manage requirements and new features (avahi autodiscover, run as a systemd service, support for xbmc, airplay, dlna...)
At this time raspberry has an arch arm distro with mate desktop (gtk2).
user: alarm pass: alarm
it is added to sudoers.
It has ssh and vnc enabled (first tries with creating systemd config services) from boot. You can see what net raspberry gets with: (See 192.168.0 depends on your net)
$ nmap -p 22 --open -sV 192.168.0.0/24
$ nmap -p 5900 --open -sV 192.168.0.0/24
connect through ssh or vnc is a easy way to interact with raspberry pi at this time, but you can always plug raspberry to a monitor and operate with a usb keyboard and mouse.
from that just run miracle-wifid and miracle-sinkctl as usual
$ sudo miracle-wifid
$ sudo miracle-sinkctl
and run the interface it detects
pair your device and see the your screen on vnc, tv or whatever.
If for whatever reason it doesn't work check if wlan0 is not up with
$ ifconfig
and if it does bring it down:
$ sudo ifconfig wlan0 down
For package managing I have added yaourt (a package manager for AUR (Arch linux user repository)). After this great contribution postponed by me long time
https://aur.archlinux.org/packages/miraclecast-git/
To update miraclecast you just need to do:
$ yaourt -S miraclecast
that uses my AUR repo https://aur.archlinux.org/packages/miraclecast/ which is tied to master branch (no edge updates or unstable)
See yaourt is configured to don't ask anything http://kissmyarch.blogspot.com.es/2012/05/two-simple-yaourt-tips.html.
so, i rested with the -uibc flag and it worked kind of.. well, now that it works i want to write a script which sends the network stream to kodi.. hope that works..
Took the a while know kodi is the old good xbmc.
It is an interesting option, feel free to ask anything here or in a new issue. Should be easy to do (when we know where to do it)
Hint: miracast is a simple rtsp video stream
I revive an old post about kodi and miracast
http://forum.kodi.tv/showthread.php?tid=167455&pid=2389125#pid2389125
Let's see if people can provide some help about it.
Wow, great news! Will this run on RPi 2 as well? I'm building Raspberry PI based infotainment add-on for VW stock navigation and i was searching for reliable Miracast solution for such a long time. I'm using https://github.com/codemonkeyricky/piracast at the moment, but it isn't as stable as i want it to be. I'm looking for more stable solution. Did i find it? :)
Luckily enough, the image nowadays is based on arch arm for raspberry pi 2
https://archlinuxarm.org/platforms/armv8/broadcom/raspberry-pi-3
so it should.
Your requirements are interesting so if it works maybe you want to help in create systemd services for running from boot and ease the miraclecast control.
If it didn't work we can create quickly an image for rpi2
Hello albfan, thanks for a quick entry. I cloned your image to a new SD card, but unfortunatelly it didn't boot at all. Not even the colour image on HDMI output at start. When i swapped files on FAT partition from my raspbian SD card, it boots, but i guess it's not a proper way to fix a problem. I've downloaded archlinux package for rpi2 (it's the same as for 3) and swapped files from FAT partition once again. It did'n work neither. Any help appreciated.
Did you follow this steps on a vanilla arch arm image?:
Login as the default user alarm with the password alarm. The default root password is root.
If that works I guess my image should work too. But if it keeps failing, TIMTOWTDI, just installing a couple of packages and tweaking some files you will get it working.
Hello. I didn't follow that, because your image (from google drive) contains whole disk and it's already partitioned. So i was only playing with FAT (boot) partition. Didn't touch second partition at all. OK i will start from clean archarm distro and see if this will work. Thanks.
Yes. It's onky to check if a clean image works and see where's the problem. After my first install I had done a pacman uodate. Maybe that added some specific armv8 (rpi3) stuff (package uodates or new ones) and there's the incompatibility.
As I told before, share a 7,4Gb image is not a solution at all. Downloading vanilla image and using fakeroot should be possible to configure a custom image for any embedded device from a few Kb script
If your test is succesful, that will reveal the necessity for that approach.
Wow, it's working ! Your disk image is allright. Only thing i was missing was an entry in config.txt file with kernel=kernel7.img . My observation (as text-console guy) is that you need to run 'sudo miracle-sinkctl' in gui mode. If you run this in text mode (eg. via ssh) gstreamer will not appear at all. Is this using RPi's hw-acceleration? I guess not. Maybe it would be possible to compile your project on raspbian? Modern raspbian images have systemd onboard and gstreamer with OpenMAX build in (or as a package). I will give it a try on the raspbian since i prefer debian-like systems. Anyways, great project! It's stable as i wanted. I was able to cycle connect-disconnect many times without any issue. When i was playing with piracast it was very hard to make a connection to it. It worked 50/50. Great :+1:
Great contribution!
https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=101122
I will update README.md about that (If you want provide a PR about that)
About gstreamer, as gstreamer starts as a fork of miracle-wifid, it doesn't work on text mode. Some research is needed to fix that.
Raspbian has an old systemd version and seems it doesn't work correctly. Keep an eye on it and don't hesitate to ask here about your progress
Hi there!
I admire you for what you have achieved! I have downloaded the image from google drive and installed it, but when I run "miracle-wifid" I get a warning that say: "wpa_supplicant or driver does not support P2P". Any help please?
@WillemPi3 you need to shutdown existing wpa_supplicant. If it is present is used by miracle-wifid, and normally existing wpa_supplicant is not configured to support p2p_scanning.
$ sudo systemctl stop networkd.service
$ sudo systemctl stop network.target
should be enough. Anyway, check there's no wpa_supplicant running before starting miracle-wifid
with:
$ ps -ef | grep wpa_supplican[t]
and kill it if it is present. There's a helper in res/ directory kill_wpa.sh
. There's an issue opened to resolve this #75, but is a low level technical task, and there's no clear way to solve it (you shouldn't have activate Wifi p2p scanning all the time, is a waste of battery and resources)
Thank you that helped! I've connected my Galaxy S6 to the Pi and it mirrored the screen for maybe 2 seconds and then miraclecast disconnected. I tried to restart the process but it couldn't kill the wpa or restart the connection. I've reinstalled the image and updated miraclecast with yaourt, tried to connect my phone again and this time it didn't even connect. Could it be my phone that is not supported?
This was the output generated in Terminal:
`[alarm@alarmpi res]$ sudo ./show_wpa.sh
[sudo] password for alarm:
[alarm@alarmpi res]$ sudo miracle-wifid &
[1] 5193
[alarm@alarmpi res]$ sudo miracle-sinkctl
[ADD] Link: 3
[miraclectl] # run 3 now running on link 3
[ADD] Peer: ee:9b:f3:a5:d7:f5@3
[PROV] Peer: ee:9b:f3:a5:d7:f5@3 Type: pbc PIN:
[GO NEG] Peer: ee:9b:f3:a5:d7:f5@3 Type: pbc PIN:
[FAIL] Peer: ee:9b:f3:a5:d7:f5@3 Reason: unknown
[miraclectl] # ERROR: supplicant: HUP on supplicant socket of wlan0 (supplicant_global_fn() in wifid-supplicant.c:2145)
ERROR: supplicant: wpas (pid:5197) failed unexpectedly, relaunching after short grace period.. (supplicant_failed() in wifid-supplicant.c:2312)
no longer waiting for peer [Phone] Galaxy S6 (ee:9b:f3:a5:d7:f5@3)
ERROR: cannot change p2p-scanning state on link 3 to 1: Unknown object '/org/freedesktop/miracle/wifi/link/_33'. (ctl_link_set_p2p_scanning() in ctl-wifi.c:671)
[REMOVE] Peer: ee:9b:f3:a5:d7:f5@3
no longer running on link 3
[REMOVE] Link: 3 [miraclectl] # ERROR: supplicant: wpas (pid:5213) failed unexpectedly, relaunching after short grace period.. (supplicant_failed() in wifid-supplicant.c:2312)
ERROR: supplicant: wpas (pid:5214) failed again.. entering grace period, waiting 30s before relaunching (supplicant_failed() in wifid-supplicant.c:2316)
WARNING: supplicant: wpa_supplicant or driver does not support P2P (supplicant_status_fn() in wifid-supplicant.c:1682)
[ADD] Link: 3
[miraclectl] # run 3 WARNING: supplicant: P2P_FIND failed (supplicant_p2p_find_fn() in wifid-supplicant.c:1897)
now running on link 3
[miraclectl] # exit
[miraclectl] # no longer running on link 3 [alarm@alarmpi res]$ ./show_wpa.sh
root 5217 5194 0 14:05 pts/0 00:00:00 /usr/bin/wpa_supplicant -c /run/miracle/wifi/wlan0-3.conf -C /run/miracle/wifi -i wlan0 -g /run/miracle/wifi/wlan0-3.global
[alarm@alarmpi res]$ ./kill-wpa.sh killing existing wpa_supplicant connection
[alarm@alarmpi res]$ ERROR: supplicant: wpas (pid:5217) failed unexpectedly, relaunching after short grace period.. (supplicant_failed() in wifid-supplicant.c:2312)
WARNING: supplicant: wpa_supplicant or driver does not support P2P (supplicant_status_fn() in wifid-supplicant.c:1682) `
It fails on device handshaking, so the problem must be in device handshaking (miracle-wifid log) post it here.
sudo miracle-wifid log
give the following:
ERROR: unparsed remaining arguments starting with: log (parse_argv() in wifid.c:517)
sudo miracle-wifid --log-level trace
is the right command.
[alarm@alarmpi Desktop]$ sudo miracle-wifid --log-level trace [sudo] password for alarm: INFO: miracle-wifid - revision 1.0 Aug 29 2016 07:59:44 DEBUG: friendly-name from local hostname: alarmpi (manager_read_name() in wifid.c:366) DEBUG: link: new link: wlan0 (3) (link_new() in wifid-link.c:71) DEBUG: supplicant: new supplicant for wlan0 (supplicant_new() in wifid-supplicant.c:2087) INFO: link: add link: wlan0 INFO: link: manage link wlan0 DEBUG: supplicant: start supplicant of wlan0 (supplicant_start() in wifid-supplicant.c:2610) DEBUG: supplicant: spawn supplicant of wlan0 (supplicant_spawn() in wifid-supplicant.c:2459) INFO: supplicant: wpa_supplicant found: /usr/bin/wpa_supplicant INFO: supplicant: wpas spawned as pid:581 DEBUG: supplicant: open supplicant of wlan0 (supplicant_open() in wifid-supplicant.c:2250) TRACE: wpa: raw message: OK
TRACE: wpa: raw message: OK
TRACE: wpa: raw message: p2p_device_address=ba:27:eb:12:c8:c6 p2p_state=IDLE wifi_display=1 ifname=p2p-dev-wlan0 address=ba:27:eb:12:c8:c6 ifname=wlan0 address=b8:27:eb:12:c8:c6
DEBUG: supplicant: local p2p-address is: ba:27:eb:12:c8:c6 (supplicant_status_fn() in wifid-supplicant.c:1807) TRACE: wpa: raw message: OK
TRACE: wpa: raw message: OK
TRACE: wpa: raw message: FAIL
TRACE: wpa: raw message: OK
DEBUG: link: link wlan0 started (link_supplicant_started() in wifid-link.c:277) TRACE: wpa: raw message: FAIL
sudo miracle-sinkctl DEBUG: supplicant: send 'WFD_SUBELEM_SET 0 000600111c4400c8' to wpas on wlan0 (supplicant_set_wfd_subelements() in wifid-supplicant.c:1975) TRACE: wpa: raw message: OK
DEBUG: supplicant: sent P2P_FIND to wpas on wlan0 (supplicant_p2p_start_scan() in wifid-supplicant.c:2020) TRACE: wpa: raw message: OK
DEBUG: supplicant: p2p-scanning now active on wlan0 (supplicant_p2p_find_fn() in wifid-supplicant.c:1901) TRACE: wpa: raw message: IFNAME=p2p-dev-wlan0 <3>CTRL-EVENT-SCAN-STARTED TRACE: wpa: raw message: <3>CTRL-EVENT-SCAN-STARTED TRACE: wpa: raw message: <3>P2P-DEVICE-FOUND ee:9b:f3:a5:d7:f5 p2p_dev_addr=ee:9b:f3:a5:d7:f5 pri_dev_type=10-0050F204-5 name='[Phone] Galaxy S6' config_methods=0x188 dev_capab=0x25 group_capab=0x0 wfd_dev_info=0x01101c440032 vendor_elems=1 new=1 TRACE: wpa: raw message: <3>P2P-DEVICE-FOUND ee:9b:f3:a5:d7:f5 p2p_dev_addr=ee:9b:f3:a5:d7:f5 pri_dev_type=10-0050F204-5 name='[Phone] Galaxy S6' config_methods=0x188 dev_capab=0x25 group_capab=0x0 wfd_dev_info=0x01101c440032 vendor_elems=1 new=1 DEBUG: peer: new peer: ee:9b:f3:a5:d7:f5 @ wlan0 (peer_new() in wifid-peer.c:52) INFO: peer: add peer: ee:9b:f3:a5:d7:f5 DEBUG: peer: peer ee:9b:f3:a5:d7:f5 @ wlan0 started (peer_supplicant_started() in wifid-peer.c:162) DEBUG: supplicant: requesting data for new peer ee:9b:f3:a5:d7:f5 (supplicant_event_p2p_device_found() in wifid-supplicant.c:962) TRACE: wpa: raw message: ee:9b:f3:a5:d7:f5 pri_dev_type=10-0050F204-5 device_name=[Phone] Galaxy S6 manufacturer=samsung model_name=SM-G920F model_number=SM-G920F serial_number=1015fafd49493402 config_methods=0x188 dev_capab=0x25 group_capab=0x0 level=-36 age=0 listen_freq=2412 wps_method=not-ready interface_addr=00:00:00:00:00:00 member_in_go_dev=00:00:00:00:00:00 member_in_go_iface=00:00:00:00:00:00 go_neg_req_sent=0 go_state=unknown dialog_token=0 intended_addr=00:00:00:00:00:00 country=ZA oper_freq=0 req_config_methods=0x0 flags=[REPORTED] status=0 invitation_reqs=0 wfd_subelems=00000601101c440032 vendor_elems=dd080000f00f00020100dd080000f00c00000103dd090000f00b04ca1c0000dd1a00904c0408bf0c3258810ffaff0000faff0000c0050001000000dd09001018020000100000
TRACE: wpa: raw message: IFNAME=p2p-dev-wlan0 <3>CTRL-EVENT-SCAN-STARTED TRACE: wpa: raw message: <3>CTRL-EVENT-SCAN-STARTED TRACE: wpa: raw message: IFNAME=p2p-dev-wlan0 <3>CTRL-EVENT-SCAN-STARTED TRACE: wpa: raw message: <3>CTRL-EVENT-SCAN-STARTED TRACE: wpa: raw message: <3>P2P-PROV-DISC-PBC-REQ ee:9b:f3:a5:d7:f5 p2p_dev_addr=ee:9b:f3:a5:d7:f5 pri_dev_type=10-0050F204-5 name='[Phone] Galaxy S6' config_methods=0x188 dev_capab=0x25 group_capab=0x0 TRACE: wpa: raw message: <3>P2P-PROV-DISC-PBC-REQ ee:9b:f3:a5:d7:f5 p2p_dev_addr=ee:9b:f3:a5:d7:f5 pri_dev_type=10-0050F204-5 name='[Phone] Galaxy S6' config_methods=0x188 dev_capab=0x25 group_capab=0x0 TRACE: wpa: raw message: <3>P2P-GO-NEG-REQUEST ee:9b:f3:a5:d7:f5 dev_passwd_id=4 go_intent=14 TRACE: wpa: raw message: <3>P2P-GO-NEG-REQUEST ee:9b:f3:a5:d7:f5 dev_passwd_id=4 go_intent=14 DEBUG: supplicant: GO Negotiation Request from ee:9b:f3:a5:d7:f5 (supplicant_event_p2p_go_neg_request() in wifid-supplicant.c:1065) DEBUG: supplicant: connect to ee:9b:f3:a5:d7:f5 via pbc/(null) (supplicant_peer_connect() in wifid-supplicant.c:739) TRACE: wpa: raw message: <3>P2P-FIND-STOPPED TRACE: wpa: raw message: <3>P2P-FIND-STOPPED DEBUG: supplicant: p2p-scanning stopped on wlan0 (supplicant_event_p2p_find_stopped() in wifid-supplicant.c:904) TRACE: wpa: raw message: OK
TRACE: wpa: raw message: <3>P2P-GO-NEG-SUCCESS role=client freq=2437 ht40=0 peer_dev=ee:9b:f3:a5:d7:f5 peer_iface=ee:9b:f3:a5:57:f5 wps_method=PBC
TRACE: wpa: raw message: <3>P2P-GO-NEG-SUCCESS role=client freq=2437 ht40=0 peer_dev=ee:9b:f3:a5:d7:f5 peer_iface=ee:9b:f3:a5:57:f5 wps_method=PBC
DEBUG: supplicant: set STA-MAC for ee:9b:f3:a5:d7:f5 from
TRACE: wpa: raw message: wifi_display=1 ifname=wlan0 address=b8:27:eb:12:c8:c6
WARNING: supplicant: wpa_supplicant or driver does not support P2P (supplicant_status_fn() in wifid-supplicant.c:1682) TRACE: wpa: raw message: OK
DEBUG: link: link wlan0 started (link_supplicant_started() in wifid-link.c:277) TRACE: wpa: raw message: UNKNOWN COMMAND
DEBUG: supplicant: sent P2P_FIND to wpas on wlan0 (supplicant_p2p_start_scan() in wifid-supplicant.c:2020) TRACE: wpa: raw message: UNKNOWN COMMAND
WARNING: supplicant: P2P_FIND failed (supplicant_p2p_find_fn() in wifid-supplicant.c:1897)
hello, good initiative. would love to know the current status of the project. specifically for rpi3 :) I need to get it working there and do miracast streaming from android phone.
Hi @amit-handa. Look at https://github.com/albfan/miraclecast/wiki/raspberry-pi-3 on wiki faq. Feel free to open new issues if try yourself and get blocked
I suggest to try again from master. There's a fix about wfd_video_formats. Closing by now until more input is provided
First thing is, my Nexsu 5 is not finding the Miracast device, but my Windows 10 Laptop does.. Everything connects fine, but the screen is not showing can you help me quick? :) I am really sorry.. I did everything what was listed in the FAQ