Git Product home page Git Product logo

Comments (9)

sandeepmistry avatar sandeepmistry commented on August 14, 2024

@slashmili please see: https://github.com/sandeepmistry/node-bluetooth-hci-socket#user-channel

For user channel the adapter must be powered down before starting the Node.js app as per the documentation.

from node-bluetooth-hci-socket.

slashmili avatar slashmili commented on August 14, 2024

@sandeepmistry as I mentioned in the output I already powered down the device

sudo hciconfig hci0 down
sudo node le-scan-test.js
...

from node-bluetooth-hci-socket.

sandeepmistry avatar sandeepmistry commented on August 14, 2024

@slashmili apologies for missing this.

I believe setFilter is only applicable for bindRaw and not bindUser mode, as you are still getting an the events.

Could you please submit a PR to read me to document this?

from node-bluetooth-hci-socket.

slashmili avatar slashmili commented on August 14, 2024

Sure!

Does it mean that in noble/hci.js, there should be a checking to only call setSocketFilter if HCI_CHANNEL_RAW is set?

The reason I'm interested to these details is, I'm porting this library to Erlang and planning to use it in Nerves

from node-bluetooth-hci-socket.

sandeepmistry avatar sandeepmistry commented on August 14, 2024

Does it mean that in noble/hci.js, there should be a checking to only call setSocketFilter if HCI_CHANNEL_RAW is set?

Yes, I agree. It currently ignores the error event of "File descriptor in bad state" - but it would be clearer to not call setSocketFilter as you suggested. Do you have time to submit a PR for this as well?

from node-bluetooth-hci-socket.

slashmili avatar slashmili commented on August 14, 2024

Of course! I'll do this this week

from node-bluetooth-hci-socket.

sandeepmistry avatar sandeepmistry commented on August 14, 2024

@slashmili any progress on the PR?

from node-bluetooth-hci-socket.

slashmili avatar slashmili commented on August 14, 2024

@sandeepmistry no sorry I'm still pretty busy moving 🚚

from node-bluetooth-hci-socket.

slashmili avatar slashmili commented on August 14, 2024

Just for the record I found this explanation

Using this new facility does not require any external library or special
ioctl or socket filters. Just create the socket and bind it. After that
the file descriptor is ready to speak H:4 protocol.

http://www.spinics.net/lists/linux-bluetooth/msg37345.html

from node-bluetooth-hci-socket.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.