DECODE PRM4 User manual

DECODE
Radio modem PRM4 868MHz
User's manual v1.6
http://www.decode.rs

Table of Contents
1 Introduction...............................................................................................................4
2 Modes of operation....................................................................................................5
3 Installing the device...................................................................................................8
3.1 Power supply..................................................................................................8
3.2 Serial connector..............................................................................................8
3.3 The antenna connector.................................................................................10
3.4 Signaling lights............................................................................................10
3.5 Jumpers........................................................................................................11
4 AT command set......................................................................................................12
4.1 Setup of the serial interface parameters.......................................................14
4.2 Setup of the ra io interface..........................................................................15
4.3 Comman mo e setup..................................................................................16
4.4 Re uce power consumption mo e setup....................................................16
5 Firm are update.....................................................................................................18
5.1 The proce ure for writing the new firmware...............................................18
6 Technical specifications..........................................................................................19
Ra io mo em PRM4 868MHz /User's manual V1.6 / 24.05.2011 2

Document history
Date 29.04.2009 Initial version of the ocumentv1.0
Date 23.06.2009 Revision v1.1
Date 09.12.2009 Revision v1.4 A e AT comman s EC an ET. Correcte the
AM comman format.
Date 08.02.2010 Revision v1.5 Bug relate to incomplete flushing of transmit
buffer when sen ing ata by full-buffer criteria, correcte .
Correcte bug relate to saving of parameters which haven't
been save with ATWR comman while exiting comman
mo e. New function intro uce to keep the same bps an ata
format while entering comman mo e with +++ sequence.
New function that set spee to 9600 bps an ata format to 8N1
while entering comman mo e with SET pushbutton. Bug
relate to same spee 9600 bps while entering comman mo e
with SET pushbutton, correcte .
Date 24.05.2011 New parameter ReceiverThreshol a e for setting of receive
level in Sleep mo e an averaging RSSI values for arbitration
of receiver wakeup.

1 Introduction
Deco e PRM4 mo em is use for ata transmission in UHF ISM 868MHz ban .
Through the use of ra io interface it procures networking of evices an systems.
Easy to use, the PRM 4 provi es secure metho of connecting computers, PLC
evices, measuring evices an SCADA systems.
The evice transports the asynchronous serial ata between two or more PRM4
evices in point-to-point or point-to-multipoint configuration. The RS-232/485/422
connection enables the implementation of the evice into the existing systems without
the nee for a itional equipment.
PRM4 Device
The stan ar elivery contains the PRM4 evice, network power supply a apter for
230V, mini omni- irectional antenna for ISM 868MHz ban , DB9 M-F serial cable
an CD with this manual an necessary software.
Ra io mo em PRM4 868MHz /User's manual V1.6 / 24.05.2011 4

2 odes of operation
Deco e PRM4 evice can operate in one of the two mo es of operation.
When powere , the evice will automatically enter the efault, data transfer mo e.
When the evice is in the data transfer mo e, it will listen an receive all the packets
inten e for it, whereas the transmitter will turn-on only occasionally to sen the ata
acquire from the wire connection.
The mo e an parameters of operation are set through the use of AT comman s using
the command mo e of operation. The transfer into the command mo e an the set of
supporte AT comman s is escribe in chapter 4.
The PRM 4 evice supports an a ressing scheme. All mo ems inten e for ata
exchange in a ra io network must be set to the same frequency an must have the
same network address (NA). The NA can be set to any value from the 0 – 65535
range. Each evice has its source address (SA) use to i entify the evice insi e a
network. The SA can take values between 0 an 255 inclusive. Note that the SA must
be set uniquely insi e a network. If a point-to-multipoint connection is require (e.g.
for master-slave protocols use with SCADA software or PLC evices) the
destination address (DA) masking is use . This way it is possible to mask a number
of bits when comparing the DA an SA an , consequently, the packet with one
estination a ress can be sent to multiple evices having the unmaske parts of their
SA match the unmaske parts of DA.
For example, if assume that the ra io frequency an the NA are the same for all the
evices in the following figure, the evice with the SA equal to 100 will sen its
packets to the remaining three evices, whereas the evices with the SA 1,2 an 3 will
sen ata only to the SA 100 evice. This is because the Address Masks (AM) on
evices with SA 1,2 an 3 have been set to 252 (binary 11111100) so that they match
the higher (unmaske ) six bits of the DA (binary 000000).
Ra io mo em PRM4 868MHz /User's manual V1.6 / 24.05.2011 5

Point-to-multipoint connection
The below figure illustrates the point-to-point connection. The AM is set to 255 so all
the bits are compare an only the exact match of the SA an DA woul lea to
receipt of the packets. The NAs as well as the ra io frequencies are set as with the
previous example.
Point-to-point connection
The PRM 4 evice receives over the serial interface an buffers the ata that nee s to
be sent until the con ition for sen ing the ata is met. The ata is sent when there are
no new ata for a specifie time interval after the last ata has been receive on the
serial interface. This time interval can be set by using the AT comman s an it is
referre to as the packetization timeout. The efault value of this parameter is set to
5ms. In other wor s, if communicating on 9600bps, a 5 character pause will in uce
the mo em to sen the entire memory content within one packet. The transmit ata
buffer size is 512 bytes.
The following figure shows the example of three-character packet generation an
sen ing on 9600bps with efault packetization timeout.
Ra io mo em PRM4 868MHz /User's manual V1.6 / 24.05.2011 6

Packet generation and sending
In cases when there is a nee for low power consumption of the evice (i.e. solar or
battery power) the evice can be set into one of the three re uce power consumption
mo es by using the ATSM comman . When in the re uce power consumption
mo e, the receiver is not constantly turne on. It is turne on an off 8 times per
secon . Therefore, when using this mo e, waiting for all the receivers to become
active may in uce the a itional transport elay. By using the ATSM comman the
re uce power consumption mo e of operation can be a juste to fit the various fiel
configurations. If the evices with the re uce power consumption are
communicating only with a evice in a normal mo e, the first group of evices is set
to ATSM2 whereas the evice operating in normal mo e is set with ATSM1. On the
other han , if all the evices are operating in low power consumption mo e, they
ought to be set with ATSM3.
Important note: When calculating the power bu get for the re uce power consumption mo e, the
RS232 signal lines shoul not be omitte . It is recommen e that, in these cases, the transmit/receive
signals of the RS232 interface shoul be switche off when not actively communicating.
Ra io mo em PRM4 868MHz /User's manual V1.6 / 24.05.2011 7

3 Installing the device
3.1 Power supply
The PRM 4 is powere by 5 to 28 VDC or 3.3 to 12VDC in battery powere version
of the pro uct. The stan ar current rain is less than 50mA with the transmitter
turne on constantly an rops to 2-3mA in the re uce power consumption mo e
(exclu ing the RS232 consumption). The power is supplie through the etachable
screw connector with 3.5mm gap on the back plate of the evice. Min the polarity of
the power connector pins. The power connector has reverse polarity an over-voltage
protections.
PRM4 back plate
3.2 Serial connector
The connection of a serial interface is achieve by 9-pin female connector (DB9F).
Depen ing on the position of the jumpers locate on the circuit boar , the evice can
be connecte with the following interfaces: RS-232C, RS-422 an RS-485. If the
jumpers are set for RS-232C, the signal layout matches the DCE si e. The following
table shows the DB9F connector signal layout for ifferent serial connections.
Pin DB9F
connector
RS-232
signals
RS-422
signals
RS-485
signals
1 DCD output
2 RD output -TX -TX/RX
3 TD input -RX
4 DTR input
5 GND - GND GND
6 DSR output
7 RTS input +RX
8 CTS output +TX +TX/RX
9 RI(1) output(1)
Ra io mo em PRM4 868MHz /User's manual V1.6 / 24.05.2011 8

(1) By altering the J7 jumper state it is possible to change the function of this pit to the power
supply input.
(2) On some evices with RS485/422 connection, the signals have been enote as A an B. In
that case, the A signals shoul be connecte to the + signals of the mo em. Vice verse, the B
signals shoul be connecte to the – signals of the mo em.
Ra io mo em PRM4 868MHz /User's manual V1.6 / 24.05.2011 9

3.3 The antenna connector
The antenna is connecte on a SMA female connector on the front plate of the evice.
The antenna shoul be for 863 to 870MHz ban with an impe ance of 50Ω. The
antenna inclu e in the pro uct pack has a 0 Bi gain. In case the a itional range
ought to be achieve the higher gain antennas must be use .
PRM4 front plate
3.4 Signaling lights
The above figure illustrates the layout of the LED signaling lights. The LED functions
are shown in the following table.
Indicator Colour Description
LED Po er Green Constantly on when the power supply is
connecte , the evice's processor is active
an if the re uce power consumption mo e
is set to 0 or 2. If this parameter is set to 1 or
3 this in icator flashes with the frequency of
8Hz.
LED Mode Re On when the evice is in special mo es.
LED Rx Data Green On when receiving ata.
LED Tx Data Re On when sen ing ata.
Ra io mo em PRM4 868MHz /User's manual V1.6 / 24.05.2011 10

3.5 Jumpers
The jumpers are locate on the printe circuit boar of the PRM4 evice. By altering
the state of the jumpers, the serial interface on DB9 port can be set.
Serial interface State Jumpers
RS-232C 1-2 J3, J4, J5, J6, J10
2-3
RS-485 2-wire, no
termination
1-2 J11, J8
2-3
RS-485 2-wire, 120Ω
termination
1-2 J11
2-3
RS-422/485 4-wire,
no termination
1-2 J8, J9
2-3
RS-422/485 4-wire, R
termination 120Ω
1-2 J8
2-3
RS-422/485 4-wire,
T termination 120Ω
1-2 J9
2-3
RS-422/485 4-wire, T
an R- termination 120Ω
1-2
2-3
The following figure illustrates the evice's circuit boar with the layout of the
jumpers.
The jumpers J1 an J2 are use to set the evice into the firmware upgra e mo e.
Otherwise, they ought to be in 2-3 state.
The layout of the jumpers on the printed circuit board
Ra io mo em PRM4 868MHz /User's manual V1.6 / 24.05.2011 11

4 AT command set
The evice's parameters can be altere by using the AT comman set. The comman s
are sent to the evice by using the terminal program (HyperTerminal or similar) over
the serial RS232 port at the spee 9600bps with 8 ata bits, no parity, 1 stop bit. The
mo em evice accepts the comman s only in command mo e. Changing the mo e of
the evice from data transfer to command can be achieve in two ways:
While turning on the mo em, press an hol the SET button on the front
panel, – the evice will start-up in the command mo e.
If the evice is alrea y turne on an in the data transfer mo e, the command
mo e is entere by sen ing the array that consists of the character repeate
three times within the given time frame. Before an after the array, the pause
in sen ing must be ma e. The pause intervals before an after the sequence
must be of the same uration. The efault character for this purpose is ASCII
plus sign. Therefore, to enter the command mo e “+++” sequence ought to be
sent. The pause time interval is set in ms by using the ET comman . The
efault value is 1000 (or 1s). Bearing in min the efault setting, the command
mo e is entere by sen ing the following sequence:
pause 1s "+++" pause 1s
In both cases the mo em will respon with OK when the command mo e is entere .
If SET button is use for entering command mo e, serial port parameters will be
fixe : spee 9600 b/s, format 8 ata, no parity, 1 stop bit. If sequence "+++" is use
for the same task, mo em will keep ata formats use uring data transfer mo e.
Each AT comman consists of the comman itself an , optionally, a itional
parameters. At the en of each AT comman , the Carriage Return (CR) character
must be sent. On keyboar s, it is usually the new line or Enter key. The mo em will
also accept the Line Fee (LF) character as well as CR LF an LF CR combinations.
The parameters can be entere in both the ecimal an hexa ecimal numeric systems.
For example, to set a network a ress both ATNA10779 an ATNA0x2A1B can be
use .
By using the ATDC comman , all set parameters an their values can be liste .
Below the manufacturer name an type of the evice, the frequency range an
firmware release ate are liste . The evice output, as a result of ATDC comman , is
given in the following frame:
Ra io mo em PRM4 868MHz /User's manual V1.6 / 24.05.2011 12

DECODE PRM4 MODEM
FREQUENCY BAND: 868MHz
FIRMWARE: V1.4 09.12.2009
-------------------------------------
BAUD RATE:
CHARACTER FORMAT:
STOP BITS: 0
PACKETIZATION TIMEOUT: 5
RF FREQUENCY: 4000
RF POWER: 6
SOURCE ADDRESS: 0 (0x0)
DESTINATION ADDRESS: 0 (0x0)
NETWORK ADDRESS: 0 (0x0)
ADDRESS MASK: 255 (0xFF)
ECHO MODE: 1
SLEEP MODE: 0
ESCAPE CHARACTER: 4
ESCAPE TIMEOUT: 1000
OK
Ra io mo em PRM4 868MHz /User's manual V1.6 / 24.05.2011 13

4.1 Setup of the serial interface parameters
AT
Command
Description Parameter Default
value
BR Baud Rate
This comman sets the ata transmission
spee on the serial interface for the data
transfer mo e. The transmission spee in
the command mo e is fixe at 9600 bps if
mo e was entere by SET button .
0 - 1200 b/s
1 - 2400 b/s
2 - 4800 b/s
3 - 9600 b/s
4 - 19200 b/s
5 - 38400 b/s
6 - 57600 b/s
7 - 115200 b/s
3
CF Character Format
This comman sets the ata an parity bit
number on serial interface for the data
transfer mo e. In the command mo e the
format is always 8N1 if mo e was entere
by SET button .
0 – 7 no par.
1 – 7 o par.
2 – 7 even par.
3 – 8 no par
4 – 8 o par.
5 – 8 even par.
3
SB Stop Bits
This comman sets the number of stop bits
on the serial interface for the data
transmission mo e.
0 - 1 stop bit
1 - 2 stop bits
0
PT Packetization Timeout
Time (in ms) from the last receive ata on
the serial interface till the ata in the output
buffer is sent on the ra io interface.
1 – 1000 5
EC Escape Character
ASCII character that is sent to signalize the
evice to enter the command mo e. Default
value correspon s to ASCII "+" character.
0-255 43
ET Escape Timeout
Defines the require pause time (ms)
inserte before an after the "+++"
sequence, while "+++" sequence shoul be
entere uring the same interval (ms) .
10-3000 1000
Ra io mo em PRM4 868MHz /User's manual V1.6 / 24.05.2011 14

4.2 Setup of the radio interface
AT
Command
Description Parameter Default
value
FR Frequency
This comman sets the working ra io
frequency of the mo em. The parameter is
given in kHz a e to the 860MHz. For
example, the frequency 865.425MHz is set
by entering the parameter value of 5425.
3000 - 7000 4000
PW Po er
This comman s sets the output power of
the transmitter ranging from -16 Bm to
+13 Bm. The quantifying step is roughly
0.45 B.
0 – 63 63
SA Source Address
The source a ress is the mo em's own
a ress. The mo em will regar all packets
where the significant bits of the estination
a ress match its source a ress. The
source a ress bits on positions where there
are “1” in a ress mask are consi ere as
significant bits.
0 – 255 0
DA Destination Address
The estination a ress is the source
a ress of the mo em to which the ata is
inten e .
0 – 255 0
NA Net ork Address
The network a ress escribes the group of
mo ems, or network. The mo em can only
communicate with another mo ems from
the same network.
0 – 65535 0
AM Address Mask
A ress mask etermines the significant
bits use to etermine the estination of the
packet.
0 – 255 255
Ra io mo em PRM4 868MHz /User's manual V1.6 / 24.05.2011 15

4.3 Command mode setup
AT
Command
Description Parameter Default
value
EX EXit
This comman is use to exit the command
mo e an enters the data transfer mo e.
none -
E0 Echo 0
This comman turns off the echoing of the
characters sent in the command mo e.
none -
E1 Echo 1
This comman turns on the echoing of the
characters sent in the command mo e.
none E1
WR WRite
This comman saves the set parameters
into the permanent, EEPROM memory.
none -
RE Restore defaults
This comman restores the efault
configuration of the evice.
none -
DC Display Configuration
This comman isplays the current
configuration.
none -
4.4 Reduced power consumption mode setup
AT
Command
Description Parameter Default
value
SM Sleep Mode
By using this comman the re uce power
consumption mo e of operation can be
a juste to fit the various fiel
configurations. If the evices with the
re uce power consumption are
communicating only with a evice in a
normal mo e, the first group of evices is
set to ATSM2 whereas the evice
operating in normal mo e is set with
ATSM1. On the other han , if all the
evices are operating in low power
consumption mo e, they ought to be set
with ATSM3.
0 – 3 0
Ra io mo em PRM4 868MHz /User's manual V1.6 / 24.05.2011 16

AT
Command
Description Parameter Default
value
RT Receiver Threshold
This comman sets threshol of receiving
signal which eci es on receiver turn-on
uring the re uce power consumption
mo e. Parameter is expresse in - Bm.
Example: 115 value etermines that all
signals above -115 Bm shoul turn the
receiver on, to be receive at the same
time. Signals weaker than -115 Bm will be
rejecte .
110 – 125 115
Ra io mo em PRM4 868MHz /User's manual V1.6 / 24.05.2011 17

5 Firmware update
The following is nee e to loa the new version of the firmware into the PRM4
evice:
MSPFET soft are – Can be locate on the CD that is inclu e in the PRM4
pro uct pack. Otherwise, the latest software version can be ownloa e from
http://kurt.on.ufanet.ru/files/MspFet_16007_ evel.zip
RS232 cable for programming the PRM 4 evice, an
File containing the ne firm are.
5.1 The procedure for writing the new firmware
Open the casing of the evice an take out the printe circuit boar .
Connect the serial port of the PC to RS232 port of the mo em via DB9 cable
an programming cable. The a apter for PRM 4 is DB9 female to DB9 male
cable with the following pin connections:
DB9 female DB9 male
pin 2 ------------------- pin 8
pin 3 ------------------- pin 7
pin 4 ------------------- pin 4
pin 5 ------------------- pin 5
pin 7 ------------------- pin 3
Set the J1 an J2 into the 1-2 state. The rest of the jumpers shoul be in a state
correspon ing for RS-232C serial connection accor ing to the aforementione
table.
Connect the power supply.
Start the MSPFET, loa the prm4xxx.hex, using the setup of the program
a just the BSL an serial port to which the evice is connecte . Press AUTO.
Confirm that the mo em's microcontroller has been programme an verifie .
Disconnect the power supply.
Set the J1 an J2 into the 2-3 state.
Return the circuit boar into the casing an close it.
Check the mo em operation with the new firmware.
Ra io mo em PRM4 868MHz /User's manual V1.6 / 24.05.2011 18

6 Technical specifications
Frequency range ISM 868MHz, accor ing to EN 300 220
Channel range and number 25kHz, 80 channels
Transmit po er +13 Bm, 20mW
Modulation 2FSK with Gaussian filtration
Deviation ±4kHz
Occupied band idth 25kHz
Frequency control synthesizer
Frequency stability ±2 ppm, -10ºC to +60ºC
Tx – Rx transition time ≤1ms
Error detection CRC16
Radio signaling rate 9600bps
Receiver sensitivity better than -115dBm for 10-3 BER
Channel occupation time less than 1%
Range up to 2km with ro antenna, 16km with high gain
antenna
Antenna connector SMA female
Antenna impedance 50Ω
Serial interface 8 ata, None parity, 1 stop bit
1200, 2400, 4800, 9600, 19200, 38400, 57600,
115200
Serial connector DB9 DCE RS-232: Tx, Rx, RTS, CTS, DTR, DSR, DCD, RI,
GND
RS-422: Tx+, Tx-, Rx+, Rx-, GND (2W/4W
selectable)
RS-485: Tx+, Tx-, Rx+, Rx-, GND (2W/4W
selectable)
Termination 120 Ohm for RS-422 an RS-485
selectable
Settings through AT comman set
Addressing scheme 65536 network a resses, 256 source a resses
Net ork configuration Point-to-point, point-to-multipoint
Po er supply 8-32V c, 2W or battery option 3.3-12V c
Po er consumption <50mA
LED indications power supply, receive, transmit, error in channel
Temperature range -20°C to 75°C, 0 to 95% RH (non condensing)
Protection IP50
Dimensions 86 x 57 x 26 mm
Weight 110g
Mounting esktop or optional mounting for 35mm DIN rail
Ra io mo em PRM4 868MHz /User's manual V1.6 / 24.05.2011 19

Contact
Decode Data Communications
A ress 12G Zorana Djin jica Blv , 11070 Belgra e, Serbia
Web http://www. eco e.rs
Email office@ eco e.rs
Tel/Fax +381 11 3110027
Table of contents