====== required software ====== yaourt -S btscanner pacman -S bluez-utils ====== discoverable ====== dbus-send --system --dest=org.bluez /org/bluez/hci0 org.bluez.Adapter.SetMode string:discoverable hciconfig hci0 piscan ====== hide ====== dbus-send --system --dest=org.bluez /org/bluez/hci0 org.bluez.Adapter.SetMode string:off hciconfig hci0 noscan ====== scan ====== hciconfig hciconfig hci0 up hcitool scan l2ping MAC btscanner sudo bluetoothctl agent on default-agent pair MAC connect MAC TODO: 兩種 scan 的差別 ble compatibility ====== RSSI ====== hcitool rssi AA:BB:CC:DD:EE:FF ===== Beacon ===== Advertised speed sudo hciconfig hci0 up sudo hcitool -i hci0 cmd 0x08 0x0008 1e 02 01 1a 1a ff 4c 00 02 15 e2 c5 6d b5 df fb 48 d2 b0 60 d0 f5 a7 10 96 e0 00 00 00 00 c5 00 00 00 00 00 00 00 00 00 00 00 00 00 sudo hcitool -i hci0 cmd 0x08 0x0006 A0 00 A0 00 03 00 00 00 00 00 00 00 00 07 00 sudo hcitool -i hci0 cmd 0x08 0x000a 01 參考 * https://wiki.debian.org/BluetoothUser * http://shyuanliang.blogspot.tw/2014_10_01_archive.html * https://github.com/karulis/pybluez * https://github.com/MS3FGX/Bluelog * https://www.cnet.com/how-to/how-to-setup-bluetooth-on-a-raspberry-pi-3/ * http://ops9.blogspot.tw/2013/09/inquiry-scan.html