bluetoothctl-parser

Two python scripts:

  1. bluetoothctl-parser.py - Gathers device info using bluetoothctl, cleans it up and outputs it STDOUT in JSON format.
  2. bluetoothctl-prettytable.py - Gathers device info from bluetoothctl, cleans it and and outputs it to a table. This script gets device data every 5 seconds and refreshes the table. It runs in a forever loop.

bluetoothctl-parser.py Usage

  1. Start bluetooth scanning using bluetoothctl. Leave the scan running while using the script.
    bluetoothctl scan on
    
  2. Open a second terminal and mark the script executable.
    chmod +x bluetoothctl-parser.py
    
  3. Run the script. No privilege is required.
    ./bluetoothctl-parser.py
    

bluetoothctl-prettytable.py Usage

  1. Start bluetooth scanning using bluetoothctl. Leave the scan running while using the script.
    bluetoothctl scan on
    
  2. Open a second terminal and mark the script executable.
    chmod +x bluetoothctl-prettytable.py
    
  3. Run the script. No privilege is required.
    ./bluetoothctl-prettytable.py
    

bluetoothctl-parser.py Sample Output

<img src=https://dojolabs.s3.amazonaws.com/bluetooth/bluetoothctl-parser-script-output2.jpg>

<img src=https://dojolabs.s3.amazonaws.com/bluetooth/bluetoothctl-parser-script-output1.jpg>


bluetoothctl-prettytable.py Sample Output

<img src=https://dojolabs.s3.amazonaws.com/bluetooth/bluetoothctl-prettytable.jpg>


Troubleshooting


To Do: