kp007
Posts: 1
Joined: Wed Sep 24, 2014 11:12 am

Re: Piracast (Miracast on Pi) Beta Release

Wed Sep 24, 2014 11:17 am

First of thanks a lot for your Efforts.
i am trying to connect to pisaast app running at my Raspberry. i am using my Xiami mi3 i have tried Nexus 5 and Sory Xperia Z1 also every time i am getting the same error as below.

==========================================================================
Discovery request received!
wlan0 Scan completed :
Cell 01 - Address: 66:09:80:CE:BA:17
ESSID:"DIRECT-"
Protocol:IEEE 802.11g
Frequency:2.462 GHz (Channel 11)
Encryption key:on
Bit Rates:54 Mb/s
IE: Unknown: DD800050F204104A0001101044000101101200020004103B00010010470010D82353B94C5C5D7F9C287BDED001E427102100065869616F6D69102300054D49203357102400054D49203357104200073162613938383310540008000A0050F20400051011000C416E64726F69645F313536381008000243881049000600372A000120
Quality=0/100 Signal level=100/100
Extra:fm=0003


Getting peer device address...
p2p_peer_devaddr_get:
peer_devaddr: 66:09:80:CE:BA:17
p2p_wpsinfo:
Getting peer authentication type...
p2p_req_cm_get:
wlan0 p2p_get:

CM=pbc


Confirming peer authentication...
p2p_set_nego:
mac: 66:09:80:CE:BA:17
peer_status: 10
Negotiation suceeded!
p2p_role_get:
Role: 3
Traceback (most recent call last):
File "piracast.py", line 76, in <module>
wfd.wfd_connection_wait()
File "/home/pi/piracast-master/piracast-master/scripts/wfd.py", line 291, in wfd_connection_wait
p2p_set_nego(mac)
File "/home/pi/piracast-master/piracast-master/scripts/wfd.py", line 88, in p2p_set_nego
p2p_go_mode_set()
File "/home/pi/piracast-master/piracast-master/scripts/wfd.py", line 166, in p2p_go_mode_set
get_stdout(["./hostapd", "-B", "p2p_hostapd.conf"])
File "/home/pi/piracast-master/piracast-master/scripts/util.py", line 21, in get_stdout
cmd = subprocess.Popen(args, shell=isinstance(args, basestring), stdout=subprocess.PIPE)
File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1259, in _execute_child
raise child_exception
OSError: [Errno 13] Permission denied


===========================================================================

sirwanimayur
Posts: 1
Joined: Mon Nov 03, 2014 5:44 am

Re: Piracast (Miracast on Pi) Beta Release

Mon Nov 03, 2014 5:46 am

I'm using same WiFi dongle for Internet connection. Is it okay?
Also I get package not found when I try to install isc-dhcp-server.

bachym
Posts: 1
Joined: Mon Nov 24, 2014 6:30 am

Re: Piracast (Miracast on Pi) Beta Release

Mon Nov 24, 2014 6:34 am

I have success with Xiaomi RedMi 1S

PieEater
Posts: 3
Joined: Wed Dec 31, 2014 4:08 pm

Re: Piracast (Miracast on Pi) Beta Release

Wed Dec 31, 2014 4:12 pm

I am also getting `read_all_sta:` to infinity while the sender device eventually times out. I checked

Code: Select all

wfd.py
and it contains

Code: Select all

call(["iwpriv", "wlan0", "p2p_set", "intent=15"])
. I only downloaded the zip from Github on Monday.

What can I do to overcome this issue? I can post any logs needed.

Henke_83
Posts: 5
Joined: Tue Jan 06, 2015 10:18 am

Re: Piracast (Miracast on Pi) Beta Release

Tue Jan 06, 2015 10:29 am

I´m testing out this Piracast project and I must say what a fantastic work you have done.

I have tested the Following devices:
Android 4.3 - Sony Xperia SP C5303 - Connected and working sometimes
Windows 8.1 Phone - Nokia Lumia 630DS - Not connecting, struggling with the negotitation part..
Windows 8.1 PC - Asus Vivotab Note 8 - Not connecting, struggling with the negotitation part..

I have read about it has been some problem connecting Windows with PBC method in the Hostapd, and it needs to be patched. I will se if this will result in a complete negotitation part.

Will post update in progress for this..

PieEater
Posts: 3
Joined: Wed Dec 31, 2014 4:08 pm

Re: Piracast (Miracast on Pi) Beta Release

Mon Jan 12, 2015 1:42 pm

Henke_83 wrote:I have read about it has been some problem connecting Windows with PBC method in the Hostapd, and it needs to be patched. I will se if this will result in a complete negotitation part.

Will post update in progress for this..
I can't wait! :mrgreen:

ravindrank
Posts: 20
Joined: Thu Dec 04, 2014 6:49 am

Re: Piracast (Miracast on Pi) Beta Release

Sat Jan 17, 2015 8:59 pm

Thanks for all the cool stuff. I just tries this. Did some testing and its working :) Some info below to help myself and everyone..

Hardware:
Raspi B+
Kernel:3.12.35+ #730
Wifi adapter: Bus 001 Device 006: ID 7392:7811 Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS]

Devices worked with:
Nexus 4 (Lollipop)

Devices failed connecting:
Laptops based on Windows 8.1 (If we try multiple times.. it almost completes)
Samsung S5

ravindrank
Posts: 20
Joined: Thu Dec 04, 2014 6:49 am

Re: Piracast (Miracast on Pi) Beta Release

Sat Jan 17, 2015 11:09 pm

ravindrank wrote:Thanks for all the cool stuff. I just tries this. Did some testing and its working :) Some info below to help myself and everyone..

Hardware:
Raspi B+
Kernel:3.12.35+ #730
Wifi adapter: Bus 001 Device 006: ID 7392:7811 Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS]

Devices worked with:
Nexus 4 (Lollipop)

Devices failed connecting:
Laptops based on Windows 8.1 (If we try multiple times.. it almost completes)
Samsung S5

Looks like my S5 also works.. Will reconfirm (HDMI display not connected :( )

Code: Select all

peer_status: 9
peer_status: 9
peer_status: 10
Negotiation suceeded!
p2p_role_get:
Role: 3
ioctl[RTL_IOCTL_HOSTAPD]: Invalid argument
ioctl[RTL_IOCTL_HOSTAPD]: Invalid argument
do_wps:
Selected interface 'wlan0'
OK

wps passed!
read_all_sta:
read_all_sta:
read_all_sta:
read_all_sta:
read_all_sta:
read_all_sta:
read_all_sta:
read_all_sta:
Wireless display negotiation completed!
lease table has not been updated, wait for a second...
lease table has not been updated, wait for a second...
Source has requested IP!
leased IP:  192.168.2.31

ravindrank
Posts: 20
Joined: Thu Dec 04, 2014 6:49 am

Re: Piracast (Miracast on Pi) Beta Release

Sun Jan 18, 2015 9:51 pm

Yes!!! :) it works with my Samung S5.. Sometimes we have to try multiple times.. I can test further..I will try and look into the code to see if I can find more .. :)

Updated....

Hardware:
Raspi B+
Kernel:3.12.35+ #730
Wifi adapter: Bus 001 Device 006: ID 7392:7811 Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS]

Devices worked with:
Nexus 4 (Lollipop)
Samsung S5 (Little buggy, some time we need try multiple times)

Devices failed connecting:
Laptops based on Windows 8.1

PieEater
Posts: 3
Joined: Wed Dec 31, 2014 4:08 pm

Re: Piracast (Miracast on Pi) Beta Release

Mon Jan 19, 2015 2:25 pm

ravindrank wrote: Devices failed connecting:
Laptops based on Windows 8.1
Any fixes for this down the road? I'm getting read_all_sta: to infinity with Win8.1.

xwjabc
Posts: 1
Joined: Thu Jan 22, 2015 3:17 am

Re: Piracast (Miracast on Pi) Beta Release

Thu Jan 22, 2015 3:31 am

Good work!

Nexus 5 works fine but Xiaomi Mi3 does not. I've read all python scripts and the docs from Realtek and finally find the reason, that is, Mi3 uses a non-standard protocol: the phone sets intent=15 (when I set the intent=14 in pi the status shows that the phone play the role 3) and decides to become a GO. So in this sort of circumstance SoftAP on pi should not be established and we need to use wpa_cli to connect the AP created by phone. At last both devices perform well.

kev1807
Posts: 4
Joined: Fri Mar 21, 2014 5:32 pm

Re: Piracast (Miracast on Pi) Beta Release

Thu Feb 05, 2015 8:42 pm

has anyone tried this with the Nexus 9 and the miracast activation hack from xda-developers?

I Don't have a wireless Stick yet, nor is my Nexus 9 with me ( I 'll get a replacement for the second time...) And I don't want to use the restricted chromecast

+ has anyone tried it with raspbmc? (I think due to OpenElec s reduction it won't work with OE.)

Using miracast with raspbmc would be awesome

keep up this awesome work !

gcsx
Posts: 18
Joined: Tue Apr 29, 2014 10:00 pm

Re: Piracast (Miracast on Pi) Beta Release

Mon Feb 09, 2015 9:22 pm

Hello everyone!

I just got two brand new TL-WN725N.
A V2.0 (the silver one) and a V2.1 (the gold plated one).

I installed :
Raspbian 3.12.36+ #737,
The provided driver from MrEngMan (8188eu-20150114.tar.gz)
And Piracast (the latest from GitHub) on an RPI B+.

Piracast starts without a problem and starts listening (peer_status: 2).

I'm trying to connect with a MS Surface Pro.
I can see the Piracast "entertainment device" on the tablet and initiate the connection, but I get stuck with the inifinite read_all_sta:.

I tried the intent trick (1, 14 and 15) without success...

Any advice?

Thanks!

EDIT : Here is the connection negociation I can see before the infinite read_all_sta loop :

Discovery request received!
wlan0 Scan completed :
Cell 01 - Address: xx:xx:xx:xx:xx:xx
ESSID:"DIRECT-"
Protocol:IEEE 802.11g
Frequency:2.462 GHz (Channel 11)
Encryption key:off
Bit Rates:54 Mb/s
IE: Unknown: <a loooong hex string>
Quality=0/100 Signal level=100/100
Extra:fm=0003


Getting peer device address...
p2p_peer_devaddr_get:
peer_devaddr: xx:xx:xx:xx:xx:xx
p2p_wpsinfo:
Getting peer authentication type...
p2p_req_cm_get:
wlan0 p2p_get:

CM=pbc


Confirming peer authentication...
p2p_set_nego:
mac: xx:xx:xx:xx:xx:xx
peer_status: 10
Negotiation suceeded!
p2p_role_get:
Role: 3
ioctl[RTL_IOCTL_HOSTAPD]: Invalid argument
ioctl[RTL_IOCTL_HOSTAPD]: Invalid argument
do_wps:
Selected interface 'wlan0'
OK

wps passed!

Henke_83
Posts: 5
Joined: Tue Jan 06, 2015 10:18 am

Re: Piracast (Miracast on Pi) Beta Release

Tue Feb 10, 2015 6:53 pm

For users using Windows 8, 8.1 and 10TP
Even if you come to read_all_sta and the WPS-pbc says it OK, this is not OK.
Because in the hostapd_cli - if you look for dot11RSNAStatsSTAAdress there is no adress to negotiate with.
If you go in hostapd_cli and write all_sta, you should get information about the connected device. This is not the case with Windows 8, Windows 8.1, and Windows 10 Technical Preview.
I´m trying to get hostapd work with "wps_pbc any".

If anyone else come before me solving this I´m happy :D

gcsx
Posts: 18
Joined: Tue Apr 29, 2014 10:00 pm

Re: Piracast (Miracast on Pi) Beta Release

Wed Feb 11, 2015 4:33 pm

@Henke_83

Thanks for your reply.
I would like to help you but I haven't used C / C++ for ages now and I don't know anything about the internal mechanics of WPS and hostapd...

However, I'll be happy to test things with Win 8, 8.1 or 10 TP.
I have some devices where I can easily put Windows to test if needed.
I have a brand new Pi 2 too, I'm currently trying to build the 8188eu driver from git, because the one provided in the recent Raspbian don't work with Piracast, and MrEngMan stopped providing his one since then, but he explained how to build it.
I think I'll write a script to automate this a bit.

ajladera
Posts: 1
Joined: Wed Nov 26, 2014 4:12 pm

Re: Piracast (Miracast on Pi) Beta Release

Tue Mar 10, 2015 4:29 am

Raspberry Pi: Model B
Dongle: TL-WN725N V2
Device: Motorola Moto G XT1064 Lollipop 5.0.2 works 100%
Device: Motorola Moto G XT1032 KitKat 4.4.4 works 100%

Edit device build.pro
Add at the end: persist.debug.wfd.enable = 1

I'll try with Ubuntu 14.04 and Windows 8.1

thanks you

DarkGod
Posts: 1
Joined: Wed Mar 04, 2015 7:52 am

Re: Piracast (Miracast on Pi) Beta Release

Fri Mar 13, 2015 3:35 pm

Hello,

Does the Piracast work on Windows 8.1 machines with compatible Miracast hardware?

When setting up connection from a Windows 8.1 desktop with NDIS 6.4 and WDDM 1.4 using the TP-LINK TL-WN725N V2 or a Surface Pro 3 i'm only receiving `read_all_sta:` to infinity.

gbyfrans
Posts: 1
Joined: Mon Mar 16, 2015 1:47 pm

problem in sink.py

Tue Mar 17, 2015 3:09 pm

Hi guys,

i really need your help.
Im using asus zenfone 5 as a sender device to cast screen to my raspberry.
I passed all the wifi direct activity, the problem begins from the sink.py file.
The process stopped in M2-M7, sometimes in M2, sometimes in M6, or can be in M7.

I give an example when stopped in M2

Code: Select all

Received 'OPTIONS * RTSP/1.0\r\nCSeq: 1\r\nRequire: org.wfa.wfd1.0\r\n\r\n'
M2 Resp: 'RTSP/1.0 200 OK\r\nCSeq: 2\r\nDate: Tue, Mar 17 2015 14:36:12 GMT\r\nPublic: org.wfa.wfd1.0, GET_PARAMETER, PAUSE, PLAY, SETUP, SET_PARAMETER, TEARDOWN\r\n\r\n'
and for M7 it said that unexpected session name.

as I read the post in some pages before, it is mentioned that cseq didnt match the phone (or something like that). How do I should modify the sink.py to make my piracast work?

THANKS IN ADVANCE

ghino
Posts: 2
Joined: Sun Aug 23, 2015 7:17 pm

Re: Piracast (Miracast on Pi) Beta Release

Sun Aug 23, 2015 8:12 pm

Hi
I installed and work good piracast using LG g2 and LG gpad with same IP work around and start shell command without & character.

Now I would like to start automatically with boot. How can I do that? Any suggestions or workaround?

ghino
Posts: 2
Joined: Sun Aug 23, 2015 7:17 pm

Re: Piracast (Miracast on Pi) Beta Release

Mon Aug 24, 2015 12:07 pm

Hi,

I automated the start of piracast using crontab. I did 2 sh files. First to execute piracast.py and a second to execute the nice command line as github instruction.
It starts correctly on pi boot.
It seems works also with vga output.
Lg pad usually withuot problems while i have some problems to connect to lg g2 that end connection on Wi-Fi direct

JurgenVanGorp
Posts: 1
Joined: Thu Sep 10, 2015 5:13 pm

Re: Piracast (Miracast on Pi) Beta Release

Thu Sep 10, 2015 5:41 pm

Hi,

Thanks for this excellent project.

I'd need some advice on using the Raspberry Pi as Miracast client instead of server.

In this project the Raspberry is used as server, I.e. it acts as display for e.g. a smartphone. What I'm looking for is to show the Raspberry Pi video output (even when a monitor is not connected on the hdmi port) on another Miracast enabled display. I've been looking for this, but I'm always redirected to this thread.

Any option of reconfiguring the software for use as Miracast client instead of server? If it cannot easily be done, is there another way of doing this?

Many thanks in advance.
Kind regards.

janbenes
Posts: 5
Joined: Fri Oct 23, 2015 8:42 am

Re: Piracast (Miracast on Pi) Beta Release

Fri Oct 23, 2015 8:46 am

[quote="ghino"]Hi,

It seems works also with vga output.


May I ask what VGA board did the piracast work witch? Thanks, Jan

pinipinilla
Posts: 1
Joined: Thu Nov 05, 2015 8:56 pm

Re: Piracast (Miracast on Pi) Beta Release

Thu Nov 05, 2015 9:09 pm

Hello,

I can't mirror the screen of a Nexus4. Do you know what is happening?

-> The dongle used is TL-WN725N version 2.1.
-> The version of the SO in RPi is

root@raspberrypi:/home/pi/piracast-master/scripts# uname -a
Linux raspberrypi 3.10.25+ #622 PREEMPT Fri Jan 3 18:41:00 GMT 2014 armv6l GNU/Linux

-> so the module installed was:

sudo insmod /lib/modules/3.10.25+/kernel/drivers/net/wireless/8188eu.ko

-> The execution enter in a loop of "read_all_sta:" messages after the Nexus 4 is trying to connect to a "Piracast Wireless screen". After a while the entry in the Wireless Screen utility in the Nexus 4 disappear.

root@raspberrypi:/home/pi/piracast-master/scripts# sudo nice -n -20 ./core &
[1] 3264
root@raspberrypi:/home/pi/piracast-master/scripts# (mgmt_data): mgmt_data_init(): Initialized.
(mgmt_m2ts): sx_mgmt_m2ts_decoder_init(): Initialized.
decoder_hw: initialized(sx_audio_sink_init): Initialization completed...
(sx_audio_sink_init): Initialization completed...
(audio_scheduler): Init.
(mgmt_sys): (mgmt_sys_init): Done.
(mgmt_data_open): Opened.
(mgmt_m2ts_decoder_open): sx_mgmt_m2ts_decoder_open(): Invoked.
(audio_scheduler): Open.
(mgmt_sys): (mgmt_sys_open): Done.

root@raspberrypi:/home/pi/piracast-master/scripts# sudo python piracast.py
Bring up wlan0 just in case...
ifup: interface wlan0 already configured
Increase rmem_default...
Starting ISC DHCP server: dhcpd.

wpa_supplicant: no process found
Waiting for incoming connection...
peer_status: 2
peer_status: 2
peer_status: 2
Discovery request received!
wlan0 Scan completed :
Cell 01 - Address: 12:68:3F:7A:CD:01
ESSID:"DIRECT-"
Protocol:IEEE 802.11g
Frequency:2.412 GHz (Channel 1)
Encryption key:on
Bit Rates:54 Mb/s
IE: Unknown: DD8A0050F204104A0001101044000101101200020004103B0001001047001027321AB6B8FA52F88A426354957B98FE102100034C4745102300074E657875732034102400074E657875732034104200103034376634616562646334386136626510540008000A0050F20400051011000C416E64726F69645F356261641008000243881049000600372A000120
Quality=0/100 Signal level=100/100
Extra:fm=0003


Getting peer device address...
p2p_peer_devaddr_get:
peer_devaddr: 12:68:3F:7A:CD:01
p2p_wpsinfo:
Getting peer authentication type...
p2p_req_cm_get:
wlan0 p2p_get:

CM=pbc


Confirming peer authentication...
p2p_set_nego:
mac: 12:68:3F:7A:CD:01
peer_status: 10
Negotiation suceeded!
p2p_role_get:
Role: 3
ioctl[RTL_IOCTL_HOSTAPD]: Invalid argument
ioctl[RTL_IOCTL_HOSTAPD]: Invalid argument
do_wps:
Selected interface 'wlan0'
OK

wps passed!
read_all_sta:
read_all_sta:
..........

ankitdaf
Posts: 1
Joined: Mon Nov 23, 2015 1:25 pm

Re: Piracast (Miracast on Pi) Beta Release

Mon Nov 23, 2015 1:27 pm

Does this work on any of the newer versions of Raspbian ? I had a really hard time getting a working image of the distro versions mentioned in the first post.

I am using the same hardware as mentioned, the Pi is a Pi Model B+

This is for non-profit educational applications, would appreciate it any help

raspalex
Posts: 1
Joined: Tue Jan 26, 2016 2:02 pm

Re: Piracast (Miracast on Pi) Beta Release

Tue Jan 26, 2016 2:09 pm

Hi,
You say you modified the driver source code from "finger" and added miracast support. I don't see any link to the modified tl-wn727n ( 8188eu ) driver source code. Can you please publish it ?

Thanks
raslex

Return to “Media centres”