Giter VIP home page Giter VIP logo

lazycast's People

Contributors

barhun avatar bobogei81123 avatar flexcomp-haj avatar homeworkc avatar illyen avatar leopck avatar manjotsidhu avatar mifistor avatar n00byking avatar sbaier1 avatar veryvince avatar xiaoyu-ebox avatar yousefamar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lazycast's Issues

Pi as Hotspot and lazycast issue

Hi, first of all, thank you very much for the work.
It´s a realy nice thing.

I´ve tried to setup my Pi3 to a miracast receiver wich worked perfectly.
As soon as I startet to turn my Pi into a standalone network
(https://www.raspberrypi.org/documentation/configuration/wireless/access-point.md) (so its not connectet to my wifi an can receive the miracast) lazycast wont work anymore.
Tried everything: just one dhcp, solutions from other issues. Nothing worked for me.
Both parts, lazycast and the accespoint both work separately.

connection broken after two seconds

hi, first of all, thank you very much for the work.
It would be great if it worked!µ

So after setting the permissions and installing the dependencies, i run the ./all.sh script.
First it asks for the pin code, and i can connect my android phone. For a brief moment, i then see the android screen and hear the audio on the RaspberryPI , but this quickly disappears and a new pin code is asked. Here the output from the terminal:

pi@raspberrypi:~ $ cd lazycast/
pi@raspberrypi:~/lazycast $ ./all.sh
Selected interface 'p2p-wlan0-1'
Available interfaces:
p2p-wlan0-1
p2p-dev-wlan0
wlan0
already on
p2p-wlan0-1
The display is ready
PIN:
90554971
---M1--->
OPTIONS * RTSP/1.0
CSeq: 0
Require: org.wfa.wfd1.0

<--------
RTSP/1.0 200 OK
CSeq: 1
\Public: org.wfa.wfd1.0, SET_PARAMETER, GET_PARAMETER

<---M2---
OPTIONS * RTSP/1.0
CSeq: 100
Require: org.wfa.wfd1.0

-------->
RTSP/1.0 200 OK
CSeq: 100
Public: org.wfa.wfd1.0, GET_PARAMETER, SET_PARAMETER, SETUP, PLAY, PAUSE, TEARDOWN

---M3--->
GET_PARAMETER rtsp://localhost/wfd1.0 RTSP/1.0
CSeq: 1
Content-Length: 127
Content-Type: text/parameters

wfd_audio_codecs
wfd_video_formats
wfd_coupled_sink
wfd_client_rtp_ports
wfd_standby_resume_capability
wd_initial_buffer

<--------
RTSP/1.0 200 OK
CSeq: 2
Content-Type: text/parameters
Content-Length: 485

wfd_client_rtp_ports: RTP/AVP/UDP;unicast 1028 0 mode=play
wfd_audio_codecs: LPCM 00000002 00
wfd_video_formats: 00 00 02 04 0001FEFF 3FFFFFFF 00000FFF 00 0000 0000 00 none none
wfd_3d_video_formats: none
wfd_coupled_sink: none
wfd_display_edid: none
wfd_connector_type: 05
wfd_uibc_capability: input_category_list=GENERIC, HIDC;generic_cap_list=Keyboard, Mouse;hidc_cap_list=Keyboard/USB, Mouse/USB;port=none
wfd_standby_resume_capability: none
wfd_content_protection: none

---M4--->
SET_PARAMETER rtsp://localhost/wfd1.0 RTSP/1.0
CSeq: 2
Session: 00000000
Content-Length: 249
Content-Type: text/parameters

wfd_audio_codecs: LPCM 00000002 00
wfd_video_formats: 00 00 02 04 00000080 00000000 00000000 00 0000 0000 00 none none
wfd_presentation_URL: rtsp://192.168.173.80/wfd1.0/streamid=0 none
wfd_client_rtp_ports: RTP/AVP/UDP;unicast 1028 0 mode=play

<--------
RTSP/1.0 200 OK
CSeq: 3

---M5--->
SET_PARAMETER rtsp://localhost/wfd1.0 RTSP/1.0
CSeq: 3
Session: 00000000
Content-Length: 27
Content-Type: text/parameters

wfd_trigger_method: SETUP

<--------
RTSP/1.0 200 OK
CSeq: 4

<---M6---
SETUP rtsp://192.168.101.80/wfd1.0/streamid=0 RTSP/1.0
CSeq: 101
Transport: RTP/AVP/UDP;unicast;client_port=1028

-------->
RTSP/1.0 200 OK
CSeq: 101
Date: Tue, May 14 2019 06:15:39 GMT
Session: 00000000
Transport: RTP/AVP/UDP;unicast;client_port=1028;server_port=19022

['RTSP/1.0 200 OK\r\nCSeq: 101\r\nDate: Tue, May 14 2019 06:15:39 GMT\r\nSession: 00000000\r\nTransport: RTP/AVP/UDP', 'unicast', 'client_port=1028', 'server_port=19022\r\n\r\n']
['server_port=19022\r\n\r\n']
19022
<---M7---
PLAY rtsp://192.168.101.80/wfd1.0/streamid=0 RTSP/1.0
CSeq: 102
Session: 00000000

-------->
RTSP/1.0 200 OK
CSeq: 102
Date: Tue, May 14 2019 06:15:39 GMT

---- Negotiation successful ----
idrport:42799
audiodest:0
oldcc 0 cc 4

PIN:
85127845
PIN:
42664680
PIN:
13581770
PIN:
49752687

lazycast with wifi in router mode

Hi,
I'm very impressed by your project. It's the only miracast solution that works out of the box I've found.
I try to integrate lazycast in my raspberry pi project, which I developped for schools in germany (--> http://mediakit.education).
But at one point I get stucked....
I use the wlan0 device as a router to give internet acces to students and I want to use lazycast parallel to this network connection....
I've seen that lazycast is creating a second wifi-device. And it's obviously possible to use it parralel to an internet connection via wifi, so the wlan device can handle two different network connections.
Do you have any idea how can I solve this problem?

Greetings
Olaf Koch

IndexError: list index out of range

Hi homeworkc,
lazycast is the tool I was looking for.
Many thanks for this project.
Some times the ssid of the raspberry is no longer visible and therefore no longer possible to connect.
I get this error message:

Traceback (most recent call last):
  File "./d2.py", line 161, in <module>
    serverport=serverport[-1]
IndexError: list index out of range
PIN:
31093781
PIN:
Failed to connect to non-global ctrl_ifname: p2p-wlan0-6  error: No such file or directory

If I try to stop all.sh with a Ctrl-c I get this error message:

^CTraceback (most recent call last):
  File "./d2.py", line 17, in <module>
    import socket
  File "/usr/lib/python2.7/socket.py", line 53, in <module>
    import _ssl
KeyboardInterrupt
PIN:
Failed to connect to non-global ctrl_ifname: p2p-wlan0-6  error: No such file or directory

I should restart the raspberry and it works again.

Bests regards

compilation troubles

hi, i very much need this kind of software. Reading about Lazycast i thought, well let's try it. But in the documentation, nowhere is mentioned that one need to first compile the software, of course since there are no binaries delivered but only source code. So, before doing anything else, i first type "make" and hope for a succesfull compilation.. but no; i have copypasted the output, including many compilation warnings and errors, below. Any idea why this happens and how i can solve it?
Btw: if i compile it like this, including the warnings, i can't get lazycast working properly; the connection stays for few seconds (i can see the android screen and audio on tv) but then it falls away and connection is broken;

here the compilation output:

pi@raspberrypi:~/lazycast-master $ make
make -C player/.
make[1]: Map '/home/pi/lazycast-master/player' wordt binnengegaan
cc -DOMX_SKIP64BIT -I/opt/vc/include/ -I /opt/vc/include/interface/vmcs_host/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -I/opt/vc/include/interface/vcos/ -I /opt/vc/include/IL -I/opt/vc/src/hello_pi/libs/ilclient -I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -I./ -I/opt/vc/src/hello_pi/libs/ilclient -I/opt/vc/src/hello_pi/libs/vgfont -DSTANDALONE -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -D_LINUX -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -U_FORTIFY_SOURCE -Wall -g -DHAVE_LIBOPENMAX=2 -DOMX -DOMX_SKIP64BIT -ftree-vectorize -pipe -DUSE_EXTERNAL_OMX -DHAVE_LIBBCM_HOST -DUSE_EXTERNAL_LIBBCM_HOST -DUSE_VCHIQ_ARM -Wno-psabi -I/opt/vc/include/ -I /opt/vc/include/interface/vmcs_host/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -I/opt/vc/include/interface/vcos/ -I /opt/vc/include/IL -I/opt/vc/src/hello_pi/libs/ilclient -I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -I./ -I/opt/vc/src/hello_pi/libs/ilclient -I/opt/vc/src/hello_pi/libs/vgfont -g -c player.c -o player.o -Wno-deprecated-declarations
player.c: In function ‘copy_into_buffer_and_empty’:
player.c:221:6: warning: unused variable ‘buff_size’ [-Wunused-variable]
int buff_size = buff_header->nAllocLen;
^~~~~~~~~
player.c: In function ‘setup_demuxer’:
player.c:470:50: warning: comparison of constant ‘0’ with boolean expression is always false [-Wbool-compare]
if (!avcodec_open2(codec_context, codec, NULL) < 0)
^
player.c:470:50: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
player.c:491:50: warning: comparison of constant ‘0’ with boolean expression is always false [-Wbool-compare]
if (!avcodec_open2(codec_context, codec, NULL) < 0)
^
player.c:491:50: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
player.c: In function ‘setup_clockComponent’:
player.c:602:23: warning: unused variable ‘clock’ [-Wunused-variable]
OMX_COMPONENTTYPE*clock = ilclient_get_handle(clockComponent);
^~~~~
player.c: In function ‘audioplay_get_latency’:
player.c:729:16: warning: variable ‘error’ set but not used [-Wunused-but-set-variable]
OMX_ERRORTYPE error;
^~~~~
player.c: In function ‘receivepkt’:
player.c:823:1: warning: no return statement in function returning non-void [-Wreturn-type]
}
^
player.c: In function ‘addnullpacket’:
player.c:908:16: warning: variable ‘padpacket’ set but not used [-Wunused-but-set-variable]
unsigned char padpacket[2048];
^~~~~~~~~
player.c:904:6: warning: unused variable ‘err’ [-Wunused-variable]
int err = 1000;
^~~
player.c: In function ‘main’:
player.c:1318:37: warning: passing argument 3 of ‘pthread_create’ from incompatible pointer type [-Wincompatible-pointer-types]
if (pthread_create(&thread, NULL, receivepkt, oldnodecopy) != 0)
^~~~~~~~~~
In file included from player.c:6:0:
/usr/include/pthread.h:233:12: note: expected ‘void * (
)(void )’ but argument is of type ‘void * ()(Nodetype ) {aka void * ()(struct Node *)}’
extern int pthread_create (pthread_t *__restrict __newthread,
^~~~~~~~~~~~~~
player.c: In function ‘copy_into_buffer_and_empty’:
player.c:169:10: warning: ‘r’ may be used uninitialized in this function [-Wmaybe-uninitialized]
return r;
^
cc -o player.bin -Wl,--whole-archive player.o -lilclient -lavformat -lavcodec -lavutil -L/opt/vc/lib/ -lbrcmGLESv2 -lbrcmEGL -lopenmaxil -lbcm_host -lvcos -lvchiq_arm -lpthread -lrt -lm -L/opt/vc/src/hello_pi/libs/ilclient -L/opt/vc/src/hello_pi/libs/vgfont -Wl,--no-whole-archive -rdynamic
rm player.o
make[1]: Map '/home/pi/lazycast-master/player' wordt verlaten
make -C h264/.
make[1]: Map '/home/pi/lazycast-master/h264' wordt binnengegaan
cc -DOMX_SKIP64BIT -I/opt/vc/include/ -I /opt/vc/include/interface/vmcs_host/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -I/opt/vc/include/interface/vcos/ -I /opt/vc/include/IL -I/opt/vc/src/hello_pi/libs/ilclient -I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -I./ -I/opt/vc/src/hello_pi/libs/ilclient -I/opt/vc/src/hello_pi/libs/vgfont -DSTANDALONE -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -D_LINUX -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -U_FORTIFY_SOURCE -Wall -g -DHAVE_LIBOPENMAX=2 -DOMX -DOMX_SKIP64BIT -ftree-vectorize -pipe -DUSE_EXTERNAL_OMX -DHAVE_LIBBCM_HOST -DUSE_EXTERNAL_LIBBCM_HOST -DUSE_VCHIQ_ARM -Wno-psabi -I/opt/vc/include/ -I /opt/vc/include/interface/vmcs_host/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -I/opt/vc/include/interface/vcos/ -I /opt/vc/include/IL -I/opt/vc/src/hello_pi/libs/ilclient -I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -I./ -I/opt/vc/src/hello_pi/libs/ilclient -I/opt/vc/src/hello_pi/libs/vgfont -g -c h264.c -o h264.o -Wno-deprecated-declarations
h264.c: In function ‘video_decode_test’:
h264.c:413:31: warning: passing argument 2 of ‘audioplay_create’ from incompatible pointer type [-Wincompatible-pointer-types]
if (audioplay_create(client, &audio_render, list, 4) != 0)
^
In file included from h264.c:43:0:
audio.h:1:9: note: expected ‘COMPONENT_T * {aka struct _COMPONENT_T *}’ but argument is of type ‘COMPONENT_T ** {aka struct _COMPONENT_T **}’
int32_t audioplay_create(ILCLIENT_T *, COMPONENT_T , COMPONENT_T *, int);
^~~~~~~~~~~~~~~~
h264.c:494:10: warning: unused variable ‘startindicator’ [-Wunused-variable]
int startindicator = buffer[1] & 0x40;
^~~~~~~~~~~~~~
h264.c:470:18: warning: unused variable ‘oldlen’ [-Wunused-variable]
unsigned char
oldlen = NULL;
^~~~~~
h264.c:469:22: warning: unused variable ‘actuallen’ [-Wunused-variable]
int peslen = -100, actuallen = 0;
^~~~~~~~~
h264.c:469:7: warning: unused variable ‘peslen’ [-Wunused-variable]
int peslen = -100, actuallen = 0;
^~~~~~
h264.c: In function ‘main’:
h264.c:647:38: warning: passing argument 3 of ‘pthread_create’ from incompatible pointer type [-Wincompatible-pointer-types]
if (pthread_create(&npthread, NULL, addnullpacket, beg) != 0)
^~~~~~~~~~~~~
In file included from h264.c:35:0:
/usr/include/pthread.h:233:12: note: expected ‘void * (
)(void )’ but argument is of type ‘void * ()(rtppacket ) {aka void * ()(struct srtppacket *)}’
extern int pthread_create (pthread_t __restrict __newthread,
^~~~~~~~~~~~~~
h264.c:649:37: warning: passing argument 3 of ‘pthread_create’ from incompatible pointer type [-Wincompatible-pointer-types]
if (pthread_create(&dthread, NULL, video_decode_test, beg) != 0)
^~~~~~~~~~~~~~~~~
In file included from h264.c:35:0:
/usr/include/pthread.h:233:12: note: expected ‘void * (
)(void )’ but argument is of type ‘int ()(rtppacket ) {aka int ()(struct srtppacket *)}’
extern int pthread_create (pthread_t *__restrict __newthread,
^~~~~~~~~~~~~~
h264.c: In function ‘sendtodecoder’:
h264.c:177:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
h264.c: In function ‘video_decode_test’:
h264.c:519:10: warning: ‘buf’ may be used uninitialized in this function [-Wmaybe-uninitialized]
sendtodecoder(video_decode, video_scheduler, video_render, tunnel,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
buf, &beg, scan, &port_settings_changed, &first);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc -DOMX_SKIP64BIT -I/opt/vc/include/ -I /opt/vc/include/interface/vmcs_host/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -I/opt/vc/include/interface/vcos/ -I /opt/vc/include/IL -I/opt/vc/src/hello_pi/libs/ilclient -I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -I./ -I/opt/vc/src/hello_pi/libs/ilclient -I/opt/vc/src/hello_pi/libs/vgfont -DSTANDALONE -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -D_LINUX -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -U_FORTIFY_SOURCE -Wall -g -DHAVE_LIBOPENMAX=2 -DOMX -DOMX_SKIP64BIT -ftree-vectorize -pipe -DUSE_EXTERNAL_OMX -DHAVE_LIBBCM_HOST -DUSE_EXTERNAL_LIBBCM_HOST -DUSE_VCHIQ_ARM -Wno-psabi -I/opt/vc/include/ -I /opt/vc/include/interface/vmcs_host/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -I/opt/vc/include/interface/vcos/ -I /opt/vc/include/IL -I/opt/vc/src/hello_pi/libs/ilclient -I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -I./ -I/opt/vc/src/hello_pi/libs/ilclient -I/opt/vc/src/hello_pi/libs/vgfont -g -c audio.c -o audio.o -Wno-deprecated-declarations
audio.c: In function ‘audioplay_create’:
audio.c:55:10: warning: unused variable ‘s’ [-Wunused-variable]
int32_t s;
^
At top level:
audio.c:42:20: warning: ‘audio_dest’ defined but not used [-Wunused-variable]
static const char *audio_dest[] = { "local", "hdmi" };
^~~~~~~~~~
cc -o h264.bin -Wl,--whole-archive h264.o audio.o -lilclient -lavformat -lavcodec -lavutil -lasound -L/opt/vc/lib/ -lbrcmGLESv2 -lbrcmEGL -lopenmaxil -lbcm_host -lvcos -lvchiq_arm -lpthread -lrt -lm -L/opt/vc/src/hello_pi/libs/ilclient -L/opt/vc/src/hello_pi/libs/vgfont -Wl,--no-whole-archive -rdynamic
rm h264.o audio.o
make[1]: Map '/home/pi/lazycast-master/h264' wordt verlaten
make -C control/.
make[1]: Map '/home/pi/lazycast-master/control' wordt binnengegaan
cc -O2 -Wall -g -c controlhidc.c -o controlhidc.o
cc -o controlhidc.bin controlhidc.o -L /usr/X11R6/lib -lX11 -lm
cc -O2 -Wall -g -c control.c -o control.o
control.c: In function ‘main’:
control.c:198:13: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘KeySym {aka long unsigned int}’ [-Wformat=]
printf("%x\n", *keysym);
^
cc -o control.bin control.o -L /usr/X11R6/lib -lX11 -lm
rm control.o controlhidc.o
make[1]: Map '/home/pi/lazycast-master/control' wordt verlaten

<--M6---: error

<---M6---
SETUP rtsp://192.168.173.80/wfd1.0/streamid=0 RTSP/1.0
CSeq: 101
Transport: RTP/AVP/UDP;unicast;client_port=1028

-------->

['']
[]
Traceback (most recent call last):
File "./d2.py", line 178, in
serverport=serverport[-1]
IndexError: list index out of range

Having issues with pi 3b+ running the newest Buster

I'm using a rpi 3b+ with a fresh setup of Buster that I downloaded directly from the rpi site a couple days ago. So everything is a new fresh setup of raspbian. I've gotten this to the point of being seen by an android phone. When I try to cast to the pi I get a new window that opens and it stays white and the phone shows that it's connected. When i have the phone disconnect from lazycast, that window on the pi closes. Here's the readout of everything from the terminal window.

pi@raspberrypi:~/Downloads/lazycast $ ./all.sh
Selected interface 'p2p-wlan0-0'
Available interfaces:
p2p-wlan0-0
p2p-dev-wlan0
wlan0
already on
p2p-wlan0-0
The display is ready
PIN:
8675309
---M1--->
OPTIONS * RTSP/1.0
CSeq: 0
Require: org.wfa.wfd1.0

<--------
RTSP/1.0 200 OK
CSeq: 1
\Public: org.wfa.wfd1.0, SET_PARAMETER, GET_PARAMETER

<---M2---
OPTIONS * RTSP/1.0
CSeq: 100
Require: org.wfa.wfd1.0

-------->
RTSP/1.0 200 OK
CSeq: 100
Public: org.wfa.wfd1.0, GET_PARAMETER, SET_PARAMETER, SETUP, PLAY, PAUSE, TEARDOWN

---M3--->
GET_PARAMETER rtsp://localhost/wfd1.0 RTSP/1.0
CSeq: 1
Content-Length: 99
Content-Type: text/parameters

wfd_audio_codecs
wfd_video_formats
wfd_client_rtp_ports
wfd_uibc_capability
wd_initial_buffer

<--------
RTSP/1.0 200 OK
CSeq: 2
Content-Type: text/parameters
Content-Length: 485

wfd_client_rtp_ports: RTP/AVP/UDP;unicast 1028 0 mode=play
wfd_audio_codecs: LPCM 00000002 00
wfd_video_formats: 00 00 02 04 0001FEFF 3FFFFFFF 00000FFF 00 0000 0000 00 none none
wfd_3d_video_formats: none
wfd_coupled_sink: none
wfd_display_edid: none
wfd_connector_type: 05
wfd_uibc_capability: input_category_list=GENERIC, HIDC;generic_cap_list=Keyboard, Mouse;hidc_cap_list=Keyboard/USB, Mouse/USB;port=none
wfd_standby_resume_capability: none
wfd_content_protection: none

---M4--->
SET_PARAMETER rtsp://localhost/wfd1.0 RTSP/1.0
CSeq: 2
Content-Length: 378
Content-Type: text/parameters

wfd_audio_codecs: LPCM 00000002 00
wfd_video_formats: 00 00 02 04 00000080 00000000 00000000 00 0000 0000 00 none none
wfd_presentation_URL: rtsp://255.255.255.255/wfd1.0/streamid=0 none
wfd_client_rtp_ports: RTP/AVP/UDP;unicast 1028 0 mode=play
wfd_uibc_capability: input_category_list=HIDC;generic_cap_list=Keyboard, Mouse;hidc_cap_list=Keyboard/USB, Mouse/USB;port=4321

<--------
RTSP/1.0 200 OK
CSeq: 3

uibcport:4321

---M5--->
SET_PARAMETER rtsp://localhost/wfd1.0 RTSP/1.0
CSeq: 3
Content-Length: 27
Content-Type: text/parameters

wfd_trigger_method: SETUP

<--------
RTSP/1.0 200 OK
CSeq: 4

<---M6---
SETUP rtsp://192.168.101.80/wfd1.0/streamid=0 RTSP/1.0
CSeq: 101
Transport: RTP/AVP/UDP;unicast;client_port=1028

connect to 192.168.173.80:4321
-------->
RTSP/1.0 200 OK
CSeq: 101
Date: Sun, Aug 11 2019 19:39:49 GMT
Session: 00000013
Transport: RTP/AVP/UDP;unicast;client_port=1028;server_port=19022

senddes:62
['RTSP/1.0 200 OK\r\nCSeq: 101\r\nDate: Sun, Aug 11 2019 19:39:49 GMT\r\nSession: 00000013\r\nTransport: RTP/AVP/UDP', 'unicast', 'client_port=1028', 'server_port=19022\r\n\r\n']
['server_port=19022\r\n\r\n']
19022
<---M7---
PLAY rtsp://192.168.101.80/wfd1.0/streamid=0 RTSP/1.0
CSeq: 102
Session: 00000013

-------->
RTSP/1.0 200 OK
CSeq: 102
Date: Sun, Aug 11 2019 19:39:49 GMT

---- Negotiation successful ----
./h264/h264.bin: error while loading shared libraries: libavutil.so.55: cannot open shared object file: No such file or directory
SET_PARAMETER rtsp://localhost/wfd1.0 RTSP/1.0
CSeq: 4
Session: 00000013
Content-Length: 30
Content-Type: text/parameters

wfd_trigger_method: TEARDOWN

PIN:
8675309

I've been tracing down that error above about a file not found. I've gone through libavcodec and libavformat. But now I'm stuck at this file file. I believe it's looking for older versions of ffmpeg, however I haven't been able to use an older version of ffmpeg for some reason. Any suggestions on this would be greatly appreciated.

Raspbian Desktop (rpi3) not shown on android disconnection

First of all thanks and congratulations for this project ( i didn't manage todo make work other rpi3 Cast solutions)

I downloaded release 1.0.1 with git
I set player1 (h264 player didn't work)
With android redmi note 3 pro i succesfully connected from wireless display entering the pin. Both audio and video worked pretty well.

But when i disconnect from android raspbian Desktop is not shown, nor can i use keyboard to show any shell. Unique solution is rebooting rpi3 (yesterday i managed booting It with ctrl+ alt+ del)

Any advice? (Is this a bug)

Can't open display

Hi,

When I try to connect my wind10 pc, the programs finish by saying can't open display. The PC is connected to the device tho. Any Idea what may have gone wrong ?

huge freezes(stream from mobile phone)

i have freezes when streaming from my mobile phone(Redmi Note 8)
maybe there are some settings in config files that increase performance or something else.
thanks

p2p-wlan0-<number> grows and grows ...

Every start of lazycast with all.sh takes more time until I can establish a good connection.
Also the number of p2p-wlan0 grows. At the moment ifconfig shows p2p-wlan0-84...
How can I reset everthing to the starting values?

Cannot connect to Rpi3 display with Windows 10

When I attempt to connect to my lazycast Rpi3, I get the error "couldn't connect to your device." I was hoping to change the interface the lazycast uses for its network to see if that would help, but I cannot find a way to change the interface.

Support ALSA for player

First off, I just wanted to say thanks for your work on this amazing project!

As far as I can tell, the option for using alsa as sound output (presumably the default device) is ignored and treated as HDMI for the player player (see here), while it's supported for h264 (see here). Is there a reason for this?

At the moment, I'm trying to get USB audio working (I'm running on a Pi Zero W, so I don't have an analogue input, instead USB to analogue) but even with h264 it ends up going through HDMI anyway, so I wanted to try player. FWIW, a command like omxplayer -o alsa test.mp4 works just fine.

Any info much appreciated!

difficulties using NetworkManager

First off, thank you for your efforts to make this a useful casting app. I have high hopes that I can get it working. I've tried this install a couple of different ways. Using an RPi CM3+ with 2 wireless dongles (edup ep-n8508 and Edimax EW-7611ULB), an RPi3A+ with built-in wifi.
I typically have been using SSH to connect and install things.

I've tried this first using Raspbian Buster Lite with no success. Essentially wifi would not longer work after the

"sudo apt install network-manager network-manager-gnome openvpn openvpn-systemd-resolved network-manager-openvpn network-manager-openvpn-gnome"
and
"sudo apt purge openresolv dhcpcd5" commands.

I was able to run the all.sh with ethernet, but got the same error posted here #43 (comment)

I tried this on an existing system and with a fresh image, on the CM3+ and RPi3A+, wifi would fail around 89% finished with installing and wlan0 could no longer be found.

Using a fresh image of "Raspbian Buster Desktop with recommended software" I tried skipping those steps and could get to all.sh giving me a pin code, but I couldn't find the device on the network, so I went and installed network manager which again, kills wlan0 around 89% finished with the install.
Going into Advanced Network Settings in the Raspbian desktop I can then make a connection called the same name as the all.sh script will name it, make that a hotspot using the wlan0 device, and Cloned MAC address = "Stable"
I can also use a USB to Ethernet adapter to keep an internet connection on the device. After rebooting it looks like I can connect to the device as a hotspot, but the password is the one I have it in Advanced Network Settings, not a pin.
Also after that reboot, all.sh fails:
pi@Streamer:~/lazycast $ ./all.sh
Selected interface 'p2p-dev-wlan0'
Available interfaces:
p2p-dev-wlan0
wlan0
Selected interface 'p2p-dev-wlan0'
OK
Selected interface 'p2p-dev-wlan0'
OK
Selected interface 'p2p-dev-wlan0'
OK
Selected interface 'p2p-dev-wlan0'
OK
Selected interface 'p2p-dev-wlan0'
OK
Selected interface 'p2p-dev-wlan0'
OK
Selected interface 'p2p-dev-wlan0'
OK

Selected interface 'p2p-dev-wlan0'
FAIL
Selected interface 'p2p-dev-wlan0'
Available interfaces:
p2p-dev-wlan0
wlan0
Selected interface 'p2p-dev-wlan0'
FAIL
Selected interface 'p2p-dev-wlan0'
Available interfaces:
p2p-dev-wlan0
wlan0
Selected interface 'p2p-dev-wlan0'
FAIL

The only way I can get a pin is by removing the Hotspot connection and letting wlan0 either just scan or be connected to an SSID.
There must be something I'm missing here. is there anything obvious from what I've mentioned that could be causing this problem?

Win 10: Connection couldn't be established

My Windows 10 source, recognizes the raspberry as a wireless display, but it can't establish a connection between them. Can anyone tell me what the issue is?

I followed all the advice given in the readme.

Regards and thanks for your help in advance

Strajuck

Will this work on rpi1

Wondering whether this can work with rpi1 with wifi-usb dongle, or even with LAN.

Thanks.

Android cast hangs on "connecting" state.

Hello.

I found your lazycast tool and it suits my need perfectly. I want to connect my Pi3 to my ceiling mounted projector and use it as a wireless display for my Windows PC.

I didn't get it to work using Buster, having the same problem already mentioned not having Internet access anymore after downgrading. So I just used an older (stretch) Raspbian rom. Now it works up until the password is printed to the screen every couple of seconds.

In Windows 10, however, it says my PC does not support wireless displays (the laptop is 10 years old).
On my phone (Android), the lazycast does show up in the list of wireless displays, but when I click it it says "connecting" for a while (20s or so) and then stops. I am also never asked for the password.

Is it supposed to work on Android? Of is it Windows only?

After fiddling for 2 hours I took a break and went out to get some takeout. And guess what, in the restaurant there is a TV in the corner saying "connect your screen wirelessly". Tried it, and it worked on the first try. It says "connecting" for 3-5s, and then it's connected.

Any idea?

Workaround for random P2P device MAC in wpa_supplicant

Download wpa_supplicant source as described in command.txt

Edit p2p_supplicant.c function wpas_p2p_mac_setup
After:
u8 addr[ETH_ALEN] = {0};
Add two lines:
os_memcpy(wpa_s->own_addr, wpa_s->conf->p2p_device_persistent_mac_addr, ETH_ALEN);
os_memcpy(wpa_s->global->p2p_dev_addr, wpa_s->conf->p2p_device_persistent_mac_addr, ETH_ALEN);

Add following option to wpa_supplicant.conf
p2p_device_persistent_mac_addr= wanted mac address

Now P2P Go device always = p2p_device_persistent_mac_addr
For example my conf:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=0
country=US
persistent_reconnect=1
p2p_device_persistent_mac_addr=3e:50:84:9d:7e:11
mac_addr=0
p2p_interface_random_mac_addr=0
network={
ssid="DIRECT-AO"
bssid=3e:50:84:9d:7e:a5
psk="yrf6u5IC"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP
auth_alg=OPEN
mode=3
disabled=2
}

can not establish connection

it works, when i turn off my firewall in windows.
can you please list what protocols and ports i need to open in firewall ?

Support for Raspberry Pi 3A?

Have downloaded the repo onto my Rpi 3A but when I try can connect either my laptop or tablet it just say failed to connected.

Android cast screen can't find lazycast

lazycast successfully runs on RPi3, says it's ready and displays a pin.

When I go to "Cast screen" on my Android device it just keeps searching for the device and never finds anything.
I tried with 3 different devices, that are able to connect to other sinks.

Not sure what to do next or how to debug it.

implementation on RPI+3b

Hey, ii'm trying to implement this on last rpi 3b+ and take advantage on 802.11ac and 5ghz that this rpi offers. As far i can understand, i can add on the all.sh file "freq=5" to use 5GHz mode. Is it possible to add dual-band(2.4 and 5ghz) compatibilty? and is it possible to use 802.11ac p2p connection to have a more stable connection and better latency?

Another question, is it possible to add support to multigestures using UIBC? Is there any document regarding uibc that i can read?

white screen issue

I setup Lazycast on PI3 with 7" LCD and at start it works fine, i have my Win 10 desktop on the PI3 screen but after few min that i am working with it turns white with "untitled" in the caption and loos the desktop that i am streaming.
From connection it looks fine all is working just loosing the desktop stream, any idea?

Another issue i have is that it is not utilizing the compleet screen size, i have a black frame around the desktop image. any way to optimize that?
Nir

how do open security?

what mean?

wpa_cli set device_type 7-0050F204-1
wpa_cli set p2p_go_ht40 1
wpa_cli wfd_subelem_set 0 00060151022a012c
wpa_cli wfd_subelem_set 1 0006000000000000
wpa_cli wfd_subelem_set 6 000700000000000000

where i can read about wfd_subelem_set arguments? is there any information anywhere about "wfd_subelem_set"?

how do "key_mgmt=NONE"?
how do open security without password and any pin at all?

Don't enter pin code on win10

Hello, thank you very much for this great project.

I'm using my android phone to test that it's OK, occasionally no display on the pi desktop.
But when I use win10 as a source, win10 don't pop the window to enter pin code, but to enter it on the other end(Raspberry Pi).
default

Black border with every resolution

Hello,
I tried lazycast and everything works very well -- thanks for your work homeworkc.
Only one problem: when I cast a screen, I always get a black Border of about 10% around the picture, no matter which resolution of the screen I choose -- even with the native resolution of the screen attached to the raspi. This happens to all players (I tried no. 1/2 and the omxplaxer, always the same).
This results in poor readability of text because some pixels are droped.
Is this a bug or a feature?
I thought that omxplayer is using fullscreen, but this seems not to be.
Best regards,
orlo11.

I can't connect to my rpi using lazycast

I used to work with my raspberry with lazycast from my win10 computer, it used to work but not anymore. The screen is seen but everytime I try to connect with the pin showing on the shell it has troubles
I tried on differents win10 pc and it's still the same

Problems faced in lazycast

It works fine when raspberry pi 3 is rebooted. But everytime it takes time to display pin. Before that it goes on the loop like Available interfaces: p2p-dev-wlan0 wlan0 Selected interface 'p2p-dev-wlan0' OK Selected interface 'p2p-wlan0-5' Available interfaces: 'INTERFACES' command timed out. Selected interface 'p2p-dev-wlan0' Available interfaces: p2p-dev-wlan0 wlan0 Selected interface 'p2p-dev-wlan0' OK Selected interface 'p2p-dev-wlan0' Available interfaces: p2p-dev-wlan0 wlan0 Selected interface 'p2p-dev-wlan0' OK
After waiting for 10-15 minutes, it finally shows pin and then works flawlessly when connected. Once disconnected, it does not work when I try to connect again and I have to reboot to make it work.

Can following issues be solved ?

  • Making process to display pin fast
  • To work again without rebooting when it is disconnected
  • Some times lazycast doesn't show up even when the pin is shown

Is this project still maintained?

Do you accept new feature requests? Are you working on making this a set-and-forget product?

How much time do you spend working on this project?

Unnamed Window (German: Unbenanntes Fenster) form all players

Hello,
I gave lazycast a try.
I took a raspbian buster out of the box, did apt update and full-upgrade (all today 2020-01-31)
installed udhcpd, downgraded wpasupplicant via aptitude, installed lazycast 1.2 (and also 1.1).
When I connect from an android phone (Galaxy S7) I see messages in the terminal, where I started all.sh, but no picture (on the phone it looks like it would work).
Then I tried from a Win 10 machine. I can connect, but there only appears an empty white window with the title "Unbenanntes Fenster" (as my locale is de_DE -- means "Unnamed window"), the panel remains on the screen.
I can use the mouse, connected to the Raspi, to control the Win 10 machine, so the back channel works.
This happens whatever I choose as player. I even changed the "d2.py" to run omxplayer, but always the same result.
Does anyone know a solution? It seems, the player starts in a wron way.
Regards
orlo11.

Issue with raspberry pi 4 and Microsoft surface pro

I installed and set up the raspberry pi accordingly and this is what happenes:

  1. surface pro connects to pi successfully
  2. i see the mirrored screen on the pi
  3. after 3 to 10 seconds the connection shuts down

I'm thankful to anyone trying to look into my problem.

Log:

pi@raspberrypi:~/lazycast $ ./all.sh
Selected interface 'p2p-wlan0-1'
Available interfaces:
p2p-wlan0-1
p2p-dev-wlan0
wlan0
already on
p2p-wlan0-1
The display is ready
Your device is called: lazycast_on_raspberrypi
PIN:
31415926
---M1--->
OPTIONS * RTSP/1.0
Require: org.wfa.wfd1.0
CSeq: 1

<--------
RTSP/1.0 200 OK
CSeq: 1
\Public: org.wfa.wfd1.0, SET_PARAMETER, GET_PARAMETER

<---M2---
OPTIONS * RTSP/1.0
CSeq: 100
Require: org.wfa.wfd1.0

-------->
RTSP/1.0 200 OK
Server: MSMiracastSource/10.00.18362.0693 guid/86A74632-FA38-0006-6A80-598738FAD501
Public: org.wfa.wfd1.0, SETUP, TEARDOWN, PLAY, PAUSE, GET_PARAMETER, SET_PARAMETER
CSeq: 100

---M3--->
GET_PARAMETER rtsp://localhost/wfd1.0 RTSP/1.0
Content-Length: 673
Content-Type: text/parameters
CSeq: 2

wfd_video_formats
wfd_audio_codecs
wfd_client_rtp_ports
wfd_display_edid
wfd_connector_type
wfd_uibc_capability
wfd2_rotation_capability
wfd2_video_formats
wfd2_audio_codecs
wfd2_video_stream_control
wfd_content_protection
wfd_idr_request_capability
intel_friendly_name
intel_sink_manufacturer_name
intel_sink_model_name
intel_sink_version
intel_sink_device_URL
microsoft_latency_management_capability
microsoft_format_change_capability
microsoft_diagnostics_capability
microsoft_cursor
microsoft_rtcp_capability
microsoft_video_formats
microsoft_max_bitrate
microsoft_multiscreen_projection
microsoft_audio_mute
microsoft_color_space_conversion

<--------
RTSP/1.0 200 OK
CSeq: 2
Content-Type: text/parameters
Content-Length: 485

wfd_client_rtp_ports: RTP/AVP/UDP;unicast 1028 0 mode=play
wfd_audio_codecs: LPCM 00000002 00
wfd_video_formats: 00 00 02 10 0001FEFF 3FFFFFFF 00000FFF 00 0000 0000 00 none none
wfd_3d_video_formats: none
wfd_coupled_sink: none
wfd_display_edid: none
wfd_connector_type: 05
wfd_uibc_capability: input_category_list=GENERIC, HIDC;generic_cap_list=Keyboard, Mouse;hidc_cap_list=Keyboard/USB, Mouse/USB;port=none
wfd_standby_resume_capability: none
wfd_content_protection: none

---M4--->
SET_PARAMETER rtsp://localhost/wfd1.0 RTSP/1.0
Content-Length: 367
Content-Type: text/parameters
CSeq: 3

wfd_video_formats: 00 00 02 10 00000000 00000008 00000000 00 0000 0000 00 none none
wfd_audio_codecs: LPCM 00000002 00
wfd_presentation_URL: rtsp://192.168.173.80/wfd1.0/streamid=0 none
wfd_client_rtp_ports: RTP/AVP/UDP;unicast 1028 0 mode=play
wfd_uibc_capability: input_category_list=HIDC;generic_cap_list=none;hidc_cap_list=Keyboard/USB, Mouse/USB;port=50000

<--------
RTSP/1.0 200 OK
CSeq: 3

uibcport:50000

---M5--->
SET_PARAMETER rtsp://localhost/wfd1.0 RTSP/1.0
Content-Length: 27
Content-Type: text/parameters
CSeq: 4

wfd_trigger_method: SETUP

<--------
RTSP/1.0 200 OK
CSeq: 4

<---M6---
SETUP rtsp://192.168.101.80/wfd1.0/streamid=0 RTSP/1.0
CSeq: 101
Transport: RTP/AVP/UDP;unicast;client_port=1028

-------->
RTSP/1.0 200 OK
Transport: RTP/AVP/UDP;unicast;client_port=1028;server_port=62908;ssrc=77b8eb05;rtcp-fb-ssrc=77b8eb06
Server: MSMiracastSource/10.00.18362.0693 guid/86A74632-FA38-0006-6A80-598738FAD501
Blocksize: 1450
Session: 1023620112
CSeq: 101

['RTSP/1.0 200 OK\r\nTransport: RTP/AVP/UDP', 'unicast', 'client_port=1028', 'server_port=62908', 'ssrc=77b8eb05', 'rtcp-fb-ssrc=77b8eb06\r\nServer: MSMiracastSource/10.00.18362.0693 guid/86A74632-FA38-0006-6A80-598738FAD501\r\nBlocksize: 1450\r\nSession: 1023620112\r\nCSeq: 101\r\n\r\n']
['server_port=62908']
62908
<---M7---
PLAY rtsp://192.168.101.80/wfd1.0/streamid=0 RTSP/1.0
CSeq: 102
Session: 1023620112

-------->
RTSP/1.0 200 OK
Server: MSMiracastSource/10.00.18362.0693 guid/86A74632-FA38-0006-6A80-598738FAD501
Date: Wed, 25 Mar 2020 12:40:58 GMT
Session: 1023620112
CSeq: 102

---- Negotiation successful ----
idrport:47921
audiodest:0
set audio backend :hdmi
oldcc 0 cc 3
recv timeout

Win 10 to Rasp Pi4 doesn't connect

I followed all the step in the main page, i see the rasp from my win 10 but can't connect after i insert the pin:

image

in yellow: not possible to connect

Miracast over Infrastructure

A very useful feature would be Miracast over Infrastructure, which is supported under Windows 10 1703 and later. In companion with Chromecast-like GUI this feature would make lazycast a very useful solution even in semi-corporate networks. Please consider adding it in future releases.

wps_pbc

Hi homeworkc, Have you tested wps_pbc to connect? I use my android phone for testing, which is always fixed as wps_pin. I want to find a simpler way to connect, and it was a bit of a hassle to type the password every time.

Windows 10 says connected but no visible feed

Hi. When I try and connect my windows 10 laptop to lazy it works perfectly for about 15 seconds before the raspberry pi appears to drop the connection. Windows still thinks it is screen mirroring but the feed is no longer visible on the raspberry pi.

Reliable way of streaming in KODI

Hi.
First of all, thank you for your great work. This project is exactly what i'm looking for with expanding my home media center functionalities. Have you considered integrating your solution into XBIAN or any other distro? I'm having trouble using this with XBIAN. I managed to stream my screen using player=1, player=2 and player=3(omxplayer). The only difficulty that arises is that I need to have some player already opened and then lazycast somehow hijacks the screen and mirroring works. It works really great and I'm wondering if I could make this solution into something more generic.

Using external USB WiFi dongle

Hi,
I was trying to improve the connection and make the streaming more smooth by using a usb wifi dongle. It was Asus USB AC53 Nano, however, even I disable raspberry pi's internal wifi, the program keeps looping in Available interface: wlan0... And there's no pin that shows up.

I would like to ask if it's possible to use an external wifi chip to use lazycast. Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.