Support for Bluetooth (using BlueZ in Linux).
The following packages are required packages for this module:
bluez >= 5.7 bluez-libs >= 5.7 bluez-utils >= 5.7 pybluez >= 0.18
salt.modules.bluez_bluetooth.
address_
()¶Get the many addresses of the Bluetooth adapter
CLI Example:
salt '*' bluetooth.address
salt.modules.bluez_bluetooth.
block
(bdaddr)¶Block a specific bluetooth device by BD Address
CLI Example:
salt '*' bluetooth.block DE:AD:BE:EF:CA:FE
salt.modules.bluez_bluetooth.
discoverable
(dev)¶Enable this bluetooth device to be discoverable.
CLI Example:
salt '*' bluetooth.discoverable hci0
salt.modules.bluez_bluetooth.
noscan
(dev)¶Turn off scanning modes on this device.
CLI Example:
salt '*' bluetooth.noscan hci0
salt.modules.bluez_bluetooth.
pair
(address, key)¶Pair the bluetooth adapter with a device
CLI Example:
salt '*' bluetooth.pair DE:AD:BE:EF:CA:FE 1234
Where DE:AD:BE:EF:CA:FE is the address of the device to pair with, and 1234 is the passphrase.
TODO: This function is currently broken, as the bluez-simple-agent program no longer ships with BlueZ >= 5.0. It needs to be refactored.
salt.modules.bluez_bluetooth.
power
(dev, mode)¶Power a bluetooth device on or off
CLI Examples:
salt '*' bluetooth.power hci0 on
salt '*' bluetooth.power hci0 off
salt.modules.bluez_bluetooth.
scan
()¶Scan for bluetooth devices in the area
CLI Example:
salt '*' bluetooth.scan
salt.modules.bluez_bluetooth.
start
()¶Start the bluetooth service.
CLI Example:
salt '*' bluetooth.start
salt.modules.bluez_bluetooth.
stop
()¶Stop the bluetooth service.
CLI Example:
salt '*' bluetooth.stop
salt.modules.bluez_bluetooth.
unblock
(bdaddr)¶Unblock a specific bluetooth device by BD Address
CLI Example:
salt '*' bluetooth.unblock DE:AD:BE:EF:CA:FE
salt.modules.bluez_bluetooth.
unpair
(address)¶Unpair the bluetooth adapter from a device
CLI Example:
salt '*' bluetooth.unpair DE:AD:BE:EF:CA:FE
Where DE:AD:BE:EF:CA:FE is the address of the device to unpair.
TODO: This function is currently broken, as the bluez-simple-agent program no longer ships with BlueZ >= 5.0. It needs to be refactored.
salt.modules.bluez_bluetooth.
version
()¶Return Bluez version from bluetoothd -v
CLI Example:
salt '*' bluetoothd.version