Skip to content

Instantly share code, notes, and snippets.

@wattnotions
Created May 25, 2014 12:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wattnotions/94aa42725dd05fbfbb22 to your computer and use it in GitHub Desktop.
Save wattnotions/94aa42725dd05fbfbb22 to your computer and use it in GitHub Desktop.
Opens phone bluetooth module and connects with computer
#qpy:console
from androidhelper import Android
droid = Android()
if droid.checkBluetoothState().result == True:
print 'Bluetooth is on'
print " Phone info:" + str(droid.bluetoothGetLocalName())
print "Computer info: " + str(droid.bluetoothGetRemoteDeviceName(address='88:53:2E:E8:65:4C'))
droid.bluetoothConnect(address='88:53:2E:E8:65:4C') # connect to computer
print "Active connections : " + str(droid.bluetoothActiveConnections())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment