Skip to content

Signals not working with node 0.10.4 #45

Closed
sandeepmistry opened this Issue Apr 27, 2013 · 10 comments

3 participants

@sandeepmistry

Hi, I am having issues getting signals working on Ubuntu 12.10 with node.js 0.10.4

I have tried the examples:

 python example-signal-emitter.py

and

nodejs test_signal1.js 

but it looks like the signal is never emitted or received correctly.

@aallan
aallan commented Jun 20, 2013

Looks like I'm running into this too, I'm running Node 0.10.12.

@cfsghost
Collaborator

It's working well on my environment, I'm using Node v0.10.12.

Could you guys provide more debug messages and information to us?

@sandeepmistry

Sure, what would you like me to try? How can I get the debug messages/information you need?

Btw, I tried it with node v0.10.12 and BlueZ 4.101 and still no device found signal. dbus-monitor --system shows a DeviceFound event. I ran test.js from npm install noble@0.1.1

@cfsghost
Collaborator

Weird. I cannot reproduce this problem still.

Recently, I rework node-dbus since it lacked fo a lot features and not easy to add new thing to current code base. It supported most of D-Bus functions and solved some weird problems already.

I just pushed a development version, you can found it in development branch.

https://github.com/Shouqun/node-dbus/tree/development

WARNING: It has totally different APIs, you can check examples to know how to use.

@sandeepmistry

I'm getting a Segmentation fault when I try hello.js on the development branch with node v0.10.12.

What version of node.js are you using?

@cfsghost
Collaborator

I'm using v0.10.18 currently.

Try to update the latest version, I've fixed a lot of bugs.

@sandeepmistry

Works on my 32-bit Ubuntu 13.04 machine with node v0.10.12! (64-bit still seems to segfault).

Feel free to close, or wait until development is merged into master.

@cfsghost
Collaborator

Cool.

I just updated the development branch. A lot of crash bugs are fixed already.

Could you help testing it? I'll appreciate. :-)

@sandeepmistry

Seems better :)

Here's my code:

var DBus = require('../');

var dbus = new DBus();

var bus = dbus.getBus('system');

bus.getInterface('org.bluez','/', 'org.bluez.Manager', function(err, iface) {
  console.log(err);
  console.log(iface);

  iface.DefaultAdapter['finish'] = function(result) {
    bus.getInterface('org.bluez', result, 'org.bluez.Adapter', function(err, iface) {
        console.log(err);
        console.log(iface);

        iface.on('DeviceFound', function(device) {
            console.log('DeviceFound ' + device);
        });

        iface.StartDiscovery();
    });
  };
  iface.DefaultAdapter();
});
@cfsghost
Collaborator

Version 0.2 was released. It was moved to master branch and uploaded to NPM.

Just close this issue. :-)

@cfsghost cfsghost was assigned Sep 29, 2013
@cfsghost cfsghost closed this Sep 29, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.