PCR2 Command Line Interface 3.8

This manual relates to PCR2 Firmware V3.8.x

This manual describes the command line interface (CLI) of Parametric PCR2 Radar People Counters. The CLI is used to configure the devices once.

After initial setup we recommend using LoRaWAN Configuration Downlinks to change settings remotely. You can find more informations in the TCR Configuration Payload Description.

Terminal Emulator

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

Debugmode

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 Settings:

  • Append CRLF

Command Format

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.

Example of a command with parameter out of range

set mode 9999
0

set mode 1
1

Device Information Commands

Get Device Type

Device types include:

IN Indoor People Counter
OD Outdoor People Counter
R Railway Counter
T General Traffic Counter
XIO Industrial Object Counter with digital outputs
ODS Outdoor People Counter, Solar powered

LoRaWAN™ bands include:

EU868 EU 863-870MHz ISM Band
AS923 AS923MHz ISM Band
US915 US 902-928MHz ISM Band
AU915 Australia 915-928MHz ISM Band

Command

get typestr

Example:

get typestr
PCR2-EU868-IN

Get Firmware Version

Command

get fw_version

Example:

get fw_version
3.8.0

Get Serial Number

Get the device unique serial number

Command

get serial

Example:

get serial
3334373981377504

Get Device Status

This returns the actual device status

init Device is initializing
joining Device trying to join a LoRaWAN™ network
active Device is connected to LoRaWAN™ network
error Hardware or Configuration Error

Command

get status

Example:

get status
joining

Get CPU temperature

Get the intenal CPU temperature. Temperature is in 1/10 °

Examples:

210 21.0°C
321 32.1°C

Commands

get temp

Example:

get temp
330 

Get Left-to-Right Counter Value (All Speed Groups)

Get the counter value of all left-to-right counts. You can overwrite the value by using the set command.

Commands

get ltr

Example:

get ltr
1


Get Right-to-Left Counter Value (All Speed Groups)

Get the counter value of all right-to-left counts. You can overwrite the value by using the set command.

Commands

get rtl

Example:

get rtl
22


Get Left-to-Right Counter of Speed Group 1

Commands

get l1

Example:

get l1
5

Get Left-to-Right Counter of Speed Group 2

Commands

get l2

Example:

get l2
5

Get Right-to-Left Counter of Speed Group 1

Commands

get r1

Example:

get r1
2

Get Right-to-Left Counter of Speed Group 2

Commands

get r2

Example:

get r2
2

Clear all counters

Commands

clear

Example:

clear
ok

Application Settings

Get/Set Operation Mode

PCR2 can run in four different modes:

0 Timespan, used to sum up detection and send after a certain time (Sending Interval)
1 NotZero, Same as Timespan but w/o sending if counters are 0 (zero)
2 Trigger, Send on every events. Events can be filtered with Hold Off setting
3 Capacity Alert Mode

New mode will be active only after a restart.

Commands

get mode

set mode <val>

Example:

get mode
2

set mode 0
0

restart

Get/Set Radar Sensititivy

Set the radar sensitivity can be set from 10 … 100% (100% is very sensitive) Default: 50

Commands

get sens

set sens <val>

Example:

get sens
80

set sens 50
50

restart

Get/Set Measurement Interval

Set the accumulation interval in minutes (1…1440 minutes). Default: 10 During this time, alle persons will be counted and sums are transfered. After transfer counters will be reset.

Commands

get interval

set interval <val>

Example:

get interval
15

set interval 60
60

Get/Set Inactivity Timeout

Reset sum counters if there is no movement for a certain time (1…1440m) 0 = no timeout.

Commands

get timeout

set timeout <val>

Example:

get timeout
0

set timeout 60
60

Get/Set Hold Off time

This is a timer (0…600s) can be used to filter events. Default: 0

Commands

get hold

set hold <val>

Example:

get hold
60

set hold 0
0

Get/Set LTR Sum

ltr count event will increase LTR sum by 1

Commands

get sumltr

set sumltr <val>

Example:

get sumltr
-21

set sumltr -20
-20

Get/Set RTL Sum

rtl count event will increase RTL sum by 1

Commands

get sumrtl

set sumrtl <val>

Example:

get sumrtl
12

set sumltr 0
0

Get/Set XIO Operation Mode

If the PCR2 is equiped with a XIO Board following operation modes can be enabled

0 Off Switch XIO Board 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 RC Remote controlled by LoRa Downlink

New mode will be active only after a restart.

Commands

get xiomode

set xiomode <val>

Example:

get xiomode
2

set xiomode 0
0

restart

LoRaWAN™ Network Settings

Get/Set Enabled

Enable or disable LoRaWAN™ radio. If disabled you can use the device as a wired-sensor connnected wie USB. ‘LTR’ or ‘RTL’ will be sent over the serial interface on detection

Commands

lora get enabled

lora set enabled <val>

Example:

lora get enabled 
1

lora set enabled 0
0
LTR
LTR
RTL
.
.
.

Get/Set Device Class

Set the LoRa Device class to A or C

Commands

lora get class

lora set class [A|C]

Example:

lora get class 
A

lora set class C
C
restart

Get/Set DevEUI

Set / Get the uniqe 64 bit end-device identifier (EUI-64)

Commands

lora get deveui

lora set deveui <val>

Example:

lora get deveui 
0123456789abcdef

lora set deveui 0123456789abcdf
01234567890abcdef

Get/Set AppEUI

Set / Get the unique 64 bit application identifier (EUI-64)

Commands

lora get appeui

lora set appeui <val>

Example:

lora get appeui 
deadbeefdeadbeef

lora set appeui deadbeefdeadbeef
deadbeefdeadbeef

Get/Set AppKey

Set / Get the Application Session Key (AppSKey). AppSKEy is used for encryption and decryption of the payload. The payload is fully encrypted between the Node and the Handler/Application Server component of The Things Network (which you will be able to run on your own server). This means that nobody except you is able to read the contents of messages you send or receive.

Commands

lora get appkey

lora set appkey <val>

Example:

lora get appkey 
deadbeefdeadbeefdeadbeefdeadbeef

lora set appkey deadbeefdeadbeefdeadbeefdeadbeef
deadbeefdeadbeefdeadbeefdeadbeef

Get/Set Frequency Sub-Band (FSB)

For US915 and AU915 devices only. 8 sub-bands are available (set 1-8). 0 = all channels enabled

Hints:

  • Use FSB1 for Comcast machineQ networks
  • Use FSB2 for myDevices networks

Commands

lora get fsb

lora set fsb <val>

Example:

lora get fsb 
1

lora set fsb 0
0

Enable/Disable confirmed uplink messages.

Default: 0

Commands

lora get confirmed

lora set confirmed <val>

Example:

lora get confirmed 
0

lora set confirmed 1
1

restart

Set/Get LinkCheck Interval

We will send a LinkCheck MAC command together with an uplink regularly to make sure gateway responds properly. If there is no answer we try to re-join. lci is in range ... 1440 minutes.

LinkCheck can be disabled completely by setting to 0.

Commands

lora get lci

lora set lci <val>

Example:

lora get lci
10

lora set lci 1440
1440

restart