Comments (8)
Initialiazing a noble object I get the following debug messages:
hci-usb HCI event: 0e0402030c00 +20ms
hci onSocketData: 040e0402030c00 +0ms
hci event type = 4 +0ms
hci sub event type = 14 +0ms
hci cmd = 3075 +0ms
hci status = 0 +0ms
hci result = +0ms
and the reset is considered OK when the message "0e0401030c00" is received (https://github.com/sandeepmistry/node-bluetooth-hci-socket/blob/master/lib/usb.js#L103)
I doesn't know what this "2" instead of "1" means in the payload.
By forcing status to "poweredOn", I can start a scanning but I'm not sure if it's really working (I can't see my phone but I guess the scanning only sees BLE element and not juste BT 4.0 ones ?)
from node-bluetooth-hci-socket.
@pierreduf interesting, here's by understanding of the break down:
0e // EVT_CMD_COMPLETE
04 // length
01 // ncmd
030c // command - 0x0C03 = 3075 => reset
00 // status - 00 => success
See: http://git.kernel.org/cgit/bluetooth/bluez.git/tree/lib/hci.h#n1849
So it looks like the ncmd
field value doesn't need to be an exact match to 1
, it's just the command number. If you verify this works with your Intel adapter. I'd be happy to merge a pull request or make the change ...
Btw, what phone are your using (hardware, and OS)?
from node-bluetooth-hci-socket.
It's a Huawei P8 Lite that has BLE (I can use it to pilot my rolling spider :))
Do you think I should see it using "your" scanning ? Because if I sjould, it's not the case so there's another pbm beyond the "wrong" check of the reset :(
from node-bluetooth-hci-socket.
@pierreduf not sure if your phone is advertising, if it's running Android 5.0 or above it does have built-in peripheral API's.
I expect noble to only report BLE advertisements anyways.
The better question is does noble's advertisement-discovery.js example detect your Rolling Spider?
from node-bluetooth-hci-socket.
Nope it doesn't work :(
I tried with your source, removing the "onStateChange" function and adding at the end:
noble.state = "poweredOn"
noble.startScanning();
The output is:
hci-usb using USB VID = 32903, PID = 2602 +0ms
hci-usb reset +20ms
hci-usb write: 01030c00 +0ms
hci set scan enabled - writing: 010c20020101 +0ms
hci-usb write: 010c20020101 +20ms
hci-usb HCI event: 0e0402030c00 +0ms
hci onSocketData: 040e0402030c00 +10ms
hci event type = 4 +0ms
hci sub event type = 14 +0ms
hci cmd = 3075 +0ms
hci status = 0 +0ms
hci result = +10ms
hci-usb HCI event: 0e04020c2000 +20ms
hci onSocketData: 040e04020c2000 +0ms
hci event type = 4 +0ms
hci sub event type = 14 +0ms
hci cmd = 8204 +0ms
hci status = 0 +0ms
hci result = +0ms
noble scanStart +10ms
But nothing more :(
from node-bluetooth-hci-socket.
@pierreduf make sure reset command is processed before scanning is started, some things to try out:
-
Change: https://github.com/sandeepmistry/node-bluetooth-hci-socket/blob/master/lib/usb.js#L103 to check for:
0e0402030c00
-
Add a delay before scanning is started, using
setTimeout
with value of 1000ms or so
from node-bluetooth-hci-socket.
@pierreduf ping, any updates?
from node-bluetooth-hci-socket.
Closing for now due to lack of activity, feel free to open again with updates.
from node-bluetooth-hci-socket.
Related Issues (20)
- Segfaults/assertion errors (when no BT hardware is available?) HOT 1
- Failed Install - Win 10 HOT 1
- Error: No compatible USB Bluetooth 4.0 device found! HOT 1
- Dell precision m4800 Error: No compatible USB Bluetooth 4.0 device found!
- TypeError: Cannot read property 'endpoint' of undefined HOT 1
- . HOT 1
- Maintenance status ? HOT 6
- Add new device HOT 2
- Adapter unavailable in windows bluetooth settings
- Issues with bluetooth adapter 4.2 and 5.0
- raspberry pi3 HOT 3
- Installation fails in Docker-iobroker container on Raspi4 running Raspbian Buster HOT 1
- Add new device intel wireless bluetooth USB\VID_8087&PID_0AAA HOT 1
- Unable to install on Linux Mint HOT 1
- Adapter not found HOT 1
- Error : LIBUSB_ERROR_ACCES HOT 1
- Canβt install HOT 1
- Socket.write not writing commands HOT 1
- Installation fails (Arch Linux, node-gyp 9.3.0) HOT 3
- I need a C++ for windows sample
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-bluetooth-hci-socket.