Created
May 18, 2016 02:08
-
-
Save JulienSansot/215b027d1d5cf8cfa38685570f88e610 to your computer and use it in GitHub Desktop.
Get the id of Bluetooth device
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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