TCR Command Line Interface
Important Note
The information in this section is for Parametric products as at 31/12/2023 and will not be subject to any updates in the future.
V2.2 | V2.1 | V2.0 | V1.3 | V1.1 | V1.0
Changes made in this version of the document.
- Added commands to lock device configuration. See Device Control
- Added command to read power supply voltage
get dc_voltage
andget sbx_voltage
Introduction
This manual describes the command line interface (CLI) of Parametric TCR traffic counters with LoRaWAN® and TCR Firmware V2.2.
The command line interface commands can be used for initial setup of the device. We recommend using PPX Product Explorer as for setting up your device.
CR LF Line Endings
All commands are terminated by a CR (\r)
and LF (\n)
ASCII symbol.
For the sake of clarity, we refrain from adding '\r\n' to each command.
Set & Get Commands
Device settings can be changed by a set and get commands, as well as a few control commands such as restart.
Range Checks
All supplied arguments are range checked and truncated if necessary.
Example:
lora set interval 2000 // 2000 is not OK
1440 // value will be truncated
lora set interval 10 // 10 is OK
10
save
Save & Apply Changes
All changes to device settings are instantly changed. Use the save command to permanently store changes to the configuration memory.
Some changes will be active only after a device restart by a power cycle or by sending the restart command.
Example:
lora set interval 5
5
save
ok
restart
Command List
The complete list of supported CLI commands. help
prints the same list to the console.
Status Commands
Command | Description | Example |
---|---|---|
get typestr |
Get Device Type e.g. TCR-DLI/LS/EU868 | get typestr TCR-DLI/LS/EU868 |
get status |
Get Device Status (0=OK) | get status 0 |
get serial |
Get the unique serial number | get serial 3434333575376517 |
get fw_version |
Get firmware version | get fw_version 2.1.0 |
get ltr |
Get sum of all LTR Counters | get ltr 2323 |
get rtl |
Get sum of all RTL Counters | get rtl 4155 |
get ltrinfo |
Get raw data of last LTR Counting returns {length},{speed},{confidence} length in cm speed in km/h detection confidence (100% very sure, 0% not sure) |
get ltrinfo 122,15,100 |
get ltrinfo |
Get raw data of last RTL Counting returns {length},{speed},{confidence} length in cm speed in km/h detection confidence (100% very sure, 0% not sure) |
get rtlinfo 230,52,70 |
get dc_voltage |
Get dc power supply voltage in mV | get dc_voltage 4980 |
get sbx_voltage |
Get voltage of solar battery in mV. (solar powered devices only) | get sbx_voltage 7250 |
Application Settings
Commands to change common application settings.
Command | Description | Example | DL CMD |
---|---|---|---|
get speedclass |
Get current device speed setting | get speedclass 1 |
|
set speedclass [class] |
Set device speed settings 1: low speed traffic (LS) 2: high speed traffic (HS) |
set speedclass 2 2 |
|
get mode |
Get current uplink mode 0 = Timespan 1 = NotZero 2 = Trigger |
get mode 0 |
|
set mode [mode] |
Change operation mode 0 = Timespan 1 = NotZero 2 = Trigger |
set mode 0 0 |
41 |
get holdoff |
Get current holdoff timer setting 0...600 (0 = off) |
get hold 1 |
|
set holdoff [s] |
Set holdoff timer in seconds 0...600 (0 = off) |
set hold 1 1 |
42 |
get timeout |
Get current auto-zero timeout in minutes 0...1440 (0=off) |
get timeout 120 |
|
set timeout [min] |
Set auto-zero timeout in minutes 0...1440 (0=off) |
set timeout 120 120 |
43 |
get sumup |
Check if totalizer is active 0 = disabled 1 = enabled |
get sumup 1 |
|
set sumup [ena] |
Enable totalizer instead of interval counter 0 = disabled 1 = enabled |
set sumup 1 1 |
44 |
get fallbackcat |
Fallback Category (if size and speed do not match) | get fallbackcat 0 |
|
set fallbackcat [cat] |
Set Fallback Category 0: P 1: A 2: B 3: C |
set fallbackcat 1 1 |
45 |
Traffic Category Settings
Settings to configure traffic categorization. This includes object size and speed of an object. If both values are in the defined range, the object will marked to be cat P, A, B or C.
P (People)
Commands used to configure people detection.
Command | Description | Example | DL CMD |
---|---|---|---|
cat p get enabled |
Check if people counting is enabled 0 = disabled 1 = enabled |
cat p get enabled 1 |
|
cat p set enabled [on] |
Enable people counting 0 = disabled 1 = enabled |
cat p set enabled 1 1 |
01 |
cat p get ltr |
Get number of people counted from left | cat p get ltr 15 |
|
cat p get ltrspeed |
Get average speed of people from left [km/h] | cat p get ltrspeed 4 |
|
cat p set ltr [cnt] |
Overwrite number of people counted from left | cat p set ltr 0 0 |
02 |
cat p get rtl |
Get number of people counted from right | cat p get rtl 13 |
|
cat p get rtlspeed |
Get average speed of people from right [km/h] | cat p get rtlspeed 4 |
|
cat p set rtl [cnt] |
Overwrite number of people counted from right | cat p set rtl 0 0 |
03 |
cat p get minsize |
Get minimum object size for a person [cm] | cat p get minsize 1 |
|
cat p set minsize [cm] |
Set minimum object size for a person [cm] | cat p set minsize 1 1 |
04 |
cat p get maxsize |
Get maximum object size for a person [cm] | cat p get maxsize 100 |
|
cat p set maxsize [cm] |
Set maximum object size for a person [cm] | cat p set maxsize 100 100 |
05 |
cat p get minspeed |
Get minimum accepted speed of a person [km/h] | cat p get minspeed 1 |
|
cat p set minspeed [kmh] |
Set minimum accepted speed of a person [km/h] | cat p set minspeed 1 1 |
06 |
cat p get maxspeed |
Get maximum accepted speed of a person [km/h] | cat p get maxspeed 7 |
|
cat p set maxspeed [kmh] |
Set maximum accepted speed of a person [km/h] | cat p set maxspeed 7 7 |
07 |
A (Two-Wheelers)
Commands used to configure two-wheeler detection (bikes, motocycles, scooters)
Command | Description | Example | DL CMD |
---|---|---|---|
cat a get enabled |
Check if two-wheeler counting is enabled 0 = disabled 1 = enabled |
cat a get enabled 1 |
|
cat a set enabled [on] |
Enable two-wheeler counting 0 = disabled 1 = enabled |
cat a set enabled 1 1 |
11 |
cat a get ltr |
Get number of two-wheelers counted from left | cat a get ltr 15 |
|
cat a get ltrspeed |
Get average speed of two-wheelers from left [km/h] | cat a get ltrspeed 4 |
|
cat a set ltr [cnt] |
Overwrite number of two-wheelers counted from left | cat a set ltr 0 0 |
12 |
cat a get rtl |
Get number of two-wheelers counted from right | cat a get rtl 13 |
|
cat a get rtlspeed |
Get average speed of two-wheelers from right [km/h] | cat a get rtlspeed 4 |
|
cat a set rtl [cnt] |
Overwrite number of two-wheelers counted from right | cat a set rtl 0 0 |
13 |
cat a get minsize |
Get minimum object size for a two-wheeler [cm] | cat a get minsize 100 |
|
cat a set minsize [cm] |
Set minimum object size for a two-wheeler [cm] | cat a set minsize 100 100 |
14 |
cat a get maxsize |
Get maximum object size for a two-wheeler [cm] | cat a get maxsize 250 |
|
cat a set maxsize [cm] |
Set maximum object size for a two-wheeler [cm] | cat a set maxsize 250 250 |
15 |
cat a get minspeed |
Get minimum accepted speed of a two-wheeler [km/h] | cat a get minspeed 5 |
|
cat a set minspeed [kmh] |
Set minimum accepted speed of a two-wheeler [km/h] | cat a set minspeed 5 5 |
16 |
cat a get maxspeed |
Get maximum accepted speed of a two-wheeler [km/h] | cat a get maxspeed 40 |
|
cat a set maxspeed [kmh] |
Set maximum accepted speed of a two-wheeler [km/h] | cat a set maxspeed 40 40 |
17 |
B (Cars)
Commands used to configure detection of cars.
Command | Description | Example | DL CMD |
---|---|---|---|
cat b get enabled |
Check if car counting is enabled 0 = disabled 1 = enabled |
cat b get enabled 1 |
|
cat b set enabled [on] |
Enable car counting 0 = disabled 1 = enabled |
cat b set enabled 1 1 |
21 |
cat b get ltr |
Get number of cars counted from left | cat b get ltr 15 |
|
cat b get ltrspeed |
Get average speed of cars from left [km/h] | cat b get ltrspeed 4 |
|
cat b set ltr [cnt] |
Overwrite number of cars counted from left | cat b set ltr 0 0 |
22 |
cat b get rtl |
Get number of cars counted from right | cat b get rtl 13 |
|
cat b get rtlspeed |
Get average speed of cars from right [km/h] | cat b get rtlspeed 4 |
|
cat b set rtl [cnt] |
Overwrite number of cars counted from right | cat b set rtl 0 0 |
23 |
cat b get minsize |
Get minimum object size for a car [cm] | cat b get minsize 250 |
|
cat b set minsize [cm] |
Set minimum object size for a car [cm] | cat b set minsize 250 250 |
24 |
cat b get maxsize |
Get maximum object size for a car [cm] | cat b get maxsize 600 |
|
cat b set maxsize [cm] |
Set maximum object size for a car [cm] | cat b set maxsize 600 600 |
25 |
cat b get minspeed |
Get minimum accepted speed of a car [km/h] | cat b get minspeed 10 |
|
cat b set minspeed [kmh] |
Set minimum accepted speed of a car [km/h] | cat b set minspeed 10 10 |
26 |
cat b get maxspeed |
Get maximum accepted speed of a car [km/h] | cat b get maxspeed 100 |
|
cat b set maxspeed [kmh] |
Set maximum accepted speed of a car [km/h] | cat b set maxspeed 100 100 |
27 |
C (HGV)
Commands used to configure detection of heavy goods vehicules (trucks, lorries)
Command | Description | Example | DL CMD |
---|---|---|---|
cat c get enabled |
Check if HGV counting is enabled 0 = disabled 1 = enabled |
cat c get enabled 1 |
|
cat c set enabled [on] |
Enable HGV counting 0 = disabled 1 = enabled |
cat c set enabled 1 1 |
31 |
cat c get ltr |
Get number of HGVs counted from left | cat c get ltr 15 |
|
cat c get ltrspeed |
Get average speed of HGVs from left [km/h] | cat c get ltrspeed 4 |
|
cat c set ltr [cnt] |
Overwrite number of HGVs counted from left | cat c set ltr 0 0 |
32 |
cat c get rtl |
Get number of HGVs counted from right | cat c get rtl 13 |
|
cat c get rtlspeed |
Get average speed of HGVs from right [km/h] | cat c get rtlspeed 4 |
|
cat c set rtl [cnt] |
Overwrite number of HGVs counted from right | cat c set rtl 0 0 |
33 |
cat c get minsize |
Get minimum object size for a HGV [cm] | cat c get minsize 600 |
|
cat c set minsize [cm] |
Set minimum object size for a HGV [cm] | cat c set minsize 600 600 |
34 |
cat c get maxsize |
Get maximum object size for a HGV [cm] | cat c get maxsize 1000 |
|
cat c set maxsize [cm] |
Set maximum object size for a HGV [cm] | cat c set maxsize 1000 1000 |
35 |
cat c get minspeed |
Get minimum accepted speed of a HGV [km/h] | cat c get minspeed 10 |
|
cat c set minspeed [kmh] |
Set minimum accepted speed of a HGV [km/h] | cat c set minspeed 10 10 |
36 |
cat c get maxspeed |
Get maximum accepted speed of a HGV [km/h] | cat c get maxspeed 80 |
|
cat c set maxspeed [kmh] |
Set maximum accepted speed of a HGV [km/h] | cat c set maxspeed 80 80 |
37 |
Radar Settings
Use these settings to fine tune radar module.
Command | Description | Example | DL CMD |
---|---|---|---|
radar get enabled |
Check if radar module is enabled 0 = disabled 1 = enabled |
radar get enabled 1 |
|
radar set enabled [on] |
Enable/Disable radar module 0 = disabled 1 = enabled |
radar set enabled 1 1 |
51 |
radar get channel |
Get radar channel | radar get channel 0 |
|
radar set channel [ch] |
Change radar channel 1 or 2 | radar set channel 1 1 |
52 |
radar get sens |
Get current radar sensitivity setting | radar get sens 50 |
|
radar set sens [level] |
Set sensitivity level 10 … 100% |
radar set sens 65 65 |
53 |
radar get beam |
Get current radar beam width 80...30° |
radar get beam 40 |
|
radar set beam [angle] |
Set radar beam width 80...30° |
radar set beam 30 30 |
54 |
radar get dir |
Get current radar virtual beam direction -30...30° |
radar get dir 0 |
|
radar set dir [d] |
Set radar virtual beam direction -30...30° (< 0 : turn to traffic from left (LTR) |
radar set dir -10 -10 |
55 |
radar get ltrdist |
Get min distance to objects moving from left (LTR) in [cm] | radar get ltrdist 800 |
|
radar set ltrdist [cm] |
Set min distance to objects moving from left (LTR) in [cm] | radar get ltrdist 800 800 |
56 |
radar get rtldist |
Get min distance to objects moving from right (RTL) in [cm] | radar get rtldist 400 |
|
radar set rtldist [cm] |
Set min distance to objects moving from right (RTL) in [cm] | radar get rtldist 400 400 |
57 |
radar get autotune |
Check if auto sensitivity is on | radar get autotune 0 |
|
radar set autotune [on] |
Enable/Disable automatic sensitivity >0 = disabled 1 = active |
radar set autotune 1 1 |
58 |
LoRaWAN® Settings
Command | Description | Example | DL CMD |
---|---|---|---|
lora get enabled |
Check if LoRa Modem is enabled 0 = disabled 1 = enabled |
lora get enabled 1 |
|
lora set enabled [on] |
Enable LoRaWAN® modem 0 = disabled 1 = enabled |
lora set enabled 1 1 |
|
lora get region |
Get lora region setting | lora get region 1 |
|
lora set region [region] |
Change LoRaWAN® region 0 = no region active 1 = EU868 2 = AS923 3 = AU915 4 = US915 5 = IN865 |
lora set region 2 2 |
|
lora get interval |
Get current uplink interval in [min] 1...1440 |
lora get interval 10 |
|
lora set interval [val] |
Change uplink interval in [min] 1...1440 Values below 3 min are not recommended and might not working in your LoRaWAN® region due to duty cycle regulations |
set interval 10 10 |
61 |
lora get deveui |
Reads the uniqe 64 bit end-device identifier (EUI-64) | lora get deveui 3434333575376517 |
|
lora get appeui |
Reads the unique 64 bit application identifier (EUI-64) | lora get appeui 8CAE49CFFFFFFF01 |
|
lora set appeui [appeui] |
Overwrite AppEUI (default for TCR is 8CAE49CFFFFFFF02) 16 chars hex string |
lora set appeui 8CAE49CFFFFFFF02 8CAE49CFFFFFFF02 |
|
lora get appkey |
Reads the unique 64 bit application identifier (EUI-64) | lora get appkey 00000000000000000000000000000000 |
|
lora set appkey [appeui] |
Overwrite AppEUI (shipped with random key) 32 chars hex string |
lora set appkey DEADBOBA000000000000000000000000 DEADBOBA000000000000000000000000 |
|
lora get class |
Get LoRaWAN® device class | lora get class 0 |
|
lora set class [class] |
Set LoRaWAN® Device class 0 : Class A device 2 : Class C device |
lora set class 2 2 |
62 |
lora get confirmed |
Check confirmed uplink mode 0 = unconfirmed uplinks 1 = confirmed uplinks |
lora get confirmed 1 |
|
lora set confirmed [cnf] |
Set confirmed uplinks mode 0 = unconfirmed uplinks 1 = confirmed uplinks |
lora set confirmed 1 1 |
63 |
lora get adr |
Check if ADR is on | lora get adr 1 |
|
lora set adr [on] |
Set ADR mode 0 = off 1 = on |
lora set adr 1 1 |
|
lora get dr |
Get current datarate 0...7 | lora get dr 21 |
|
lora set dr [on] |
Set a fix datarate 0...7 When ADR is on DR will be overwritten |
lora set dr 2 2 |
|
lora get fsb |
Get current subband setting 0 = all 1...8 = Subband 1...8 |
lora get fsb 0 |
|
lora set fsb [fsb] |
Set subband or enable all 0 = all 1...8 = Subband 1...8 (US915 and AU915 devices only) |
```lora set fsb | |
lora get lci |
Get LinkCheck Inteval Setting | lora get lci 1440 |
|
lora set lci [lci] |
Set LinkCheck Interval in minutes 0 = disabled 1...1440 |
lora set lci 1440 1440 |
|
lora get ula |
Get number of join/uplink attempts | lora get ula 10 |
|
lora set ula [cnt] |
Set number of join/uplink attempts, 1...255 | lora set ula 5 5 |
|
lora get timesync |
Check if RTC timesync is active (LoRaWAN® 1.0.3 only) 0: inactive 1: active |
lora get timesync 1 |
|
lora set timesync [on] |
Enable RTC timesync (LoRaWAN® 1.0.3 only) 0: inactive 1: active |
lora set timesync 1 1 |
LoRaWAN® Status
These commands are useful to debug the LoRaWAN® connection
Command | Description | Example | DL CMD |
---|---|---|---|
lora get snr |
Get current signal-to-noise ratio (SNR) in dB | lora get snr 12 |
|
lora get rssi |
Get current received signal strength indicator (RSSI) in dBm | lora get rssi -117 |
|
lora get fcnt |
Get last uplink Fcnt | lora get fcnt 23 |
|
lora send |
Send an uplink right away | lora send ok |
Device Control
Command | Description | Example | DL CMD |
---|---|---|---|
get locked |
Checks if access to device configuration has been locked 0 : unlocked (access granted) 1 : locked (no access) |
get locked 0 |
|
lock [pin] |
Locks device config with a numeric PIN (up to 8 digits) | lock 1234 ok |
|
unlock [pin] |
Unlock access to device configuration | unlock 1234 ok |
|
set defaults |
Reloads factory settings (except LoRaWAN® keys) Use save to permanently store changes into ROM |
set defaults ok |
|
clear |
Clear all counter values | clear ok |
|
save |
Save changed settings to ROM | save ok |
ee |
restart |
Restart device | restart |
Using a Terminal Emulator
You could use a terminal emulator such as RealTerm to open the serial connection and send/receive commands.
Serial Port Settings
- Baudrate: 19200
- Data Bits: 8usb_t
- Parity: None
- Stop Bits: 1
Terminal Emulator Settings: - Append CRLF
Examples
Typical device setup
This example shows a typical setup of a TCR counting traffic on a two direction street.
- We want to have data every 10min
- LoRaWAN® application key is changed
- Traffic from right (RTL) is in 3.4m distance (nearer lane)
- Traffic from left (LTR) is in 6.5m distance (farer lane)
- Sensitivity we set to 100% as a starting point
- At the end we save the changes to ROM and restart the device
> lora set interval 10
10
> lora set appkey AE64E7C8AB5745AAA7E328CA781B54E6
AE64E7C8AB5745AAA7E328CA781B54E6
> radar set rtldist 340
340
> radar set ltrdist 650
650
> radar set sens 100
100
> save
ok
> restart
Disclaimer
ALL PRODUCT, PRODUCT SPECIFICATIONS AND DATA ARE SUBJECT TO CHANGE WITHOUT NOTICE TO IMPROVE RELIABILITY, FUNCTION OR DESIGN OR OTHERWISE.
PMY Systems AG, its affiliates, agents, and employees, and all persons acting on its or their behalf (collectively, "PMX"), disclaim any and all liability for any errors, inaccuracies or incompleteness contained in any datasheet or in any other disclosure relating to any product.
PMX makes no warranty, representation or guarantee regarding the suitability of the products for any particular purpose or the continuing production of any product. To the maximum extent permitted by applicable law, PMX disclaims (i) any and all liability arising out of the application or use of any product, (ii) any and all liability, including without limitation special, consequential or incidental damages, and (iii) any and all implied warranties, including warranties of fitness for particular purpose, non-infringement and merchantability.
Statements regarding the suitability of products for certain types of applications are based on PMX's knowledge of typical requirements that are often placed on Paramtric products in generic applications. Such statements are not binding statements about the suitability of products for a particular application. It is the customer's responsibility to validate that a particular product with the properties described in the product specification is suitable for use in a particular application. Parameters provided in datasheets and / or specifications may vary in different applications and performance may vary over time. All operating parameters, including typical parameters, must be validated for each customer application by the customer's technical experts. Product specifications do not expand or otherwise modify Paramtric's terms and conditions of purchase, including but not limited to the warranty expressed therein.
Hyperlinks may direct users to third-party websites. These links are provided as a convenience and for informational purposes only. Inclusion of these hyperlinks does not constitute an endorsement or an approval by PMX of any of the products, services or opinions of the corporation, organization or individual associated with the third-party website. PMX disclaims any and all liability and bears no responsibility for the accuracy, legality or content of the third-party website or for that of subsequent links.
Except as expressly indicated in writing, PMX products are not designed for use in medical, life-saving, or life-sustaining applications or for any other application in which the failure of the PMX product could result in personal injury or death. Customers using or selling PMX products not expressly indicated for use in such applications do so at their own risk. Please contact authorized PMX personnel to obtain written terms and conditions regarding products designed for such applications.
No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted by this document or by any conduct of PMX. Product names and markings noted herein may be trademarks of their respective owners