Advertisement
Guest User

HowTo pair Bluetooth device with the Pi

a guest
Apr 1st, 2014
6,368
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.85 KB | None | 0 0
  1. # HowTo pair Bluetooth device with the Pi
  2. #
  3. # Install Bluetooth + tools and start Bluetooth service
  4. #
  5. apt-get install bluetooth bluez-utils sysv-rc-conf
  6. sysv-rc-conf bluetooth on
  7. /etc/init.d/bluetooth restart
  8. #
  9. # Put the BT device in discovery mode and scan for BT devices
  10. #
  11. hcitool scan
  12. #
  13. # Start a Bluetooth agent to interface with the BT device
  14. # Replace "xx:xx:xx:xx:xx:xx" with the address found during scan
  15. # Make up a PIN code when asked and confirm the pin on the BT device
  16. #
  17. bluez-simple-agent hci0 xx:xx:xx:xx:xx:xx
  18. #
  19. # Make the BT device trusted to allow auto connect
  20. #
  21. bluez-test-device trusted xx:xx:xx:xx:xx:xx yes
  22. #
  23. # Connect to the BT device
  24. #
  25. bluez-test-input connect xx:xx:xx:xx:xx:x
  26. #
  27. # The BT device should be available now
  28. # If necessary to remove a trusted BT device enter
  29. #
  30. bluez-test-device remove xx:xx:xx:xx:xx:xx
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement