Tutorial :any command line com port query tools? [closed]



Question:

I want to make a chat program that uses SMS as its base engine. To do this I need to communicate with my GSM phone via Bluetooth attached to COM7 on my computer. I can do this fine using HyperTerminal, Tera Term etc.

But to have an unobtrusive, friendly interface I need a command line tool to send AT commands, (and receive responses) to/from my mobile phone through my COM port. I have been searching for days to no avail. Is there anything that I have missed?


Solution:1

It's probably not exactly what you want but I wrote a python framework for communicating via AT-commands. It supports data cables, bluetooth on Linux and Windows (written in Python 2).

A sample program built with that framework is RecNPlay. With RecNPlay you are able to record (, save) and playback keystrokes on your mobile phone.

You could take RecNPlay as an example and program your own tool to communicate. The library RecNPlay is built on is called PyGSMLib and provides python-wrappers to a lot of AT-commands and supports 'AT unsolicited results'.

Sample python program which listens to Nokia specific GPRS events (like connect, disconnect from mobile, disconnect by network):

device = sys.argv[1]    sconn = None  comm = None  try:      sconn = Serial(device, 9600, timeout=3)      print "Initializing V250 connection...",      comm = V250Communicator(sconn)      print "ok"      gsm = NokiaController(comm, True)      gsm.nokiaEnableGprsEventReporting()      def listen(msg):          print "Unknown: %s" % str(msg)        comm.setUnsolicitedResultListener(listen)      import os      os.sys.stdin.readline()  finally:      if sconn:          sconn.close()  

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »