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

Dbus Connection Refused #227

Open
Vishal8523 opened this issue Feb 19, 2021 · 1 comment
Open

Dbus Connection Refused #227

Vishal8523 opened this issue Feb 19, 2021 · 1 comment

Comments

@Vishal8523
Copy link

After setting the environment variables, bluez is not getting the access to Dbus.

export DISPLAY=':0'
export DBUS_SESSION_BUS_ADDRESS='unix:path=/usr/var/run/dbus/system_bus_socket'
/home/root/node_modules/dbus/lib/bus.js:20
                self.connection = _dbus.getBus(0);
                                        ^

Error: Failed to connect to socket /usr/var/run/dbus/system_bus_socket: Connection refused
    at new module.exports (/home/root/node_modules/dbus/lib/bus.js:20:27)
    at Function.DBus.getBus (/home/root/node_modules/dbus/lib/dbus.js:39:9)
    at Function.DBus.registerService (/home/root/node_modules/dbus/lib/dbus.js:78:17)
    at Bluez.getUserService (/home/root/node-bluez/lib/Bluez.js:284:37)
    at new Bluez (/home/root/node-bluez/lib/Bluez.js:20:45)
    at Object.<anonymous> (/home/root/bluetooth/bluezAPI.js:2:17)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)

Appreciate the help

@richguernsey
Copy link

Are you connecting directly from the host OS or are you using a docker container? The path may change depending on what tech your using

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

2 participants