71
NPort Advanced Functions - Driver Moxa Connectivity 2012-08

NPort Advanced Functions - Driver Moxa Connectivity 2012-08

Embed Size (px)

Citation preview

Page 1: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

NPort Advanced Functions- DriverMoxa Connectivity 2012-08

Page 2: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

Advanced Functions – Overview

• Inactivity Timeout• Delimiter• Force Transmit• Packet Length• Connection Control

• TCP Alive Check Timeout

• Max. Connection• Ignore Jammed IP• Allow Driver Control• Command by Command• Authentication

• Fast Flush• TX Mode• Auto Network Re-connection• Return Error If Network Is Unavailable• Always Accept Open

Requests• COM Grouping (NPort 5000)

EthernetSerial

Firmware Driver

• Secure

Page 3: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

Advanced Functions – Driver

OP Mode

DriverFunction

RealCOM

NPort Administration Suite NPort Windows Driver Manager

Fast Flush

TX Mode

Auto Network Re-connection

Return Error If Network Is Unavailable

Always Accept Open Requests

COM Grouping

Page 4: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

Fast Flush

Serial Ethernet

Page 5: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

Q : What is Fast Flush? When do I need to enable this function?

Where can this function be used?

Tips:

When your program uses the PurgeComm function call,

Fast Flush will avoid forcing the driver to query NPort

firmware continuously when in Real Com mode

Fast Flush – Introduction

Page 6: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

What is PurgeComm?• Before working with a port, we recommend clearing the

buffers; sometimes there's also a need to clear the buffers when working with ports. The PurgeComm function can be used for this purpose. This function can also stop the read and write operations

What is Fast Flush?• Fast Flush is effective with PurgeComm function to directly

flush the local buffer rather than querying NPort firmware continuously.

• If you don’t use this function, it would take more time (about several hundred milliseconds) compared to native COM ports, especially when network traffic is very heavy.

Fast Flush – Introduction

Page 7: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

Fast Flush – PurgeComm Introduction You must make sure that your application program uses Win32

PurgeComm functions (IOCTL_SERIAL_PURGE) for NPort Serial-to-Ethernet communication.

You can use capture logs from the *Port Monitor utility to determine if PurgeComm functions exist.

A portmon (Port Monitor) is a 3rd party freeware utility and GUI/device driver combination that monitors and displays all serial port activity on a system. http://www.sysinternals.com/ntw2k/freeware/portmon.shtml

Page 8: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

1. PurgeComm( )

2. Flush driver buffer

3. Flush firmware buffer

4. Return “success”

AP

Driver

Firmware

>100 ms

< 10 ms

If Fast Flush is DISABLED…….

But if Fast Flush is ENABLED…….

It takes about >100 ms for PurgeComm

It takes less than <10 ms for PurgeComm

AP

Driver

Fast Flush Enable

FirmwarePurgeComm

Flush driver buffer

Flush firmware buffer

<10 ms

> 100 msFast Flush Disable

Fast Flush – How does It Work?

Page 9: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

Apply Change to activate this optional setting

NPort 5000

Apply Change to activate this optional setting

Fast Flush – Where to Find It?

NPort 6000

Page 10: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

TX Mode

Serial Ethernet

Page 11: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

Q : What is Hi-Performance and Classical in TX Mode?

Where can this function be used?

Tips:

TX mode in RealCom Mode is available for better data

performance and reliability

TX Mode – Introduction

Page 12: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

TX Mode – What is It?

Transmission Hi-Performance Classical

NPort Driver

Handling

NPort driver will notify the AP (application program) to return when the data that has been sent out from the driver.

NPort driver will NOT notify AP until the data has been sent out from NPort’s firmware to the UART

Selection Principle

application just needs to send or receive data to/from your device

send-and-wait: send one polling command and wait for the answer

Suitable Application

require better performance or throughput

require critical response time

Advantage works more quickly works more reliably

Page 13: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

TX Mode – Where to Find It?

NPort 5000

NPort 6000

Page 14: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

Auto Network Re-connection

Serial Ethernet

Page 15: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

Q : What is Auto Network Re-connection?

Where can this function be used?

Tips:

When NPort does not respond to background “check

alive” packets, the driver will repeatedly attempt to re-

establish the TCP connection. The customer’s

software doesn’t have to close the port then re-open it.

Auto Network Re-connection – Introduction

Page 16: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

EthernetRealCOM mode

1. Establish Connection

3. Check Alive

4. No Response2. Crash or network is broken

5. Try to Re-connect

Host

Auto Network Re-connection – How does It Work?

Page 17: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

Auto Network Re-connection – Where to Find It?

Page 18: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

Return Error If Network Is Unavailable

Serial Ethernet

Page 19: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

Q : What is Return Error If Network Is Unavailable?

Tips:

If the driver cannot establish the connection to NPort,

calling the Win32 Comm function will result in the error

return code “STATUS_NETWORK_UNREACHABLE”

Return Error If Network Is Unavailable – Introduction

Page 20: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

EthernetRealCOM mode

1. Establish Connection

4. No Response

2. Crash or network is broken

Host

Return Error If Network Is Unavailable – How does It Work?

AP

Driver

3. Call Win32 Comm

3.

5. Return STATUS_NETWORK_UNREACHABLE

5.

Page 21: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

When the driver cannot establish the connection to NPort, it will return 0xC000023C which means the network is unreachable.

Return Error If Network Is Unavailable – How does It Work?

Page 22: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

Return Error If Network Is Unavailable – Where to Find it?

Page 23: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

Always Accept Open Requests

Serial Ethernet

Page 24: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

Q : What is Always Accept Open Requests? Where can this function be used?

Tips:

Even the driver cannot establish the connection to

NPort, user's software still can open the mapped COM

port just like a onboard COM port.

Always Accept Open Requests– Introduction

Page 25: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

EthernetRealCOM mode

4. Try Establish Connection1. Crash or network is broken

Host

Always Accept Open Requests – How does It Work?

AP

Driver

2.

3. Open COM port OK.

3.

Page 26: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

Always Accept Open Requests– Where to Find it?

Page 27: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

Always Accept Open Requests– Advanced Options

Put writing data in queue if network connection lost• Opened the COM port when NPort is offline• Start writing data to COM port• Stored the data• Send data to NPort while connects to it

Drop writing data if network connection lost• Opened the COM port when NPort is offline• Start writing data to COM port• Dropped the data

Page 28: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

COM Grouping

Supported Models: NPort 5000 / 5000A SeriesNPort IA5000 / IA5000A Series

Serial Ethernet

Page 29: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

Q : What is COM Grouping? Where can this function be used?

Tips:

Designed to simulate the serial RS-485 multi-drop behavior over an Ethernet network.

COM Grouping– Introduction

Page 30: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

Confidential

Ethernet

COM 4

COM 4

COM Grouping– How does It Work?

Page 31: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

Confidential

How to Configure COM Grouping?

Driver Support List:Version NPort Administration Suite V1.14 later

OS Windows NT and Windows 2000 later

Max. ports 32 of each COM Group

Creating a COM Group Adding a Port to a COM Group Removing a Port from a COM Group Deleting a COM Group Modify Ports in a COM Group

Page 32: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

Confidential

Creating a COM Group (Step 1-3) Step1: Select group members

1

2

Page 33: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

Confidential

Step2: Group selected ports together

3

4

5

Page 34: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

Confidential

Step3: Apply changes

6

Page 35: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

Confidential

Adding a Port to a COM Group (Step 1-4) Step1: Select member

1

2

Page 36: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

Confidential

Step2: Grouping

3

4

5

Page 37: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

Confidential

Step3: Confirming

6

Page 38: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

Confidential

Step4: Apply changes

7

Page 39: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

Confidential

Removing a Port from a COM Group (Step 1-3) Step1: Select port

1

2

Page 40: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

Confidential

Step2: Change to a unused COM number

3

4

Page 41: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

Confidential

Step3: Apply changes

5

Page 42: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

Confidential

Deleting a COM Group (Step 1-3) Step1: Select COM Group

1

2

Page 43: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

Confidential

Step2: Change COM number

3

4

5

Page 44: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

Confidential

Step3: Apply changes

6

Page 45: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

Modify Ports in a COM Group

Changing the COM Number of a COM Group Changing Read/Write/Signal Status

Permission Changing Advanced Settings of the COM

Group

Page 46: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

Confidential

Modify Ports in a COM Group-Changing the COM Number of a COM Group Step1: Select target COM Group

1

2

Page 47: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

Confidential

Step2: Select target COM number

3

4

5

Page 48: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

Confidential

Step3: Apply changes

6

Page 49: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

Confidential

Modify Ports in a COM Group- Change Read/Write/Signal Status PermissionStep1: Select any COM port of target COM Group

1

2

Page 50: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

Confidential

Step2: Enable the COM Group settings page

3

4

5

Page 51: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

Confidential

Step3: Change the settings

6

7

192.168.127.253 192.168.127.252

Read

Read

Read

Write

Write

※ Only one “Signal Status” in a group

Page 52: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

Confidential

Step4: Apply changes

8

Page 53: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

Confidential

Change Advanced SettingsStep1: Select “Signal Status” port of target COM Group

1

2

Page 54: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

Confidential

Step2: Change Advanced Settings

4

5

3

Select “Signal Status” port Non select “Signal Status” port

Page 55: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

Confidential

Step3: Apply changes

6

Page 56: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

Hint: How to find the “Signal Status” of target COM Grouping?

COM Settings -> COM Grouping Page

Ex: 192.168.127.253 Port 1 is the “Signal Status” port of the COM Group

Page 57: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

Secure

Serial Ethernet

Page 58: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

Secure Operation modes (SSL)

Secure Real COM mode• Must enable encryption in both Windows driver and NPort

6000 firmware

Secure TCP Server mode• Programming by OpenSSL• A SSDK (Secure SDK) TCP Client example provided for

testing of Secure TCP Server mode

Secure TCP Client mode• Programming by OpenSSL• Example for TCP Server will be provided in next SSDK

Page 59: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

No Encryption No Encryption

12345

abcde

RealCOM mode

Page 60: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

Encryption Encryption

@#$^*

&G%^

Secure RealCOM mode

Page 61: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

Etherenet

Hello Client: Cipher Suite AES, DES, RC4…

Hello Server: AES

Client Key Exchange

Certificate:

Server DoneServer Key Exchange

Change Cipher SpecFinish

Change Cipher SpecFinish

Public

Public

Secure RealCOM mode – SSL Handshake Flow

Page 62: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

Etherenet

SSL

TCP Server ModeTCP Client Software

1. SSDK TCP Client 2. Secure Socket

Secure TCP Server mode

Page 63: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

Etherenet

SSL

1. SSDK TCP Server2. Secure Socket

TCP Server Software

TCP Client Mode

Secure TCP Client mode

Page 64: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

Q : What is Keep Connection? When do I need to enable this function?

Tips:

If the customer’s application will open/close COM

ports frequently and the NPort 6000 is only for one

host, the customer can enable this option to speed up

the opening/closing time.

Secure : Keep Connection

Page 65: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

If this function is disabled:

Ethernet

SecureRealCOM mode

Host

2. Close COM Port Close Data port 950 Cmd port 966

Secure : Keep Connection – How does It Work?

1. Open COM Port Open Data port 950 Cmd port 966400 ms

4. Close COM Port

3. Open COM Port

60 ms

60 ms

400 ms

Page 66: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

If this function is disabled:

Secure : Keep Connection – How does It Work?

Page 67: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

If this function is disabled:

Secure : Keep Connection – How does It Work?

361ms

Page 68: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

If this function is enabled:

Secure : Keep Connection – How does It Work?

Ethernet

SecureRealCOM mode

Host

2. Close COM Port Close Cmd port 966

1. Open COM Port Open Data port 950 Cmd port 966400 ms

4. Close COM Port

3. Open COM Port

60 ms

60 ms

40 ms

Page 69: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

If this function is enabled:

Secure : Keep Connection – How does It Work?

Page 70: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

If this function is enabled:

Secure : Keep Connection – How does It Work?

3.1ms

Page 71: NPort Advanced Functions - Driver Moxa Connectivity 2012-08

Secure : Keep Connection – Where to Find It?