Balena Bluetooth Block with GATT Server?

We’ve been looking into setting up a GATT bluetooth server on our BalenaFin with moderate success using the BlueZero python wrapper for BlueZ. We are able to broadcast characteristics and display a device name succesfully.

However, we would like to explore using the Balena Block for Bluetooth as the connection agent and it is unclear how we would go about that. In the documentation it states :

Note that this block does not deal with the bluetooth “data layer”. Your application will need to handle the data stream corresponding to the desired bluetooth profile.

We’ve looked at the Balena audio as reference as the readme suggest but can’t really parse out how audio is refferencing the balena bluetooth block (except for maybe the pulse-audio-sink?) but regardless we’re looking for more guidance on how to integrate data layers like a GATT server to the balena bluetooth block. Thanks!

The bluetooth block just pairs two devices, using the name you set in BLUETOOTH_DEVICE_NAME. The block just communicates with the linux bluetooth daemon to advertise itself. Anything you do with the connection is up to you.

It should just be plug 'n play though, just add the balena bluetooth block to your docker-compose.yml, and you should be good to go.

Sorry for the late reply. I would recommend upgrading to the prototype plan if you need faster response times, because paid support takes precedence over the forums.