The converter supports the Ring Indicator (RI) line used by the RM-70, but the driver does not support the TIOCGICOUNT ioctl function. As a quick workaround I wrote ring-0.2.tar.gz which uses TIOCMIWAIT for counting RI pulses instead. This is less efficient but appears to be quite reliable. For each high-low-high pulse the program prints the current timestamp to STDOUT.
Bundled is a simple Perl script which counts rows read per minute on STDIN and stores the average value in a rrdtool round-robin database at a given interval. The script can also be used for things like measuring the frequency of specific log messages in logfiles.
Example storing 5 minute CPM averages in geiger.ppm:
$ ./ring /dev/ttyUSB0 | examples/rpm-rrd.pl geiger.ppm 300Refer to this post for an example of how to create a rrdtool database and generate a graph. Add a CDEF rrdgraph expression for converting CPM to approximate mR/hr using the nominal ratios listed here if desired.
Some Debian/Ubuntu kernels have issues with open(2) blocking when opening /dev/ttyUSB0 using the pl2303 driver. The workaround mentioned here is reported to work for this program.

0 comments:
Post a Comment