nport advanced functions - driver moxa connectivity 2012-08

Post on 28-Mar-2015

283 Views

Category:

Documents

4 Downloads

Preview:

Click to see full reader

TRANSCRIPT

NPort Advanced Functions- DriverMoxa 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

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

Fast Flush

Serial Ethernet

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

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

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

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?

Apply Change to activate this optional setting

NPort 5000

Apply Change to activate this optional setting

Fast Flush – Where to Find It?

NPort 6000

TX Mode

Serial Ethernet

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

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

TX Mode – Where to Find It?

NPort 5000

NPort 6000

Auto Network Re-connection

Serial Ethernet

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

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?

Auto Network Re-connection – Where to Find It?

Return Error If Network Is Unavailable

Serial Ethernet

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

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.

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?

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

Always Accept Open Requests

Serial Ethernet

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

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.

Always Accept Open Requests– Where to Find it?

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

COM Grouping

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

Serial Ethernet

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

Confidential

Ethernet

COM 4

COM 4

COM Grouping– How does It Work?

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

Confidential

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

1

2

Confidential

Step2: Group selected ports together

3

4

5

Confidential

Step3: Apply changes

6

Confidential

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

1

2

Confidential

Step2: Grouping

3

4

5

Confidential

Step3: Confirming

6

Confidential

Step4: Apply changes

7

Confidential

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

1

2

Confidential

Step2: Change to a unused COM number

3

4

Confidential

Step3: Apply changes

5

Confidential

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

1

2

Confidential

Step2: Change COM number

3

4

5

Confidential

Step3: Apply changes

6

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

Confidential

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

1

2

Confidential

Step2: Select target COM number

3

4

5

Confidential

Step3: Apply changes

6

Confidential

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

1

2

Confidential

Step2: Enable the COM Group settings page

3

4

5

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

Confidential

Step4: Apply changes

8

Confidential

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

1

2

Confidential

Step2: Change Advanced Settings

4

5

3

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

Confidential

Step3: Apply changes

6

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

Secure

Serial Ethernet

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

No Encryption No Encryption

12345

abcde

RealCOM mode

Encryption Encryption

@#$^*

&G%^

Secure RealCOM mode

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

Etherenet

SSL

TCP Server ModeTCP Client Software

1. SSDK TCP Client 2. Secure Socket

Secure TCP Server mode

Etherenet

SSL

1. SSDK TCP Server2. Secure Socket

TCP Server Software

TCP Client Mode

Secure TCP Client mode

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

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

If this function is disabled:

Secure : Keep Connection – How does It Work?

If this function is disabled:

Secure : Keep Connection – How does It Work?

361ms

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

If this function is enabled:

Secure : Keep Connection – How does It Work?

If this function is enabled:

Secure : Keep Connection – How does It Work?

3.1ms

Secure : Keep Connection – Where to Find It?

top related