balena-labs-projects / bluetooth Goto Github PK
View Code? Open in Web Editor NEWOptimized bluetooth agent for balenaOS. Based on BlueZ 5.0.
Home Page: https://hub.balena.io/blocks
Optimized bluetooth agent for balenaOS. Based on BlueZ 5.0.
Home Page: https://hub.balena.io/blocks
Block restarts without error being thrown.
On the main blocks page icons next to audio and bluetooth blocks look larger compared to other blocks.
Here's the logo file as defined in balena.yml:
https://raw.githubusercontent.com/balenablocks/audio/master/logo.png
And here's correctly looking one from fbcp:
https://raw.githubusercontent.com/balenablocks/fbcp/master/logo.png
The logos have different size and proportions. Fbcp could be used as a reference.
Recent releases of balenaOS will "remember" connected devices in /var/lib/bluetooth
.
I've confirmed this on the following device:
ID="balena-os"
NAME="balenaOS"
VERSION="2.60.1+rev1"
VERSION_ID="2.60.1+rev1"
PRETTY_NAME="balenaOS 2.60.1+rev1"
MACHINE="raspberrypi3"
VARIANT="Development"
VARIANT_ID="dev"
META_BALENA_VERSION="2.60.1"
RESIN_BOARD_REV="a28e387"
META_RESIN_REV="9aed19a"
SLUG="raspberrypi3"
However, this bluetooth block does not reconnect to devices automatically after a power cycle. I suspect this is something that can be added via this block, but if balenaOS changes are required we can open a new issue there.
Note that this was previously fixed in balenaSound before it started using this bluetooth block.
balena-io-experimental/balena-sound@78a727a
Not sure if the same fix would apply to this block since it looks like we are now relying on the host OS for more components.
Is there a simple example that shows how to use the bluetooth block to implement a simple communication between for example a raspberry pi 4 and a laptop or phone?
Currently, there is no documented way to interact or control the Bluetooth block from inside or outside the container. It would be quite helpful to issue commands to the Bluetooth block from the outside to perform functions like:
The Bluetooth block could expose an API endpoint to send requests to perform these functions or more from other containers in the application. While, if there is a tool being used to get the Bluetooth running inside the container some documentation can be linked about that tool for folks to use & control the Bluetooth block (programatically) from inside the container. Thanks for creating this! ๐
Add support for other applications to consume metadata and send commands.
I think we have dbus MPRIS iirc in balenaOS?
Play sound when bluetooth devices connect/disconnect.
Should integrate seamlessly with balenaAudio primitive.
Emit events when devices connect/disconnect.
We have seen problems when trying to re-pair devices: balena-io-experimental/balena-sound#526
To reproduce (pi3, android phone, oneplus 7T):
couldn't pair with balenaOS 0687 because of an incorrect pin or passkey error.
bluetoothctl paired-devices
i saw: Device 48:01:C5:7B:61:78 OnePlus 7T
- so the device was listing my phone as paired, when they were not paired.bluetoothctl remove 48:01:C5:7B:61:78
- I then was able to pair my phone to the pi again!So it seems like there's a problem with the balena device retaining the other device as being paired, even when its not, which causes some funkyness when that other device tries to re-pair
If we use the hostOS bluetoothd, do we need to install bluez in the container?
An interface that gets configured by the block will keep it's configuration until told otherwise.
Restarting the block with a different BLUETOOTH_HCI_INTERFACE
value will configure the new one but keep the old one configured. So both interfaces will be configured and broadcasting.
To avoid that we need to restart/turn off all interfaces at block startup.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.