TCR Command Linie Interface 1.3

This manual relates to TCR Firmware V1.3.x

This manual describes the command line interface (CLI) of Parametric TCR Radar Traffic 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

Initial Settings

This chapter contains the most important commands for commissioning the device. In particular, the settings for the measuring distance and the sensitivity are to be considered.

Speed Groups

get sg_start <no>

get sg_end <no>

set sg_start <no> <kmh>

set sg_end <no> <kmh>

TCR devices allow to define up to 4 freely programmable speed groups. This makes it possible to separate road users based on the measured speed and direction.

TCR-LS/LSS

LS/LSS devices are specifically designed for pedestrian/bicycle counts and outdoor sports. The default settings of the speed groups are shown in the table below.

no sg_start sg_end  
0 1 7 Used to separate pedestrians walking by (1-7km/h)
1 8 40 Faster traffic such as bikes (8-40km/h)

Note: There are only 2 speed groups awailable on TCR-LS/LSS

TCR-HS/HSS

HS/HSS devices are used for general traffic statistics applications. The default settings for speed groups are listed in the following table.

no sg_start sg_end  
0 8 25 Stop ‘n go traffic (no people counting ) (8-25km/h)
1 26 49 Slow city traffic (26-49km/h)
2 50 79 Fast city traffic (50-79km/h)
3 80 120 Highway (80-120km/h)

Example: Setting up speed groups for a TCR-LSS

set sg_start 0 1                                                              
1

set sg_end 0 7                                                
7

set sg_start 1 8                                                              
8

set sg_end 1 40                                                
40

Distance to Street

get rtldist

set rtldist <cm>

get ltrdist

set ltrdist <cm>

Set the distance from the device This makes it possible to separate road users based on the measured speed and direction.

TCR-LS/LSS

LS/LSS devices are specifically designed for pedestrian/bicycle counts and outdoor sports. The default settings of the speed groups are shown in the table below.

no sg_start sg_end  
0 1 7 Used to separate pedestrians walking by (1-7km/h)
1 8 40 Faster traffic such as bikes (8-40km/h)

Note: There are only 2 speed groups awailable on TCR-LS/LSS

TCR-HS/HSS

HS/HSS devices are used for general traffic statistics applications. The default settings for speed groups are listed in the following table.

no sg_start sg_end  
0 8 25 Stop ‘n go traffic (no people counting ) (8-25km/h)
1 26 49 Slow city traffic (26-49km/h)
2 50 79 Fast city traffic (50-79km/h)
3 80 120 Highway (80-120km/h)

Example: Setting up speed groups for a TCR-LSS

set sg_start 0 1                                                              
1

set sg_end 0 7                                                
7

set sg_start 1 8                                                              
8

set sg_end 1 40                                                
40

Operation Modes

get mode

set mode [0|1]

Gets and Sets the operation mode. TCR devices can run in two different operation modes.

  • 0 : Timespan Mode
  • 1 : Trigger Mode

Example

set mode 1
1

Device Information

Following commands are useful to get device informations. These commands are read only.


Device Type

get typestr

Reads the device typestring. This can be:

  • TCR-EU868-LS/LSS/HS/HSS
  • TCR-AS923-LS/LSS/HS/HSS
  • TCR-AU915-LS/LSS/HS/HSS
  • TCR-US915-LS/LSS/HS/HSS

Example: Get the typestring

get typestr
TCR-EU868-HS

Device Firmware

get fw_version

Reads the device firmware version in format MAJ.MIN.BUGFIX (Semantic versioning)

Example

get fw_version                                                                
1.3.0


Radar Firmware

get radar_version

Reads the version of integrated radar processing module.

Example:

get radar_version                                                             
1.5.2        


Hardware Serial Number

get serial

This command reads out the hardware serial number. This number is also printed on the type label and the QR.

Example:

get serial                                                                    
353637315A306104 


LoRaWAN Status

get status

LoRaWAN connection status includes 4 possible states:

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

Example:

get status                                                                    
active


Counter Values

get ltr <no>

get rtl <no>

These commands read the counter values from left-to-right (ltr) or right-to-left (ltr) counters.

Counter values are separated in directions and speed groups. So you need to always appedn the speed group no (0…3) to this command.

Example: Reading the number of objects counted from left in speed group 1

get ltr 1                                                                     
12

Example: Reading the number of objects counted from right in speed group 0

get rtl 0                                                                     
32

Temperature

get temp

Reads the temperature of the integrated CPU in 1/10 °C. So 345 is 34.5 °C

Example

get temp                                                                      
323     

Measurement Interval

get interval

set interval <val>

Set the measurement interval in minutes (1…1440 minutes). During this time, alle objects will be counted into the selected speed group.

This interval is also the LoRaWAN uplink interval.

Example

get interval
15

set interval 60
60


Hold Off Time

get hold

set hold <val>

Holdoff can be used to filter burst events. Setting the holdoff timer to e.g. 10s will prevent double-coutings of a single vehicle if there are trailers attached.

Note: This function can be used to count trains.

Example

get hold
60

set hold 0
0

Counter Reset

clear This will reset all counters in all speed group to zero

Example

clear                                                                         
ok    


Factory Defaults

set defaults This will reload factory settings. All your changes will be lost.

Note: command does not return but resets device

Example

set defaults

Radar Sensitivity

get sens

set sens <val>

Setting the Radar Sensitivity correctly is critical for good counting accuracy. Sensitivity can be set from 10 … 100% (100% is very sensitive).

Start with a low value such as 70%. If you think the counts are too low, increase the value. If the counts are too high, decrease the value. You can also use LoRaWAN Configuration Downlinks to change this setting remotely without having to re-screw the device.

Alternatively, you can use the new Autotune function to let the device find its sensitivity automatically.

Example

get sens
80

set sens 50
50

restart

LoRaWAN Commands

Offline Mode

lora get enabled

lora set enabled <val>

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

Example

lora get enabled 
1

lora set enabled 0
0
LTR
LTR
RTL
.
.
.

LoRaWAN Device Class

lora get class

lora set class [A|C]

TCR can be operated as a Class A (default) or as a Class C LoRaWAN device

Example

lora get class 
A

lora set class C
C

restart

DevEUI

lora get deveui

lora set deveui <val>

Set / Get the uniqe 64 bit end-device identifier (EUI-64). Defaults to the hardware serial number.

Example

lora get deveui 
0123456789abcdef

lora set deveui 0123456789abcdf
01234567890abcdef

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

AppKey

lora get appkey

lora set appkey <val>

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.

Example

lora get appkey 
deadbeefdeadbeefdeadbeefdeadbeef

lora set appkey deadbeefdeadbeefdeadbeefdeadbeef
deadbeefdeadbeefdeadbeefdeadbeef

Frequency Sub-Band (FSB)

lora get fsb

lora set fsb <val>

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

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

Example

lora get fsb 
1

lora set fsb 0
0

lora get confirmed

lora set confirmed <val>

Enable/Disable confirmed uplink messages.

We recommed to use confirmed uplinks to prevent data loss

Example

lora get confirmed 
0

lora set confirmed 1
1

restart

LinkCheck

lora get lci

lora set lci <val>

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.

Example

lora get lci
10

lora set lci 1440
1440

restart