Git Product home page Git Product logo

wds's Introduction

DISCONTINUATION OF PROJECT.

This project will no longer be maintained by Intel.

Intel has ceased development and contributions including, but not limited to, maintenance, bug fixes, new releases, or updates, to this project.

Intel no longer accepts patches to this project.

If you have an ongoing need to use this project, are interested in independently developing it, or would like to maintain patches for the open source software community, please create your own fork of this project.

Wireless Display Software For Linux OS (WDS)

WDS is a set of libraries for developers who want to build Wi-Fi Display applications on linux.

WDS consists of:

  • libwds: Main library implements a Wi-Fi Display dialect of RTSP that includes the parser, actual negotiation logic for sink and source, and the related data structures. It is not tied to any specific connection manager, media framework or main loop. This Library is also compatible with MSVC.
  • network: Supports integration with GLib main loop and GStreamer
  • p2p: Supports integration with Connman Wifi P2P features

The source code includes example implementations:

  • sink: Wi-Fi Display sink that depends on Gstreamer, Connman and GLib mainloop
  • desktop_source: Wi-Fi Display source that depends on Gstreamer, Connman and GLib mainloop

More information can be found on the mailing list and the wiki.

Requirements:

WDS test executables have runtime dependencies on just a few things (mostly GStreamer and GLib), but for successful Wi-Fi Display sessions the following are adviced:

  • Wifi adapter from Intel 7260-family or Atheros ath9k
  • wpa_supplicant: version 2.4 or later, built with CONFIG_P2P=y, CONFIG_WIFI_DISPLAY=y and CONFIG_CTRL_IFACE_DBUS_NEW=y
  • connman: version 1.28 (released Feb 1st 2015) or later.
  • gstreamer: either master branch more recent than Feb 3rd 2015 (commit d0a50be2), or 1.4 branch more recent than Feb 3rd 2005 (commit 1ce3260a638d or release 1.4.6 or later).

Test results with other Wifi adapters are very welcome but be warned that in many cases Wifi-P2P has not had the testing it needs on linux: you may run into problems in surprising places.

Building WDS from git:

cmake .
make

Testing WDS

Pre-requisites

Make sure wpa_supplicant & connmand are running. Running both of them uninstalled is possible (but in that case make sure the system wpa_supplicant and system connection manager are not running):

$ sudo hostap/wpa_supplicant/wpa_supplicant -ddt -u

$ sudo connman/src/connmand -n -d

Use connmanctl to enable Wi-Fi and Wi-Fi P2P:

$ connman/client/connmanctl
connmanctl> enable wifi
Enabled wifi
connmanctl> enable p2p
Enabled p2p

Check that Peer-to-peer functionality is working:

connmanctl> scan p2p
Scan completed for p2p
connmanctl> peers
Nexus 5 (jku) idle peer_0c8bfd5f12fc_8ac9d0c0da67
Push2TV 75AEB2-PTV3000 idle peer_0c8bfd5f12fc_22e52a75aeb2

Enable agent:

connmanctl> agent on
Agent registered

Testing WDS sink with an Android device (e.g. Nexus 5):

  • start sink: sink/sink-test
  • Android: select the sink from the list in "Settings > Display > Cast Screen"
  • connmanctl: when agent asks, accept the connection

In a few seconds, a window should open and a audio/video stream should start playing.

Testing WDS source with another sink:

  • start source: desktop_source/desktop_source
  • Initial scan will be automatic, but scan command will re-scan.
  • After getting scan results, connect with connect N (where N is number from scan result)
  • connmanctl: when agent asks, accept the connection

In a few seconds, the sink should start showing a stream mirroring your desktop.

wds's People

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  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

wds's Issues

ActionTec SBWD100A: Triggering SETUP fails with 403

This is between desktop_source and the actiontec dongle.

I guess this is just a result of the wfd_video_formats we send?

OPTIONS * RTSP/1.0
CSeq: 1
Require: org.wfa.wfd1.0

RTSP/1.0 200 OK
CSeq: 1
Date: Fri, Jan 01 2010 00:53:44 GMT
Public: org.wfa.wfd1.0, SET_PARAMETER, GET_PARAMETER

OPTIONS * RTSP/1.0
CSeq: 301
Require: org.wfa.wfd1.0

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

GET_PARAMETER rtsp://localhost/wfd1.0 RTSP/1.0
CSeq: 2
Content-Length: 59

wfd_video_formats
wfd_audio_codecs
wfd_client_rtp_ports
RTSP/1.0 200 OK
CSeq: 2
Content-Type: text/parameters
Content-Length: 276

wfd_video_formats: 00 01 02 08 00019ceb 05557fff 00000fff 02 0000 00ff 11 0780 0438, 01 08 00019ceb 05557fff 00000fff 02 0000 00ff 11 0780 0438
wfd_audio_codecs: LPCM 00000003 02, AAC 00000001 02, AC3 00000000 02
wfd_client_rtp_ports: RTP/AVP/UDP;unicast 24030 0 mode=play
SET_PARAMETER rtsp://localhost/wfd1.0 RTSP/1.0
CSeq: 3
Content-Length: 209

wfd_client_rtp_ports: RTP/AVP/UDP;unicast 24030 0 mode=play
wfd_presentation_url: rtsp://127.0.0.1/wfd1.0/streamid=0 none
wfd_video_formats: 00 00 01 01 00000001 00000000 00000000 00 0000 0000 00 0000 0000
RTSP/1.0 200 OK
CSeq: 3

SET_PARAMETER rtsp://localhost/wfd1.0 RTSP/1.0
CSeq: 4
Content-Length: 27

wfd_trigger_method: SETUP
RTSP/1.0 403 Forbidden
CSeq: 4

MiracSink::handle_m5_trigger_setup aborts

handle_m5_trigger_setup aborts, I think when it tries to clean up: it complains about invalid size free in WFD::TransportHeader::~TransportHeader().
#0 0x00007ffff643d077 in __GI_raise (sig=sig@entry=6)

at ../nptl/sysdeps/unix/sysv/linux/raise.c:56

#1 0x00007ffff643e458 in __GI_abort () at abort.c:89
#2 0x00007ffff647afb4 in __libc_message (do_abort=do_abort@entry=1,

fmt=fmt@entry=0x7ffff656dbc0 "*** Error in `%s': %s: 0x%s ***\n")
at ../sysdeps/posix/libc_fatal.c:175

#3 0x00007ffff648078e in malloc_printerr (action=1,

str=0x7ffff6569c96 "free(): invalid size", ptr=<optimized out>)
at malloc.c:4996

#4 0x00007ffff6481496 in _int_free (av=,

p=<optimized out>, have_lock=0) at malloc.c:3840

#5 0x0000000000471c4a in WFD::TransportHeader::~TransportHeader (

this=0x7fffffffddf0, __in_chrg=<optimized out>)
at /home/wysiwidi/src/wysiwidi/wfd_parser/transportheader.cpp:42

#6 0x000000000046ffec in std::default_deleteWFD::TransportHeader::operator() (this=0x8c05a0, __ptr=0x7fffffffddf0)

at /usr/include/c++/4.9/bits/unique_ptr.h:76

#7 0x000000000046f837 in std::unique_ptr<WFD::TransportHeader, std::default_deleteWFD::TransportHeader >::~unique_ptr (this=0x8c05a0,

__in_chrg=<optimized out>)
at /usr/include/c++/4.9/bits/unique_ptr.h:236

#8 0x000000000046eb1d in WFD::Header::~Header (this=0x8c0580,

__in_chrg=<optimized out>)
at /home/wysiwidi/src/wysiwidi/wfd_parser/header.cpp:45

#9 0x000000000046eb5c in WFD::Header::~Header (this=0x8c0580,

__in_chrg=<optimized out>)
at /home/wysiwidi/src/wysiwidi/wfd_parser/header.cpp:46

#10 0x000000000046e77e in std::default_deleteWFD::Header::operator() (

this=0x7fffffffdda8, __ptr=0x8c0580)
at /usr/include/c++/4.9/bits/unique_ptr.h:76

#11 0x000000000046e4b5 in std::unique_ptr<WFD::Header, std::default_deleteWFD::Header >::~unique_ptr (this=0x7fffffffdda8,

__in_chrg=<optimized out>)
at /usr/include/c++/4.9/bits/unique_ptr.h:236

#12 0x000000000046df49 in WFD::Message::~Message (this=0x7fffffffdd90,

__in_chrg=<optimized out>)
at /home/wysiwidi/src/wysiwidi/wfd_parser/message.cpp:32

#13 0x0000000000478fc9 in WFD::Setup::~Setup (this=0x7fffffffdd90,

__in_chrg=<optimized out>)
at /home/wysiwidi/src/wysiwidi/wfd_parser/setup.cpp:31

#14 0x0000000000460d15 in MiracSink::handle_m5_trigger_setup(std::shared_ptrWFD::Message) ()
#15 0x0000000000461816 in MiracSink::got_message(std::shared_ptrWFD::Message) ()
#16 0x0000000000469d57 in MiracBroker::handle_body(std::string) ()
#17 0x0000000000469bd0 in MiracBroker::handle_header(std::string) ()
#18 0x0000000000469991 in MiracBroker::receive_cb(int, GIOCondition) ()
#19 0x0000000000469774 in MiracBroker::receive_cb(int, GIOCondition, void*) ()
#20 0x00007ffff7549b6d in g_main_context_dispatch ()

from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#21 0x00007ffff7549f48 in ?? ()

from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#22 0x00007ffff754a272 in g_main_loop_run ()

from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#23 0x000000000045e827 in main ()

sink needs to call gst_init()

Not sure where we should put it though... We probably want to support the common gst command line options so I guess main.c makes senses (note that it's a bit tricky: gst_init() will die on unrecognised options so you can't just feed it argv). For now I'll be fine with just a gst_init() anywhere.

Atheros ath9k WiFi adapter

Just wanted to let you guys know the sink also works with my Atheros AR9287 based WiFi adapter, using the ath9k driver and my Nexus 4.

At first, there were some connection issues which I've worked around, and now, after I've updated to the latest wpa_supplicant (I noticed there were some interesting changes in the last couple of days) the workarounds are no longer necessary and it works out of the box.
You might want to update your wpa_supplicant version recommendation.

I do have some issues with gstreamer, but that's another matter, though if you could document which plugins are needed that would help. Currently I have no sound, and there are some decoding errors (libav stuff).

MiracNetwork::Receive exceptions should be handled

Receive throws exceptions once in a while and I don't think we're handling them properly. Note to self: check what the problems are, handle them.

For those following at office: I just saw several seconds of my android phone display streamed to my laptop before this bug cut it short. This thing might actually work!

Some of problem whem testing WDS sink with an Android device

Testing WDS sink with an Android device:

  • start sink: sink/sink-test
  • Android: select the sink from the list in "Settings > Display > Cast Screen"
  • connmanctl: when agent asks, accept the connection
    The problem is that:
    Waiting for a long time, no window to open, no audio / video stream to play.

connection "succeeds" when it shouldn't

It's possible that I'm Doing It Wrong but: if I have any working network connection (so a default gateway), connecting to any address:port "succeeds", as in at some point a call to MiracNetwork::Connect() returns TRUE. I know for a fact that there was nothing in that ip. Have I misunderstood how MiracNetwork should work?

RTP playback issues

Try playing streams with something like

GST_DEBUG_DUMP_DOT_DIR=. gst-launch-1.0 udpsrc port=5000 caps="application/x-rtp" ! rtpmp2tdepay ! decodebin name=decoder ! "audio/x-raw" ! .audio_sink playsink name=sink    decoder. ! "video/x-raw" ! sink.video_sink

(and also with jitterbuffer in there)

Need a README and a blog post

I've answered two requests for information about wysiwidi today. We really need

  • a README that explains features, requirements, limitations, building and testing
  • a blog post (or a wiki page) that expands on the above: how do we see it being used, why does it work like it does, what are the rough plans for future, etc

I'll do them this week if no-one else steps up in the mean time

something about HDCP.

Hi,
I am conducting miracast test with the source code on the web https://github.com/albfan/miraclecast/ .
Most of the devices can successfully cast screen, however, it fails when it is conducted on Win10.
The reason may be that there is no parameter "wfd_content_protection" in miraclecast while the RTSP parameter of โ€œwfd_content_protection: HDCP2.1โ€ needs to be configured on Win10. That is, HDCP encryption and decryption need to be carried out.
The WDS source code did contain function "wfd_content_protection", but no HDCP algorithms as SHA256, AES-128, HMAC-SHA256 and CTR-DRBG is listed.
Could I ask you some questions about the detail?
1๏ผ‰Can I do Wi-Fi Display directely on Win10 using WDS ?
2๏ผ‰How will the encryption and decryption algorithms of HDCP be implemented in wds๏ผŸ
Thank you so much for your time!

wfd_video_formats max-hres/max-vres are not "none" whan they should be

desktop_source ends up sending this:

SET_PARAMETER rtsp://localhost/wfd1.0 RTSP/1.0
CSeq: 3
Content-Length: 209

wfd_client_rtp_ports: RTP/AVP/UDP;unicast 19000 0 mode=play
wfd_presentation_url: rtsp://127.0.0.1/wfd1.0/streamid=0 none
wfd_video_formats: 00 00 01 01 00000001 00000000 00000000 00 0000 0000 00 0000 0000

I think wfd_video_formats is wrong: max-hres and max-vres values depend on the message they're in (yeah, crazy). In M4 request the values are always "none". In M3 response they are "none" if preferred-display-mode is not supported, and a 4*4hexdigit otherwise.

Requests should include User-Agent

This would be useful already while reading the logs. It'll be even more useful once other people start running this and sending bug reports...

We should have a default User-Agent "Wysiwidi X.Y" and a way to set the value. I don't immediately see who/what should set the user-agent for every Request we send.

Broker/Network should clean up GLib event sources

All those calls to g_unix_fd_add() should be accompanied by a g_source_remove() at some point.

Not doing that means the Broker callbacks still get called after the Broker is released... Not good.

Unable to display the Mirrored Screen

Hi,
I have followed the given steps in the README.md and successfully compiled wds with all dependencies. But When I use ./sink-test in the wds/sink/ directory, Sometimes it will connect but it wont display the mirrored screen. After connecting I am getting the following error
error: XDG_RUNTIME_DIR not set in the environment.
libva info: VA-API version 0.36.1
libva info: va_getDriverName() returns -1
libva error: va_getDriverName() failed with unknown libva error,driver_name=(null)

And one more thing after disconnecting the wireless display device, again it wont connect. I have to manually reboot the device and execute the commands. Can you please tell me the steps to do it properly?

Tell me the proper steps to build and run without error.

Thanks

Real management service component

What is the actual prupose of the WDS project? Is it just to have a library bundling the core of WiFi Display or to implement also a management service component on top of that plugging all bits and peaces together (like the desktop_source_test/sink_test utilities are already doing to some degree)?

Working with Linux as Source and Miracast Dongle

Unfortunately I had similar problems as here:
#87

I see to change those parameters but I don't know where. How do I set up a connection to peer and then launch gst manually. I'm a bit of a confused novice here.

When I tried connecting to peer with connmanctl it successfully connects then immediately disconnects. Subsequent to that I would not know what to do except launch the gst commands.

Any help is much appreciated.

crash in M3 reply H264Profile handling

100% reproducable with the LG TV (32LN575S-ZE).

Note that TV can only manage one connection -- after that you need to reboot it to test again :)

desktop-source-test: /home/wysiwidi/src/wysiwidi/wfd/parser/videoformats.cpp:115: EnumType wfd::{anonymous}::MaskToEnum(ArgType, EnumType) [with EnumType = wfd::H264VideoFormat::H264Profile; ArgType = unsigned char]: Assertion `false' failed.

Program received signal SIGABRT, Aborted.
0x00007ffff6175107 in __GI_raise (sig=sig@entry=6)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56  ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  0x00007ffff6175107 in __GI_raise (sig=sig@entry=6)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00007ffff61764e8 in __GI_abort () at abort.c:89
#2  0x00007ffff616e226 in __assert_fail_base (
    fmt=0x7ffff62a4968 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", 
    assertion=assertion@entry=0x7ffff7ba87d0 "false", 
    file=file@entry=0x7ffff7ba8798 "/home/wysiwidi/src/wysiwidi/wfd/parser/videoformats.cpp", line=line@entry=115, 
    function=function@entry=0x7ffff7ba8b40 <wfd::H264VideoFormat::H264Profile wfd::(anonymous namespace)::MaskToEnum<wfd::H264VideoFormat::H264Profile, unsigned char>(unsigned char, wfd::H264VideoFormat::H264Profile)::__PRETTY_FUNCTION__> "EnumType wfd::{anonymous}::MaskToEnum(ArgType, EnumType) [with EnumType = wfd::H264VideoFormat::H264Profile; ArgType = unsigned char]") at assert.c:92
#3  0x00007ffff616e2d2 in __GI___assert_fail (
    assertion=0x7ffff7ba87d0 "false", 
    file=0x7ffff7ba8798 "/home/wysiwidi/src/wysiwidi/wfd/parser/videoformats.cpp", line=115, 
    function=0x7ffff7ba8b40 <wfd::H264VideoFormat::H264Profile wfd::(anonymous namespace)::MaskToEnum<wfd::H264VideoFormat::H264Profile, unsigned char>(unsigned char, wfd::H264VideoFormat::H264Profile)::__PRETTY_FUNCTION__> "EnumType wfd::{anonymous}::MaskToEnum(ArgType, EnumType) [with EnumType = wfd::H264VideoFormat::H264Profile; ArgType = unsigned char]")
    at assert.c:101
#4  0x00007ffff7b796bb in wfd::(anonymous namespace)::MaskToEnum<wfd::H264VideoFormat::H264Profile, unsigned char> (from=2 '\002', 
    biggest_value=wfd::H264VideoFormat::CBP)
    at /home/wysiwidi/src/wysiwidi/wfd/parser/videoformats.cpp:115
#5  0x00007ffff7b78c18 in wfd::(anonymous namespace)::ToH264Profile (
    profile=2 '\002')
    at /home/wysiwidi/src/wysiwidi/wfd/parser/videoformats.cpp:122
#6  0x00007ffff7b78c57 in wfd::H264Codec::ToVideoFormat (this=0x80fe80)
    at /home/wysiwidi/src/wysiwidi/wfd/parser/videoformats.cpp:133
#7  0x00007ffff7b790ed in wfd::VideoFormats::GetSupportedH264Formats (
    this=0x80fb30)
    at /home/wysiwidi/src/wysiwidi/wfd/parser/videoformats.cpp:210
#8  0x00007ffff7b92441 in wfd::source::M3Handler::HandleReply (
    this=0x80ca30, reply=0x814160)
    at /home/wysiwidi/src/wysiwidi/wfd/source/cap_negotiation_state.cpp:82
#9  0x00007ffff7b819cf in wfd::MessageSenderBase::Handle (this=0x80ca30, 
    message=std::unique_ptr<wfd::Message> containing 0x814160)
    at /home/wysiwidi/src/wysiwidi/wfd/common/message_handler.cpp:293
#10 0x00007ffff7b7ff2c in wfd::MessageSequenceHandler::Handle (
    this=0x80c9c0, message=std::unique_ptr<wfd::Message> containing 0x0)
    at /home/wysiwidi/src/wysiwidi/wfd/common/message_handler.cpp:75
#11 0x00007ffff7b7ff2c in wfd::MessageSequenceHandler::Handle (
    this=0x808b00, message=std::unique_ptr<wfd::Message> containing 0x0)
    at /home/wysiwidi/src/wysiwidi/wfd/common/message_handler.cpp:75
#12 0x00007ffff7b90ec8 in wfd::SourceImpl::MessageParsed (this=0x809c60, 
    message=std::unique_ptr<wfd::Message> containing 0x0)
    at /home/wysiwidi/src/wysiwidi/wfd/source/source.cpp:230
#13 0x00007ffff7b8444c in wfd::RTSPInputHandler::ParsePayload (
    this=0x809c68)
    at /home/wysiwidi/src/wysiwidi/wfd/common/rtsp_input_handler.cpp:76
#14 0x00007ffff7b84168 in wfd::RTSPInputHandler::InputReceived (
    this=0x809c68, 
    input="RTSP/1.0 200 OK\r\nCSeq: 2\r\nContent-Type: text/parameters\r\nContent-Length: 276\r\n\r\nwfd_audio_codecs: LPCM 00000003 00, AAC 00000007 00, AC3 00000007 00\r\nwfd_video_formats: 40 00 01 08 0001FFFF 3FFFFFFF 0"...)
    at /home/wysiwidi/src/wysiwidi/wfd/common/rtsp_input_handler.cpp:40
#15 0x00007ffff7b90503 in wfd::SourceImpl::RTSPDataReceived (
    this=0x809c60, 
    message="RTSP/1.0 200 OK\r\nCSeq: 2\r\nContent-Type: text/parameters\r\nContent-Length: 276\r\n\r\nwfd_audio_codecs: LPCM 00000003 00, AAC 00000007 00, AC3 00000007 00\r\nwfd_video_formats: 40 00 01 08 0001FFFF 3FFFFFFF 0"...) at /home/wysiwidi/src/wysiwidi/wfd/source/source.cpp:139
#16 0x000000000042df56 in MiracBrokerSource::got_message (this=0x805500, 
    message="RTSP/1.0 200 OK\r\nCSeq: 2\r\nContent-Type: text/parameters\r\nContent-Length: 276\r\n\r\nwfd_audio_codecs: LPCM 00000003 00, AAC 00000007 00, AC3 00000007 00\r\nwfd_video_formats: 40 00 01 08 0001FFFF 3FFFFFFF 0"...)
    at /home/wysiwidi/src/wysiwidi/desktop_source/mirac_broker_source.cpp:34
#17 0x000000000043044b in MiracBroker::receive_cb (this=0x805500, fd=7, 
    condition=G_IO_IN)
    at /home/wysiwidi/src/wysiwidi/mirac_network/mirac-broker.cpp:85
#18 0x0000000000430266 in MiracBroker::receive_cb (fd=7, 
    condition=G_IO_IN, data_ptr=0x805500)
    at /home/wysiwidi/src/wysiwidi/mirac_network/mirac-broker.cpp:45
#19 0x00007ffff7282b6d in g_main_context_dispatch ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#20 0x00007ffff7282f48 in ?? ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#21 0x00007ffff7283272 in g_main_loop_run ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#22 0x000000000042b189 in main (argc=1, argv=0x7fffffffe338)
    at /home/wysiwidi/src/wysiwidi/desktop_source/main.cpp:124

Black/frozen screen

Hi! I'm running Arch Linux with wpa_supplicant 2.5, connman 1.30 and gstreamer 1.6.2.

I'm trying to stream laptop screen on my tv, but I'm unable to connect through 'desktop-source-test':

* Registering Wi-Fi Display Source with IE 00000600101C440032
* Now scanning for peers...
  0 : TOSHIBA LCDTV-TV
* scan complete
connect 0
connect error GDBus.Error:net.connman.Error.Failed: Input/output error

I'm able to connect manually using connmanctl > connect , but the tv shows a blank screen and sometimes there is a single frozen screenshot of a screen. I also get a warning:

* Connected to 192.168.1.2
** Message: connection from: 192.168.1.2
** (desktop-source-test:1317): WARNING **: Unimplemented IDR picture request

I have searched for answers in the mailing list and I cheched that I do have x264enc installed:

$ gst-inspect-1.0 | grep x264encx264:  
x264enc: x264enc

G_MESSAGES_DEBUG=all output is next:

$ G_MESSAGES_DEBUG=all /opt/wds/desktop_source/desktop-source-test
* Registering Wi-Fi Display Source with IE 00000600101C440032
* Now scanning for peers...
  0 : TOSHIBA LCDTV-TV
* scan complete
connect 0
connect error GDBus.Error:net.connman.Error.Failed: Input/output error

// manually connecting here using connmanctl..

* Connected to 192.168.1.2
** Message: connection from: 192.168.1.2
(desktop-source-test:3794): rtsp-DEBUG: Sending RTSP message:
OPTIONS * RTSP/1.0
CSeq: 1
Require: org.wfa.wfd1.0

(desktop-source-test:3794): rtsp-DEBUG: Received RTSP message:
RTSP/1.0 200 OK
CSeq: 1
Date: Tue, Dec 15 2015 14:48:31 GMT
Public: org.wfa.wfd1.0, GET_PARAMETER, SET_PARAMETER

(desktop-source-test:3794): rtsp-DEBUG: Received RTSP message:
OPTIONS * RTSP/1.0
CSeq: 1
Require: org.wfa.wfd1.0

(desktop-source-test:3794): rtsp-DEBUG: Sending RTSP message:
RTSP/1.0 200 OK
CSeq: 1
Public: org.wfa.wfd1.0, GET_PARAMETER, SET_PARAMETER, PLAY, PAUSE, SETUP, TEARDOWN

(desktop-source-test:3794): rtsp-DEBUG: Sending RTSP message:
GET_PARAMETER rtsp://localhost/wfd1.0 RTSP/1.0
CSeq: 2
Content-Type: text/parameters
Content-Length: 41

wfd_video_formats
wfd_client_rtp_ports

(desktop-source-test:3794): rtsp-DEBUG: Received RTSP message:
RTSP/1.0 200 OK
CSeq: 2
Content-Type: text/parameters
Content-Length: 206

wfd_video_formats: 38 00 01 01 0001ffff 3fffffff 00000fff 64 0008 000f 00 none none, 02 04 0001ffff 3fffffff 00000fff 64 0008 000f 00 none none
wfd_client_rtp_ports: RTP/AVP/UDP;unicast 42030 0 mode=play

(desktop-source-test:3794): rtsp-DEBUG: Sending RTSP message:
SET_PARAMETER rtsp://localhost/wfd1.0 RTSP/1.0
CSeq: 3
Content-Type: text/parameters
Content-Length: 209

wfd_client_rtp_ports: RTP/AVP/UDP;unicast 42030 0 mode=play
wfd_presentation_URL: rtsp://127.0.0.1/wfd1.0/streamid=0 none
wfd_video_formats: 00 00 02 04 00000100 00000000 00000000 00 0000 0000 00 none none

(desktop-source-test:3794): rtsp-DEBUG: Received RTSP message:
RTSP/1.0 200 OK
CSeq: 3

(desktop-source-test:3794): rtsp-DEBUG: Sending RTSP message:
SET_PARAMETER rtsp://localhost/wfd1.0 RTSP/1.0
CSeq: 4
Content-Type: text/parameters
Content-Length: 27

wfd_trigger_method: SETUP

(desktop-source-test:3794): rtsp-DEBUG: Received RTSP message:
RTSP/1.0 200 OK
CSeq: 4

(desktop-source-test:3794): rtsp-DEBUG: Received RTSP message:
SETUP rtsp://127.0.0.1/wfd1.0/streamid=0 RTSP/1.0
CSeq: 2
Transport: RTP/AVP/UDP;unicast;client_port=42030

(desktop-source-test:3794): rtsp-DEBUG: Sending RTSP message:
RTSP/1.0 200 OK
CSeq: 2
Session: abcdefg123456;timeout=60
Transport: RTP/AVP/UDP;unicast;client_port=42030;server_port=49224

(desktop-source-test:3794): rtsp-DEBUG: Received RTSP message:
PLAY rtsp://127.0.0.1/wfd1.0/streamid=0 RTSP/1.0
CSeq: 3
Session: abcdefg123456

(desktop-source-test:3794): rtsp-DEBUG: Sending RTSP message:
RTSP/1.0 200 OK
CSeq: 3

(desktop-source-test:3794): rtsp-DEBUG: Received RTSP message:
SET_PARAMETER rtsp://localhost/wfd1.0 RTSP/1.0
CSeq: 4
Content-Type: text/parameters
Content-Length: 17
Session: abcdefg123456

wfd_idr_request

** (desktop-source-test:3794): WARNING **: Unimplemented IDR picture request
(desktop-source-test:3794): rtsp-DEBUG: Sending RTSP message:
RTSP/1.0 200 OK
CSeq: 4

(desktop-source-test:3794): rtsp-DEBUG: Sending RTSP message:
GET_PARAMETER rtsp://localhost/wfd1.0 RTSP/1.0
CSeq: 5

(desktop-source-test:3794): rtsp-DEBUG: Received RTSP message:
RTSP/1.0 200 OK
CSeq: 5
Session: abcdefg123456

What can be the case? Thanks!

p2p and sink whitespace cleanup

(reminder to myself)

I believe I messed the whitespaces in the p2p patch set. Also p2p/ and sink/ really could be more uniform in style.

redesign connection establishment

Now we know when connect() fails but that doesn't actually make things work for the proof of concept:
There's currently no way to restart the connection attempt if it fails (on the Connect(NULL, NULL) call). On the other hand we don't really know when the source wants us to connect to it so we need to try until a connection is made.

reliablity of sink

Hey there,

I'm testing out wds on Ubuntu 14.10 with wpa_supplicant 2.4, connmand 1.30, and an Onkyo UWF-1 wifi adaptor (chipset i believe is AR9271), with a Nexus 10 tablet (Android 5.1.1). I'm just wondering, following the instructions in the README here, I manage to connect and cast about 30% or 40% of the time.

I get a variety of failure modes:

  • stays stuck on connecting
  • my sink disappears from the cast screen list and reappears
  • gets stuck in an appearing -> connecting -> appearing -> connecting loop
  • after accepting the connection in connmanctl an invite appears back on the android tablet saying my host wants to connect to it. No connection is made after.

I've tried with the same tablet and a Microsoft Wireless Display adapter and it seems to connect every time so I don't think it's on the android side.

So, just wondering, what reliability do ye get? And what could you suggest changing in my setup to improve reliability? Let me know if you have any questions or want output from anything.

(Possibly each of the list above should be their own issue, but I just wanted to make sure it isn't my setup first)

Cheers,
Alex.

IOP: Netgear Push2TV sends SETUP without Request-URI

Testing our source with the Netgear Push2TV sink we receive what seems to me like a malformed RTSP request (notice the missing Request-URI) and we just drop it. The earlier OPTIONS message does contain a Request-URI (but then again that one is just "*").

Relevant debug output from the source:

(desktop-source-test:6167): rtsp-DEBUG: Received RTSP message:
SETUP  RTSP/1.0
CSeq: 2
User-Agent: SEC-WDH/ME29
Transport: RTP/AVP/UDP;unicast;client_port=19000


Unknown message
Unknown message
Unknown message
Unknown message
Unknown message
Unknown message
Unknown message
Unknown message
Unknown message

source video params should be tweaked for desktop mirroring use case

I think the encoder in desktop_source (or something on the pipeline) is doing some optimizations that work for movies but not so well for desktop mirroring:
small changes often don't show up on the sink until next keyframe. E.g. it's possible to move the mouse cursor slowly to the other side of the screen without the display on the sink getting updated. Likewise while writing this comment the text appears in bursts as if small letters might not trigger an update on their own.

badly handled disconnection in wfd

Disconnecting from the source (android) side makes the sink go belly up:

This is definitely not a pristine source clone from master but I don't think the changes are relevant to this.

(gdb) r
Starting program: /home/wysiwidi/src/wysiwidi/sink/sink-test 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
* Registering Wifi Display with IE 00000600111C440032
[New Thread 0x7ffff5275700 (LWP 12223)]
[New Thread 0x7ffff4a74700 (LWP 12224)]
[New Thread 0x7fffeffff700 (LWP 12225)]
[New Thread 0x7fffef7fe700 (LWP 12226)]
* New peer: Nexus 5 (jku)
[Thread 0x7ffff5275700 (LWP 12223) exited]
[Thread 0x7ffff4a74700 (LWP 12224) exited]
* Connecting to source at 192.168.3.2:7236
** Message: Trying to connect...
** Message: connection success to: 192.168.3.2
terminate called after throwing an instance of 'std::bad_weak_ptr'
  what():  bad_weak_ptr

Program received signal SIGABRT, Aborted.
0x00007ffff6180107 in __GI_raise (sig=sig@entry=6)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56  ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  0x00007ffff6180107 in __GI_raise (sig=sig@entry=6)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00007ffff61814e8 in __GI_abort () at abort.c:89
#2  0x00007ffff6c88b3d in __gnu_cxx::__verbose_terminate_handler() ()
   from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3  0x00007ffff6c86bb6 in ?? ()
   from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4  0x00007ffff6c86c01 in std::terminate() ()
   from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5  0x00007ffff6c86e19 in __cxa_throw ()
   from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6  0x00007ffff7b8993f in std::__throw_bad_weak_ptr ()
    at /usr/include/c++/4.9/bits/shared_ptr_base.h:78
#7  0x00007ffff7b8b7f2 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count (this=0x7fffffffdb98, __r=...)
    at /usr/include/c++/4.9/bits/shared_ptr_base.h:822
#8  0x00007ffff7b8b3f7 in std::__shared_ptr<wfd::MessageHandler, (__gnu_cxx::_Lock_policy)2>::__shared_ptr<wfd::MessageHandler> (
    this=0x7fffffffdb90, __r=...)
    at /usr/include/c++/4.9/bits/shared_ptr_base.h:940
#9  0x00007ffff7b8ac35 in std::shared_ptr<wfd::MessageHandler>::shared_ptr<wfd::MessageHandler> (this=0x7fffffffdb90, 
    __r=std::weak_ptr (empty) 0x0)
    at /usr/include/c++/4.9/bits/shared_ptr.h:249
#10 0x00007ffff7b8a2e9 in std::enable_shared_from_this<wfd::MessageHandler>::shared_from_this (this=0x7fe1e8)
    at /usr/include/c++/4.9/bits/shared_ptr.h:547
#11 0x00007ffff7b87d63 in wfd::MessageSequenceHandler::OnCompleted (
    this=0x7fe1e0, handler=std::shared_ptr (count 3, weak 1) 0x805e50)
    at /home/wysiwidi/src/wysiwidi/wfd/common/message_handler.cpp:90
#12 0x00007ffff7b87d77 in wfd::MessageSequenceHandler::OnCompleted (
    this=0x805e50, handler=std::shared_ptr (count 3, weak 1) 0x805ed0)
    at /home/wysiwidi/src/wysiwidi/wfd/common/message_handler.cpp:90
#13 0x00007ffff7b88a76 in wfd::MessageSequenceWithOptionalSetHandler::OnCo---Type <return> to continue, or q <return> to quit---
mpleted (this=0x805e50, 
    handler=std::shared_ptr (count 3, weak 1) 0x805ed0)
    at /home/wysiwidi/src/wysiwidi/wfd/common/message_handler.cpp:199
#14 0x00007ffff7b87d77 in wfd::MessageSequenceHandler::OnCompleted (
    this=0x805ed0, handler=std::shared_ptr (count 2, weak 1) 0x805fc0)
    at /home/wysiwidi/src/wysiwidi/wfd/common/message_handler.cpp:90
#15 0x00007ffff7b895f9 in wfd::MessageSenderBase::Handle (this=0x805fc0, 
    message=std::unique_ptr<wfd::Message> containing 0x80b500)
    at /home/wysiwidi/src/wysiwidi/wfd/common/message_handler.cpp:295
#16 0x00007ffff7b87ab1 in wfd::MessageSequenceHandler::Handle (
    this=0x805ed0, message=std::unique_ptr<wfd::Message> containing 0x0)
    at /home/wysiwidi/src/wysiwidi/wfd/common/message_handler.cpp:71
#17 0x00007ffff7b87ab1 in wfd::MessageSequenceHandler::Handle (
    this=0x805e50, message=std::unique_ptr<wfd::Message> containing 0x0)
    at /home/wysiwidi/src/wysiwidi/wfd/common/message_handler.cpp:71
#18 0x00007ffff7b886ac in wfd::MessageSequenceWithOptionalSetHandler::Handle (this=0x805e50, message=std::unique_ptr<wfd::Message> containing 0x0)
    at /home/wysiwidi/src/wysiwidi/wfd/common/message_handler.cpp:168
#19 0x00007ffff7b87ab1 in wfd::MessageSequenceHandler::Handle (
    this=0x7fe1e0, message=std::unique_ptr<wfd::Message> containing 0x0)
    at /home/wysiwidi/src/wysiwidi/wfd/common/message_handler.cpp:71
#20 0x00007ffff7b8c7d0 in wfd::SinkImpl::MessageParsed (this=0x7fef90, 
    message=std::unique_ptr<wfd::Message> containing 0x0)
    at /home/wysiwidi/src/wysiwidi/wfd/sink/sink.cpp:167
#21 0x00007ffff7b8bf57 in wfd::RTSPInputHandler::ParsePayload (
    this=0x7fef98)
    at /home/wysiwidi/src/wysiwidi/wfd/common/rtsp_input_handler.cpp:66
#22 0x00007ffff7b8bd54 in wfd::RTSPInputHandler::InputReceived (
    this=0x7fef98, 
    input="RTSP/1.0 200 OK\r\nDate: Mon, 19 Jan 2015 20:04:44 +0000\r\nServer: stagefright/1.2 (Linux;Android 5.0.1)\r\nCSeq: 4\r\nSession: 1745858788;timeout=30\r\nConnection: close\r\n\r\n")
    at /home/wysiwidi/src/wysiwidi/wfd/common/rtsp_input_handler.cpp:40
#23 0x00007ffff7b8c423 in wfd::SinkImpl::RTSPDataReceived (
    this=0x7fef90, 
    message="RTSP/1.0 200 OK\r\nDate: Mon, 19 Jan 2015 20:04:44 +0000\r\nServer: stagefright/1.2 (Linux;Android 5.0.1)\r\nCSeq: 4\r\nSession: 1745858788;timeout=30\r\nConnection: close\r\n\r\n")
    at /home/wysiwidi/src/wysiwidi/wfd/sink/sink.cpp:129
#24 0x000000000042744c in Sink::got_message (this=0x802b10, 
    message="RTSP/1.0 200 OK\r\nDate: Mon, 19 Jan 2015 20:04:44 +0000\r\nServer: stagefright/1.2 (Linux;Android 5.0.1)\r\nCSeq: 4\r\nSession: 1745858788;timeout=30\r\nConnection: close\r\n\r\n")
    at /home/wysiwidi/src/wysiwidi/sink/sink.cpp:33
#25 0x00000000004290cb in MiracBroker::receive_cb (this=0x802b10, fd=7, 
    condition=G_IO_IN)
    at /home/wysiwidi/src/wysiwidi/mirac_network/mirac-broker.cpp:85
#26 0x0000000000428ee6 in MiracBroker::receive_cb (fd=7, 
    condition=G_IO_IN, data_ptr=0x802b10)
    at /home/wysiwidi/src/wysiwidi/mirac_network/mirac-broker.cpp:45
#27 0x00007ffff728db6d in g_main_context_dispatch ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#28 0x00007ffff728df48 in ?? ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#29 0x00007ffff728e272 in g_main_loop_run ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#30 0x0000000000425dc4 in main (argc=1, argv=0x7fffffffe358)
    at /home/wysiwidi/src/wysiwidi/sink/main.cpp:123

p2p: use Manager API to get P2P Technology object path

Currently the object path is hard coded. The path doesn't really change but using the Manager API would allow us to see when a P2P technology becomes available or unavailable -- this would be relevant for USB wifi mostly.

Can connect more than one device to a WDS Sink

Morning,

I would like to connect more than one device to a WDS sink.

Now for each "P2P :: Peer", "connman" starts a new DHCP server with a new IP domain.
So, exists any way to connect more than one device to the WDS Sink? Configuring "connman" in a specific mode, change the way to create the WDS Sink, ...

Thank you.

Francisco Moya

error when running connmand

Hi,
I'm running ubuntu 14.10 wpa_supplicant2.4 and connman 1.28, when I run the command sudo connmand -n -d I get this error :

Failed to create storage directory: No such file or directory
Connection ":1.144" is not allowed to own the service "net.connman" due to security policies in the configuration file
Does anyone have idea about what's wrong because when googling it, I didn't find very useful answers ?

connman/supplicant fails to clean up after a P2P connection

This is a connman/supplicant issue but a testing road block for us so documenting here.

The p2p interface stays even after our sink has exited (and android has disconnected). It messes up networking afterwards, for both future p2p connections and normal ones: connman has to be restarted for anything to work. I'll talk this over with tomasz

wysiwidi not working in the last step

Hi,
I'm trying to test wysiwidi but it does not work. I'm running Fedora 21 with kernel 3.18. Also I am running wpa_supplicant (2.3) and connman (1.28). After agent asks I accept the connection, but nothing happens and no stream start playing, but I didn't get any error.The android device is Nexus 7 (5.0.1).
Any suggestion ?

LG TV sends wfd_video_formats that breaks MaskToEnumList()

@pozdnyakov , you maybe have an idea about this...

(desktop-source-test:13925): rtsp-DEBUG: Sending RTSP message:
OPTIONS * RTSP/1.0
CSeq: 1
Require: org.wfa.wfd1.0

  • scan complete
    (desktop-source-test:13925): rtsp-DEBUG: Received RTSP message:
    RTSP/1.0 200 OK
    CSeq: 1
    Public: org.wfa.wfd1.0, GET_PARAMETER, SET_PARAMETER

OPTIONS * RTSP/1.0
CSeq: 1
User-Agent: LGE
Require: org.wfa.wfd1.0

(desktop-source-test:13925): rtsp-DEBUG: Sending RTSP message:
RTSP/1.0 200 OK
CSeq: 1
Public: org.wfa.wfd1.0, GET_PARAMETER, SET_PARAMETER, PLAY, PAUSE, SETUP, TEARDOWN

(desktop-source-test:13925): rtsp-DEBUG: Sending RTSP message:
GET_PARAMETER rtsp://localhost/wfd1.0 RTSP/1.0
CSeq: 2
Content-Length: 59

wfd_video_formats
wfd_audio_codecs
wfd_client_rtp_ports

(desktop-source-test:13925): rtsp-DEBUG: Received RTSP message:
RTSP/1.0 200 OK
CSeq: 2
Content-Type: text/parameters
Content-Length: 276

wfd_audio_codecs: LPCM 00000003 00, AAC 00000007 00, AC3 00000007 00
wfd_video_formats: 40 00 01 08 0001FFFF 3FFFFFFF 000005FF 00 0000 0000 10 none none, 02 08 0001FFFF 3FFFFFFF 000005FF 00 0000 0000 10 none none
wfd_client_rtp_ports: RTP/AVP/UDP;unicast 19000 0 mode=play

desktop-source-test: /home/wysiwidi/src/wysiwidi/wfd/parser/videoformats.cpp:131: std::vector wfd::{anonymous}::MaskToEnumList(ArgType, EnumType) [with EnumType = wfd::VESARatesAndResolutions; ArgType = unsigned int]: Assertion `false' failed.
Aborted

Hi,

Hi, I'm testing wysiwidi and it seems that it is working but when I run the command G_MESSAGES_DEBUG=all ./sink-test a window is open and I get just a first picture from my android device and then it's blocked there and also no sound I can here from my desktop.
capture du 2015-04-08 09 14 00

this is the output of G_MESSAGES_DEBUG=all ./sink-test :

  • Registering Wifi Display with IE 00000600111C440032
  • New peer: Android_5e33
  • Connecting to source at 192.168.0.2:7236
    ** Message: Trying to connect...
    ** Message: connection success to: 192.168.0.2
    (sink-test:25424): rtsp-DEBUG: Received RTSP message:
    OPTIONS * RTSP/1.0
    Date: Wed, 08 Apr 2015 08:10:16 +0000
    Server: stagefright/1.2 (Linux;Android 4.4.2)
    CSeq: 1
    Require: org.wfa.wfd1.0

(sink-test:25424): rtsp-DEBUG: Sending RTSP message:
RTSP/1.0 200 OK
CSeq: 1
Public: org.wfa.wfd1.0, GET_PARAMETER, SET_PARAMETER

(sink-test:25424): rtsp-DEBUG: Sending RTSP message:
OPTIONS * RTSP/1.0
CSeq: 1
Require: org.wfa.wfd1.0

(sink-test:25424): rtsp-DEBUG: Received RTSP message:
RTSP/1.0 200 OK
Date: Wed, 08 Apr 2015 08:10:16 +0000
Server: stagefright/1.2 (Linux;Android 4.4.2)
CSeq: 1
Public: org.wfa.wfd1.0, SETUP, TEARDOWN, PLAY, PAUSE, GET_PARAMETER, SET_PARAMETER

(sink-test:25424): rtsp-DEBUG: Received RTSP message:
GET_PARAMETER rtsp://localhost/wfd1.0 RTSP/1.0
Date: Wed, 08 Apr 2015 08:10:16 +0000
Server: stagefright/1.2 (Linux;Android 4.4.2)
CSeq: 2
Content-Type: text/parameters
Content-Length: 83

wfd_content_protection
wfd_video_formats
wfd_audio_codecs
wfd_client_rtp_ports

(sink-test:25424): rtsp-DEBUG: Sending RTSP message:
RTSP/1.0 200 OK
CSeq: 2
Content-Type: text/parameters
Content-Length: 306

wfd_audio_codecs: LPCM 00000003 00, AAC 0000000F 00, AC3 00000007 00
wfd_client_rtp_ports: RTP/AVP/UDP;unicast 59528 0 mode=play
wfd_content_protection: none
wfd_video_formats: 40 00 02 10 0001FFFF 1FFFFFFF 00000FFF 00 0000 0000 00 none none, 01 10 0001FFFF 1FFFFFFF 00000FFF 00 0000 0000 00 none none

(sink-test:25424): rtsp-DEBUG: Received RTSP message:
SET_PARAMETER rtsp://localhost/wfd1.0 RTSP/1.0
Date: Wed, 08 Apr 2015 08:10:17 +0000
Server: stagefright/1.2 (Linux;Android 4.4.2)
CSeq: 3
Content-Type: text/parameters
Content-Length: 246

wfd_video_formats: 00 00 02 02 00000020 00000000 00000000 00 0000 0000 00 none none
wfd_audio_codecs: AAC 00000001 00
wfd_presentation_URL: rtsp://192.168.0.2/wfd1.0/streamid=0 none
wfd_client_rtp_ports: RTP/AVP/UDP;unicast 59528 0 mode=play

(sink-test:25424): rtsp-DEBUG: Sending RTSP message:
RTSP/1.0 200 OK
CSeq: 3

(sink-test:25424): rtsp-DEBUG: Received RTSP message:
SET_PARAMETER rtsp://localhost/wfd1.0 RTSP/1.0
Date: Wed, 08 Apr 2015 08:10:17 +0000
Server: stagefright/1.2 (Linux;Android 4.4.2)
CSeq: 4
Content-Type: text/parameters
Content-Length: 27

wfd_trigger_method: SETUP

(sink-test:25424): rtsp-DEBUG: Sending RTSP message:
RTSP/1.0 200 OK
CSeq: 4

(sink-test:25424): rtsp-DEBUG: Sending RTSP message:
SETUP rtsp://192.168.0.2/wfd1.0/streamid=0 RTSP/1.0
CSeq: 2
Transport: RTP/AVP/UDP;unicast;client_port=59528
Require: org.wfa.wfd1.0

(sink-test:25424): rtsp-DEBUG: Received RTSP message:
RTSP/1.0 200 OK
Date: Wed, 08 Apr 2015 08:10:17 +0000
Server: stagefright/1.2 (Linux;Android 4.4.2)
CSeq: 2
Session: 2105011384;timeout=30
Transport: RTP/AVP/UDP;unicast;client_port=59528;server_port=64512

(sink-test:25424): rtsp-DEBUG: Sending RTSP message:
PLAY rtsp://192.168.0.2/wfd1.0/streamid=0 RTSP/1.0
CSeq: 3
Session: 2105011384
Require: org.wfa.wfd1.0

(sink-test:25424): rtsp-DEBUG: Received RTSP message:
RTSP/1.0 200 OK
Date: Wed, 08 Apr 2015 08:10:17 +0000
Server: stagefright/1.2 (Linux;Android 4.4.2)
CSeq: 3
Session: 2105011384;timeout=30
Range: npt=now-

(sink-test:25424): rtsp-DEBUG: Received RTSP message:
GET_PARAMETER rtsp://localhost/wfd1.0 RTSP/1.0
Date: Wed, 08 Apr 2015 08:10:42 +0000
Server: stagefright/1.2 (Linux;Android 4.4.2)
CSeq: 5
Session: 2105011384

(sink-test:25424): rtsp-DEBUG: Sending RTSP message:
RTSP/1.0 200 OK
CSeq: 5

(sink-test:25424): rtsp-DEBUG: Received RTSP message:
GET_PARAMETER rtsp://localhost/wfd1.0 RTSP/1.0
Date: Wed, 08 Apr 2015 08:11:07 +0000
Server: stagefright/1.2 (Linux;Android 4.4.2)
CSeq: 6
Session: 2105011384

(sink-test:25424): rtsp-DEBUG: Sending RTSP message:
RTSP/1.0 200 OK
CSeq: 6

(sink-test:25424): rtsp-DEBUG: Received RTSP message:
GET_PARAMETER rtsp://localhost/wfd1.0 RTSP/1.0
Date: Wed, 08 Apr 2015 08:11:32 +0000
Server: stagefright/1.2 (Linux;Android 4.4.2)
CSeq: 7
Session: 2105011384

(sink-test:25424): rtsp-DEBUG: Sending RTSP message:
RTSP/1.0 200 OK
CSeq: 7

(sink-test:25424): rtsp-DEBUG: Received RTSP message:
GET_PARAMETER rtsp://localhost/wfd1.0 RTSP/1.0
Date: Wed, 08 Apr 2015 08:11:57 +0000
Server: stagefright/1.2 (Linux;Android 4.4.2)
CSeq: 8
Session: 2105011384

(sink-test:25424): rtsp-DEBUG: Sending RTSP message:
RTSP/1.0 200 OK
CSeq: 8

(sink-test:25424): rtsp-DEBUG: Received RTSP message:
GET_PARAMETER rtsp://localhost/wfd1.0 RTSP/1.0
Date: Wed, 08 Apr 2015 08:12:22 +0000
Server: stagefright/1.2 (Linux;Android 4.4.2)
CSeq: 9
Session: 2105011384

(sink-test:25424): rtsp-DEBUG: Sending RTSP message:
RTSP/1.0 200 OK
CSeq: 9

(sink-test:25424): rtsp-DEBUG: Received RTSP message:
GET_PARAMETER rtsp://localhost/wfd1.0 RTSP/1.0
Date: Wed, 08 Apr 2015 08:12:47 +0000
Server: stagefright/1.2 (Linux;Android 4.4.2)
CSeq: 10
Session: 2105011384

(sink-test:25424): rtsp-DEBUG: Sending RTSP message:
RTSP/1.0 200 OK
CSeq: 10

any help please ?

GDBus IO error

Trying to setup WDS on fresh install of Ubuntu 15.10 with builds from source of gstreamer 1.6.2, wpa-supplicant 2.5 and connman 3.21. I keep getting the following error when trying to run the example desktop source app:

connect error GDBus.Error:net.connman.Error.Failed: Input/output error

I can see peers while scanning fine.

Any help would be greatly appreciated!

Segmentation fault after connection success

I am getting segmentation fault after connection success.

root@raspberrypi:/home/pi/wds/sink# ./sink-test

  • Registering Wifi Display with IE 00000600111C440032
  • New peer: Shrikant
  • Connecting to source at 192.168.0.2:7236
    ** Message: Trying to connect...
    ** Message: Trying to connect...
    ** Message: Trying to connect...
    ** Message: Trying to connect...
    ** Message: Trying to connect...
    ** Message: connection success to: 192.168.0.2

** (sink-test:1266): WARNING *: * GET_PARAMETER: Ignoring unsupported property 'wd_initial_buffer'.
Segmentation fault (core dumped)
root@raspberrypi:/home/pi/wds/sink#

Please help me with this?

Android source disconnects after we reply to GET_PARAMETER

I'm not sure if this is because of updates to android or changes in our code but it does seem like Android source dislikes our GET_PARAMETERS reply: it seems to disconnect immediately after that.

Attaching RTSP exchange:

OPTIONS * RTSP/1.0
Date: Sun, 11 Jan 2015 15:18:20 +0000
Server: stagefright/1.2 (Linux;Android 5.0.1)
CSeq: 1
Require: org.wfa.wfd1.0

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

OPTIONS * RTSP/1.0
CSeq: 1
Require: org.wfa.wfd1.0

RTSP/1.0 200 OK
Date: Sun, 11 Jan 2015 15:18:30 +0000
Server: stagefright/1.2 (Linux;Android 5.0.1)
CSeq: 1
Public: org.wfa.wfd1.0, SETUP, TEARDOWN, PLAY, PAUSE, GET_PARAMETER, SET_PARAMETER

GET_PARAMETER rtsp://localhost/wfd1.0 RTSP/1.0
Date: Sun, 11 Jan 2015 15:18:30 +0000
Server: stagefright/1.2 (Linux;Android 5.0.1)
CSeq: 2
Content-Type: text/parameters
Content-Length: 83

wfd_content_protection
wfd_video_formats
wfd_audio_codecs
wfd_client_rtp_ports
RTSP/1.0 200 OK
CSeq: 2
Content-Length: 302

wfd_audio_codecs: LPCM 00000003 00, AAC 0000000F 00, AC3 00000007 00
wfd_client_rtp_ports: RTP/AVP/UDP;unicast 0 0 mode=play
wfd_content_protection: none
wfd_video_formats: 40 00 01 10 0001FFFF 1FFFFFFF 00000FFF 00 0000 0000 11 0000 0000, 02 10 0001FFFF 1FFFFFFF 00000FFF 00 0000 0000 11 0000 0000

Missed step to setup

I miss an step from WDS sink test

connmanctl> peers
<my device> idle peer_<mac>_<mac>
...
connmanctl> connect peer_<mac>_<mac>

Afer that laptop works smoothly as a sink

IOP: RTSP with Windows source goes wrong

Getting Windows to talk to use requires a connman patch at the moment (Tomasz is working on it) but here's a sneak peek:

It looks like they disconnect once we send the GET_PARAMETER reply. They also send a TEARDOWN trigger immediately after our OPTIONS reply -- what is that about?

I've prepended the data received from windows with "< " because it's not obvious:

< OPTIONS * RTSP/1.0
< CSeq: 1
< Require: org.wfa.wfd1.0
< User-Agent: WiDiApp/4.5.53.0 RDS/1.0.0
< 
RTSP/1.0 200 OK
CSeq: 1
Public: org.wfa.wfd1.0, GET_PARAMETER, SET_PARAMETER

< SET_PARAMETER rtsp://localhost/wfd1.0 RTSP/1.0
< CSeq: 2
< Content-Type: text/parameters
< Content-Length: 30
< 
< wfd_trigger_method: TEARDOWN
OPTIONS * RTSP/1.0
CSeq: 1
Require: org.wfa.wfd1.0

< RTSP/1.0 200 OK
< CSeq: 1
< Date: Tue, Feb 03 2015 13:28:58 GMT
< Public: org.wfa.wfd1.0, GET_PARAMETER, PAUSE, PLAY, SETUP, SET_PARAMETER, TEARDOWN
< 
< GET_PARAMETER rtsp://localhost/wfd1.0 RTSP/1.0
< CSeq: 3
< Content-Type: text/parameters
< Content-Length: 379
< 
< wfd_client_rtp_ports
< wfd_audio_codecs
< wfd_video_formats
< wfd_3d_video_formats
< wfd_coupled_sink
< wfd_display_edid
< wfd_connector_type
< wfd_uibc_capability
< wfd_standby_resume_capability
< wfd_content_protection
< wfd_idr_request_capability
< intel_sink_version
< intel_sink_information
< intel_lower_bandwidth
< intel_interactivity_mode
< intel_fast_cursor
< intel_content_protection
RTSP/1.0 200 OK
CSeq: 3
Content-Length: 412

wfd_3d_video_formats: none
wfd_audio_codecs: LPCM 00000003 00, AAC 0000000F 00, AC3 00000007 00
wfd_client_rtp_ports: RTP/AVP/UDP;unicast 35891 0 mode=play
wfd_connector_type: none
wfd_content_protection: none
wfd_coupled_sink: none
wfd_display_edid: none
wfd_standby_resume_capability: none
wfd_uibc_capability: none
wfd_video_formats: 00 00 01 01 00000001 00000000 00000000 00 0000 0000 00 0000 0000

Connman p2p support

Hello,

Following the readme:

connmanctl> enable wifi
Enabled wifi
connmanctl> enable p2p
Error p2p: Method "SetProperty" with signature "sv" on interface "net.connman.Technology" doesn't exist

Any ideas?

wpa_supplicant v2.1
connmand 1.21
kernel 3.19.0-21 (ubuntu 15,04)

03:00.0 Network controller: Intel Corporation Centrino Wireless-N 1030 [Rainbow Peak](rev 34)
Subsystem: Intel Corporation Centrino Wireless-N 1030 BGN
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 38
Region 0: Memory at f1b00000 (64-bit, non-prefetchable) [size=8K]
Capabilities: [c8] Power Management version 3
Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [d0] MSI: Enable+ Count=1/1 Maskable- 64bit+
Address: 00000000fee0200c Data: 41e2
Capabilities: [e0] Express (v1) Endpoint, MSI 00
DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <512ns, L1 unlimited
ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset+
DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+ FLReset-
MaxPayload 128 bytes, MaxReadReq 128 bytes
DevSta: CorrErr+ UncorrErr- FatalErr- UnsuppReq+ AuxPwr+ TransPend-
LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <4us, L1 <32us
ClockPM+ Surprise- LLActRep- BwNot-
LnkCtl: ASPM L1 Enabled; RCB 64 bytes Disabled- CommClk+
ExtSynch- ClockPM+ AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
Capabilities: [100 v1] Advanced Error Reporting
UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
CEMsk: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
AERCap: First Error Pointer: 00, GenCap- CGenEn- ChkCap- ChkEn-
Capabilities: [140 v1] Device Serial Number bc-77-37-ff-ff-39-5e-2c
Kernel driver in use: iwlwifi

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.