From e9a73bbb3c14af340999f70146747787785f4fee Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Mon, 19 Dec 2011 18:20:33 +0000 Subject: initial commit --- pyDMM/pyRFCLIENT.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 pyDMM/pyRFCLIENT.py (limited to 'pyDMM/pyRFCLIENT.py') diff --git a/pyDMM/pyRFCLIENT.py b/pyDMM/pyRFCLIENT.py new file mode 100755 index 0000000..33656c9 --- /dev/null +++ b/pyDMM/pyRFCLIENT.py @@ -0,0 +1,25 @@ +#!/usr/bin/python +import signal,sys +from bluetooth import * + +# Create the client socket +client_socket=BluetoothSocket( RFCOMM ) +bt_addr = "00:18:E4:0C:68:08" #electic +#bt_addr = "00:18:E4:0B:F5:06" #herge-1 +bt_port = 1 +client_socket.connect((bt_addr,bt_port)) + +def signal_handler(signal, frame): + print "closing bluetooth" + client_socket.close() + sys.exit(0) + +signal.signal(signal.SIGINT, signal_handler) +S=struct.Struct('