Outstation response to DNP3 simulator

575 views
Skip to first unread message

chintan shah

unread,
Mar 8, 2017, 8:31:39 AM3/8/17
to automatak-dnp3
Hi Adam , 

I was just testing the Outstation-demo with the DNP3 simulator picked up from here : https://automatak.com/opendnp3/simulator/setup.msi

For every function code that it sends , simulator shows the status as FAILURE_RESPONSE_TIMEOUT . Not sure whether the outstation is responding to the master . Am I missing some configuration on outstation / master ? 







J Adam Crain

unread,
Mar 8, 2017, 10:08:56 AM3/8/17
to automatak-dnp3
This usually indicates that the link layer addresses have not been configured to match on the outstation/master.

What do you see in the outstation/master logs?

-Adam

chintan shah

unread,
Mar 9, 2017, 2:52:38 AM3/9/17
to automatak-dnp3
Hi Adam , 

Below is the screenshot of the master logs . Looks like there is some configuration miss. 




Below is the screenshot of the outstation logs :


J Adam Crain

unread,
Mar 9, 2017, 8:31:20 AM3/9/17
to automatak-dnp3
Hi Chintan,

The simulator is configured with master = 1, outstation = 1024, but the outstation is configured with master = 1, outstation = 10.

You need to change one of the link layer addresses to match, e.g. 1024 to 10 or 10 to 1024.

-Adam

On Wednesday, March 8, 2017 at 8:31:39 AM UTC-5, chintan shah wrote:

chintan shah

unread,
Mar 9, 2017, 9:49:15 AM3/9/17
to automatak-dnp3
Hi Adam, 

Yes .I was able to figure that out..I changed the destination at the master and it worked..Thanks a lot for your timely responses..

Another quick question. For certain Function codes, Master shows status as Failure_Bad_response . Any suggestion on how to get correct responses ?  . Some of the function perhaps might not have been implemented ? 

Sorry if it sounds too basic to you as I am new to DNP3 and trying to get some hands on and learn . 

J Adam Crain

unread,
Mar 9, 2017, 9:55:26 AM3/9/17
to automatak-dnp3
I'd have to see the logs and specific function codes.

The outstation demo explicitly rejects COLD/WARM_RESTART since the default handler says it isn't supported:

https://github.com/automatak/dnp3/blob/2.0.x/cpp/libs/include/opendnp3/outstation/IOutstationApplication.h#L109

-Adam

chintan shah

unread,
Mar 13, 2017, 3:41:42 AM3/13/17
to automatak-dnp3
Hi Adam , 

Here is the logs for the master for the couple of function codes that is being rejected : 



And the corresponding logs at the outstation : 

ms(1489390719003) <-LL--  server - Function: PRI_UNCONFIRMED_USER_DATA Dest: 10 Source: 1 Length: 8
ms(1489390719004) <-TL--  outstation - FIR: 1 FIN: 1 SEQ: 14 LEN: 2
ms(1489390719004) <-AL--  outstation - CD 0F
ms(1489390719004) <-AL--  outstation - FIR: 1 FIN: 1 CON: 0 UNS: 0 SEQ: 13 FUNC: INITIALIZE_DATA
ms(1489390719004) --AL->  outstation - CD 81 00 01
ms(1489390719004) --AL->  outstation - FIR: 1 FIN: 1 CON: 0 UNS: 0 SEQ: 13 FUNC: RESPONSE IIN: [0x00, 0x01]
ms(1489390719004) --TL->  outstation - FIR: 1 FIN: 1 SEQ: 12 LEN: 4
ms(1489390719004) --LL->  outstation - Function: PRI_UNCONFIRMED_USER_DATA Dest: 1 Source: 10 Length: 5
ms(1489390727148) <-LL--  server - Function: PRI_UNCONFIRMED_USER_DATA Dest: 10 Source: 1 Length: 8
ms(1489390727148) <-TL--  outstation - FIR: 1 FIN: 1 SEQ: 15 LEN: 2
ms(1489390727148) <-AL--  outstation - CE 13
ms(1489390727149) <-AL--  outstation - FIR: 1 FIN: 1 CON: 0 UNS: 0 SEQ: 14 FUNC: SAVE_CONFIGURATION
ms(1489390727149) --AL->  outstation - CE 81 00 01
ms(1489390727149) --AL->  outstation - FIR: 1 FIN: 1 CON: 0 UNS: 0 SEQ: 14 FUNC: RESPONSE IIN: [0x00, 0x01]
ms(1489390727149) --TL->  outstation - FIR: 1 FIN: 1 SEQ: 13 LEN: 4
ms(1489390727149) --LL->  outstation - Function: PRI_UNCONFIRMED_USER_DATA Dest: 1 Source: 10 Length: 5



Any misses in the configuration ? 

Adam Crain

unread,
Mar 13, 2017, 7:01:06 PM3/13/17
to automatak-dnp3
Opendnp3 doesn't support the initialize_data function code. It's pretty esoteric and only used for some specialized applications.

-Adam

chintan shah

unread,
Oct 4, 2017, 3:20:31 AM10/4/17
to automatak-dnp3

Hi Adam , 

I just got back to this after few months . Just wanted to quickly check few things here inline with the below question. While testing with the below client , several of the DNP3 function codes are being responded with BAD_RESPONSE and RESPONSE_TIMEOUT . Below are these DNP3 operations :

ms(1507100646296) <-AL--  outstation - FIR: 1 FIN: 1 CON: 0 UNS: 0 SEQ: 14 FUNC: IMMED_FREEZE
ms(1507100646296) --AL->  outstation - CE 81 00 01
ms(1507100646296) --AL->  outstation - FIR: 1 FIN: 1 CON: 0 UNS: 0 SEQ: 14 FUNC: RESPONSE IIN: [0x00, 0x01]
ms(1507100646296) --TL->  outstation - FIR: 1 FIN: 1 SEQ: 11 LEN: 4
ms(1507100646296) --LL->  outstation - Function: PRI_UNCONFIRMED_USER_DATA Dest: 1 Source: 10 Length: 5


ms(1507100714013) <-AL--  outstation - FIR: 1 FIN: 1 CON: 0 UNS: 0 SEQ: 1 FUNC: IMMED_FREEZE_NR
ms(1507100714014) WARN    outstation - Ignoring NR function code: IMMED_FREEZE_NR


ms(1507100915454) <-AL--  outstation - FIR: 1 FIN: 1 CON: 0 UNS: 0 SEQ: 2 FUNC: FREEZE_CLEAR
ms(1507100915454) --AL->  outstation - C2 81 00 01
ms(1507100915454) --AL->  outstation - FIR: 1 FIN: 1 CON: 0 UNS: 0 SEQ: 2 FUNC: RESPONSE IIN: [0x00, 0x01]
ms(1507100915454) --TL->  outstation - FIR: 1 FIN: 1 SEQ: 13 LEN: 4


ms(1507100969361) <-AL--  outstation - FIR: 1 FIN: 1 CON: 0 UNS: 0 SEQ: 4 FUNC: FREEZE_AT_TIME
ms(1507100969362) --AL->  outstation - C4 81 00 01
ms(1507100969362) --AL->  outstation - FIR: 1 FIN: 1 CON: 0 UNS: 0 SEQ: 4 FUNC: RESPONSE IIN: [0x00, 0x01]
ms(1507100969362) --TL->  outstation - FIR: 1 FIN: 1 SEQ: 14 LEN: 4


ms(1507101026505) <-AL--  outstation - FIR: 1 FIN: 1 CON: 0 UNS: 0 SEQ: 7 FUNC: INITIALIZE_DATA
ms(1507101026505) --AL->  outstation - C7 81 00 01
ms(1507101026505) --AL->  outstation - FIR: 1 FIN: 1 CON: 0 UNS: 0 SEQ: 7 FUNC: RESPONSE IIN: [0x00, 0x01]
ms(1507101026506) --TL->  outstation - FIR: 1 FIN: 1 SEQ: 17 LEN: 4

ms(1507101058909) <-AL--  outstation - FIR: 1 FIN: 1 CON: 0 UNS: 0 SEQ: 8 FUNC: INITIALIZE_APPLICATION
ms(1507101058910) --AL->  outstation - C8 81 00 01
ms(1507101058910) --AL->  outstation - FIR: 1 FIN: 1 CON: 0 UNS: 0 SEQ: 8 FUNC: RESPONSE IIN: [0x00, 0x01]
ms(1507101058910) --TL->  outstation - FIR: 1 FIN: 1 SEQ: 18 LEN: 4

and similar responses for :

START_APPLICATION
STOP_APPLICATION
SAVE_CONFIGURATION
ASSIGN_CLASS
DELAY_MEASURE
OPEN_FILE
CLOSE_FILE
AUTHENTICATE_FILE
ABORT_FILE

Could you let me know if these are not supported in the current implementation of DNP3 ? Any documentation on how to implement handlers for this DNP3 function codes will also help in case if requried . 

Regards
Chintan

Adam Crain

unread,
Oct 4, 2017, 12:07:50 PM10/4/17
to automatak-dnp3
Hi Cihintan,

You can see which function codes the outstation currently supports here:


Assign class and delay measure are definitely supported. I'd have to see the specifics of the request to identify what is going wrong.

File transfer is definitely not supported.

-Adam
Reply all
Reply to author
Forward
0 new messages