I am interested in reading data in from the GMC300 into my own application for post processing, but I am having a little trouble reading anything from the port. I wrote a simple python script that should access the data, but I'm not seeing any data when I run it. Right now it is running on a Debian Linux dist. (Raspberry Pi), but I could easily try it on a windows system using C# or similar language.
Has anyone done this or could point me in the correct direction?
Has anyone done this or could point me in the correct direction?
Here the USB serial device of the GMC-300 appears as /dev/ttyUSB0 and communication uses the following serial settings: 57600 baud 8 data bits No parity 1 stop bit No hardware control lines
Except for the baud rate these settings may already match the default settings of the python serial class. Therefore, you'd only need to specify the device and the baud rate. For example:
import serial
s = serial.Serial( "/dev/ttyUSB0", 57600 )
s.write("<GETVER>>")
version = s.read(14)
print version
It also helps to have read/write access to "/dev/ttyUSB0":
$ ls -l /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 0 Mar 5 20:57 /dev/ttyUSB0
$ groups
user dialout cdrom audio video
ZLM, why are you insisting on 38400 baud. My software uses 57600 and works at that baudrate. mbowser, why don't you look at my C++/Ubuntu Linux software at h**p://sourceforge.net/p/gqgmc/wiki/Home/. You should be able to read the C++ fairly easily and convert to Python. The ICD documentation and documentation embedded in the code is comprehensive.