Skip to content

Instantly share code, notes, and snippets.

@JulienSansot
Created May 18, 2016 02:08
Show Gist options
  • Save JulienSansot/215b027d1d5cf8cfa38685570f88e610 to your computer and use it in GitHub Desktop.
Save JulienSansot/215b027d1d5cf8cfa38685570f88e610 to your computer and use it in GitHub Desktop.
Get the id of Bluetooth device
# examples :
#
# get the integrated BT :
# ./get_bt_id.sh UART
#
# get the USB BT :
# ./get_bt_id.sh USB
bt_type=$1
bt_id=$(sudo hciconfig | awk '/'"$bt_type"'/ {gsub(":","");print $1;}')
echo "$bt_id"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment