f = assert(io.popen ("/usr/bin/stdbuf -o0 /usr/bin/btmon"))
run_command("hciconfig hci0 down")
run_command("hciconfig hci0 up")
f = assert(io.popen ("/usr/bin/stdbuf -o0 /usr/bin/btmon"))
run_command("hciconfig hci0 down")
run_command("hciconfig hci0 up")