PCR2 Command Line Interface 3.12

This manual relates to PCR2 Firmware V3.12.x

This manual describes the command line interface (CLI) of Parametric PCR2 Radar People Counters. The CLI is used to setup the devices in the office. After installation on-site you can use configuration downlinks to fine tune your PCR2. Please find more informations in the Configuration Payload Description.

Older versions of this document:



Serial Port Settings

Use a USB cable with Micro-USB port to establish a connection between TCR’s CONFIG port and your PC.

Serial port settings:

  • Baudrate: 19200
  • Data Bits: 8
  • Parity: None
  • Stop Bits: 1

Terminal Emulator

We recommend using a terminal emulator such as RealTerm to open the serial connection and send/receive commands.

RealTerm

Terminal Emulator Settings:

  • Append CRLF



Command Format

Device settings can be changed by a set and get commands, as well as a few special commands such as restart.

CR LF

Commands are always terminated by a CR and LF symbol. However, for the sake of simplicity, the description of the individual commands does not include it.

Return Values

Set commands and Get commands both return the parameters passed to the command. If a parameter is out of range, the return value is the default value. This can be used to check whether the parameter was stored correctly.

Examples

get mode
0

set mode 1
1

restart



Command Definitions

Command Arg Range Description Example
get typestr   Get Device Type (see Device Id Table for all supported types) get typestr
PCR2-EU868-ODS
get type   Get Device Id (see Device Id Table for all supported types) get type
5
get mode   Get current counting mode (see Counting Modes Table) get mode
0
set mode [mode] 0 = Timespan
1 = NotZero
2 = Trigger
3 = CapAlert
Change operation mode set mode 0
0
get fw_version   Get firmware version get fw_version
3.11.0
get radar_version   Get version of radar co-processor (FFR) get radar_version
1.6.0
get serial   Get the unique serial number get serial
3434333575376517
get status   Get LoRaWAN®connection status get status
active
get ltr   Get Left-to-right counter value since last uplink get ltr
2
get ltr_sum   Get number of all Left-to-right counts since device power on. get ltr_sum
320
set ltr_sum [sum] 0…65535 Overwrite the sum of Left-to-right counts since device power on. set ltr_sum 0
0
get rtl   Get Right-to-left counter value since last uplink get rtl
5
get rtl_sum   Get number of all Right-to-left counts since device power on. get rtl_sum
345
set rtr_sum [sum] 0…65535 Overwrite the sum of Right-to-left counts since device power on. set rtl_sum 0
0
get temp   Get System Temperature in 1/10°C get temp
296
get interval   Get current uplink interval settings in seconds get interval
10
set interval 1…1440 Set uplink interval in seconds
Values below 3 min are not recommended and might not working in your LoRaWAN®region
set interval 10
10
get hold   Get current holdoff timer setting in seconds get hold
1
set hold [s] 0…600 (0 = off) Set holdoff timer in seconds set hold 1
1
get lim   Get current capacity limit setting
PCR2-XIO only
get lim
0
set lim [people] 0…65535 Set capacity limit
PCR2-XIO only
set lim 100
100
get timeout   Get current auto-zero timeout in minutes get timeout
120
set timeout [min] 0…1440 (0=off) Set auto-zero timeout in minutes set timeout 120
120
get xiomode   Get current XIO settings (see XIO Modes)
PCR2-XIO only
get xiomode
0
set xiomode [mode] 0…3 Set XIO mode (see XIO Modes)
PCR2-XIO only
set xiomode 0
0
       
lora get enabled   Check if LoRa Modem is enabled (online mode) lora get enabled
1
lora set enabled [on] 0 = off
1 = on
Enable LoRaWAN®modem (offline mode) lora set enabled 1
1
lora get class   Check current LoRa device class setting lora get class
A
lora set class [class] A = Class A device
C = Class C device
Set LoRaWAN®device class lora set class A
A
lora get deveui   Reads the uniqe 64 bit end-device identifier (EUI-64) lora get deveui
3434333575376517
lora set deveui [deveui] 16 chars hex string Overwrite DevEUI (defaults to serial number) lora set deveui 3434333575376517
3434333575376517
lora get appeui   Reads the unique 64 bit application identifier (EUI-64) lora get appeui
8CAE49CFFFFFFF01
lora set appeui [appeui] 16 chars hex string Overwrite AppEUI (default for PCR2 is 8CAE49CFFFFFFF01) lora set appeui 8CAE49CFFFFFFF01
8CAE49CFFFFFFF01
lora get appkey   Reads the unique 64 bit application identifier (EUI-64) lora get appkey
00000000000000000000000000000000
lora set appkey [appeui] 32 chars hex string Overwrite AppEUI (shipped with random key) lora set appkey DEADBEEF000000000000000000000000
DEADBEEF000000000000000000000000
lora get fsb   Get current subband setting (US915 and AU915 devices only) lora get fsb
0
lora set fsb [fsb] 0 = all
1…8 = Subband 1…8
Set subband or enable all (US915 and AU915 devices only) lora set fsb 0
0
lora get confirmed   Get confirmed uplink setting lora get confirmed
1
lora set confirmed [cnf] 0 = unconfirmed uplinks
1 = confirmed uplinks
Enabled / Disabled confirmed uplinks lora set confirmed 1
1
lora get lci   Get LinkCheck Inteval Setting lora get lci
1440
lora set lci [lci] 0 = disabled
1…1440
Set LinkCheck Interval in minutes lora set lci 1440
1440
lora get ptype   Get Application Payload Format lora get ptype
3
lora set ptype [pt] 0 = ELSYS compatible
1 = Cayenne compatible
2= Parametric Extended (Default)
Set the payload format lora set ptype 3
3
       
sbx get version   Reads the firmware version of the SBX solar charger
PCR2-ODS only
sbx get batt
7850
sbx get batt   Reads the voltage of the integrated battery (ODS only) in millivolts
PCR2-ODS only
sbx get batt
7850
sbx get pow   Reads the current power input from a solar panel (ODS only) in milliwatts
PCR2-ODS only
sbx get pow
5423
       
radar get enabled   Check if radar module is enabled radar get enabled
1
radar set enabled [on] 0 = disabled
1 = enabled
Enable/Disable radar module radar set enabled 1
1
radar get version   Get version of radar co-processor (FFR) radar get version
1.6.0
radar get autotune   Check if Autotuning mode is on radar get autotune
0
radar set autotune [on] 0 = disabled
1 = enabled
Enable/Disable Autotuning radar set autotune 1
1
radar get sens   Get current radar sensitivity setting radar get sens
50
radar set sens [sensitivity] 10 … 100% (100% is very sensitive) Set sensitivity setting radar set sens 65
65
radar get beam   Get current radar sensitivity setting radar get beam
40
radar set beam [angle] Change Radarbeam angle Set sensitivity setting radar set beam 30
30
radar get mindist   Get minimal distance to target object in centimeter radar get mindist
200
radar set mindist [cm] Change minimal distance to target object radar get mindist 190
190
 
radar get maxdist   Get maximum distance to target object in centimeter radar get maxdist
500
radar set maxdist [cm] Change maximum distance to target object radar set maxdist 400
400
 
radar get channel   Get radar channel radar get channel
0
radar get channel [ch] 0 = LOW Frequency
1 = HIGH Frequency
Change radar frequency radar set channel 1
1
       
set defaults   Reloads factory settings and overwrites LoRa keys set defaults
ok
clear   Clear all counter values clear
ok
restart   Restart device restart
ok



Tables

Device Ids

Deivce Id Device Type Description
0 PCR2-IN Indoor Peoplecounter
1 PCR2-OD Outdoor Peoplecounter (small)
2   Deprecated type, Do not use!
3   Deprecated type, Do not usese!
4 PCR2-XIO Peoplecounter with digital outputs
5 PCR2-ODS Peoplecounter Solar-powered
6 PCR2-ODA Peoplecounter with AC power-supply
7 PCR2-ODB Peoplecounter for use with external battery
8 PCR2-ODBS Peoplecounter for use with external battery and solar panel

XIO Modes

You can choose how the digital outputs are controlled on a PCR2-XIO

Id Mode Description
0 Off O1 and O2 always off
1 Pulse Generate a 500ms pulse on O1 if RTL detected, O2 if LTR is detected
2 Detection O1 is always on. If LTR or RTL is detected, O2 will be on during holdoff time
3 CapacityAlert O1 on when sum < lim, O2 on when sum >= lim
4 RemoteControlled Remote controlled by LoRa Downlink