question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow BLE and BT Classic integrations to run from the same adapter

See original GitHub issue

Is your feature request related to a problem? Please describe. Currently, you can only run BLE or BT Classic integrations on one hci device at the same time. USB Bluetooth sticks are generally cheap to come by, but a bit annoying to stick into the Pi Zeros. It would be much nicer if we could mix any integrations using these two different communication modes and use them from the same HCI device.

Describe the solution you’d like room-assistant should prioritize Bluetooth device usage and start/stop BLE scanning as well as Bluetooth queries automatically so that the adapter can be shared. This should happen transparently for the user and also be able to handle multiple adapters for more performance.

Describe alternatives you’ve considered Buying USB Bluetooth sticks for every machine and then using the hciDeviceId options accordingly.

Additional context From a technical standpoint it makes sense to structure out the Bluetooth device code into a separate Bluetooth module which handles all the hardware stuff. The other integrations could then just declare that module as dependency and hook into the newly provided APIs.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
ghzgodcommented, Oct 18, 2020

Ah interesting and thank you. The command I posted above has worked for me before but then I wonder if it was running and ignoring the path supplied because I didn’t put -c. It is running now! I switched both HCI Device numbers to the USB BT adapter I have.

I notice an occasional error about 10X at once and then not again until my next scan:

processLeAdvertisingReport: Caught illegal packet (buffer overflow): RangeError [ERR_BUFFER_OUT_OF_BOUNDS]: Attempt to write outside buffer bounds

However it is properly tracking my devices both BT Classic and BLE from the same adapter! Anything else you would like me to test?

0reactions
github-actions[bot]commented, Oct 25, 2020

🎉 This issue has been resolved in version 2.11.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bluetooth Low Energy | room-assistant
If you encounter issues you can try to run the integrations from different HCI devices. This integration requires a BLE capable Bluetooth ......
Read more >
Bluetooth permissions - Android Developers
BLUETOOTH is necessary to perform any Bluetooth classic or BLE communication, such as requesting a connection, accepting a connection, and transferring data.
Read more >
What to Consider when Integrating BLE in your React Native ...
In this article, we will specifically focus on the integration of BLE devices in React Native. However, how is this technology different from...
Read more >
Bluetooth developer FAQ | Microsoft Learn
What APIs do I use? Bluetooth Classic (RFCOMM) or Bluetooth Low Energy (GATT)?. There are various discussions online around this general topic so...
Read more >
Bluetooth Classic vs. Bluetooth Low Energy (BLE) on Android
use an intent to show a system-provided dialog for the user: enable it programmatically by BluetoothAdapter.getDefaultAdapter().enable(). This ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found