Home

MiiNePort E1/E2-SDK User`s Manual

image

Contents

1. First click Add button 5 23 MiiNePort E1 E2 SDK d Configuration Wi Configure Setting Wizard page for user configure settings Configure Settings Name Type Array Length Default value Description MiiNePort IDE Development Tool Them the configuration window will be pop you can fill the value into each filed After you determine the new attribute please click Confirm Add New Configuration Configuration Name moxa example Description moxa example Type Int C expression int moxa example E Array Length 1 Default Value 0 ox cancel Then your attribute will be showed on the configuration settings list Besides you can modify or remove them easily After you complete all desired attributes please click Finish Configure Setting Wizard page for user configure settings Configure Settings Name Type Array Length Default value Description moxa exa Int 0 moxa example Finally your configuration will be saved into config init c The picture below is the configuration settings we set before 5 24 MiiNePort E1 E2 SDK MiiNePort IDE Development Tool include lt sdkcont h gt int Moxa example def Q void user configuration roid 1 Name Moxa example Type Int Size uw Default O Describe moxa example sysc AddUserConfig Hoxa example amp Moxa example def 4 I SCM Wizard amp
2. B 2 C SNMP Agent with MIB II and RS 232 Like Groups MiiNePort E1 Series modules have SNMP Simple Network Management Protocol agent software built in The software supports RFC1317 RS 232 like groups and RFC 1213 MIB II The following table lists the standard MIB II groups as well as the variable implementations for the MiiNePort E1 Series modules RFC1 213 MIB II supported SNMP variables iAdEnessmMaxSire IcmpoutAddrMasks iNeoMedelfndex lempoutAddrMaskReps ipwetMedePysMdres pweoMedaNeMddess pwwedaype monngpsems MiiNePort E1 E2 SDK SNMP Agent with MIB II and RS 232 Like Groups vorms reM NMPMIB C 2 D Supported File Systems There are two file systems in MiiNePort SDK for you to access via file operation APIs ROM file system and FAT ROM File System When you create your project under MiiNePort IDE you can find a directory named romfs under your project directory as shown in the following When Web Console is enabled lt romfs gt contains web page files by default When Web Console is disabled lt romfs gt contains only README TXT by default Project Explorer 53 x Project Explorer 3 mL E B us amp 7 4 S HelloWorld 4 cS HelloWorld ih Includes ih Includes apps apps Debug Debug g include g include 4 romfs 4 romfs contents htm B README TXT fileSystem htm index htm loadDefaul
3. a eh 5 29 MiiNePort E1 E2 SDK MiiNePort IDE Development Tool User Application Wizard Add User Application Wizard page for user application Application Name Pthreads Information Stack Size Bytes 8192 Default 8192 bytes This wizard is used to help you to create your application subroutine If you would like to develop your own application you can use this wizard Then I will show you how to add a new application Fill all fields click Finish button User Application Wizard Add User Application Wizard page for user application Application Name Moxa Pthreads Information Stack Size Bytes 8192 Default 8192 bytes Then the file templates will be created you can develop your application by them fd C C MiiNePort IDE EM File Edit Source Navigate Search F ming B B E 4S HelloWorld gt Bi Includes gt apps amp include gt g romfs d Ga IS ata moxa c B moxa h gt e userapps c Makefile gt A config init c amp main c amp sys default c b sys reset c COPYING GPL TXT amp Makefile gt Makefile defs B B Makefile tools 5 30 MiiNePort E1 E2 SDK MiiNePort IDE Development Tool Build project The function is used to build a customized firmware which you develop This function can build two different types of firmware If you select debug type the firmware will be downloaded in
4. 2 Click Next when the Welcome screen opens to proceed with the installation 16 Setup NPort Windows Driver Man Welcome to the NPort Windows Driver Manager Setup Wizard This will install NPort Windows Driver Manager Ver1 2 on your computer It is recommended that you close all other applications before continuing Click Next to continue or Cancel to exit Setup 4 4 MiiNePort E1 E2 SDK Utility Console and Driver Installation 3 Click Browse to select the destination directory and then click Next to install program files to the directory displayed in the input box Where should NPort Windows Driver Manager be installed Select Start Menu Folder Where should Setup place the program s shortcuts 5 The installer will display a summary of the installation options Click Install to begin the installation The setup window will report the progress of the installation To change the installation settings click Back and navigate to the previous screen e Setup NPort Windows Driver Manager Ready to Install Setup is now ready to begin installing NPort Windows Driver Manager on your computer 6 Click Finish to complete the installation of NPort Windows Driver Manager 4 5 MiiNePort E1 E2 SDK Utility Console and Driver Installation TE Setup NPort Windows Driver Manage 215 xi Completing the NPort Windows Driver Manager Setup Wizard Setup has finished installing NPort Windows Driver Mana
5. be applied into your customize firmware 5 15 MiiNePort E1 E2 SDK MiiNePort IDE Development Tool d MiNePor SDK Projet WENN A 0e MiiNePort Service Selection Select startup services for your application MiiNePort project CONSOLE Web Console CLI SNMP agent Network Application TFTP Server F NTP Client Miscellaneous CPU Monitor This page help to select default module in your device Please check functions in program selection pane in detail lt Back Ness _ Frish _ cancel Web Console CLI The Web Console is the most user friendly way to configure the MiiNePort device We use the Web Console interface to introduce the functions There are only a few differences between the Web Console and Serial Console Default sttmgs HTTP port 0 655535 Connections U Session timeout sec 065535 Keep Alive timeout sec 065535 HTTP port Factory Default Recommended Setting 0 65535 Required Connections Factory Default Recommended Setting gt 0 Required Session timeout Factory Default Recommended Setting 0 6553 300 Required Keep Alive timeout Factory Default Recommended Setting 25 Required 0 65535 For telnet serial console access MiiNePort device provides Command Line Interface CLI to do some configuration or monitor work of the device such as network configuration serial parameter configuration etc The programmer can build user defi
6. e Upgrade file Select Firmware File File path C MiiePort E1 Hellovwarld ram u OF X Cancel After uploading successfully the MiiNePort devices were updated with all new firmware ATTENTION For E1 user can upgrade MiiNePort SDK firmware into MiiNePort device from MiiNePort E1 standard firmware V1 7 For E2 user can upgrade MiiNePort SDK firmware into MiiNePort device from MiiNePort E2 standard firmware V1 3 After upgrading successfully the setting of MiiNePort will be reset to default 5 33 6 NetEZ Technologies This chapter introduces the NetEZ technology family and its innovative functions The following topics are covered in this chapter O SCM Serial Command Mode O EXTrigger External Trigger O EZPower MiiNePort E1 E2 SDK NetEZ Technologies SCM Serial Command Mode The MiiNePort E1 E2 SDK s SCM Serial Command Mode allows the module s parameters to be retrieved or configured through the serial port rather than over the network This is done through the use of specially parsed commands sent to the module through the serial port SCM is often used when your device has already been used in actual applications and you need to change the MiiNePort E1 E2 SDK s configuration such as changing the device s IP address by using your device s key pad The details are shown below TCP IP Ethernet Device main system triggers the SCM a pulling low Pin 7 or b sending assigned cha
7. please click Confirm button Add New Command Command Name moxa command Function moxa function Node Brief moxa brief Then the new command is created You can modify and remove it When you finish setting CLI click the Finish button d Command Line Interface Command Line interface Wizard page for command line interface Command Line Hierarchy Tree 4 miine Information 4 status Node Name moxa serialno Node Brief devname example uptime cpuload 4 moxa gt net system tools Add Command Remove Then you can develop the behavior of this moxa command in the moxa_function in this example Clidddtmd tools ping ping brief cli ping function Clidddtmd moxa node moxa command moxa command brief moxa function 5 22 MiiNePort E1 E2 SDK MiiNePort IDE Development Tool Configuration Wizard Ww malala s dd Configuration Wizara Configure Setting Wizard page for user configure settings Configure Settings Name Type Array Length Default value Description This wizard is used to help to make configuration variables You can define the attribute you need in this page By this way you can build up your own configuration First click Add button Configure Setting Wizard page for user configure settings Configure Settings Name Type Array Length Default value Description
8. Connects to Host PC and echos all the received data to server TCP Client Startup Acts as a TCP client Connects to Host PC on startup and performs data transmission between the serial and ethernet TCP Server Echo Acts as a TCP sever Accepts connection and echos all the received data to client TCP Server Multiple Connections Acts as a TCP server Accepts multiple connections and performs data transmission between the serial and ethernet TCP Server Single Connection Acts as a TCP server Accepts single connection and performs data transmission between the serial and ethernet UDP Echo Creates a UDP socket and echos the data received from the ethernet port UDP Mode Creates a UDP socket and performs data transmission between the serial port and ethernet port Data Packing Data packing Packet length 0 1024 Delimiter 1 oo Hex C Enable Delimiter 2 0 Hex C Enable Delimiter process Force transmit 0 65535ms Packet length Factory Default Recommended Setting 0 to 1024 bytes 0 byte The Packet length setting refers to the maximum amount of data that is allowed to accumulate in the serial port buffer before sending At the default of O for packet length no maximum amount is specified and data in the buffer will be sent as specified by the delimiter settings or when the buffer is full When a packet length between 1 and 1024 bytes is specified data in the buffer will be sent as soon as it reaches the s
9. Firmware version R V Get Firmware Build number R Get MAC address ROM Ping CNP Load Default CLD Save amp Restart CSR moxa Command Finish Cancel Finally your command will be saved into scmcmd c file You can add other behavior in this method 5 26 MiiNePort E1 E2 SDK MiiNePort IDE Development Tool scm ddomd i1 C LD scmcallback ff Load Default CLD scm Addomdil C SE semCallback fy Save amp Restart CSR scm ddCmd 1 G BG moxaCallback GetMoxaCfu GBN SNMP Wizard amp B s e amp d SNMP Private MIB Wizard MEE x Private MIB Setting Wizard page for private MIB settings SNMP Private MIB List Index Node Name MIB file 1 sample Japps services snmp mibs This wizard is used to help to add private MIB You can add the private MIB you need in this page By these OIDs in private MIB you can manage your device by SNMP protocol ATTENTION For MIB wizard a node has a max of 255 subnodes First click Add button 5 27 MiiNePort E1 E2 SDK MiiNePort IDE Development Tool SNMP Private MIB Wiza lea n Private MIB Setting Wizard page for private MIB settings SNMP Private MIB List Index Node Name MIB file aa 1 sample Japps services snmp mibs Node name overview MIB file D Ryan MOXA TS_Job Alpha Test Hint MIB Wizard only generates C code for top level MIB n
10. Max connection 1 The module will only allow 1 host s RealCOM driver to open a connection to the module s serial port Max connection 2 to 4 When set to 2 or higher RealCOM drivers for up to the specified number of hosts may open this port at the same time When RealCOM drivers for multiple hosts open the port at the same time the COM driver only provides a pure data tunnel with no control ability The serial port parameters will use firmware settings instead of your application program AP settings Application software that is based on the COM driver will receive a driver response of success when the software uses any of the Win32 API functions The firmware will only send data back to the driver on the host Data will be sent first in first out when data is received by the MiiNePort E1 from the Ethernet interface ATTENTION When Max connection is greater than 1 the MiiNePort E1 module will use a multiple connection application i e 2 to 4 hosts are allowed access to the port at the same time When using a multi connection application the module will use the serial communication parameters as defined here in the web console and all hosts connected to the port must use identical serial settings If one of the hosts opens the COM port with different serial settings data will not be transmitted properly Ignore jammed IP Setting ss Factory Default Recommended Setting Enable Disable Required when Max connection greater th
11. System requests configured device name for this MiiNePort IRBNOMiiNePort 9527 4 MiiNePort reports device name as MiiNePort 9527 IP configuration Command code NC Command parameters N A Reply parameters MiiNePort s IP configuration index as follows o static MiiNePort E1 E2 SDK Introduction to SCM Serial Command Mode Command Set System requests IP configuration for this MiiNePort IRNCOO MiiNePort reports IP configuration as Static IP address Command code NI Command parameters N A Reply parameters MiiNePort s IP address IRNIO192 168 127 254 MiiNePort reports IP address as 192 168 127 254 Netmask Command code NM Command parameters N A Reply parameters MiiNePort s Netmask address System requests Netmask address for this MiiNePort IRNM0O255 255 255 0 MiiNePort reports netmask as 255 255 255 0 Gateway Command code NG Command parameters N A Reply parameters MiiNePort s Gateway address System requests Gateway address for this MiiNePort IRNMO255 255 255 255 MiiNePort reports Gateway address as 255 255 255 255 Serial Number Command code 9S Command parameters N A Reply parameters MiiNePort s serial number in digit notation A 6 MiiNePort E1 E2 SDK Introduction to SCM Serial Command Mode Command Set IR 0S09527 MiiNePort reports serial number is 9527 Firmware Version Command code V Command parameters N A Reply paramete
12. scmCallback scmCallback scmCallback scmCallback scmCallback scmCallback scmCallback scmCallback scmCallback scmCallback scmCallback scmCallback scmCallback scmCallhack Comment Get Device Name GBN Get IP configure GNC Get IP address GNI Get Netmask GNM Get gateway GNG Get DNS GND Set Device Name SBN Set IP configuration SNC Set IP address SNI Set Netmask SNM Set Gateway SNG Set DNS SND Get Device Name RBN Get running IP configure RNC Get runnina IP address RNI Then a serial command mode window will be pop up please fill each filed Click Confirm to add a new serial command OP Command Function Comment The result about all serial command will be listed on serial command list Click Finish button to apply your settings Serial Command Mode Wizard page for Serial Command Mode Serial Command List Port OP Command BN NC NI NM NG ND es Qv B M NP LD SR BG FPRPRPRP RP RP RP RP RP RP RP RP pmP RB Q C O07 72727722 2 20 270 20 Function scmCallback scmCallback scmCallback scmCallback scmCallback scmCallback scmCallback scmCallback scmCallback scmCallback scmCallback scmCallback scmCallback moxaCallBack Comment Get Device Name RBN Get running IP configure RNC Get running IP address RNI Get running Netmask RNM Get running gateway RNG Get DNS RND Get Serial Number R S Get
13. voltage Use EZPower to configure the MiiNePort s system power input to either 3 3 VDC or 5 VDC 6 4 A Introduction to SCM Serial Command Mode Command Set The following topics are covered in this appendix O Command Reply Format gt Single Line Command Format gt Single Line Reply Format gt Head and Tail Format gt Operation Codes gt Status Codes gt Restriction O Command Code gt Command Code for Getting the Configuration gt Command Codes for Setting the Configuration gt Command Codes for Retrieving Running Configuration gt Command Codes for Viewing the Status gt Control Command Codes MiiNePort E1 E2 SDK Introduction to SCM Serial Command Mode Command Set Command Reply Format Single Line Command Format Head Op Parameters Tail 1 byte 1 byte 0 to n bytes 1 to 2 bytes Single Line Reply Format Head Op Cmd ST Parameters Tail 1 byte 1 byte 2 bytes 1 byte 0 to n bytes 1 to 2 bytes Head and Tail Format Tail 1 or 2 bytes Operation Codes operation Code Meaning R Retrieve running configuration Status Codes Status Code Meaning si Enter Serial Command Mode Command was executed successfully Unrecognized format Restriction The total number of parameters in a single command cannot exceed 1024 characters MiiNePort E1 E2 SDK Introduction to SCM Serial Command Mode Command Set Command Code Command Code for Getting the Configuration Device Nam
14. 950 966 Porti 4 7 MiiNePort E1 E2 SDK Utility Console and Driver Installation Linux Real TTY Drivers Real TTY drivers are provided to map Linux host TTY ports to MiiNePort serial TTL ports Once the mapping has been set up Linux users and applications can connect to a serial TTL port as if it were a local TTY port These drivers have been designed and tested for the majority of Linux distributions including Linux kernel version 2 4 x 2 6 x and 3 0 x Please check Moxa s website http www moxa com for the latest Linux kernel support For more detail please refer to README TXT Installing Linux Real TTY Driver Files Obtain the driver file from the accompanying CD ROM or the Moxa website at http www moxa com Log in to the console as a super user root Execute cd to go to the root directory Copy the driver file npreal2xx tgz to the directory Execute tar xvfz npreal2xx tgz to extract all files into the system ons Ea Execute tmp moxa mxinst For RedHat AS ES WS and Fedora Corel append an extra argument as follows tmp moxa mxinst SP1 The shell script will install the driver files automatically 7 After installing the driver you will be able to see several files in the usr lib npreal2 driver folder gt mxaddsvr Add Server mapping TTY port gt mxdelsvr Delete Server un mapping TTY port gt mxloadsvr Reload Server gt mxmknod Create device node TTY port gt mxrmnod Remove device node
15. B la Serial Command Mode Wizard page for Serial Command Mode Serial Command List t 2 o D Command Function Comment BN scmCallback Get Device Name GBN NC scmCallback Get IP configure GNC NI scmCallback Get IP address GNI NM scmCallback Get Netmask GNM NG scmCallback Get gateway GNG ND scmCallback Get DNS GND BN scmCallback Set Device Name SBN NC scmCallback Set IP configuration SNC NI scmCallback Set IP address SNI NM scmCallback Set Netmask SNM NG scmCallback Set Gateway SNG ND scmCallback Set DNS SND BN scmCallback Get Device Name RBN NC scmCallback Get running IP configure RNC NT scmCallhack Get runnina IP address RNI G G G G G G S S S S S S R R R PRPRPRPRP RP RP m RP RP RP RP RP RB This wizard is used to help to add SCM commands You can add the serial command you need in this page By these serial commands you can configure your device more help to add SCM command Click Add button to add new serial command Regarding the format of serial command please refer to appendix A 5 25 MiiNePort E1 E2 SDK MiiNePort IDE Development Tool Serial Command Mode Wizard page for Serial Command Mode Serial Command List Command BN NC NI NM NG ND BN NC NI NM NG ND BN NC D 5 o D P P P P P HP mM Hm HP H HP Hm m mP HdBii Bi Di DIMI NAN Hl HAO Oi OIO oO Function scmCallback
16. DK version For MiiNePort E1 SDK DIO For the 3 configurable pins Pin 6 7 and 8 refer to Chapter 1 Pin Assignments for their default settings and change to the appropriate function for your application Restart The restart function is enabled by default and is not subject to be disabled You can choose to enable or disable the Restart function in the Pin and IO Settings 5 6 MiiNePort E1 E2 SDK MiiNePort IDE Development Tool EXTrigger is designed to provide an easy tool for network troubleshooting without interrupting device operation EXTrigger External Reset For MiiNePort E2 SDK Mode Select Input or Output under Mode to specify digital input or digital output operation State Select Low or High under State to specify a high or low state for digital output channels Note that when Mode is set to Input as shown in the above screenshot the State option is deactivated The next page is regarding serial to Ethernet application data packing and serial command mode rL E dg MiNePon SDK Pro RR NN ess Application Selection Select an application to represent your target device Serial to Ethernet application RealCOM Mode Port setting Data packing TCP alive check time 0 99 min Packet length 0 0 1024 Max connection Delimiter 1 00 Hex Enable Ignore jammed IP 3 Enable Disable Delimiter 2 00 Hex Enable Allow driver control 3 Enable Disable Delimite
17. IO cn EROR CER CC RICERCHE REOR ERE ER 5 6 Realc OM MOGE cevpkibia iiti b ERER ERE RERERE ERE UE AI EEN EAE EERERERER ERE RIT ENEO O ra e d abbr i ton onn 5 7 Ethernet Modem MOCO writ 5 9 Sample JADDIESLIOLI a dadas sumet A tana Danced atacand tea E eer MM DL cece eer ere EMT A ATUM 5 9 Data esie dinis EO EMT 5 10 Serial Command MOJE ecc eect vrbc rv endete uve eth nut eden eed sac he ccce d a Sa FETTE FREE ETK VER ERATE 5 12 WV SE COS fe 5 16 GNE pv EO 5 16 SNMP aJ ONE eane tos tu cA PT ITFLEPELHM OE ELIDK RRS MEE E EU MN MAN NO ar A MN I TUN M I MUN KIM ATE 5 17 Hare sg 1 YA 2 CP e T RCM PM RM ECCE NUN 5 18 NTP GHEE norunt anena aeo dE Abi CMD EN o DUE VUA DU Musee DD NE ME ESSES DEC DUUU EEUU EUL UU DD UEE 5 18 CPU MODIEOEcecccoeeceeeedodexeximdeeocesiecinidexie exire etwewewireie xime redd qut PaatitecE toti toti tard utdDoDPtepitupbte bitu biar 5 19 AYP I ape rene m E 5 19 Modi bprolecbdepDehtel V oriasi Esee pE A REESE EE CREDE Ut ett EEEE stumps AS UE DELL VASUMUU CUR Ud e a 5 20 CLELAMIZOIEG usine etu iesu A mE SEMI I DIEI M III II I MUSEI 5 20 Contgurauoh VIZ efe cssc aae near Maki qa d ENDE IN EIE M E NEA ELERRMIDE LATUM LM dun c quis tots ite bate tebe ete ede ete d vbt 5 23 SCM WIZA O errn D M 5 25 SNMP WIZA A teenage Pert nr Cati eC C i Cer cafeta efie e e vaa
18. IP 192 168 3 4 with data ports from 4001 to 4016 and command ports from 966 to 981 Removing Mapped TTY Ports After logging in as root enter the directory usr lib npreal2 driver and then execute mxdelsvr to delete a server The syntax of mxdelsvr is mxdelsvr IP Address Example cd usr lib npreal2 driver mxdelsvr 192 168 3 4 The following actions are performed when executing mxdelsvr 1 Modifies npreal2d cf 2 Removes the relevant TTY ports in directory dev 3 Restart the driver If the IP address is not provided in the command line the program will list the installed servers and total ports on the screen You will need to choose a server from the list for deletion Removing Linux Driver Files A utility is included that will remove all driver files mapped TTY ports and unload the driver To do this you only need to enter the directory usr lib npreal2 driver and then execute mxuninst to uninstall the driver This program will perform the following actions Unload the driver Delete all files and directories in usr lib npreal2 Delete directory usr lib npreal2 pU OM OE Modify the system initializing script file UNIX Fixed TTY Drivers A fixed TTY driver is provided that will map UNIX host TTY ports to the MiiNePort Once the mapping has been set up UNIX users and applications can connect to a device port as if it were a local TTY port This driver has been designed and tested for the majority of UN
19. IX systems Please check Moxa s website http www moxa com for the latest UNIX systems support For more detail please refer to README TXT Installing the UNIX Driver Log in to UNIX and create a directory for the Moxa TTY To create a directory named usr etc execute the command mkdir p usr etc Copy moxattyd tar to the directory you created For the usr etc directory execute the following commands cp moxattyd tar usr etc cd usr etc Extract the source files from the tar file by executing the command tar xvf moxattyd tar 4 9 MiiNePort E1 E2 SDK Utility Console and Driver Installation The following files will be extracted README TXT moxattyd c source code moxattyd cf an empty configuration file Makefile makefile VERSION TXT fixed TTY driver version FAQ TXT Compile and link For SCO UNIX make sco For UnixWare 7 make svr5 For UnixWare 2 1 x SVR4 2 make svr42 Configuring the UNIX Driver Modify the configuration The configuration used by moxattyd is defined in the text file moxattyd cf which is in the same directory You may use vi or any text editor to modify the file as follows ttyp1 192 168 1 1 950 You can refer to moxattyd cf for detailed descriptions of the various configuration parameters Please note that Device Name depends on the OS See the Device Naming Rule section in README TXT for more information To start the moxattyd daemon after system boot up add a
20. MiiNePort E1 SDK Module For MiiNePort E2 SDK Module O LED Indicators MiiNePort E1 E2 SDK Introduction Overview The Moxa MiiNePort E1 E2 SDK Series products are serial to Ethernet embedded modules Moxa provides development and debug kit which includes JTAG an Eclipse based integrated software development tool and a source level debugger The following table lists the model names of all MiiNePort E1 E2 SDK series modules along with the model names of the corresponding starter kits Package Checklist Available Models e MiiNePort E1 SDK Software Development Kit for the MiiNePort E1 Series MiiNePort E1 module included e MiiNePort E2 SDK Software Development Kit for the MiiNePort E2 Series MiiNePort E2 module included Package Checklist e MiiNePort E2 SDK module or MiiNePort E1 SDK module e MiiNePort E2 SDK evaluation board or MiiNePort E1 SDK evaluation board e Universal power adaptor e 2 power cords e Null modem cable e Cross over Ethernet cable e Documentation and Software CD e Quick Installation Guide printed e Warranty Card NOTE Please notify your sales representative if any of the above items is missing or damaged Product Features All MiiNePort E1 E2 SDK modules have the following general features e Eclipse based integrated software development tool e Source level debugger e Easy to build proprietary SNMP CLI console e Various serial to Ethernet sample code e Mass production tool for easy firmware u
21. MiiNePort E1 bE2 SDK User s Manual First Edition February 2015 www moxa com product MOXA 2015 Moxa Inc All rights reserved Reproduction without permission is prohibited MiiNePort E1 bE2 SDK User s Manual The software described in this manual is furnished under a license agreement and may be used only in accordance with the terms of that agreement Copyright Notice Copyright 02015 Moxa Inc All rights reserved Reproduction without permission is prohibited Trademarks The MOXA logo is a registered trademark of Moxa Inc All other trademarks or registered marks in this manual belong to their respective manufacturers Disclaimer Information in this document is subject to change without notice and does not represent a commitment on the part of Moxa Moxa provides this document as is without warranty of any kind either expressed or implied including but not limited to its particular purpose Moxa reserves the right to make improvements and or changes to this manual or to the products and or the programs described in this manual at any time Information provided in this manual is intended to be accurate and reliable However Moxa assumes no responsibility for its use or for any infringements on the rights of third parties that may result from its use This product might include unintentional technical or typographical errors Changes are periodically made to the information herein to correct such err
22. TTY port gt mxuninst Remove TTY port and driver files At this point you will be ready to map the MiiNePort E1 serial port to the system TTY port Mapping TTY Ports Make sure that you set the operation mode of the serial port of the MiiNePort E1 to RealCOM mode After logging in as a Super user enter the directory usr lib npreal2 driver and then execute mxaddsvr to map the target MiiNePort E1 serial port to the host TTY ports The syntax of mxaddsvr is as follows mxaddsvr MiiNePort E1 IP Address Total Ports Data port Cmd port The mxaddsvr command performs the following actions 1 Modifies npreal2d cf 2 Creates TTY ports in directory dev with major and minor number configured in npreal2d cf 3 Restarts the driver Mapping TTY ports automatically To map TTY ports automatically you may execute mxaddsvr with just the IP address and number of ports as in the following example cd usr lib npreal2 driver mxaddsvr 192 168 3 4 16 In this example 16 TTY ports will be added all with IP 192 168 3 4 with data ports from 950 to 965 and command ports from 966 to 981 Mapping TTY ports manually To map TTY ports manually you may execute mxaddsvr and manually specify the data and command ports as in the following example 4 8 MiiNePort E1 E2 SDK Utility Console and Driver Installation cd usr lib npreal2 driver mxaddsvr 192 168 3 4 16 4001 966 In this example 16 TTY ports will be added all with
23. a E neces eT eee ee EANNAN ERRA SA A A 3 Command Code for Getting the CONTIQUFATION scii rir eR ER XXE ER RR GN A 3 Command Codes for Retrieving Running Configuration rresia ae EEEE nnnm nane nean nme nnns A 5 Command Codes for Viewing the St tUS cusan tuta attain adatatudacadasadetodatadatadatad c mpn De uv atedub vau A 7 Greip dye command CodeS EE A 7 Well Known POFt NUmDGFES ii ueceou ce cece euUE EE Eu d ERR EEUU EE SuAu DU EEEAEE Ud UE MEME CU ER UNURUD EC ML RU V M MA MOA LED MMDE QII aU V eV B 1 SNMP Agent with MIB II and RS 232 Like Groups eeeiseeeeeeeu annue enu aunn nnn uuum u unn nn C 1 Supported File Systems ui ax x REREREREEXREENEXIEXEEEQXREFSEXWREERRAXFEEVFIRNEKRARNRAKARUSeRA I OE TE EMIL FRCEERERERRTNR C KIDLLCU EO D 1 1 Introduction The MiiNePort E1 E2 SDK Series embedded device servers are compact drop in modules that can be integrated with your serial devices to enable connectivity to an Ethernet network All MiiNePort E1 E2 SDK Series modules come equipped with built in TCP IP protocols and other easy to use network enabling tools for fast integration allowing you to provide network access to any electronic device with a serial port The following topics are covered in this chapter O Overview D Package Checklist O Product Features O Product Specifications MiiNePort E1 SDK Evaluation Board Panel Layout MiiNePort E2 SDK Evaluation Board Panel Layout O Block Diagram For
24. an help you upload your firmware to the MiiNePort easily First you need to build a release firmware then MiiNePort IDE will ask you to confirm if reset to default to MiiNePort device Click Yes to go next step cd MiiNePort SDK i Reset MiiNePort target to default If you don t want to overwrite the current settings please select NO Then MiiNePort will create a folder which is called Release and put the firmware into this folder so that you can find your firmware in sub folder objs I Hellewarld ES rai Includes LS apps Debug gt lib H objs MiiMePort SDK elf E ROMFS Fel 5 include B Release f lib ltl obj MiiNePort SDK bin MiiMePort SDK elf ROMFS HL ramfs H roms 5 userapps e config init c amp main c e snmp init c e s 5_default c e Sys reseb c OPYING GPL TAT Makefile 5 Makefile defs Makefile tools Please copy the rom file to your desired path In this way you can upgrade the firmware by NPort Search utility T8 NPort Search Utility File Function View Help AK 2 x x m E Exit Search Search IP Locate Console Assign IP Upgrade LAN MAC Address LAN1 IP Address LAN2 MAC Address LAN2 IP Address Status Select the target devices and the firmware you saved in the desired path then click OK to start uploading the firmware to the MiiNePort devices via Ethernet 5 32 MiiNePort E1 E2 SDK MiiNePort IDE Development Tool
25. an1 This option determines how the port will proceed if multiple hosts are connected and one or more of the hosts stops responding as the port is transmitting data If you select Disable the port will wait until the data has been 5 8 MiiNePort E1 E2 SDK MiiNePort IDE Development Tool transmitted successfully to all hosts before transmitting the next group of data If you select Enable the port will ignore the host that stopped responding and continue data transmission to the other hosts NOTE Ignore Jammed IP is only valid when the Max connection is greater than 1 Allow driver control Factory Default Recommended Setting Enable Disable Required when Max connection greater than1 NOTE Allow drive control is only valid when Max connection is greater than 1 This option determines how the port will proceed if driver control commands are received from multiple hosts that are connected to the port If Disable is selected driver control commands will be ignored If Enable is selected control commands will be accepted with the most recent command received taking precedence Ethernet Modem Mode Serial to Ethernet application Ethemet Modem Mode Port sette TCP alive check time 0 99 min TCP port 4001 TCP alive check time Factory Default Recommended Setting 0 to 99 min 7 min Optional O min The TCP connection is not closed due to an idle TCP connection 1 to 99 min The module automatically closes the TCP connection if the
26. ansmit data over a modem 3 3 4 Utility Console and Driver Installation This chapter describes the installation of the MiiNePort E1 E2 SDK s utilities which are used to perform simple configurations and driver installations The following topics are covered in this chapter O NPort Search Utility Installing NPort Search Utility gt NPort Search Utility Configuration O NPort Windows Driver Manager Installing NPort Windows Driver Manager Using NPort Windows Driver Manager O Linux Real TTY Drivers 0 Installing Linux Real TTY Driver Files Mapping TTY Ports Removing Mapped TTY Ports Removing Linux Driver Files O UNIX Fixed TTY Drivers Installing the UNIX Driver Configuring the UNIX Driver MiiNePort E1 E2 SDK NPort Search Utility Installing NPort Search Utility Lis Utility Console and Driver Installation Click the INSTALL UTILITY button in the MiiNePort E1 E2 SDK Installation CD auto run window to install the NPort Search Utility Once the program starts running click Yes to proceed 2 Click Next when the Welcome screen opens to proceed with the installation e Setup NPort Search Utility Welcome to the NPort Search Utility Setup Wizard This will install NPort Search Utility erl 1 on your computer It is recommended that you close all other applications before continuing Click Next to continue or Cancel to exit Setup 3 Click Browse to select an alternate location a
27. applied to the configuration until you save amp restart the MiiNePort Command parameters 1 for All setting O for Keep IP setting Reply parameters N A CLDO System requests to load factory default ICLDO System loads factory default successfully Well Known Port Numbers This appendix is included for your reference Listed below are port numbers that already have a well established use These port numbers should be avoided when assigning a port number to your MiiNePort E1 Series module otherwise you may experience network problems Refer to the RFC 1700 standard for Well Known Port Numbers or refer to the following introduction from IANA e The port numbers are divided into three ranges the Well Known Ports the Registered Ports and the Dynamic and or Private Ports e The Well Known Ports are those from O through 1023 e The Registered Ports are those from 1024 through 49151 e The Dynamic and or Private Ports are those from 49152 through 65535 The Well Known Ports are assigned by IANA and on most systems can only be used by system processes or by programs executed by privileged users The following table shows famous port numbers among the well known port numbers For more details visit the IANA website at http www iana org assignments port numbers p Reed SSSOSC S s E go Domain Name Server domain Domain Name Server domain MiiNePort E1 E2 SDK Well Known Port Numbers Emo o
28. bled This design prevents device deadlock in the future if you or your customer forgets the password and is unable to access the console to troubleshoot the device To activate the EXTrigger s Reset to Default function press the button inside the RJ45 jack for 5 seconds while your device and the MiiNePort E1 SDK is starting up The Restart function simply shuts down the module and then turns it back on This does not affect any settings in the module but is a commonly used method for initial troubleshooting Simply hold the button for 5 seconds at any time during device operation to restart the MiiNePort E1 SDK module NOTE The Restart function of ExTrigger is disabled in Moxa s factory default settings Refer to the following table describing the LED interaction with EXTrigger EXTrigger Fault In Use Blinking Trigger Timing LED Behavior Duration Restart 0 5 time sec Press the button anytime When LED is Off stops Blinks amber during operation blinking slowly 1 Function active 2 Release button 6 3 MiiNePort E1 E2 SDK NetEZ Technologies EXTrigger is actually an external Digital Input DI that can be accessed by you or your device s end user You can design your own application by leveraging this external DI Contact Moxa for information about custom EXTrigger functions EZPower Note This function is only available for the MiiNePort E2 SDK The EZPower function makes it easy to configure the MiiNePort s input
29. cautions that you should pay attention to before proceeding with installation ATTENTION Be sure to disconnect the power cord before installing or wiring the evaluation board ATTENTION Determine the maximum possible current in each power wire and common wire Observe all electrical codes dictating the maximum current allowable for each wire size If the current goes above the maximum ratings the wiring could overheat causing serious damage to your equipment ATTENTION Take care when handling the evaluation boards When plugged in the evaluation boards internal components generate heat and consequently the board may feel hot to the touch You should also pay attention to the following e Donotrun signal or communication wiring and power wiring in the same wire conduit To avoid interference wires with different signal characteristics should be routed separately Separate paths should be used to route wiring for power and devices You can use the type of signal transmitted through a wire to determine which wires should be kept separate The rule of thumb is that wires sharing similar electrical characteristics may be bundled together e Keep input wiring and output wiring separate e If power wiring and device wiring paths must cross paths make sure the wires are perpendicular at the intersection point e All wiring should be clearly labeled Selecting the Serial Interface RS 232 MiiNePort E1 SDK To use an RS 232 serial i
30. ceed to the next step Note that the NPort IP Adress column supports FQDN Fully Qualified Domain Name in which case the IP address will be filled in automatically 4 6 MiiNePort E1 E2 SDK Utility Console and Driver Installation Add NPort Select From List Mapping IPv6 COM Port No Model MAC 1 Address 1 Address 2 1 MiiNePort E1 00 90 68 00 00 08 192 168 127 254 Search Clear All Input Manually RealCOM Redundant COM Reverse RealCOM First Mapping Port Command Port 966 Total Ports 1 J OK X Cancel 5 COM ports and their mappings will appear in blue until they are activated Activating the COM ports saves the information in the host system registry and makes the COM port available for use The host computer will not have the ability to use the COM port until the COM ports are activated Click Yes to activate the COM ports at this time or click No to activate the COM ports later NPort Windows Driver Manager File COM Mapping Configuration View Help dh amp amp Add Hemove Apply Undo COM Port Address 1 Address 2 COM2 192 168 127 254 950 966 Porti Information Total COM Port 0 6 Ports that have been activated will appear in black lt NPort Windows Driver Manager File COM Mapping Configuration View Help A amp A amp Eo A Exi Add Remove Apply Undo Setting No COM Port Address 1 Address 2 1 COM2 192 168 127 254
31. cept the terms of this agreement before continuing with the installation End User License Agreement Before installing the HMiiMePort SDE you must agree to Moxa s End User Product License Agreement Please read through this license agreement carefully If you do not agree to them please DO NOT install the software nub ject to the following terms and conditions 1 do not accept the agreement 5 2 MiiNePort E1 E2 SDK MiiNePort IDE Development Tool 4 When the Select Destination Location window appears click Next to continue You may change the destination directory by first clicking on Browse ib Setup MiiNePort SDE 1 0 Select Destination Location Where should MiiePort SDK 1 0 be installed Setup will install MiePort SOK 1 0 into Ehe Following Folder To continue click Next IF you would like to select a different Folder click Browse Browse At least 1 1 MB of Free disk space is required 5 In this page you can select what components you would like to install then click Next iG Setup MiiNePort SDE 1 0 Coie Select Components Which components should be installed Select the components you want to install clear the components you da nok wank to install Click Next when you are ready to continue Cores tool chain cygwin 1 7 3 1 and eCos v3 0 20090327 0855 78 7 MB Eclipse Eclipse CDT 3 6 and JRE 1 6 0 22 201 5 MB MiiePart 5DK v1 0 package 104 4 MB m packag Current select
32. ch 13 Circuit Pad USB Type B Connector Debug Digital IO Terminal Block 1 5 Introduction MiiNePort E1 E2 SDK Introduction Ethernet Port Pins for MiiNePort E1 E2 SDK Modules DB9 Male 12345 Block Diagram For MiNePort E1 SDK Module MOXA MiiNe 10 100 MAC PHY GPIO 1 6 MiiNePort E1 E2 SDK Introduction For MiNePort E2 SDK Module MOXA MiiNe Power system 4nnn d jp 10 100 MAC PHY ME LED Indicators MiiNePort E1 SDK Series Modules LED Color Description 100BASE TX Link Activity constant on when link exists blinks when data transmitting e Amber 10BASE T Link Activity constant on when link exists blinks when data transmitting In Use constant on when connection established ight Amber Fault blinks when IP fault MiiNePort E1 SDK Evaluation Board Serial Signal TxD LED Dii Red indicates tnat TxD hasa siga Serial Signal RXD LED D12 Red indicates that RxD has a signa Serial Signal RTS LED D13 Red Indicates that RTS has a signal Power Signal LED D43 Indicates power input status Digital Output LED D17 Red o Indicates DO O low 0 status Digital Output LED D18 Red Indicates DO 1 low 0 status 1 7 MiiNePort E1 E2 SDK Introduction MiiNePort E2 SDK Evaluation Board LED Name Cor pescrpon Power Off 1 Power is off 2 Power error 3 System error Ready Green Blinking every 1 1 The device
33. data within the time specified it will pack the data in its buffer into the same data frame for network transmission The Force transmit field is typically used in conjunction with the Delimiter fields to specify how data in the module s buffer is packed for network transmission When delimiters are used the module accumulates data in its buffer as it waits to receive a delimiter If there is a break in communication data will be held in the buffer as the module continues to wait for a delimiter The Force transmit field allows you to specify the maximum amount of time that the module will wait for data With Force transmit enabled the module will automatically pack the data in the buffer for network transmission if no data is received for the specified time When set to 0 Force transmit is disabled which means there is no time limit for how long the module will wait to receive data When set between 1 and 65535 the module will pack data as soon as there is no serial communication for the specified time 5 11 MiiNePort E1 E2 SDK MiiNePort IDE Development Tool The optimal force transmit time depends on your application but it should be larger than one character interval within the specified baud rate to have any effect For example assume that the serial port is set to 1200 bps 8 data bits 1 stop bit and no parity In this case the total number of bits needed to send one character is 10 bits and the time required to transfer one characte
34. des The module needs to know the IP address of the default gateway computer in order to communicate with the hosts outside the local network environment For correct gateway IP address information consult your network administrator DNS server 1 DNS server 2 Setting Factory Default Recommended Setting E g 192 168 1 1 None Optional IP addresses of the form x x x 0 and X X X 255 are invalid Domain Name System DNS is how Internet domain names are identified and translated into IP addresses A domain name is an alphanumeric name such as moxa com that it is usually easier to remember A DNS server is a host that translates the text based domain name into the corresponding numeric IP address which is used to establish a TCP IP connection When the user enters a website address the computer asks a DNS server for the website s IP address to connect to the web server When a DNS server is specified the module acts as DNS client and will allow domain names instead of IP addresses to be used on the web console The following web console fields support the use of domain names TCP Client Destination IP Address and IP Address Report Server Two DNS servers may be specified DNS server 1 and DNS server 2 DNS server 2 is included for use when DNS sever 1 is unavailable The Next page is about serial parameters settings all serial parameters settings can be adjusted in this page GMiNePort SDK Project WT Serial Paramete
35. e Command code BN Command parameters N A Reply parameters MiiNePort s name GBN System requests configured device name for this MiiNePort IGBNOMiiNePort E1 95274 MiiNePort reports device name as MiiNePort E1 9527 IP configuration Command code NC Command parameters N A Reply parameters MiiNePort s IP configuration index as follows o sm System requests IP configuration for this MiiNePort IGNCOO MiiNePort reports IP configuration as Static IP address Command code NI Command parameters N A Reply parameters MiiNePort s IP address IGNIO192 168 127 254 MiiNePort reports IP address as 192 168 127 254 Netmask Command code NM Command parameters N A Reply parameters MiiNePort s Netmask address System requests Netmask address for this MiiNePort A 3 MiiNePort E1 E2 SDK Introduction to SCM Serial Command Mode Command Set IGNM0255 255 255 0 MiiNePort reports netmask as 255 255 255 0 Gateway Command code NG Command parameters N A Reply parameters MiiNePort s Gateway address System requests Gateway address for this MiiNePort IGNG0255 255 255 255 MiiNePort reports Gateway address as 255 255 255 255 DNS Command code ND Command parameters The index 1 or 2 of DNS server Reply parameters MiiNePort s DNS address GND1 System requests DNS server 1 address for this MiiNePort IGND0192 168 1 2 MiiNePort reports DNS server 1 addres
36. ease refer official web site for more information NTP Client Settings Tine sever hae 1 TCs Tine sever IPhame 2 Sd Time offset 720 720 min Time server query period sec gt 30 Time server IP name 1 2 Factory Default Recommended Setting 0 to 40 characters Required Time offset Factory Default Recommended Setting MiiNePort E1 E2 SDK MiiNePort IDE Development Tool Time server query period Setting Factory Default Recommended Setting gt 30 deoo jJOpima CPU Monitor Enable this function to monitor status of the CPU The next page will display the result you select Then click Next to create this project n d MiiNePort SDK Project Confirm Confirm your selection Press Finish to create the MiiNePort Project You have selected the following settings Project Settings Project name HelloWorld Location C Users ryan_ma Documents workspace Platform MiiNePort E1 Kernel version VL 0 Network Settings Device name MiiNePort SDK IP configuration Static IP address 192 168 127 254 Netmask 255 255 255 0 Gateway 0 0 0 0 DNS server 1 0 0 0 0 DNS server 2 0 0 0 0 Selected service RealCOM Mode lt Back lext gt Cancel Finally the project will be created on project explorer list Then you can modify or add source code to develop your firmware fd C C MiiNePort IDE S NI File Edit Source Navigate Search Proje i law L Project Ex
37. es are available for COM port mapping from the host computer as well as operation modes for TCP IP protocols After choosing the operation mode in this chapter refer to subsequent chapters for configuration details The following topics are covered in this chapter O Overview O RealCOM Mode O Ethernet Modem Mode MiiNePort E1 E2 SDK Choosing the Proper Operation Mode Overview MiiNePort E1 E2 SDK modules act as a bridge to connect your serial devices to the Ethernet The built in TCP IP stack frees you from the tedious task of programming networking protocols With one step you can choose the proper operation mode and then use your computer to access manage and configure your serial devices from anywhere in the world over the Internet Traditional SCADA and data collection systems rely on serial ports RS 232 422 485 to collect data from a variety of instruments Since MiiNePort E1 E2 SDK modules convert between serial and Ethernet signals your SCADA and data collection system can be made accessible from any device connected to a standard TCP IP network regardless of whether the devices are used locally or at a remote site The MiiNePort E1 E2 SDK supports RealCOM mode and Ethernet Modem mode You don t need to take effort to development these two kinds of complex serial to Ethernet operating mode Only do some setting to complete the function RealCOM Mode RealCOM mode allows users to continue using software that was written for p
38. etia de ead o SG a ad e wat et i a de 5 27 Oe eile ee Ward ewes sere 5 29 BUBOJ ECT cs tuincasneuimecduchten et 5 31 Upload debug version firmware to MiiNePort cece cece cet ener nnn nnn nnn 5 31 Debutg culrrentacuve proj ct cie A E A E N a 5 31 Upload your customized firmware to MiiNePort ssssssesssunssnnnsnnsrsnsnrnrnrrssnrsunrrnnernnsrunrrnnrenerrunrrune 5 32 gp ow NGCEZ Technologl6Ss e sinssosuuxkaRERRERRRRKRERERERMRREERERRRNEERRRERRREREEERRR A S RRURN RES RRENERAEE ERU 6 1 SCM Serlal Comrnand MOGe cec TE E EVEETUEETPCE EEES TERETNI tulit 6 2 EXTrIgger External THOOer ucc ERERTRER ERE a III Sq cO I A A dc LI Led icai dedu 6 3 PAL st c 6 4 Introduction to SCM Serial Command Mode Command Set c serere nennen enean nnn nnn A 1 Command Reply FOUN Girt M REP aL utes DAMEN D UV S DIGG UU DU UU DU U DUDUU UD B A 2 Single nexomtnald FOMMI szsuanoaomanimongo and AA A 2 Single Liftie Reply ORI el aaa eal Eo oo ra ice hd ec Pent ova v Used eiui o inlita eee elem td leta alfa A 2 head and MalliFOrmMalisste S eEEtorsferobopPPunpbobbpnbpPensPsbbbuboDcbbbsribebhbensbersbersstUi eve E tut PE EEA A 2 OPERON E Ode eee ae ae ae ein uu iuc II DEM uc Re M cul EIE E MEI A 2 Stats COd Cs tania I eee o Gee A aad E OA A O OA E E EEE E A 2 RESEFICUOI Zei era ere eVe eA VE EEEE REEERE EERTE EAA A 2 Command Code rai a a
39. ger on your computer The application may be launched by selecting the installed icons Click Finish to exit Setup MV Launch NPort Windows Driver Manager Using NPort Windows Driver Manager After you install NPort Windows Driver Manager you can set up the MiiNePort E1 E2 SDK serial port which is connected to the device main board as remote COM ports for your PC host Make sure that the serial port on your MiiNePort E1 E2 SDK is already set to RealCOM mode when mapping COM ports with the NPort Windows Driver Manager 1 Goto Start gt NPort Windows Driver Manager gt NPort Windows Driver Manager to start the COM mapping utility 2 Click the Add icon 4 NPort Windows Driver Manager File COM Mapping Configuration View Help ri id F A g 5j Exit Add Er Py No COMPot Address 1 Address 2 3 Click Search to search for the MiiNePort E1 modules From the list that is generated select the server to which you will map COM ports and then click OK Add NPort Select From List Mapping IPv6 COM Port d Select All Clear All No Model MAC 1 Address 1 MAC 2 Address 2 1 MiiNePort E1 00 90 E8 00 00 08 192 168 127 254 Input Manually RealCOM Redundant COM Reverse RealCOM Jf OK X Cancel 4 Alternatively you can select Input Manually and then manually enter the MiiNePort E1 module s IP Address 1st Data Port 1st Command Port and Total Ports to which COM ports will be mapped Click OK to pro
40. ion requires at least 657 1 MB of disk space 6 Then creating the program s shortcuts When the Select Destination Location window appears click Next to continue You may change the destination directory by first clicking on Browse 5 3 MiiNePort E1 E2 SDK MiiNePort IDE Development Tool is Setup MiNePort SDE 1 0 Select Start Menu Folder Where should Setup place the program s shortcuts i F Setup will create the program s shortcuts in the Following Start Menu Folder To continue click Mexk IF you would like to select a different folder click Browse oval MilePort SDK 1 0 7 Click Next to start copying the software files 5 Setup MiiNePort SDE 1 0 Ready to Install Setup is now ready to begin installing IMii lePorE SDK 1 0 on your computer Click Install to continue with the installation or click Back if you want to review or change any settings Destination location CiMaxaiiMePark SDK Setup type Full installation Selected components Corss bool chain cygwin 1 7 3 1 and eCos v3 0 20080327 0855 Eclipse Eclipse CDT 3 6 and JRE 1 6 0 22 MiiMePork 5DK V1 0 package Start Menu Folder MoxalMiiePort SDE 1 0 Install Cancel 8 A progress bar will appear The procedure should take only a few seconds to complete 5 Setup MiiNePort SDK 1 0 EL Installing Please wait while Setup installs MiiMePorkE SDkK 1 0 on your computer Extracting Files Cr cygwi
41. lock 10 Digital Output LED 11 Digital Input Output Mode 12 Digital Input Switch 13 Circuit Pad USB Type B Connector Debug 2 4 MiiNePort E1 E2 SDK Getting Started Connecting to the Network To connect to the network for testing and development purposes install the module on the evaluation board and then plug the Ethernet cable into the RJ45 jack on the module If the cable is properly connected the LED on the module will indicate a valid connection to the Ethernet as follows MiiNePort E1 SDK 100BASE TX Link Activity constant on when link exists blinks when transmitting data e 10BASE T Link Activity constant on when link exists blinks when transmitting data In Use always on when connection is established i 3 Fault blinks when IP fault exists MiiNePort E2 SDK Left Amber 10BASE T Link Activity does not blink when not transmitting blinks when transmitting Right Green 100BASE TX Link Activity does not blink when not transmitting blinks when transmitting When using a private IP address factory default for the module make sure the netmask and IP settings are configured properly to access the module from a host on the network Connecting to a Serial Device To connect to a serial device for testing and development purposes the module should be installed on the evaluation board Make sure the serial interface is configured correctly before connecting the evaluation board to the se
42. main void int fd risp t len char butf 36 Fik Open file for write ey fd open uar tesat txt O CREAT O TRUNC O WBONLY Fik Write data to file zy aprintf but Hello POSIX WEite fd buf strlen buf 1 TE Symchronise changes to a file xd fsync id Fik Close file close id gt Open file for read y fd open uar test txt O RDONLY Read data from file ui d memset but 0 sizenotf but len read fd buf sizeof buf printf ERead ild bytes tain len buf Close file ud d close id return 0 Supported File Systems
43. n entry into etc inittab using the TTY name you defined in moxattyd cf as in the following example ts 2 respawn usr etc moxattyd moxattyd t 1 Device naming rule For UnixWare 7 UnixWare 2 1 x and SVR4 2 use pts n For all other UNIX operating systems use ttyp n The value of n should be equal or larger than 11 in order to prevent conflicts with the device names of functional keys in some UNIX systems Starting moxattyd Execute the command init q or reboot your UNIX operating system Adding an additional server Modify the text file moxattyd cf to add an additional server User may use vi or any text editor to modify the file For more configuration information refer to moxattyd cf which contains detailed descriptions of the various configuration parameters Find the process ID PID of the moxattyd ps ef grep moxattyd Update the configuration of moxattyd kill USR1 PID e g if moxattyd PID 404 kill USR1 404 This completes the process of adding an additional server 4 10 MiiNePort IDE The following topics are covered in this chapter 0 Installing MiiNePort IDE O Starting MiiNePort IDE O Create MiiNePort SDK Project D Ww RealCOM Mode Ethernet Modem Mode Sample Application Data Packing Serial Command Mode Web Console CLI SNMP agent TFTP Server NTP Client CPU Monitor izards Modify pr
44. n opt gnutoolsarmn elF iby gec libarm elF3 2 1 include stdbool h F Cancel 5 4 MiiNePort E1 E2 SDK MiiNePort IDE Development Tool 9 A message will indicate that MiiNePort IDE is successfully installed iis Setup MiiNePort SDE 1 0 Completing the MiNePort SDK 1 0 Setup Wizard Setup has Finished installing MiiNePort 5SDK 1 0 an your computer The application may be launched by selecting the installed icons Click Finish bo exit Setup 10 You may also open MiiNePort IDE through Start gt Programs gt MOXA gt MiiNePort SDK gt MiiNePort IDE as shown below Pe ee File Edit Source Navigate Search Project Window Help ri r E 6 amp amp Hehe Er Es Eee LE Project Explorer 23 Em El Console 2 4 Gv iv No consoles to display at this time Starting MiiNePort IDE MiiNePort IDE is an Eclipse based integrated software development tool and step by step source level debugger that is used to configure the MiiNePort SDK Before running MiiNePort IDE make sure that the MiiNePort SDK device are connected to your PC Please refer to Chapter 2 for more details You may open MiiNePort IDE from the Windows Start menu by clicking Start gt Programs gt MOXA gt MiiNePort SDK gt MiiNePort IDE The MiiNePort IDE window should appear as shown below di Moxa MiiNePort SDK B MiiNePort IDE L VERSION 5 5 MiiNePort E1 E2 SDK MiiNeP
45. n the Force transmit time Match bytes Setting ss Factory Default Recommended Setting 1 byte to 2 bytes 2 bytes only effective when Delimiter Optional is enabled 1 byte MiiNePort E1 packs the serial data and sends out TCP IP packets once it receives either one of Delimiter 1 and Delimiter 2 2 bytes MiiNePort E1 only packs the serial data and sends out TCP IP packets once it receives both of Delimiter 1 and Delimiter 2 And the receiving order should be first Delimiter 1 then Delimiter 2 Delimiter process Setting Factory Default Recommended Setting Do Nothing Do Nothing only effective when Optional Delimiter 1 Delimiter is enabled Delimiter 2 The Delimiter process field determines how the data is handled when a delimiter is received Delimiter 1 must be enabled for this field to have effect If Delimiters 1 and 2 are both enabled both characters must be received for the delimiter process to take place Do Nothing Data in the buffer will be transmitted when the delimiter is received Delimiter 1 Data in the buffer will be transmitted after 1 additional byte is received following the delimiter Delimiter 2 Data in the buffer will be transmitted after 2 additional bytes are received following the delimiter Force transmit Setting Factory Default Recommended Setting 0 to 65535 ms Optional 0 The force transmit timeout is disabled 1 to 65535 If the module does not receive the next byte of
46. nd then click Next to install program files to the directory displayed in the input box eG Setup NPort Search Utility Select Destination Location Where should NPort Search Utility be installed LJ Setup will install NPort Search Utility into the following folder To continue click Next If you would like to select a different folder click Browse C Program Files NPortS earch Browse At least 1 0 MB of free disk space is required E 4 Click Next to install the program s shortcuts in the appropriate Start Menu folder y Setup NPort Search Utility Select Start Menu Folder Where should Setup place the program s shortcuts Setup will create the program s shortcuts in the following Start Menu folder To continue click Next If you would like to select a different folder click Browse NPort Search Utility Browse lt Back Cancel 4 2 MiiNePort E1 E2 SDK Utility Console and Driver Installation 5 The installer will display a summary of the installation options Click Install to begin the installation The setup window will report the progress of the installation To change the installation settings click Back and navigate to the previous screen iB Setup NPort Search Utility Ready to Install Setup is now ready to begin installing NPort Search Utility on your computer Click Install to continue with the installation or click Back if you want to review
47. nds If the DHCP BOOTP Server is unavailable the module will use the default IP address 192 168 127 254 netmask and gateway settings IP Address Setting Factory Default Recommended Setting E g 192 168 1 1 192 168 127 254 Required IP addresses of the form x x x 0 and X X X 255 are invalid An IP address is a number assigned to a network device such as a computer as a permanent address on the network Computers use the IP address to identify and talk to each other over the network Choose a proper IP address that is unique and valid in your network environment 5 13 MiiNePort E1 E2 SDK MiiNePort IDE Development Tool Netmask Factory Default Recommended Setting E g 255 255 255 0 255 255 255 0 Required A subnet mask represents all the network hosts at one geographic location in one building or on the same local area network When a packet is sent out over the network the module will use the subnet mask to check whether the host specified in the packet is on a local network segment If the address is on the same network segment as the module a connection is established directly from the module therwise the connection is established through the default gateway Gateway Factory Default Recommended Setting E g 192 168 1 1 Optional A gateway acts as an entrance to another network Usually the computers that control traffic within the network or at the local Internet service provider are gateway no
48. ned CLI by using system CLI APIs and a function is provided to add the 5 16 MiiNePort E1 E2 SDK MiiNePort IDE Development Tool user defined CLI to the command list The project sample code provides a set of default CLI commands is for user to reference when developing new CLI or for modification to suit for the user application Default settings Telnet port 165535 Telnet port Factory Default Recommended Setting SNMP agent SNMP Simple Network Management Protocol is an Internet standard for managing devices on IP networks The SNMP consists of two kinds of devices the managed device which known as SNMP agent and the SNMP manager which controls the SNMP agent MiiNePort will be the SNMP agent which supports the SNMP V1 Version 1 and V2 Version 2 stent settmes SNMP Veron VI V2 Read community Ve community SNMP object data Description COS yy Contact E Name Pid Lotion E PELVIC o j 22 Po OID SNMP version Factory Default Recommended Setting V1 V2 Required V1 V2 Read community Factory Default Recommended Setting O to 40 characters public Optional A read community name is a plain text password mechanism that is used to authenticate queries to agents of managed network devices Write community Factory Default Recommended Setting 0 to 40 characters private Optional A write community name is a plain text password mechanism that is used to authenticate queries to agents of managed netwo
49. nt on the data circuit the line is considered to be sending a Break The Break signal must be of duration longer than the time it takes to send a complete byte plus Start Stop and Parity bits The Next page is network settings you can assign IP configuration in this page 5 12 MiiNePort E1 E2 SDK MiiNePort IDE Development Tool lt MiiNePort SDK Project Wee A pem Network Settings Configure the network default settings Device name MiiNePort SDK IP configuration Static IP address 192 168 127 254 Netmask 255 255 255 0 Gateway DNS server 1 DNS server 2 lt Back Next gt Cancel Device name Setting ss Factory Default Recommended Setting 1 to 40 characters model name Serial No Optional This option can be used to specify the location or application of the module which may be useful when managing more than one module on the network IP configuration Methodd Function Definition User defined IP address Netmask Gateway DHCP DHCP Server assigned IP address Netmask Gateway DNS BOOTP BOOTP Server assigned IP address IP configuration is a required field The default setting is Static ATTENTION In Dynamic IP environments the module will attempt to obtain an IP address from the DHCP or BOOTP server 3 times at 30 second intervals The timeout for the first try will be 1 second the second try will be 3 seconds and the last try will be 5 seco
50. nterface place the 6 pin jumper on JP19 MiiNePort E2 SDK To use an RS 232 serial interface place the 6 pin jumper on JP13 RS 485 MiiNePort E1 SDK To use an RS 485 serial interface place the 2 pin jumper on the middle two pins of JP15 or the right most two pins of JP16 labeled as 485EN and place the 6 pin jumper on JP20 MiiNePort E2 SDK Place the 6 pin jumper on JP14 2 2 MiiNePort E1 E2 SDK Getting Started Connecting Power For MiiNePort E1 SDK Evaluation Board Layout Connect the 12 48 VDC power line with the power jack of the evaluation board If the power is properly supplied the power LED D15 as shown in the following figure on the evaluation board will show a solid red color until the system is ready at which time the ready LED on the module will show a solid green color Digtal Input Ke ON Low OFF High d Q e Dig 2l Output bil ol 213 214 Pil 9 9 Low 4 Q 000 T RD py RIS CTS ooo Q D rig lv s m Bon sew For MiiNePort E2 SDK Evaluation Board Layout Connect the 12 48 VDC power line with the evaluation board s power jack If the power is properly supplied the power LED on the evaluation board D14 will show a solid green color until the system is ready When the system is ready the ready LED on the module will show a solid green color a D ow E T gnam y mig sn Bt wg s mp LE cer kii irf mii 14 mis Aii E ESS Sop Bou yep TM Connecting MiiNePort USB t
51. o PC First connect the MiiNePort USB port to the PC Please use the USB cable to connect the USB port on Evaluation Board to the PC The figures below indicate the location of the USB port on the evaluation board E1 Evaluation Board KEREI a II XT aa Xr t DX un HE JE JE uoo poo Doo ga s E B E i 2 3 MiiNePort E1 E2 SDK Getting Started Number Description za NEN EE GN 10 11 12 13 Digital 10 Terminal Block 7 Serial Port Status LED Power LED Power Jack Restart Button Circuit Pad E2 Evaluation Board ES oo 9 1 H L i Xy 7 rfi I LJ a e fe TE min Ok Sm be o ony mie ogg e o Rm 1 o E o B Uoooooooo0O00O0 o i DOOOOOOO000 Ap opem 2 o DOO00000000 o T D ap 00000000000 2 ap DooooQOoooQo0Q 13 HH c Doooooooooo EEpoooooog Doooooooooo ss9999999 00999099999 BIN 90 oog s Tjo CH E o ojo E h am lo ojo ie Sake ISS oojo 00 a IO Olle 0 O Of a 5 FH DOO 09009 OF E BEI 12 Az a ET BOBI 11 e omer S o ooi ooo sa ed asd O Jol O O X XE OX XX X S cm cttm 5 emo QOO RRR y 9e E o 10 ea aooo pup joo Good oo d oo O o PA TA oo Description 1 MiNePort E2 Module Location 2 Ethernet R145 Connector 3 Serial Interface Jumper 4 JPowerSwith 5 JPowerJack 6 jPower amp ReadyLED 7 JjpB9 Male Connector 8 Serial Port Status LED 9 Digital 10 Terminal B
52. ode please don tassign leaf node name in MIB file NOTE Node name is the root name you would like to generate 5 28 MiiNePort E1 E2 SDK MiiNePort IDE Development Tool The private MIB will be showed on the MIB list Then click Finish Private MIB Setting Wizard page for private MIB settings SNMP Private MIB List Node Name MIB file Lada sample Japps services snmp mibs Remove The MiiNePort IDE will generate some get and set functions for this MIB file under snmp folder Besides it will also generate the file regarding your MIB file Then you can implement the SNMP behavior you expect in these functions tS Project Explorer 53 gis s fr S tS Helloworld Function automatically generated by SNMP Studio for SET operation d 6 apps Please do the SET operation of writable variable amp application i var sub id of variable in the MIB tree services LES n var val Variable value set by the MIB client z dii param in var len Variable length amp cpuload retval 0 Set OK snmp retval 1 Set fail gt mibs getset overview api c getset sample api c miboverview c mibsample c Le Makefile switch var MiiNePort SDK Sample snmp agent c snmp mib c snmp trap c default amp Makefile break E sntpc amp tftps return 1 web miine_apps c amp Makefile User App Wizard H 3 x 2 amp
53. oject dependency CLI Wizard Configuration Wizard SCM Wizard SNMP Wizard User App Wizard Build project Upload debug version firmware to MiiNePort Debug current active project Upload release version firmware to MiiNePort gt Development Tool MiiNePort E1 E2 SDK MiiNePort IDE Development Tool Installing MiiNePort IDE Eclipse is an open source community whose projects are focused on building an open development platform comprised of extensible frameworks tools and runtimes for building deploying and managing software across the lifecycle MOXA provide Eclipse based integrated software development tool and step by step source level debugger which is called MiiNePort IDE The following instructions explain how to install eclipse 1 Insert the Document and Software CD into the CD ROM drive Locate and run the following setup program to begin the installation process MiiNePort SDK Setup Version build DateTime exe 2 You will be greeted by the Welcome window Click Next to continue ie Setup MiiNePort SDE 1 0 Welcome to the MiNePort SDK 1 0 Setup Wizard This will install MiiNePort SDK veri on your computer It is recommended that you close all other applications before continuing Click Next to continue or Cancel to exit Setup ie Setup MiiNePort SDE 1 0 License Agreement Please read the Following important information before continuing Please read the Following License Agreement You must ac
54. on Number Ca O2 FE 5 WEN o5 6 a 8 o9 10 NE MN 12 Restart Button 7 10 11 12 3 13 Circuit Pad ATTENTION Users must set jumpers JP15 JP16 and JP17 to correspond with the functions of pins 6 7 and 8 respectively to ensure that the evaluation board works properly ATTENTION When you are in RS 485 mode 485EN must be configured by either JP15 or JP16 and the 6 pin jumper must be moved from JP19 to JP20 1 4 MiiNePort E1 E2 SDK ATTENTION Before you manipulate the jumpers be sure to disconnect the power first MiiNePort E2 SDK Evaluation Board Panel Layout o HE m O o c e el gt OOOO 00 oo WoK o t 1 9 T ol amp GEES 1 o S rk e B DOOOOOOOOOO p or v i DOOOOOOOO0O00 eRe J ES ne 4 DoooooO0O0000 ep Doooooooooo e m D DooooQoooog 13 Hj Doooooooooo EEpoooooog ie Doooooooooo Em 0169990292929 Olm Oxbcgenegedes edere PIC DOOOOOOOO0O00 OOoOOLL Goo j I 3 OO o ojo 110 OFF CIJ 90 M o ojo oo bed leo dooob oob 1 5 XHHB BH Ee ooo foooo 12 p ijB ggeesl BHB gm L 00 ooo 11 2 a C23 looollooo m EXYXZT930 oppg 5 il mum 9095 9999 96 909 I d d m m FELELT e 2580 10 C DOGO H EA ML OCG x O70 d oe e Pa T aad e Description mE 0000003 6 Power Ready ED s serial Port Status LED lt 10 Digital Output LED Digital Input Output Mode 12 Digital Input Swit
55. or change any settings Destination location C Program Files NPortSearch Start Menu folder NPort Search Utility Completing the NPort Search Utility Setup Wizard Setup has finished installing NPort Search Utility on your computer The application may be launched by selecting the installed icons Click Finish to exit Setup NPort Search Utility Configuration The Broadcast Search function is used to locate all MiiNePort E1 E2 SDK modules that are connected to the same LAN as your computer After locating a MiiNePort E1 E2 SDK you will be able to change its IP address Since the Broadcast Search function searches by MAC address and not IP address all MiiNePort E1 E2 SDK modules connected to the LAN will be located regardless of whether or not they are part of the same subnet as the host 1 Start the NPort Search Utility and then click the Search icon T NPort Search Utility Elle Function View Help Exit Search Search IP Locate Console No Model LAN1MACAddrss LAN IP Address LAN2 MAC Address LAN2 IP Address Staus 2 The Searching window indicates the progress of the search 4 3 MiiNePort E1 E2 SDK Utility Console and Driver Installation Searching Searching for NPort JS Stop Found 1 NPort s 5 second s left LAN1 MAC Address LAN1 IP Address LAN MAC Address LAN2 IP Address 1 MilNePort E1 00 30 E8 00 00 08 192 168 127 254 3 When the search is com
56. ors and these changes are incorporated into new editions of the publication Technical Support Contact Information Moxa Americas Toll free 1 888 669 2872 Tel 1 714 528 6777 Fax 1 714 528 6778 Moxa Europe Tel 49 89 3 70 03 99 0 Fax 49 89 3 70 03 99 99 www moxa com su ort Moxa China Shanghai office Toll free 800 820 5036 Tel 86 21 5258 9955 Fax 86 10 6872 3958 Moxa Asia Pacific Tel 886 2 8919 1230 Fax 886 2 8919 1231 Table of Contents Di TRUROGUCTION Noo E 1 1 OS ON seston eat aetna et vent E 1 2 PACE E eE dici EEUU LT T nn OTIS ER Aen TEST PISO a 1 2 Product CUS assesses G edt ON ORN GN 1 2 Product SPECIE CATIONS ten ceca aom ee E EE EE bec EA ar EAO He AE TUN T TOR TA IUD EMO TUR 1 3 Panel Ei fot 1 4 MiiNePort E1 SDK Evaluation Board Panel Layout sussssnanssnnnansnnnnenanrnnnnnnsnnnnenanrnnannnsnnnnenannnnnnnnn 1 4 MiiNePort E2 SDK Evaluation Board Panel Layout ccccccc cece teen ene eee enn eee hse nnns 1 5 3 ore lt a BJs S gs Ra RR Ee T LS LI 1 6 For MilNePort EI SDK MOC UNC uc iconce inne tr xx yr och oe exon xh aie xe deu vv exer ax eeu erac uw us pb efe sati ed det DD ADR Ete E 1 6 FOP MilNNePOLE E2 SDK MOGUUIG vico op e oq Gc Gm aac dnce nagnaacnww dabbbcb tobienic bots bitoDet 1 7 EED ST FUCA OS EE er epi 1 7 2 Co uiigregcic igs leferec T 2 1 WIRING PTE CAUNONS rieri UU BA A AA tats lias 2 2 Selecting the Serial INTEC sestttltes hielten pe ein
57. ort IDE Development Tool Create MiiNePort SDK Project Prior to firmware development the MiiNEPort SDK device must be connected to the unit For developing customized firmware MOXA provides a powerful tool called EZStack You can compose the desired functions step by step The following section will show you how to build a customized firmware First create a new project by clicking File gt New MiiNePort SDK Project C C C Eclipse a i ERENNNENENEN Edit Source Navigate Search Project Window Help New Alt Shift N gt f MiiNePort SDK Project Open File L3 Project The project wizard will then begin as shown in the figure below Just fill your desired value into each field and click Next to continue The description of each parameter is shown in the table below l MiiNePort SDK Project Create your MiiNePort SDK project Project name HelloWorld 7 Use default location Location C Users ryan_ma Documents workspace e Platform MiiNePort E1 Kernel version vo Platform settings DIO settings DIO number Pin function Mode State DIO 0 Pin 6 RTS gt Output DIO 1 Pin 7 Reset to Default v Input DIO 2 Pin 8 CTS gt Input ExTrigger Restart 5 Enable Disable Bacl Next Cancel The project name The location path of project Platform The development platform 1 MiiNePort E1 2 MiiNePort E2 Kernel Version S
58. pecified length Delimiter 1 Factory Default Recommended Setting 00 to FF Optional Delimiter 2 Factory Default Recommended Setting 00 to FF Optional 5 10 MiiNePort E1 E2 SDK MiiNePort IDE Development Tool The Delimiter fields are used to specify a character or 2 character sequence which will act as a marker to control packing of serial data By default no delimiter characters are defined so the module transmits data as soon as it is received When a delimiter character or characters are defined the module will hold data in its buffer until it receives the delimiter character or 2 character sequence When the delimiter is received the module will pack up the data in its buffer and send it through the Ethernet port Use Delimiter 1 to define the first delimiter character in hex If only one delimiter character will be used Delimiter 2 should be set to 0 If the delimiter will be a two character sequence use Delimiter 2 to define the second character To disable the use of delimiters set both Delimiter 1 and Delimiter 2 to O Note that data packing is not only controlled by the delimiter it is also influenced by the module s buffer size and the Force transmit field If the delimiter has not been received by the time the 1K buffer is full the module will pack the data for network transmission and clear the buffer Also if the module will also pack data for network transmission if the next byte of data is not received withi
59. plete all MiiNePort E1 E2 SDK modules that were located will be displayed in the NPort Search Utility window T8 NPort Search Utility File Function View Help it 2 i Exit Search Search IP Locate Console No Model LANT MAC Address LAN1 IP Address LAN2 MAC Address LAN2 IP Address 1 MiNePort E1 00 90 E8 00 00 08 192 168 127 254 4 To modify the configuration of the highlighted MiiNePort E1 E2 SDK click the Console icon to open the web console This will take you to the web console where you can make configuration changes 5 To upload your custom software click the Upgrade icon to upload your firmware ATTENTION The information below is only for RealCOM mode NPort Windows Driver Manager Installing NPort Windows Driver Manager NPort Windows Driver Manager is intended for use with serial ports that are set to RealCOM mode The software manages the installation of drivers that allow you to map unused COM ports on your PC to your device presented by MiiNePort E1 E2 SDK s serial port These drivers are designed for use with Windows 98 ME NT and Windows 7 When the drivers are installed and configured devices that are embedded with the MiiNePort E1 E2 SDK will be treated as if they are attached to your PC s COM ports 1 Click the INSTALL COM Driver button in the MiiNePort E1 E2 SDK Installation CD auto run window to install the NPort Windows Driver Once the installation program starts running click Yes to proceed
60. pload e Supports RealCOM mode operation functions 1 2 MiiNePort E1 E2 SDK Introduction Product Specifications Supported Hardware MiiNePort E1 E2 MiiNePort E1 E2 H MiiNePort E1 E2 T MiiNePort E1 E2 H T Software OS eCos Software Development Tool MiiNePort IDE Windows RealCOM Drivers Windows 98 ME NT 2000 Windows XP 2003 Vista 2008 7 8 8 1 x86 x64 Embedded CE 5 0 6 0 XP Embedded Fixed TTY Drivers SCO Unix SCO OpenServer UnixWare 7 SVR 4 2 QNX 4 25 QNX 6 Solaris 10 FreeBSD AIX 5 x Linux Real TTY Drivers Linux kernel 2 4 x 2 6 x 3 0 x Operation Modes RealCOM Ethernet Modem Wizard Project SNMP CLI Telnet SCM User Configuration Serial Ethernet Test Tool PComm Lite Serial TCP Server TCP Client Search Upload Firmware Utility NPort Search Utility Serial to Ethernet Sample Source Code Integrated in MiiNePort IDE 1 TCP Server Echo 2 TCP Server to Serial Single connection 3 TCP Server to Serial Multi connection 4 TCP Client Echo 5 TCP Client to Serial Startup 6 TCP Client to Serial Any character 7 TCP Client to Serial Designed destination TCP IP port from serial 8 UDP echo 9 UDP to serial Documents API Function Helper User s Manual Getting Started Schematic Design Guide Quick Installation Guide 1 3 MiiNePort E1 E2 SDK Introduction Panel Layout MiiNePort E1 SDK Evaluation Board Panel Layout 1 13 ooooooopooo ooooooopooo zz 11 10 Descripti
61. plorer 3 ELI a ict HelloWorld gt Rll Includes gt amp apps gt amp include gt amp romfts gt 22 userapps gt ic config init c gt e mainc e sys default c 6 sys reset c COPYING GPLTXT L Makefile Ej Makefile defs B Makefile tools Wizards Moxa provides wizards to help you modify source codes Then MiiNePort IDE can create the functions automatically Below is the list of wizards You can find it on the tool bar 5 19 MiiNePort E1 E2 SDK MiiNePort IDE Development Tool a B amp S amp 9 From the left to right they are e CLI Wizard Help to add CLI commands e Configuration Wizard Help to make configuration variables e SCM Wizard Help to add SCM command e SNMP MIB Wizard Action Help to add SNMP MIB e User App Wizard Help to create user application subroutine e Project Wizard Help to change function and property of project e MiiNePort SDK debug Debug MiiNePort project e Build Release build and debug build download firmware Modify project dependency Au Gm bi 3 ai tor 4 The function is used to modify the settings of MiiNePort project The section Create MiiNePort SDK Project includes the description of all settings Please refer the before section The following section will introduce more details about each wizard CLI Wizard TE Command Line Interface Wizard iii Len lt S Command Line interface Wizard page for command line inte
62. r Selection Select an application to represent your target device Baudrate 115200 Y Data bits 8 Stop bits 1 Y Parity None Flow control RTS CTS FIFO Enable v lt Back Next gt Cancel 5 14 MiiNePort E1 E2 SDK MiiNePort IDE Development Tool Baudrate Factory Default Recommended Setting 50 bps to 921 6 Kbps 115200 Required IP configuration is a required field The default setting is Static ATTENTION Baudrate 460800 and 921600 are for High speed model only If you don t want to use High speed mode please remove jumper first Data Bits Factory Default Recommended Setting Required 9 5 7 9 Stop Bits Factory Default Recommended Setting 1 1 5 2 Required Stop Bits will be set to 1 5 when Data Bits is set to 5 bits Parity Setting Factory Default Recommended Setting None Even Odd None Required Space Mark Flow control Setting ssi Factory Default Recommended Setting None RTS CTS RTS CTS Required DTR DSR XON XOFF FIFO Setting Factory Default Recommended Setting Enable Disable Each module s serial port provides a 16 byte FIFO both in the Tx and Rx directions Disable the FIFO setting when your serial device does not have a FIFO to prevent data loss during communication MOXA provide a lot of applications for customer as long as you check the check box the desired application will
63. r is 10 bits 1200 bits s x 1000 ms s 8 3 ms Since it requires about 9 ms to send one character the Force transmit should be 10 ms or more to have any effect At 9 ms or less the module will simply pack every character as it is received which would be the same as if no delimiter characters or Force transmit time were specified at all Serial Command Mode SCM Serial Command Mode uses serial communication between the MiiNePort E1 and your device s main system to configure the MiiNePort E1 usually during device operation For more details about SCM commands refer to Chapter 7 NetEZ Technologies veral command mode Enable SC M mode Fort number Lat character Hex and character Hex 3rd character Hex HW DIO DIO tigger mode Boot up teneant 3000 ms Port number Setting ss Factory Default Recommended Setting SCM trigger mode Setting Factory Default Recommended Setting HW trigger SW trigger Optional SW trigger Bootup SW trigger Break trigger HW trigger Entering the SCM mode by HW DIO and DIO trigger mode SW trigger Entering the SCM mode by the continuous three characters The default value is 0x58 0x58 0x58 Bootup SW trigger Entering the SCM mode by the continuous three characters during the timeout period The default value is 0x58 0x58 0x58 Break trigger Break signals are caused by sending continuous Spacing values no Start or Stop bits When there is no electricity prese
64. r process Do nothing z Force transmit 0 0 65535ms Serial command mode V Enable SCM mode Port number PORT1 SCM trigger mode SW Trigger 1st character 58 Hex 2nd character 58 Hex 3rd character 58 Hex HW DIO DIOO DIO trigger mode HW LOW Boot up timeout 3000 ms RealCOM Mode serial to Ethernet application Real CM Mode v 5 7 MiiNePort E1 E2 SDK MiiNePort IDE Development Tool ATTENTION To use RealCOM mode refer to Chapter 6 Utility Console and Driver Installation to install the RealCOM driver on Windows or Linux Port sette TCP alive check time 0 99 min Max connection l hl Ignore jamumed IP O Enable 9 Disable Allow driver control O Enable Disable TCP alive check time Setting Factory Default Recommended Setting 0 to 99 min Optional O min The TCP connection is not closed due to an idle TCP connection 1 to 99 min The module automatically closes the TCP connection if there is no TCP activity for the given time After the connection is closed the module starts listening for another host s TCP connection Max connection Setting Factory Default Recommended Setting 1 2 3 4 Max connection is used when the device needs to receive data from different hosts simultaneously The factory default only allows 1 connection at a time When Max Connection is set to 1 the RealCOM driver on the specific host has full control
65. r to the Pin Assignment section in Chapter 1 for the module s configurable DIO pin descriptions Refer to the Evaluation Board Layout section in Chapter 1 to select corresponding settings on the evaluation board All 4 DIO channels can be configured by software A DI channel is a channel that operates in digital input mode a DO channel is a channel that operates in digital output mode You can use the evaluation board s Digital Output LEDs and Digital Input DIP switches as the digital input and output devices or you can connect digital input output devices to the DIO Terminal Block For channels in digital output mode the Low versus High setting is controlled from the web console When using a Digital Output LED as your output device the LED will be on to indicate that the status is Low and the LED will be off to indicate that the status is High ATTENTION When using a digital input device connected to the DIO Terminal Block the corresponding Digital Input DIP switch must be set to OFF or High Setting the DIP switch to ON or Low will interfere with the signal from your digital input device Schematic Design Guide For guidance and suggestions on integrating your device s hardware with the MiiNePort refer to the MiiNePort Schematic Design Guide in the Document and Software CD 2 6 3 Choosing the Proper Operation Mode In this chapter we will describe the operation modes supported by MiiNePort E1 E2 SDK modules Mod
66. racters or c sending break signal to MijNePort D Original connection will be stopped In the meantime D Serial communication between Device main system and the MilNePort enters into Serial Command Mode Serial Device with MiiNePort 6 2 MiiNePort E1 E2 SDK NetEZ Technologies TCP IP Ethernet a Device main system Gets Sets and Retrieves configuration on MiiNePort Fu Configuration task completes Device main system places Save amp Restart command Command Code SR B After the MiiNePort restart the serial communication between Device main system and MiiNePort resumes data transmission mode Device may start the regular TCP connections with Host am um HE ED en ne o ee ee ee GNO CON ORAE GA CANO GAS GAS UNS GEO D GAS GN as Ge d Gm Ges AD UAR GAB GAS RS GB UR GE GE de SSS dA GE GB d EE GE Ge Ge Ge Ge ue eel Serial Device with MiiNePort Refer to Appendix A Introduction to SCM Serial Command Mode Command Set for detailed instructions on using SCM commands EXTrigger External Trigger This function is for MiiNePort E1 SDK only The MiiNePort E1 SDK s EXTrigger has 2 functions 1 Resetting the module to Moxa s default configuration and 2 Restarting the module EXTrigger is designed to provide you with an easy network troubleshooting tool that can be used without stopping the device s normal operation The Reset to Default function is enabled by default and cannot be disa
67. re is no TCP activity for the given time After the connection is closed the module starts listening for another host s TCP connection TCP Port Factory Default Recommended Setting 1 to 65535 4001 Required Use this field to indicate the TCP port that the module will use to listen to connections and that other devices must use to contact the module To avoid conflicts with well known TCP ports the default is set to 4001 Sample Application Serial to Ethernet application sample application TCP Client Any Character vi Application description TCF Chent Any Character Acts as TCP client Connects to Host PC when serial port receives any character and performs data transmission between the serial and ethernet Setting Factory Default Recommended Setting TCP Client Any Character TCP Client Any Character Optional TCP Client Ask Destination 5 9 MiiNePort E1 E2 SDK MiiNePort IDE Development Tool TCP Client Echo TCP Client Startup TCP Server Echo TCP Server Multiple Connections TCP Server Single Connection UDP Echo UDP Mode TCP Client Any Character Acts as a TCP client Connects to Host PC when serial port receives a character and performs serial to Ethernet data transmissions TCP Client Ask Destination Acts as a TCP client Connects to Host PC after destination IP is got via serial port and then performs data transmission between the serial and ethernet TCP Client Echo Acts as a TCP client
68. rface Command Line Hierarchy Tree 4 miine Information status net system tools AddNode Remove This wizard is used to add CLI command The command line interface is a tree structure and each leaf is a command You can do some configuration or monitor work of the device by these commands you define Select the location you want to add command 5 20 MiiNePort E1 E2 SDK 4 miine 4 status serialno devname fwver mac uptime cpuload p net gt system tools First click Add Node to add a node Command Line interface Wizard page for command line interface Command Line Hierarchy Tree 4 miine Information 4 status Node Name status seriaino Node Brief devname f System status information mac Modify uptime cpuload p net gt system tools Node Name Node Brief example Then click Add Command to add a new command 5 21 MiiNePort IDE Development Tool MiiNePort E1 E2 SDK MiiNePort IDE Development Tool Command Line jm S Command Line interface Wizard page for command line interface Command Line Hierarchy Tree amine Information 4 status Node Name moxa i serialno Node Brief devname i example fwver P uptime cpuload moxa net system tools k Then window will show up and you have to enter Command Name Function and Node Brief After you fill
69. rial device Refer to Selecting the Serial Interface section above when you are using jumper blocks to select the serial interface on the evaluation board The module s serial signals are routed to and from the RS 232 or RS 485 COM port on the evaluation board Use a serial data cable to connect the serial device to the COM port on the evaluation board Digital I O Channel Settings For MiiNePort E1 SDK Evaluation Board Layout Each module has 3 digital I O DIO channels Refer to the Pin Assignments section above for the module s configurable DIO pin description Refer to Configurable Pin Jumpers to select the corresponding setting on the evaluation board All 3 DIO channels may be configured by software A DI channel is a channel that is operating in digital input mode a DO channel is a channel that is operating in digital output mode You may use the evaluation board s Digital Output LEDs and Digital Input DIP switches as the digital input and output devices or you may connect digital input output devices to the DIO Terminal Block For channels in digital output mode Low and High status is controlled from within the web console When using a Digital Output LED as your output device Low status will be expressed by the LED lighting up and High status will be expressed by the LED turning off 2 5 MiiNePort E1 E2 SDK Getting Started For MiiNePort E2 SDK Evaluation Board Layout Each module has 4 digital I O DIO channels Refe
70. rk devices Description Factory Default Recommended Setting O to 40 characters None Optional 5 17 MiiNePort E1 E2 SDK MiiNePort IDE Development Tool Contact Factory Default Recommended Setting O to 40 characters None Optional The SNMP contact information usually includes an emergency contact name and telephone or pager number Name Factory Default Recommended Setting O to 40 characters None Optional Location Factory Default Recommended Setting 0 to 40 characters None Optional Enter a location string for SNMP agents This string is usually set to the street address where the module is physically located Service Setting Factory Default Recommended Setting gt 0 o0 10 OPtiona OID Factory Default Recommended Setting 0 to 256 characters Optional ATTENTION For MIB wizard it works after you create project Please refer to the Wizards section for more details TFTP Server Trivial File Transfer Protocol TFTP is a file transfer protocol known for its simplicity It is generally used for automated transfer of configuration or boot files between machines in a local environment NTP Client NTP Network Time Protocol is a protocol for synchronizing the clocks of computer systems over packet switched variable latency data networks It is designed particularly to resist the effects of variable latency by using a jitter buffer NTP uses the User Datagram Protocol UDP on port number 123 Pl
71. rs MiiNePort s firmware version Version parts are separated by a single dot with at least two parts major minor and at most three parts major minor rev System requests MiiNePort s firmware version IR V01 0 MiiNePort reports firmware version is 1 0 Firmware Build Number Command code B Command parameters N A Reply parameters MiiNePort s firmware build number eight digits System requests MiiNePort s firmware build number IRG3BOO9021208 MiiNePort reports build number is 09021208 MAC address Command code OM Command parameters N A Reply parameters MiiNePort s MAC address System requests MiiNePort s firmware build number IRGMOOO0 90 E8 71 00 10 MiiNePort reports MAC address is 00 90 E8 71 00 10 Command Codes for Viewing the Status Control Command Codes PING Command code NP Command parameters Target host name or IP address Reply parameters A single minus symbol indicates the target host did not reply in 1000 milliseconds Otherwise one decimal number indicating the reply latency in milliseconds is returned CNPwww moxa come System requests to PING www moxa com A 7 MiiNePort E1 E2 SDK Introduction to SCM Serial Command Mode Command Set ICNPO10 Target host replies in 10 milliseconds CNP192 168 1 1 System requests to PING 192 168 1 1 ICNPO Target host did not reply in 1000 milliseconds Load Factory Default Command code LD Note that this command is not
72. rtElebibrbLbrtbRekcfetbReniferzfetibetifersbetit v av br kr Dv cbe rut 4 6 GNU Real MA DEIVeES s ccc eee ER EERU E EE EN E CUEET EE E E EE EEEEEU REEL ER E EEUU P ut c du au HO GU RUCEKEEKEUELETTARUCKRUPTCUPEEPEETE 4 8 Installing Linux Real TTY Driver Egidius docu dtes dios dao oec dier Rc deaPec a uO pM Ia CH UMPR OpFPIPCPUSIPrEREPPHE PETERE 4 8 Mapping iV PONS uates atu united n ded ieanea ie une ie uned ie une une tee cede une de ute deuten eret rent RA DD PAM SAP TAPIDARIPRII IP S ANNAA 4 8 RemovilidgMabDDed TIY PODES cue dottor oO hut tae uu m hm a nde lcu Fe ee AN I a 4 9 Removing LINUX DriVer FE aserite pirre er Pier ARE ER PRA E EN ARER e Cn rw ia Qu Qr e vga Po ve vw C hv 4 9 UND Fed T TY DEVeLS cxnxcocvcUftqvecoe cur con vm eene et eve ver cam cuc e enc ot cene o Otra ad qe dta sd Lus a MAUS d 4 9 Installing the UNDC DFIVOl ccn ood codo eodd oa ador ees kd aetna densanasnaadauaniadddudadadas 4 9 ConfiguriBg the HUND ID TAS usui iadvtstu bu Futter Eta a Atte oO sue abaco c utei nct nnd 4 10 5 MiiNe Port IDE Development TOOL dc iussa du suuuunaxx s sxsuuunccszsunssccrssxuauRSaEERARRRR ERR RRRRRERRRURERRARRRRE REN RREME DRE 5 1 Insraung dNeROFE IDE orbe ranean an Sant anGT enone ancr ener ener mcr Grrr on cerca en out or ee oe tus 5 2 Starting MIINePOFLUEIDE ior mitte eph RERU EE ek eee taht le ta eae cO CLIP I atid edad USD dd edad aad deu 5 5 Create MIINePOFt SDIE Project uecoxcecocccoccxnccnncicone ceca eec en CERE CER CCS EXER OC
73. s as 192 168 1 2 IP configuration Command code NC Command parameters MiiNePort s IP configuration index as shown in the following table Reply parameters N A o Static SNCO System sets IP configuration as Static ISNCO MiiNePort reports command executed successfully IP address Command code NI Command parameters MiiNePort s IP address Reply parameters N A SNI192 168 1 2 System sets IP address as 192 168 1 2 ISNIQ MiiNePort reports command executed successfully MiiNePort E1 E2 SDK Introduction to SCM Serial Command Mode Command Set Netmask Command code NM Command parameters MiiNePort s Netmask address Reply parameters N A 5NM255 255 255 0 System sets Netmask as 255 255 255 0 ISNMO MiiNePort reports command executed successfully Gateway Command code NG Command parameters MiiNePort s Gateway address Reply parameters N A 5NG192 168 1 254 System sets Gateway as 192 168 1 254 ISNGO MiiNePort reports command executed successfully DNS Command code ND Command parameters The index 1 2 and DNS server address separated by a semicolon Reply parameters N A SND1 192 168 1 123 System sets DNS1 as 192 168 1 123 ISNDO MiiNePort reports command executed successfully Command Codes for Retrieving Running Configuration Device Name Command code BN Command parameters N A Reply parameters MiiNePort s name RBN
74. server has been located by NPort search utility s location function 2 Auto Config complete Green Blinking every Indicates a LAN IP conflict or DHCP or BOOTP server did not 0 5 sec respond properly ITXD LEDD3 Red Indicates that TxD has a signal Indicates that TxD has a sone RxD LEDD4 Red Indiatesthat RxD has a signal DTR LEDD5 Red IndicatesthatDTRhasasignal o CIS LEDD6 Red indicates that CTS has a signa DSR LEDD7 Red Indiatesthat DSR has a signal DCD LEDD8 res indicates that DCD has a signa RTS LEDD9 res indicates that RTS has a signa DOO LED D10 Red J Indicates that DOO is in low 0 status IDO1 LEDD11 Red J Indicates that DO1 is in low 0 status DO2 LEDD12 Red Indicates that DO2 is in low 0 status DO3 LED D13 Red Indicates that DO3 is in low 0 status 1 8 2 Getting Started This chapter includes information about how to install MiiNePort E1 E2 SDK modules for development and testing The following topics are covered in this chapter o 0 o 0 0 0 0 0 Wiring Precautions Selecting the Serial Interface Connecting Power Connecting MiiNePort USB to PC Connecting to the Network Connecting to a Serial Device Digital I O Channel Settings Schematic Design Guide MiiNePort E1 E2 SDK Getting Started Wiring Precautions A A This section describes some important safety pre
75. t e Dn bte t vcn ne t aw raw eaa v Ua Vw Cu Ma ol wv AE o 2 2 Cohrnectihdg POW CP cessveresecctveetemqaamrerdver deoa d retainer cn rs tracts tide eee EE TEE mane FEED Ida TA UNT EENT EEEN 2 3 Connecting MiNePOrt USB TO BG aceenkiaocmcueeocimcocinuacieimexeimcciecadimacimccemicwmcancnadicatdd d sean dtd dade medetur 2 3 Connecting tothe NGEWOEK qeu TTTHETLLEE URRm 2 5 CONMECEIMNG LO a Sela OVIE aiia a Cm 2 5 Digital VO Channe peel lt 1 8 a c gee ee tee eee tee eee ee eee eee ee ee IU IUS eee ere 2 5 Schematuc Deslidlki Gilde aea RURAL enn nn ne A Uo o EE LL PEE poU LEES CU DE LUE UNE EEUU 2 6 3 Choosing the Proper Operation MOC ioca ux uEiRuEVREERRERERAC ERE a RE EMEN TURN ATERA REV 3 1 OVGIVICW me M 3 2 RECOM TOQ imt md ront UE 3 2 ERCE EROGO MMO IO mr T TE E 3 3 4 Utility Console and Driver Installation eeeeeeieeeeeeee annue nuu uahnnnnuuuuum nuu uuuuRr ru uuu uuu ua 4 1 NPO Search UEY rmm 4 2 Installing NBPOLESSegdkcliAdE uuu cou trus crores ET EA E E N 4 2 NPort Search Uulity ConblabeblOL iuueni irtet iiie edet eret idet teta qt LEE bib b uo 4 3 NPOFE WIndOWS Driver MANAG OP ui ues uacuum tcs text nai iex E Ura Gece tetetndi cu ue PC a Due UNDE DUCTU DUE 4 4 Installing NPort Windows Driver Manager sssssessssssee nnnm hh hhn nnn hene aan 4 4 Using NRO Windows Driver Mangel usesskcerEEEsEEEEpEERREb
76. t htm File open example File open example open sys index htm O RDONLY open sys README TXT O RDONLY All files in romfs directory will be compiled into ROM file system of MiiNePort SDK The files in ROM file system are available through the mount point sys The maximum storage size of ROM file system is 512K bytes All files in ROM file system are read only In your application if you need to read contents from some files but do not need to write data to these files you can put these read only files in romfs directory under your project and open these files under sys direcotry with O RDONLY flag in your program Note In your program the files under sys directory are read only and you can not create delete files under this directory FAT File System There is a FAT file system with maximum storage size of 512K bytes in MiiNePort SDK for you to create read write delete files In your program you can access FAT file system under usr directory This FAT file system only supports 8 3 filename format A 8 3 filename has at most eight characters optionally followed by a period and a filename extension of at most three characters The long filename is not supported Example File write read The following example uses POSIX library to write read a file Example MiiNePort E1 E2 SDK include lt stdio h gt include lt string h gt include zsdksys h include lt sdkfile h gt AP VER 1 0 0 int
77. to MiiNePort Then you can debug step by step On the other hand you build release version firmware it will generate a customize firmware without debug message Besides it won t write into MiiNePort and you can upgrade it into MiiNePort by utility V A Tn E Upload debug version firmware to MiiNePort After compiling source code you have to upload your debug firmware file to MiiNePort to verify all functions Moxa provides a source level debug tool In this way you can debug step by step to find your programming issues First you need to build a debug firmware and then MiiNePort will create a folder which is called Debug and put the firmware into this folder Click debug button to upload firmware into MiiNePort by USB port automatically amp m 9 amp amp s After uploading successfully you can start to debug step by step Debug current active project e amp s The function is used to debug MiiNePort project Your project will be downloaded into MiiNePort SDK and then it will execute your project In addition if you set break point you can debug step by step Ml a EE Tn E 5 31 MiiNePort E1 E2 SDK MiiNePort IDE Development Tool Upload your customized firmware to MiiNePort After development of your customized firmware is complete you have to deploy your firmware file to MiiNePort Please remember connect Ethernet cable to MiiNePort first then using NPort Search Utility it c
78. ure serial communications applications Each module comes equipped with COM drivers for Windows systems 95 and above The module s serial port is mapped by the driver to an IP address and port number The driver intercepts data sent to the host s COM port packs it into a TCP IP packet and then redirects it through the host s Ethernet card At the other end of the connection the module accepts the Ethernet frame unpacks the TCP IP packet and then transparently sends the data to the attached serial device The driver thus establishes a transparent connection between the host and serial device allowing the host to treat the networked device as if it were directly attached Data Transmission Host COM 3z IP Port TCP IP Ethernet A i Serial TTL UART am Gm Go GE URS AE UE EAD UAE UNA GA GA ORA AO OA OA ORA OA ORO OG Serial Device with MiiNePort ATTENTION The RealCOM driver comes with the NPort Windows Driver Manager which is included on the CD ROM for the MiiNePort E1 E2 SDK package 3 2 MiiNePort E1 E2 SDK Choosing the Proper Operation Mode Ethernet Modem Mode Ethernet Modem mode is designed for use with legacy operating systems such as MS DOS that do not support TCP IP Ethernet By connecting the properly configured MiiNePort serial port to the MS DOS computer s serial port it is possible to use legacy software to transmit data over the Ethernet when the software was originally designed to tr

Download Pdf Manuals

image

Related Search

Related Contents

ATD-5951 400 WATT INVERTER  Refrigerador  Plaquette PLU mode d`emploi - Malakoff? Vivre aujourd`hui  the Technical Manual  C3T Preamp User's Manual Functions  La Crosse Technology WT-3165 User's Manual      VENSTAR  Mise en page 1 - Pool Supply Unlimited  

Copyright © All rights reserved.
Failed to retrieve file