Skip to content

Instantly share code, notes, and snippets.

@z448
Last active August 29, 2015 14:25
Show Gist options
  • Select an option

  • Save z448/4ecd34bcd9e0a03188ea to your computer and use it in GitHub Desktop.

Select an option

Save z448/4ecd34bcd9e0a03188ea to your computer and use it in GitHub Desktop.
logitech k760 keyboard setup for ubuntu
#!/bin/bash
# setting up logitech k760 on ubuntu
# bluez-hcidump-2.5.tar.xz [http://www.bluez.org/download/]
# usage: sudo ./k760-setup-ubuntu.sh
function scan {
hcitool scan > $fl
}
if [ -f "$PWD/760.mac" ]; then
fl="$PWD/760.mac"
scan
K760=$(cat $fl | grep -i K760 | cut -d ' ' -f1)
K760mac=$(echo $K760 | cut -d' ' -f1)
else
touch $PWD/760.mac
scan
K760=$(cat 760.mac | grep -i K760 | cut -d' ' -f1)
K760mac=$(echo $K760 | cut -d' ' -f1)
fi
sleep 15
sudo bluez-simple-agent hci0 $K760mac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment