raffa hat folgendes geschrieben: |
Hallo
ich möchte in mein auto ein car pc mit cpos einbauen. bis jetzt bin ich mit der software voll und ganz zufrieden, allerdings habe ich bis heute nicht rausgefunden, wie ich mein handy mit der software verkoppeln kann. wie gesagt hab ich ein Htc desire mit android 2.2 kennt da jemand ne lösung? lg raffa |
S-I-M-O-N hat folgendes geschrieben: |
Den Ton (Audio Gateway) stellt der Bluetoothtreiber (bei mir Widcomm) zur Verfügung |
Code: |
import android import time uuid = '00001101-0000-1000-8000-00805F9B34FB' droid = android.Android() droid.toggleBluetoothState(True) droid.bluetoothMakeDiscoverable() droid.bluetoothAccept(uuid) outstring='' instring='' oldstring='' print 'Listening:\n' while True: if droid.bluetoothReadReady(): instring=droid.bluetoothRead().result print instring newstring=oldstring + instring print 'newstring ' + newstring if newstring=='ATZ'+'\r': outstring='ATZ\r\r\nOK' oldstring='' if newstring=='ATE1'+'\r': outstring='ATE1\r\r\nOK' oldstring='' if newstring=='AT+GMI;+GMM'+'\r': outstring='AT+GMI;+GMM\r\r\nAndroid Python Script\r\r\nAndroid Python Script v1alpha\r\r\nOK' oldstring='' if newstring=='AT+CSCS="8859-1"'+'\r': outstring='AT+CSCS="8859-1"\r\r\nOK' oldstring='' if newstring=='AT+CLCC'+'\r': outstring='AT+CLCC\r\r\nOK' oldstring='' if newstring=='AT+CPAS'+'\r': outstring='AT+CPAS\r\r\n+CPAS: 0\r\r\nOK' oldstring='' if newstring=='AT+CLIP=1'+'\r': outstring='AT+CLIP=1\r\r\nOK' oldstring='' if newstring=='AT+CRC=1'+'\r': outstring='AT+CRC=1\r\r\nOK' oldstring='' if newstring=='AT+CNMI=2,1,0,1'+'\r': outstring='AT+CNMI=2,1,0,1\r\r\nOK' oldstring='' if newstring=='AT+CMGF=0'+'\r': outstring='AT+CMGF=0\r\r\nOK' oldstring='' droid.bluetoothWrite(outstring + '\r\n') droid.exit() |