getting started with serial port communication

  • (1) I tried the example from documentation on a TER 105, however I don`t get it working. The AT commands for write, enable, list, ... return OK, but I don`t get any output from Python on the serial port which is connected to hypertrerminal.

    import SER
    a = SER.set_speed(`9600`)
    b = SER.send(`test`)
    c = SER.sendbyte(0x0d)
    d = SER.receive(10)

    The Python IDE returns an error due to the unknown SER module.
    It works fine on a PC using the module PySerial.

    import serial

    ser = serial.Serial()

    weiter = True
    while weiter:
    line = ser.readline()
    print line
    if line == `q`:
    weiter = False

    (2) can I use the Python interpreter without a SIM card (I havn`t got one yet), i.e. read and write to serial port and ignore the phone features?

    (3) where is the second com port hidden at the TER 105?

    Most certainly there is a "Hello World" which would show me, how to talk over com port.

  • 1) without a debugging system in place you`ll have a hard time with Python
    2) yes
    3) you don`t have access to it - that why is hard/impossible to debug on TER

  • (1) that`s why I considered a starter kit as a good idea but (3) suggests that I startet with the wrong package.

    (4) Do I need something else than one of these extension boards

    (5) Which one do I need to access the I/O, a serial port AND to debug.

    (6) Can I use the GM862 and antenna from TER?

  • 1) TERs are intended for end users. Starter kits are designated with STK prefix in RS price list.
    4) If you have everything else, the module, power source, antennas, cables, access to online documentation and software, a board would be enough.
    5) Depending of what module you are selecting. -QUAD-PY can be debugged with the second serial port (you`ll need a separate serial cable adapter with RS-EB-S1 or RS-EB-S2) while -GPS module can be debugged using CMUX over the main serial port. IO are available on all boards.
    6) if you will assume the process of desoldering the module and consequent loss of warranty, yes. Better take a complete starter kit and save you a lot of headache.
    - Edited by byteworks 11.12.2006, 12:13 -

  • Create a file in the beginning of your script and write your debug info there. After running the script start in command mode and view your script`s output with #rscript. Now it`s easy again! Of course the evk makes it even easier...

  • This will work if scripts are syntax/language error free. On many ocassions you`ll be lost because your script won`t start and you won`t know why.