Skip to content

RDR CLI V1.5

This document describes the command line interface (CLI) of Parametric RDR RFID/NFC Reader with LoRaWAN. CLI is used for initial setup of the device.

This document relates to Firmware V1.5.


Command Format

This chapter describes the format of most of the commands

CR LF Line Endings

Commands are always 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

All setting can be accessed by a pair of get/set commands.

Format
 (prefix) get <setting>
 (prefix) set <setting> <new value>

Prefixes are used to access a group of settings. Currently there is only one group defined:

  • lora to access LoRaWAN® related settings

Following example checks if the beeper is enabled, then switches it permanently off. Enjoy the silence.

 get beep
 1              // beeper is enabled

 set beep 0     // switch beeper off
 0              // beeper is off now

 save           // save changes to NV memory
 ok

 restart        // apply settings

Range Checks

All supplied arguments are checked and squeezed into the allowed value range if necessary.

set mode 9999    // 9999 is not supported
0                // value will be truncated to the allowed range   

set mode 1      // 1 is in the values range and is therefore accepted
1

Save & Apply Changes

All changes to device settings need to be stored in internal ROM. This needs to be done by the save command.

Some changes will be active only after device restart by a power cycle or by sending the restart command.


Device Information Commands

Device Type

This command gets the device type.

get type

Example:

get type
RDR-EU868


Firmware Version

Device Firmware version in Format Maj.Min.Fix

get version

get fw_version

Example:

get version
1.5.0

get fw_version
1.5.0


LoRa Modem Firmware Version

Returns the firmware version of the integrated LoRaWAN® modem.

Note: This is not the LoRaWAN® protocol version

get modem_version

Example:

get modem_version
1.0.2


Device Serial Number

Returns the unique serial number of the device. This is the same as DevEUI (See lora get deveui)

get serial

Example:

get serial
333031377939870a


Max Records in Payload

PCR2 Function Demonstration

The LoRaWAN® Payload can contain one or more Scan Records. This setting can be used to limit the the maximum number of data records.

Setting the value to 1 forces the device to send an uplink for every scan.

Important: The maximum number of records in the payload is additionally limited by the maximum payload lengths. (53 bytes).

get maxrecs

set maxrecs [1...4]

Values: 1...4

Default: 1

Example:

get maxrecs
4

set maxrecs 1
1

save
ok

restart


Beeper

Enable audio signals for readings.

get beep

set beep [0|1]

Values: 0: No beep signals, 1: beep signals

Default: 1

Example:

get beep
0

set beep 1
1

save
ok

restart


Time

Get or set the time of integrated realtime clock (RTC).

Internal RTC not buffered and will start at 0:00:00 UTC on device reset

get time

set time HH:mm:ss

Example:

get time
14:20:05

set time 15:20:25
15:20:25


Date

Get or set the date of internal real time clock.

Internal RTC not buffered and date will start at 2000-01-01 on device reset

get date

set date yyyy-MM-dd

NOTE: Date must be a value of 2000-01-01 or later

Example:

get date
2000-01-01

set date 2021-02-07
2021-02-07


Heartbeat

Heart beats are are uplink frames that can be enabled to check the connection when the device is not used.

Range: 10-1440 minutes (a day) or 0 to switch off this function.

Default: 1440

Note: NFC readings will restart the heart beat interval

lora get hbi

lora set hbi <minutes>

Example:

lora get hbi
0

lora set hbi 1440
1440

save
ok

restart


Reader Mode

LoRaWAN® modem can be disabled. In reader mode the device outputs all readings directly to the console. Connect an USB-Cable to the device to use this function.

Values: 0: Online Mode, 1: Reader Mode (USB-Connected)

Default: 0

Note: restart device by sending init

set rdmode [0|1]

get rdmode

Example:

get rdmode
0

set rdmode 1
1

save
ok 

restart


DevEUI

Returns the unique LoRaWAN® device EUI. This is the same as the serial number (See get serial)

lora get deveui

Example:

lora get deveui
333031377939870a


JoinEUI

Sets or returns or sets the LoRaWAN® JoinEUI as a string of 16 hex characters.

Values: 0000000000000000 ... FFFFFFFFFFFFFFFF

Default: 8CAE49CFFFFFFF05

Use save to permanently store changes to persistent memory

lora get appeui

lora set appeui <16 hex characters>

Example:

lora get joineui
8CAE49CFFFFFFF05

lora set joineui 8CAE49CFFFFFFF05
8CAE49CFFFFFFF05

save
ok 


AppEUI (Deprecated)

Sets or returns or sets the LoRaWAN® AppEUI as a string of 16 hex characters.

Note: AppEUI has been replaced by JoinEUI (LoRaWAN® 1.0.3 and newer) and will be removed in once of the next releases.

Values: 0000000000000000 ... FFFFFFFFFFFFFFFF

Default: 8CAE49CFFFFFFF05

Use save to permanently store changes to persistent memory

lora get appeui

lora set appeui <16 hex characters>

Example:

lora get appeui
8CAE49CFFFFFFF05

lora set appeui 8CAE49CFFFFFFF05
8CAE49CFFFFFFF05

save
ok


AppKey

Sets or Returns or sets the LoRaWAN® application key a string of 32 hex characters. The device comes with a random AppKey pro-programmed.

Note: If you reset device to factory defaults the device will start with an error and the red LoRaWAN® LED will blink. Set a new application key an save it to the device.

Values: 00000000000000000000000000000000 ... FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF

Default: 8CAE49CFFFFFFF05

Use save to permanently store changes to persistent memory

lora get appkey

lora set appkey <32 hex characters>

Example:

lora get appkey
00112233445566778899AABBCCDDEEFF

lora set appkey 00112233445566778899AABBCCDDEEFF
00112233445566778899AABBCCDDEEFF

save
ok


Confirmed Messages

Enable / Disable LoRaWAN® confirmed messaged.

Values: 1: Confirmed LoRa Uplinks, 0: Unconfirmed LoRa Uplinks

Default: 1

Note: Device will retry uplinks for 5 minutes when confirmed messages are neabled.

lora get confirmed

lora set confirmed [0|1]

Example:

lora get confirmed
0

lora set confirmed 1
1

save
ok

Public Network Mode

Enable / Disable LoRaWAN® Public Network mode.

Values: 1: Public Network Mode enabled, 0: Public Network Mode disabled

Default: 1

lora get pnm

lora set pnm [0|1]

Example:

lora get pnm
1

lora set pnm 0
0

save
ok

ETSI Duty Cycle

Get or Set the ETSI Duty Cycle setting - 0=disable, 1=enable - Only for testing

Default: 1

lora get dcs

lora set dcs [0|1]

Example:

lora get dcs
0

lora set dcs 1
1

save
ok

Factory Defaults

With this command you can reset RDR to factory settings.

Note: Use save for to save settings to NV memory

defaults

Example:

defaults
ok

save
ok

init
ok

Adaptive Data Rate (ADR)

Enable / Disable LoRaWAN® Adaptive Data Rate. When ADR is enable the DR setting will be ignored.

Values: 1: Enabled, 0: Disabled

Default: 1

lora get adr

lora set adr [0|1]

Example:

lora get adr
1

lora set adr 0
0

save
ok

Data Rate (ADR inactive)

Force the Data Rate the device is using. This settings gets active as soon as ADR is disabled.

Range: 0, 1, 2, 3, 4, 5, 6, 7 (0 is data rate with longest range and smalles payload)

lora get dr

lora set dr [0|1|2|3|4|5|6|7]

Example:

lora set adr 0      // disable ADR
0

lora get dr
0

lora set dr 1
1

save
ok

Save Settings

Stores all changes you have done to ROM

save

Example:

save
ok


Restart Device

Changes to device settings will getting active by restarting the device either by repowering or using the init command

init

restart

Example:

init 

restart

Note: there is no answer when sending this command as device goes down instantly.


AT Mode

RDR can be used as LoRaWAN® modem that can be directly controlled by AT Commands. When in AT mode NFC reader is not active anymore.

Use this for debugging purposes only as settings will not be permanently saved. Use lora set commands to change credentials permanentely.

Enabling AT Mode

You can enable the AT Mode by sending the following command. After device reset the AT mode will be disabled.

> AT

Example:

AT
OK

ATZ
OK

The AT command set is a standard developed by “Hayes” to control modems. AT stands for attention. The command set consists of a series of short text strings providing operations such as joining, data exchange and parameters setting. In a context of LoRa® modem, the Hayes command set is a variation of the standard AT Hayes commands.

The AT commands have the standard format “AT+XXX”, with XXX denoting the command.

There are four available command behaviours: - AT+XXX? provides a short help of the given command, for example AT+DEUI? - AT+XXX is used to run a command, such as AT+JOIN - AT+XXX=? is used to get the value of a given command, for example AT+CFS=? - AT+XXX= is used to provide a value to a command, for example AT+SEND=2:Hello

The output format is as below:

<value>\r\n
\r\n<State>\r\n

When no value is returned, the <value>\r\n output is not returned at all.

Every command (except for ATZ used for MCU reset) returns a status string, which is preceded and followed by \r\n in a \r\n<Status>\r\n format. The possible status are: - OK: command run correctly without error. - AT_ERROR: generic error - AT_PARAM_ERROR: a parameter of the command is wrong - AT_BUSY_ERROR: the LoRa® network is busy, so the command has not been completed - AT_TEST_PARAM_OVERFLOW: the parameter is too long - AT_NO_CLASSB_ENABLE: End-node has not yet switched in Class B - AT_NO_NETWORK_JOINED: the LoRa® network has not been joined yet - AT_RX_ERROR: error detection during the reception of the command

More details on each command description and examples are given in the remainder of this section. Note that each command preceded by # is provided by the host to the module. Then the return of the module is printed.

Using a Terminal Emulator

You could use a terminal emulator such as RealTerm to open the serial connection and send/receive commands.

RealTerm

Serial Port Settings

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

Terminal Emulator Settings: - Append CRLF