GQ Electronics Technical Support Forum Active Users: / Visits Today:
Highest Active Users:
GQ Electronics Technical Support Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 GQ Electronics Forums
 2.GQ Geiger Muller Counter
 GMC-800 terminal interface

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List Spell Checker
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

   Insert an Image File
Check here to include your profile signature.
    

T O P I C    R E V I E W
bmomjian Posted - 03/20/2024 : 11:01:27
I was able to successfully connect to the GMC-800 using the Linux terminal interface 'cu'. I used the command:

cu --nostop -l /dev/ttyUSB3 -s 115200 dir


The "--nostop" is needed so binary data coming from the GMC-800 is not interpreted as xon/xoff flow control commands. You might also need to set 'raw' mode using stty.

I used speed 115200, and the commands listed in this forum at:

https://www.gqelectronicsllc.com/forum/topic.asp?TOPIC_ID=10394

I am specifically using "<GETCPM>>". The AT commands did not work for me.
5   L A T E S T    R E P L I E S    (Newest First)
bmomjian Posted - 03/30/2024 : 03:42:59
The API for the GMC-800 is at http://www.gqelectronicsllc.com/download/GQ-RFC1801.txt
bmomjian Posted - 03/27/2024 : 16:28:34
quote:
Originally posted by ullix

I think you would be better off coding in Python. Code as simple as your current is e.g : "geigerlog_simple.py"
you find here: https://sourceforge.net/projects/geigerlog/files/
There are some nuanced increases in complexity in files on the same site.

Pre-releases of developments are: https://sourceforge.net/p/geigerlog/discussion/devel/




Looks interesting, though on the GMC-800 the CPM is four bytes, so the script would need modification. Fortunately my script is working.
ullix Posted - 03/27/2024 : 09:26:57
I think you would be better off coding in Python. Code as simple as your current is e.g : "geigerlog_simple.py"
you find here: https://sourceforge.net/projects/geigerlog/files/
There are some nuanced increases in complexity in files on the same site.

Pre-releases of developments are: https://sourceforge.net/p/geigerlog/discussion/devel/
bmomjian Posted - 03/26/2024 : 06:47:36
quote:
Originally posted by EmfDev

AT commands are not supported on hte GMC-800. It does not have WiFi feature.



Ah, good to know about AT not being supported.

I ended up realizing that 'cu' was overkill for my purposes so I went with a simpler Linux shell script. It just sends the command to the device and gets the reply. I found that each time I reconnect the USB cable to the device, I have to send ">>" to get the connection established; if I don't the first command I send is ignored:

# connected?
[ ! -e /dev/"$GEIGER" ] && exit 1

stty -F /dev/"$GEIGER" raw -echo 115200

# Was tty reconnected?  Reset so we get a reading on the second try.
if ! stty -F /dev/"$GEIGER" | grep -q 'rprnt = ^K'
then    # send dummy command
        echo -n '>>' > /dev/"$GEIGER"

        # set a dummy settings so we can detect reconnection
        stty -F /dev/"$GEIGER" rprnt '^K'
fi

CPM=$(perl << 'END'
        use strict;
        use warnings;

        use Momjian_us;

        # could hang, allow two seconds for read
        # https://unix.stackexchange.com/questions/559235/read-stdin-with-timeout
        local $SIG{ALRM} = sub { exit(1) };
        alarm(2);

        my $device = "/dev/$ENV{GEIGER}";
        open(my $geiger, '+<', $device) or
          sysdie("cannot open $device");

        print({$geiger} '<GETCPM>>');

        sysdie("cannot read four bytes from $device")
          if (read($geiger, my $byte4, 4) != 4);
        # Network/big endian ordering 4-byte integer
        # Newer models use 4-byte CPM for the GMC-500+, not 2
        # https://www.gqelectronicsllc.com/forum/topic.asp?TOPIC_ID=10394
        # https://www.gqelectronicsllc.com/forum/topic.asp?TOPIC_ID=9682
        print unpack('N', $byte4) . "\n";

        alarm 0;
END
)

echo "$CPM"
EmfDev Posted - 03/21/2024 : 09:42:31
AT commands are not supported on hte GMC-800. It does not have WiFi feature.

GQ Electronics Technical Support Forum © Copyright since 2011 Go To Top Of Page
Generated in 0.05 sec. Snitz's Forums 2000