Skip to content

Node-ble not able to discovery any bluetooth device #81

@nikhillife11

Description

@nikhillife11

Hello All,

I am working on a nodejs server to read/write a BLE device using node-ble. While trying to discover, my screen remains blank and I am not able to find any device(There are 5 to 6 devices online right now). Finally it gives Error: operation timed out.

I checked the " bluetoothctl " command and it shows me all the devices.

I console.log the default adaptor part and got the below message. Where adaptor looks good to me. But the next command of adapter.startDiscovery() doesn't work

adapter => Adapter {
dbus:
MessageBus {
_events: [Object: null prototype] {},
_eventsCount: 0,
_maxListeners: undefined,
_builder: Builder { options: [Object] },
_connection:
EventEmitter {
_events: [Object],
_eventsCount: 2,
_maxListeners: undefined,
stream: [USocket],
end: [Function],
_messages: [],
message: [Function],
guid: 'd6f39ed7bf6390d38d43218567b48f4a',
state: 'connected' },
_serial: 4,
_methodReturnHandlers: {},
_signals:
EventEmitter {
_events: [Object: null prototype] {},
_eventsCount: 0,
_maxListeners: undefined },
_nameOwners:
{ 'org.freedesktop.DBus': 'org.freedesktop.DBus',
'org.bluez': ':1.115' },
_methodHandlers: [],
_serviceObjects: {},
_matchRules: {},
name: ':1.117' },
adapter: 'hci0',
helper:
BusHelper {
_events: [Object: null prototype] {},
_eventsCount: 0,
_maxListeners: undefined,
service: 'org.bluez',
object: '/org/bluez/hci0',
iface: 'org.bluez.Adapter1',
dbus:
MessageBus {
_events: [Object: null prototype] {},
_eventsCount: 0,
_maxListeners: undefined,
_builder: [Builder],
_connection: [EventEmitter],
_serial: 4,
_methodReturnHandlers: {},
_signals: [EventEmitter],
_nameOwners: [Object],
_methodHandlers: [],
_serviceObjects: {},
_matchRules: {},
name: ':1.117' },
options: { useProps: true, usePropsEvents: false },
_ready: false,
_objectProxy: null,
_ifaceProxy: null,
_propsProxy: null } }

Please help me debug the issue, so that my scan works properly and I can go ahead with things.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions