PATOOL

PATool is a command-line software utility for accessing a directly connected Pike Aero sensor, or a Pike Aero sensor remotely over TCP/IP.

The PATool source code is provided under the GPL license in order to assist integration into custom applications.

PATool 1.2 Windows Installer

PATool 1.2 Source Code .ZIP File

PATool Command-line Options:

--version -v Print Version
--nosave -n Don't save command line setting (default=save)
--settings -s <n> Settings file to use
--help -h -? Print this help

--device -d <n> Set the serial device [/dev/ttyS0]
--baud -b <n> Set the serial device [2400]
--server -S Go into server mode.
--serverport -p <n> Set TCP listen port [20100]
--connecthost -H <n> Set TCP connect host []
--connectport -P <n> Set TCP connect port [20100]
--udp -u <n> Set UDP broadcast port [20200]
--backlog <n> Set backlog [20]
--logging -l <n> Set Logging Level 0..9 [0]
--rxtimeout -x <n> Set the timeout for received packets [4]
--rxretries -t <n> Set the number of reciever retry attempts [5]
--logfile -f <n> Set the logfile output (current=)
--readregister -R <n> Read the device register <n>.
--readvariable -V <n> Read the device variable <n> by name.
--sepchar -S <n> Set the output field separator character to <n>.
--opendelay -o <n> Set the open delay in milliseconds.
--outputformat -O <n> Set the output format [0]
--protocol <n> Set protocol version [0]

Setup a PATool TCP/IP server on port 20100

$ patool --device /dev/ttyS0 --server --serverport 20100

Query a remote patool server by variable name

$ patool --connecthost 192.168.1.4 --connectport 20100 --readvariable CELCIUS
22.187

Query a remote patool server by register number

$ patool --connecthost 192.168.1.4 --connectport 20100 --readregister 5
22.187

Query a specific sensor variable by name

$ patool --device /dev/ttyS0 --readvariable CELCIUS
22.62

Output format 0 (default)

$ patool --device /dev/ttyS0 --outputformat 0
7
PA10/T2
1010120
www.pikeaero.com
2.2
22.187
71.937

Output Format 1

$ patool --device /dev/ttyS0 --outputformat 1
7 *
PA10/T2 *
1010120 *
www.pikeaero.com *
2.2 *
22.250 C
72.50 F
mike@grumpy:~$

Output Format 2 (default field separator TAB (Hex 08) char)

$ patool --device /dev/ttyS0 --outputformat 2
R0 I R 7 * VARS R1
S R PA10/T2 * PRODUCT R2 S
R 1010120 * SERIAL R3 S R
www.pikeaero.com * VENDOR R4 S
R 2.2* VERSION R5 R R
22.312 C CELCIUS R6 R R
72.162 F FAHRENHEIT

Output Format 2 (with field separator character (:) )

$ patool --device /dev/ttyS0 --outputformat 2 --sepchar :
R0:I:R:7:*:VARS:R1:S:R:PA10/T2:*:PRODUCT:R2:S:R:1010120:*:SERIAL:R3:S
:R:www.pikeaero.com:*:VENDOR:R4:S:R:2.2:*:VERSION:R5:R:R:22.250:C:CELCIUS
:R6:R:R:72.162:F:FAHRENHEIT:

Writen at 14. January 2013 by pikeaero
 
More information:
PATool command-line and TCP/IP sensor query tool

Previous page: DB-9 BREAKOUT Next page: 'PADISCO' IOT SETUP