Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: cannot retrieve objects: The name org.freedesktop.miracle.wifi was not provided by any .service files (ctl_wifi_fetch() in ....../miraclecast/src/ctl/ctl-wifi.c:1172) #298

Closed
jiapei100 opened this issue Oct 2, 2018 · 16 comments

Comments

@jiapei100
Copy link

jiapei100 commented Oct 2, 2018

1. My environment:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.1 LTS
Release:        18.04
Codename:       bionic
$ systemd --version
systemd 237
+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybrid

2. tests:

$ ./test-viewer.sh 
testing plugins required:

test udpsrc... (passed)
test rtpjitterbuffer... (passed)
test rtpmp2tdepay... (passed)
test tsdemux... (passed)
test h264parse... (passed)
test avdec_h264... (passed)
test autovideosink... (passed)

everything installed

$ ./test-hardware-capabilities.sh 
wlp2s0 supports P2P

3. ERROR message:

Try miracle-sinkctl

$ systemctl stop NetworkManager.service
$ systemctl stop wpa_supplicant.service 
$ sudo miracle-wifid &
[1] 23685
$ sudo miracle-sinkctl
[sudo] password for xxxxxx: 
ERROR: cannot retrieve objects: The name org.freedesktop.miracle.wifi was not provided by any .service files (ctl_wifi_fetch() in ....../miraclecast/src/ctl/ctl-wifi.c:1172)

In fact, I got the same ERROR while using command miracle-wifictl:

$ sudo miracle-wifictl
[sudo] password for xxxxxx: 
ERROR: cannot retrieve objects: The name org.freedesktop.miracle.wifi was not provided by any .service files (ctl_wifi_fetch() in ....../miraclecast/src/ctl/ctl-wifi.c:1172)
[miraclectl] # 

Extra:

$ cat org.freedesktop.miracle.conf 
<?xml version="1.0"?> <!--*-nxml-*-->
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
        "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">

<!--
  This file is part of MiracleCast.
-->

<busconfig>

        <policy user="root">
                <allow own="org.freedesktop.miracle"/>
                <allow own="org.freedesktop.miracle.wifi"/>
                <allow send_destination="org.freedesktop.miracle"/>
                <allow send_destination="org.freedesktop.miracle.wifi"/>
                <allow receive_sender="org.freedesktop.miracle"/>
                <allow receive_sender="org.freedesktop.miracle.wifi"/>
        </policy>

        <policy context="default">
                <deny send_destination="org.freedesktop.miracle"/>
                <deny send_destination="org.freedesktop.miracle.wifi"/>

                <allow send_destination="org.freedesktop.miracle"
                       send_interface="org.freedesktop.DBus.Introspectable"/>
                <allow send_destination="org.freedesktop.miracle.wifi"
                       send_interface="org.freedesktop.DBus.Introspectable"/>

                <allow send_destination="org.freedesktop.miracle"
                       send_interface="org.freedesktop.DBus.Peer"/>                                                                                       
                <allow send_destination="org.freedesktop.miracle.wifi"                                                                                    
                       send_interface="org.freedesktop.DBus.Peer"/>                                                                                       

                <allow send_destination="org.freedesktop.miracle"
                       send_interface="org.freedesktop.DBus.ObjectManager"/>
                <allow send_destination="org.freedesktop.miracle.wifi"
                       send_interface="org.freedesktop.DBus.ObjectManager"/>

                <allow send_destination="org.freedesktop.miracle"
                       send_interface="org.freedesktop.DBus.Properties"
                       send_member="Get"/>
                <allow send_destination="org.freedesktop.miracle.wifi"
                       send_interface="org.freedesktop.DBus.Properties"
                       send_member="Get"/>

                <allow send_destination="org.freedesktop.miracle"
                       send_interface="org.freedesktop.DBus.Properties"
                       send_member="GetAll"/>
                <allow send_destination="org.freedesktop.miracle.wifi"
                       send_interface="org.freedesktop.DBus.Properties"
                       send_member="GetAll"/>

                <allow receive_sender="org.freedesktop.miracle"/>
                <allow receive_sender="org.freedesktop.miracle.wifi"/>
        </policy>

</busconfig>

Any suggestions?

@albfan
Copy link
Owner

albfan commented Oct 2, 2018

Did you install miraclecast?

That conf file should be present on /etc/dbus-1/systemd

Here config for meson:

https://github.com/albfan/miraclecast/blob/master/res/meson.build#L3

See by default all build systems install on /use/local, I've updated build instructions to avoid that: See https://github.com/albfan/miraclecast/wiki/Building

@jiapei100
Copy link
Author

@albfan

Yup... I had miraclecast successfully installed using cmake, almost the same instruction as https://github.com/albfan/miraclecast/wiki/Building, but installed under folder /usr/local .

@albfan
Copy link
Owner

albfan commented Nov 3, 2018

upload here the logs for support described in FAQ on this wiki. There's some problem with your run of miracle-wifid

@jiapei100
Copy link
Author

➜  miraclecast git:(master) systemctl stop NetworkManager.service
➜  miraclecast git:(master) systemctl stop wpa_supplicant.service 
➜  miraclecast git:(master) sudo miracle-wifid &
[1] 10178
[1]  + 10178 suspended (tty output)  sudo miracle-wifid                                                                                                                                                       
➜  miraclecast git:(master) sudo miracle-sinkctl
[sudo] password for jiapei: 
ERROR: cannot retrieve objects: The name org.freedesktop.miracle.wifi was not provided by any .service files (ctl_wifi_fetch() in ....../miraclecast/src/ctl/ctl-wifi.c:1172)
[miraclectl] # 
➜  miraclecast git:(master) sudo miracle-wifictl
ERROR: cannot retrieve objects: The name org.freedesktop.miracle.wifi was not provided by any .service files (ctl_wifi_fetch() in ....../miraclecast/src/ctl/ctl-wifi.c:1172)
[miraclectl] # 
➜  miraclecast git:(master) sudo miracle-wifid &
[2] 10217
➜  miraclecast git:(master) sudo miracle-sinkctl
[ADD] Link: 3
[miraclectl] # run 3
now running on link 3
[miraclectl] # 
  1. What's sink and peer?
    I'm expecting to display the my laptop's screen (running Ubuntu) directly on a Wifi projector. So, is my laptop running Ubuntu a sink or peer?

@albfan
Copy link
Owner

albfan commented Nov 4, 2018

in miracast protocol your device can act as source (share a video stream (normally from its screen)) or as sink( receives and shows a video streaming). Both are peers for miracast

To try to use miraclecast as source you should look into #4 and #172 (which is still a WIP) continue this in those issues please

@albfan albfan closed this as completed Nov 4, 2018
@lianzhidong
Copy link

I think you forget to copy the res/org.freedesktop.miracle.conf to /etc/dbus-1/system.d/.

@dnapier
Copy link

dnapier commented Dec 19, 2018

I'm seeing the exact same issue using the AUR from Arch Linux. Should I upload my logs as well? And if so, do you want me to create a new issue or append to this one?

@albfan
Copy link
Owner

albfan commented Dec 19, 2018

@dnapier you can upload here

@codeman101
Copy link

codeman101 commented Apr 27, 2019

I have same issue with the AUR package. What logs do you need from me? The error occurs when trying to do this

$ sudo miracle-sinkctl for sink

or this

$ sudo miracle-wifictl 

For peer. Given the difference between sink and peer described above I'ld like to do peer but I can't do either.

@albfan
Copy link
Owner

albfan commented Apr 27, 2019

@codeman101. Not sure what happens Download the package with:

yaourt -G miraclecast-git
cd miraclecast-git
makepkg -sf

And upload the build (tar.gz) here so I can inspect

@codeman101
Copy link

codeman101 commented Apr 27, 2019

@albfan I don't use youart that aur helper has been deprieciated on Arch. I use yay which does it all. The only command I had to run run was yay miraclecast I just tried uploading the tar.gz file that the helper creates but github is saying it doesn't support uploading it. (the file type)

I could make a temporary repo to upload it to but I'd rather not if possible. Is there any way you can make a quick VM of Manjaro and run the command to see the tar.gz for yourself? You would just need to install yay which is done via sudo pacman -S yay You could grab the xfce iso it has a graphical installer so it won't take long to get up and running and xfce is very lightweight.

@codeman101
Copy link

codeman101 commented Apr 28, 2019

Here I made a temp repo to upload it. https://github.com/codeman101/temporary-for-data-transfer. I didn't do this originally because I thought gihub would get angry because of the size of the file is.

@albfan
Copy link
Owner

albfan commented Apr 30, 2019

Thanks. AUR package seems correct. (it installs the dbus file)

org.freedesktop.miracle.wifi service is provided by miracle-wifid daemon:

You can check with:

dbus-send --system --dest=org.freedesktop.DBus --type=method_call --print-reply /org/freedesktop/DBus org.freedesktop.DBus.ListNames

Only if daemon is running you will see the service avaliable, so after run miracle-wifid in other terminal service should be avaliable, or in a oneliner:

sudo miracle-wifid & dbus-send --system --dest=org.freedesktop.DBus --type=method_call --print-reply /org/freedesktop/DBus org.freedesktop.DBus.ListNames | grep miracle
string "org.freedesktop.miracle.wifi"

@codeman101
Copy link

codeman101 commented Apr 30, 2019

That was it the instructions in the readme don't trigger the daemon but that second line you wrote in that post did it. Please consider making the following edits to your readme

  1. Add that line or something else to force the daemon to trigger.
  2. Make it more clear as to what to do when you say "Enable visibility for other devices" because if you're referring to running a command in the miraclectl (which is what it sounds like) it's not clear as to what to run and because of that I stopped after this point.

Also I think I encountered a serious bug (or lack of instruction) because when I got out of the miraclectl and restarted network manager and wpa my router didn't accept the correct password until I rebooted the machine.

@albfan
Copy link
Owner

albfan commented Apr 30, 2019

@codeman101 what about:

  1. launch wifi daemon

    $ sudo miracle-wifid &

About Instructions as peer, is true that they are misleading, as that feature is not implemented.

The bug (I guess is that you have miracle-wifid running in background) is because miracle-wifid is running a wpa_supplicant process with Wifi-Direct. That conflicts with NetworkManager. All you have to do is stop the miracle-wifid daemon.

That's why is recommended to run daemon in other terminal, to kill it just with Ctrl+C. anyway you can always kill it with:

sudo killall miracle-wifid

At some point we should use NetworkManager directly, now (since version 1.16) it deals with Wifi-Direct, and running as a service (systemd) istead of manually run the daemon.

@codeman101
Copy link

codeman101 commented May 1, 2019

At some point we should use NetworkManager directly, now (since version 1.16) it deals with Wifi-Direct, and running as a service (systemd) istead of manually run the daemon.

That would be great. It would definitely make it more user-friendly so the user doesn't have restart network manger when they want to go back to using the internet.

sudo killall miracle-wifid

You should add this to the readme. If it's running like a true systemd service (or even a general unix background process) killing the terminal it was executed in won't kill it.

$ sudo miracle-wifid &

By the way one of the commands in the readme causes this process to stop. I think it's when I run the command to get into the wifictl.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants