BlueZ 5 : Tool recommendation for scripts
From: tony <hidden>
Date: 2015-11-05 15:04:31
From: tony <hidden>
Date: 2015-11-05 15:04:31
Hi All, What is the recommended BlueZ 5 tool to connect a device from scripts? 'bluetoothctl' is very good in interactive mode. I tried using 'hcitool' + 'simple-agent'. But they do not seem to detect device unless a scan is initiated from 'bluetoothctl' first. hcitool scan does scan and find devices. But simple-agent returns Exception: Bluetooth device not found. bluetoothctl commands which does not take much time could be run from scripts. eg: #!/bin/bash bluetoothctl << EOF power on EOF But starting a scan does not work, because it exits before the scan is complete. Many Thanks, Tony