pySerial - accessing GSM module failed

Dave Dave daved170 at
Fri Jan 9 13:45:33 CET 2009

Hello all,
I'm newbie in the serial buissness and I beed some Help. I'm a student at my
last year and I got final assaignment.
My goal is to comunicate with SIM free, GSM Module through computer. I want
to simulate SIM card by receiving and transferring data from my code.

In order to understand how to comunicate with the GSM module I took an
existing module which gut RS232 connector and connected it to the computer.
I ran my python code:
class MySerial():
     def __init__ (self,port,baundrate,....)
          self.s = serial.Serial(port,baundreate,....)

     def read(self,size=1):
           txt =

    def write(self,text=''):            txt = self.s.write(text)

    def main():
          obj = MySerial('COM1')

the code run and I send the comman 'ATI' which ask the GSM Module if
everything is OK.
the read line returs 'ATI'. echo to my write function.

Whenever I run this comman ('ATI') through hyperterminal I gut the result :
232 OK

Does any one got an Idea why my code isn't getting the same answer from the
GSM Module?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list