#!/bin/bash

load-wireless-driver bluetooth enable >/dev/null 2>&1 
hciconfig -a >/dev/null 2>&1 
hciconfig hci0 up >/dev/null 2>&1 

if test $# = 0; then
    set -- :
fi

hcitool scan 2>&1 | grep -i -e "$1" || die "Scan did not found any BT device nearby"

## usage: bt-scan [TARGET-PATTERN]
