2009-03-23 5 views

답변

4

가 AT 모듈이 있다면 나도 몰라,하지만 당신은 직렬 포트와 통신 할 수 pyserial를 사용할 수 있습니다.

16

나는 pyserial와 같이 그것을 :

다음
import serial 

serialPort = serial.Serial(port=1,baudrate=115200,timeout=0,rtscts=0,xonxoff=0) 
def sendatcmd(cmd): 
    serialPort.write('at'+cmd+'\r') 

print 'Loading profile...', 
sendatcmd('+npsda=0,2') 

내가 대답을 듣고 ...

+0

당신이 대답 @ c0m4 – saviour123

+0

@ saviour123 serialPort.read (수신하려면 어떻게해야) 할 것 it – c0m4

+0

@c) serialPort.read()를 사용하는 m4, ussd 명령에 대한 응답이 아닌 ok 만 수신합니다. – saviour123

관련 문제