##################################################################### # Copyright (c) Ben Sgro, 2008. # # All rights reserved under the copyright laws of the United States. # # Author: sk # Email: sk@mr-sk.com # Http: mr-sk.com # # Depends: On the Bluez libs for python. # # Quotez: # I'd rather die enormous than live dormant, that's how we on it. # Jay-z # # Notes: To change your hostname on linux; # sudo /usr/sbin/hciconfig hci0 name DESIRED_NAME # #################################################################### from bluetooth import * # Place your address here RZserverAddress = "00:00:00:00:00:00" i = 1; while i<=100: sock = BluetoothSocket( RFCOMM ) try: sock.connect((RZserverAddress, 1)) except: # sock didn't connect. print "User denied, try again" i = i+1 sock.close( )