匿名
尚未登入
登入
flip the world
搜尋
檢視Bluetooth keyboard auto connect的原始碼
出自flip the world
命名空間
頁面
討論
更多
更多
頁面操作
閱讀
檢視原始碼
歷史
←
Bluetooth keyboard auto connect
您沒有權限執行編輯此頁面,由於以下原因:
您請求的操作只有這個群組的使用者能使用:
使用者
您可以檢視並複製此頁面的原始碼。
== Find keyboard & device MAC == <pre> #hcitool scan Scanning ... 23:E4:87:4C:B3:A1 Wireless Keyboard # hcitool dev Devices: hci0 06:05:04:03:02:01 </pre> == Paring == <pre> #bluez-simple-agent hci0 23:E4:87:4C:B3:A1 If everything goes well, you will be prompted to type a passkey with your keyboard: DisplayPasskey (/org/bluez/14656/hci0/dev_23_E4_87_4C_B3_A1, 936319) Your passkey is the number at the end of the line. Don’t forget to press ‘Enter’ after typing the passcode! Now your device is paired with the Raspberry Pi. </pre> == Trusting & Connecting == <pre> The final stage is making sure that the raspberry will automatically connect to the keyboard when it is turned on. This is called ‘trusting’ and is invoked by this command: #bluez-test-device trusted 23:E4:87:4C:B3:A1 yes After trusing it, all you need to do is connect to it: #bluez-test-input connect 23:E4:87:4C:B3:A1 yes </pre> == Automative connecting with systemd == ==== /etc/btkbd.conf ==== <pre> # Config file for btkbd.service # change when required (e.g. keyboard hardware changes, more hci devices are connected) BTKBDMAC = 6C:5D:63:22:0B:05 HCIDEVICE = 00:1A:7D:DA:71:13 </pre> ==== /etc/systemd/system/btkbd.service ==== <pre> [Unit] Description=systemd Unit to automatically start a Bluetooth keyboard Documentation=https://wiki.archlinux.org/index.php/Bluetooth_Keyboard Requires=dbus-org.bluez.service After=dbus-bluez.org.service ConditionPathExists=/etc/btkbd.conf ConditionPathExists=/usr/bin/hcitool ConditionPathExists=/usr/sbin/hciconfig [Service] Type=oneshot EnvironmentFile=/etc/btkbd.conf ExecStart=-/usr/sbin/hciconfig ${HCIDEVICE} up # ignore errors on connect, spurious problems with bt? so start next command with - ExecStart=-/usr/bin/hcitool cc ${BTKBDMAC} </pre> == reference == *[https://wiki.archlinux.org/index.php/bluetooth_keyboard Bluetooth keyboard] *[http://www.correlatedcontent.com/blog/bluetooth-keyboard-on-the-raspberry-pi/ Bluetooth Keyboard on the Raspberry Pi] [[Category:Projects]]
返回到「
Bluetooth keyboard auto connect
」。
導覽
導覽
首頁
近期變更
隨機頁面
MediaWiki說明
wiki工具
wiki工具
特殊頁面
頁面工具
頁面工具
使用者頁面工具
更多
連結至此的頁面
相關變更
頁面資訊
頁面日誌