Setting up Bluetooth automatic pairing on Linux [closed]
If anyone happens upon this question, to use (much of) the BlueZ “BT Management Sockets” C API directly from bash, try: btmgmt –help btmgmt add-device, btmgmt find, btmgmt discov, etc.
If anyone happens upon this question, to use (much of) the BlueZ “BT Management Sockets” C API directly from bash, try: btmgmt –help btmgmt add-device, btmgmt find, btmgmt discov, etc.
Entering a PIN is actually an outdated method of pairing, now called Legacy Pairing. Secure Simple Pairing Mode is available in Bluetooth v2.1 and later, which comprises most modern Bluetooth devices. SSPMode authentication is handled by the Bluetooth protocol stack and thus works without user interaction. Here is how one might go about connecting to … Read more
Try this… Run gatttool -b <MAC Address> –interactive like you did before. You’ll get a prompt and then you type connect. You should see a CON in the prompt indicating that you’ve connected to the device. Then type char-read-uuid 2902. You should get a list of all CCC (Client Characteristic Configuration) attributes on the device. … Read more
Had the same problem. Use: $ sudo bluetoothctl Then the controller was found automatically. I also tried https://www.raspberrypi.org/forums/viewtopic.php?t=207025 before. Maybe this effected the solution.
That happens often really often to me. I’m developing with it and it just happens from time to time. I was also able to reproduce your error within 5 minutes 😉 I’m running bluez v.5.17. However i can run lescan more than one time without this error. hcitool lescan Set scan parameters failed: Input/output error … Read more
With your Bluetooth dongle plugged in, running the following command will tell you the device name and give its state: $ hciconfig The output should look something like this: hci0: Type: BR/EDR Bus: USB BD Address: 00:01:02:aa:bb:cc ACL MTU: 1021:8 SCO MTU: 64:1 DOWN RX bytes:1000 acl:0 sco:0 events:47 errors:0 TX bytes:1072 acl:0 sco:0 commands:47 … Read more
You need to install libbluetooth-dev package for compiling your code sudo apt-get install libbluetooth-dev That should install the bluetooth header files.
This might be a bit late to the party but for me this Python project has worked fine: https://github.com/TheWeirdDev/Bluetooth_Headset_Battery_Level I only had to change the port in line 57 to 3 for my no-name X5 headset. If it hangs or errors with “connection refused” try a different port. The Python program uses AT commands via … Read more