#!/bin/bash hci=`hciconfig | grep hci | cut -f1 -d:` hci_info=`hciconfig -a $hci name` echo "Name: $hci_info" hcitool scan
Name: hci0: Type: USB
BD Address: 00:80:5A:20:EB:9C ACL MTU: 192:8 SCO MTU: 64:8
Name: 'hormiga-0'
Scanning ...
00:17:E5:D8:2B:B0 Tarantula
00:1F:5D:BF:F0:01 Cucaracha
00:1E:3B:A5:7B:16 Libeliula
00:25:C7:33:97:85 Mosquito
00:24:90:43:0B:71 Mantis
Invocation:
sh BluetoothExample.sh -> As root user
sudo sh BluetoothExample.sh -> As other user
Require
Require root privileges