13 Replies Latest reply on Jan 11, 2017 12:06 PM by Intel Corporation

    Miracast with Joule


      Do miracast drivers for linux or Windows work on Ubuntu Core, Win 10 IoT Core, or even Ostro XT?



        • 1. Re: Miracast with Joule
          Intel Corporation
          This message was posted on behalf of Intel Corporation

          Hello welcomesorrow,
          Thanks for reaching out!
          Miracast compatibility has not been officially tested on Joule, however, there are libraries for wireless display software such as https://01.org/wds. This library implements a Miracast-dialect of RTSP that includes the parser, negotiation logic for sink and source, and related data structures.
          So, you might be interested in trying to implement it. I encourage you to share your results with the community, they might be of help for other users.
          I look forward to hear from you again.

          • 2. Re: Miracast with Joule
            Intel Corporation
            This message was posted on behalf of Intel Corporation

            Hello welcomesorrow,

            Do you have any updates about this?


            • 3. Re: Miracast with Joule

              Hi Peter,


              Thank you for your follow up. I am still working on this and will come back to you asap I have got something. I installed Ubuntu 16.04.1 LTS and it is working relatively stabley at the moment.




              • 4. Re: Miracast with Joule
                Intel Corporation
                This message was posted on behalf of Intel Corporation

                Hi welcomesorrow,

                Thank you for letting us know!

                Please update us whenever you can and if the board still has issues we'll try to help you in any way we can.


                • 5. Re: Miracast with Joule

                  I am a bit lost at installing the p2p functionality of connman that is used by wds.


                  1. Ubuntu 16.04.1

                  2. gnutls-bin, libgnutls-dev 3.3.15

                  3. wpa_supplicant 2.6

                    .config file including the following options;





                  4. connman 1.33

                    ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var


                  After installing connman, p2p does not show up by connmanctl technologies command. I am afraid that I must be missing some critical setup for wpa_supplicant or connman configurations, but both wpa_supplicant and connman documents are too complicated for me to find a clue to a possible solution.


                  Any suggestions will be most welcome.

                  • 6. Re: Miracast with Joule

                    what OS are known to be supported ?

                    • 7. Re: Miracast with Joule

                      Linux. It is all experimental, but there is no reason why it (miracast,wifi p2p) should not work on Ubuntu especially if you build it from source. I have seen someone trying p2p on ostro.

                      Use connmanctrl to test Wifi P2P feature failed

                      • 8. Re: Miracast with Joule

                        I have got very close to the completion of installing wpa_supplicant 2.6, connman 1.33, and wds for wirelessly connecting Joule to Push2TV. Folloing procedures and configurations appear to work for Joule.


                        (1) Installation of dependencies


                        Intel's WDS depends on wpa_supplicant (wifi daemon) and connman (conncetion manager). The WiFi P2P technology is supported only by connman version 1.26 and later, and the connman of the Ubuntu repository is still 1.21-1.2build2 (that is the one installed by sudo apt-get install connman). The latest connman is 1.33 (https://01.org/connman) and is recommended since it is said to have an improved p2p functionality. I have not checked the version of connman on Ostro XT, but if it is 1.26, you are lucky and can forget about the following:


                        $ sudo apt install autoconf libtool-bin autopoint bison flex gtk-doc-tools

                        $ sudo apt-get install gnutls-bin libgnutls-dev


                        This will install GnuTLS version 3.4.10-4ubuntu1.1.


                        Alternatively, you can build the latest GnuTLS by yourself, but it demands a lot of efforts (as below) and is not essential for building connman 1.33 with the WiFi P2P functionality.


                        $ wget https://gmplib.org/download/gmp/gmp-6.1.2.tar.lz

                        $ ./configure

                        $ make

                        $ make check

                        $ sudo make install


                        $ wget https://www.gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-1.26.tar.bz2

                        $ tar -xzvf libgpg-error-1.26.tar.bz2

                        $ cd libgpg-error-1.26

                        $ ./configure

                        $ make

                        $ sudo make install


                        $ wget https://www.gnupg.org/ftp/gcrypt/libgcrypt/libgcrypt-1.7.5.tar.bz2

                        $ tar -xzvf libgcrypt-1.7.5.tar.bz2

                        $ cd libgcrypt-1.7.5

                        $ ./configure

                        $ make

                        $ make check

                        $ sudo make install


                        $ git clone https://git.lysator.liu.se/nettle/nettle.git

                        $ cd nettle

                        $ ./.bootstrap

                        $ ./configure && make

                        $ sudo make install


                        $ git clone https://gitlab.com/gnutls/gnutls.git $ cd gnutls $ git submodule update --init

                        $ make bootstrap

                        $ make $ make check

                        $ sudo make install


                        (2) Building ConnMan 1.33


                        $ sudo apt-get install xtables-addons-source

                        $ sudo apt-get install libreadline-dev

                        $ wget https://www.kernel.org/pub/linux/network/connman/connman-1.33.tar.xz

                        $ tar -xzvf connman-1.33.tar.xz

                        $ cd connman-1.33

                        $ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var

                        $ make

                        $ sudo make install


                        (3) Building and setting up configurations for wpa_supplicant 2.6


                        $ wget http://w1.fi/releases/wpa_supplicant-2.6.tar.gz

                        $ tar -xzvf wpa_suppicant-2.6.tar.gz

                        $ cd wpa_supplicant-2.6

                        $ cd wpa_supplicant


                        Then, edit a file called .config in the working directory as follows:


                        $ nano .config











                        You can now build wpa_supplicant.


                        $ sudo apt-get install libssl-dev libdbus-1-dev

                        $ sudo apt-get install libnl-genl-3-200 libnl-genl-3-dev libnl-idiag-3-dev

                        $ make

                        $ cp wpa_supplicant wpa_cli wpa_passphrase /usr/local/bin


                        After installing wpa_supplicant, edit a configuration file in the /etc directory.


                        $sudo nano /etc/wpa_supplicant.conf











                        (4) Testing wpa_supplicant and connman wifi daemons


                        Installing connman to Ubuntu kills the NeworkManager that is already installed (network configuration files are overwritten). To remove NetworkManager-related files,


                        $ sudo killall -STOP NetworkManger

                        $ sudo apt-get remove --purge network-manager network-manager-gnome network-manager-pptp network-manager-pptp-gnome


                        To check the name of the wifi adaptor, issue the  ifconfig command. For Joule, it will be wlp1s0. Then, start the wpa_supplicant daemon in a terminal:


                        $ sudo wpa_supplicant -i wlp1s0 -c /etc/wpa_supplicant.conf -D nl80211 -ddt


                        Open another terminal to scan p2p devices:


                        $ sudo wpa_cli -i wlp1s0

                        >p2p_find 10


                        Devices will show up in the first termina window.


                        Alternatively, run wpa_supplicant and connmand as daemons  and search p2p devices from the connmanctl interface.


                        $ sudo wpa_supplicant -ddt -u

                        $ sudo connmand -n -d

                        $ connmanctl

                        connmanctl> technologies

                        connmanctl> enable wifi

                        connmanctl> enable p2p

                        connmanctl> scan p2p

                        connmanctl> peers



                        Voila! Push2TV is now 'almost' there.


                        • 9. Re: Miracast with Joule
                          Intel Corporation
                          This message was posted on behalf of Intel Corporation

                          Hi welcomesorrow,

                          Since you are using Ubuntu Core, you might get better results asking in https://developer.ubuntu.com/en/community/.

                          However, I must point out that I have successfully used P2P communications in Edison (Yocto) but I wasn't using connman to create the connection. Perhaps you are interested in checking how I did it. You can find the steps I took in https://communities.intel.com/docs/DOC-109932

                          Hopefully it will be of some help for you.


                          • 10. Re: Miracast with Joule

                            Hi Peter,


                            Thanks a lot for your info. I will certainly check it.


                            Here, I can show you I am very close to the goal. (Btw I am on Ubuntu 16.04.1 Desktop)


                            Top left: wpa_supplicant daemon

                            Top right: connmand daemon

                            Bottom left: connmanctl

                            Bottom right: "wds/desktop-source/desktop-source-test" sample script


                            Bottom right window shows that Joule is indeed connected to Push2TV, but the link is lost immediately because of gstreamer pipeline errors, which I guess are due to the absence of plugins such as ximagesrc. I installed gsreamer1.0-0 and plugins as follows:


                            $ sudo apt-get install libgstreamer1.0 libgstreamer-plugins-base1.0 libgstreamer-plugins-good1.0 libgstreamer-plugins-bad1.0


                            This page (https://gstreamer.freedesktop.org/documentation/plugins.html ) shows that ximagesrc is included in plugins-good for instance. Could it be that WDS depends on gstreamer0.1 instead of 1.0, or the pipeline errors are caused by different reasons?

                            • 11. Re: Miracast with Joule
                              Intel Corporation
                              This message was posted on behalf of Intel Corporation

                              Hi welcomesorrow,

                              I see, I thought you were on Ubuntu Core as I was mentioned above. I can see that you have advanced a lot on your project, it's looking good so far, I encourage you to continue and share your results.

                              I don't have much experience on using gstreamer, so, I might not be of much help on this regard, but just like you, my guess would be that we're missing a plugin as this is usually the cause for this sort of issues. Nevertheless, as you mentioned the error messages are a little bit weird as you indeed installed gst-plugins-base and libgstreamer-plugins-good which are the packages that contain videoconvert and ximagesrc respectively. You could indeed try with gstreamer0.1, but if this doesn't help, you might want to get in contact with the gstreamer developers.
                              Another thing that occurred to me is that perhaps the script wds/desktop-source/desktop-source-test does not find the packages. You have perhaps experienced that some libraries are not found when compiling code unless you specify the path where they are, could something like this be happening here?

                              Let us know.

                              • 12. Re: Miracast with Joule

                                OK, I think this is it.


                                $ export LD_LIBRARY_PATH=/usr/local/lib


                                since gstreamer-1.0 plugins are installed under /usr/local/lib/gstreamer-1.0 folder. Then, force gstreamer to rescan plugins by erasing cache, and test if plugins are recognised by gstreamer.


                                $ rm -rf ~/.cashe/gstreamer-1.0

                                $ gst-inspect-1.0 ximagesrc


                                It is also suggested to export GST_PLUGINS_PATH=/usr/local/lib/gstreamer-1.0, but it does not seem to be relevant in our case.


                                In the end, I have downloaded and locally built gstreamer and plugins from git, but I think apt-get install libgstreamer1.0 libgstreamer-plugins-good1.0 ect. should be OK.

                                • 13. Re: Miracast with Joule
                                  Intel Corporation
                                  This message was posted on behalf of Intel Corporation

                                  Hello welcomesorrow,

                                  Thank you for sharing this information with the community, we really appreciate it. This might help users in the future that have similar doubts.

                                  If you ever have any other projects we'd appreciate if you could share them with us. And if you have any issues or doubts, please don't hesitate to come back to the community, we'll try to help you in any way we can.