Yes the gatttool I’m refering to (tools to manage bluetooth) is part of Bluez, and usually installed with it.
Don’t think there is a stand lone package I could use just for the tools.
There is at least another gattool in the repo for “analysis of genomic structural variation”, not relevant here.
As I understand it, the version number of the Bluez OSMC package was artificially set to be higher than any current version of Bluez to maintain OSMC dependencies ?
But it prevents from keeping it up to date (current would be bluez-5.43).
Would be useful for recent bluetooth Low Energy devices better managed with later releases.
Already tried to remove the Bluez package trying to recompile it and upgrade it ,
but I chocked on the armv7-network-osmc end libglib2 dependency part.
I will have a look at the Bluez source in repo, even if I’m afraid it’s too much for my current skills
Yes – it is updated so that the OSMC version superseded installations of BlueZ.
My understanding is that Pi does not implement BT Low Energy yet, so future versions won’t necessarily be beneficial.
You can update to a different version, but we are trying to follow the Debian style of stability and slow incremental change. I’m not really aware of any benefits a future version of BlueZ would bring just yet.
P.S. you need some patches (see our Git) for Pi Bluetooth to work properly. This is why we started distributing bluez ourselves.
Same thing here. I’d like to communicate with the MiFlora but gatttools is not installed. @lec668 , did you manage to install it from one way or another?
I don’t know if I should try to install bluez from source or if I sould try to force the Jessie package installation.
Trying quickly to install the deb from the Jessie website I got the following error:
dpkg: warning: downgrading bluez from 9.99-9 to 5.23-2+b1
dpkg: warning: files list file for package 'armv7-eventlircd-osmc' missing; assuming package has no files currently installed
(Reading database ... 50141 files and directories currently installed.)
Preparing to unpack bluez_5.23-2+b1_armhf.deb ...
Unpacking bluez (5.23-2+b1) over (9.99-9) ...
dpkg: error processing archive bluez_5.23-2+b1_armhf.deb (--install):
trying to overwrite '/usr/bin/rfcomm', which is also in package armv7-bluez-osmc 5.3.9-1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
bluez_5.23-2+b1_armhf.deb
Not sure that this is the best solution but I did the following:
Download bluez from here: Index of /pub/linux/bluetooth/ . If I recall correctly I had issues to compile the version 5.44 but 5.43 worked well
Untar the archive: tar xvf bluez-5.43.tar.xz
Go to the new directory cd bluez-5.43
Install dependencies: sudo apt-get update followed by sudo apt-get install -y libusb-dev libdbus-1-dev libglib2.0-dev libudev-dev libical-dev libreadline-dev
Execute ./configure
Run the command make
I didn’t run make install by fear of messing with the existing osmc packages, so I let the programs where they are. You will find gatttool in the folder attrib. You can type the following to have the program easily accessible from the command line sudo cp attrib/gatttool /usr/local/bin/
I need to pick up this thread again. As a Vero 4K owner I’m also missing gatttool in the custom OSMC bluez package. Since it’s part of the upstream package and a few people already expressed their need for it, would it be possible to add it to the OSMC flavored package as well?
On my Pi3, it shows the help screen without error:
./gatttool --help
Usage:
gatttool [OPTION?]
Help Options:
-h, --help Show help options
--help-all Show all help options
--help-gatt Show all GATT commands
--help-params Show all Primary Services/Characteristics arguments
--help-char-read-write Show all Characteristics Value/Descriptor Read/Write arguments
Application Options:
-i, --adapter=hciX Specify local adapter interface
-b, --device=MAC Specify remote Bluetooth address
-t, --addr-type=[public | random] Set LE address type. Default: public
-m, --mtu=MTU Specify the MTU size
-p, --psm=PSM Specify the PSM for GATT/ATT over BR/EDR
-l, --sec-level=[low | medium | high] Set security level. Default: low
-I, --interactive Use interactive mode
Yeah I managed to get it to work by compiling bluez locally as per @camfrout instructions.
Just wondering if there is any solid reason not to include gatttool It doesnt seem big, and would safe some time / re-figuring out when my sdcard eventually dies. I understand osmc over versions to ensure compatibility, just would be really nice to have this working as the ‘normal’ bluez would in this regard.
No idea. You should bear in mind that OSMC is primarily a media-focused distribution. It would probably have been a decision of Sam or one of the devs.