kbb
kbb

Reputation:

Python USSD via com port

I am new to python. Is there anyway i can use python to send ussd with a phone via at+cusd commands. i can do that using hyperterminal. i want to automate using python. thanks.

Upvotes: 0

Views: 1164

Answers (1)

nosklo
nosklo

Reputation: 223062

Yes. Use pyserial.

>>> import serial
>>> ser = serial.Serial(0)  # open first serial port
>>> print ser.portstr       # check which port was really used
>>> ser.write("hello")      # write a string
>>> ser.close()             # close port

Upvotes: 1

Related Questions