TheCellule / python-bleson

Python Bluetooth LE Module
https://groups.google.com/group/python-bleson
MIT License
118 stars 24 forks source link

Create custom Docker image for Shippable CI with Bluetooth support enabled #71

Open WayneKeenan opened 4 years ago

WayneKeenan commented 4 years ago

The standard Shippable linux kernels used for running the CI jobs do not have bluetooth support enabled. Therefore a btvirt (virtual bluetooth device) can not be created as the BT socket type is not understood by the kernel.

The idea to use btvirt, and some of the issues faced when using Travis comes from: https://github.com/ukBaz/python-bluezero/issues/182

Shippable allows custom Docker containers: http://docs.shippable.com/ci/tutorial/build-custom-ci-image/

WayneKeenan commented 4 years ago

I think I may have been too optimistic and neglected to recall that Docker containers rely on the underly host's kernel... this maybe a dead end.

ukBaz commented 4 years ago

When I looked on Travis-CI I was trying to get dbus, Bluez (bluetooth) >5.43 with virtual host controller interface (vhci)

OS dbus bluetoothd vhci Python with System Packages
Trusty yes 4.101 yes 3.4
Xenial yes 5.37 No 3.5
Bionic yes None No 3.6

Enabling of vhci seems to be the key item for btvirt

Is that still going to be the problem with the host's kernel?

vChavezB commented 3 months ago

Unfortunately the linux host requires to be built with CONFIG_BT=y. Then the host needs to give access to DBUS to the container.

This means that you need to host your own runners (Gitlab, Github, AWS,etc).