Do you have a question about the SE59XX-SDK and is the answer not in the manual?
Questions and answers
Subscribe to Our Youtube Channel
Summary of Contents for Atop SE59XX-SDK
Page 1
SE59XX-SDK User Manual V1.2 Software development Kit Atop Technologies, Inc SE59XX-SDK Family Software Development Kit User Manual V1.2 May 3 , 2018...
Page 2
Table of Contents For example, click on any item listed in the to go to that page. General Description User Guide Published by: Atop Technologies, Inc. 2F, No. 146, Sec. 1, Tung-Hsing Rd, 30261 Chupei City, Hsinchu County Taiwan, R.O.C. Tel: +886-3-550-8137 Fax: +886-3-550-8131 sales@atop.com.tw...
Page 3
Software development Kit Important Announcement The information contained in this document is the property of Atop Technologies, Inc., and is supplied for the sole purpose of operation and maintenance of Atop Technologies, Inc., products. No part of this publication is to be used for any other purposes, and it is not to be reproduced, copied, disclosed, transmitted, stored in a retrieval system, or translated into any human or computer language, in any form, by any means, in whole or in part, without the prior explicit written consent of Atop Technologies, Inc.,...
Who Should Use This User Manual ......................9 Supported Platform ..........................9 Warranty Period ............................9 Introduction to Atop SDK ....................10 Overview of SE59XX-SDK development environment ................10 Description of SDK Folders ........................12 Firmware upgrade ..........................15 2.3.1 Use boot-loader update via console port ....................15 2.3.2 Use Device Manager or Device Management Utility ................19...
Page 5
SE59XX-SDK User Manual V1.2 Software development Kit 4.3.7 Hardware Watchdog Timer ........................47 4.3.8 LEDs ..............................47 4.3.9 3G/4G Cellular (SE5901B only) ......................48 4.3.10 RTC Interface ............................48 Testing interfaces ......................49 Test COM port interface – transmit and receive ..................49 5.1.1 Test COM port interface by using atop_tcp_server ................49 5.1.1.1Test Method ............................49...
Page 6
SE59XX-SDK User Manual V1.2 Software development Kit 7.5.2 void AtopSDKSetUserPassword (int password) ...................64 Run LED API Function documentation ....................64 7.6.1 Functions ...............................64 7.6.2 void AtopSetRunLed (onMs u32,offMs u32) ..................64 Alarm LED API Function documentation ....................65 7.7.1 Functions ...............................65 7.7.2 void AtopSetAlarmLed (u32 value) ......................65 Read Reset Button API ..........................65...
Page 7
SE59XX-SDK User Manual V1.2 Software development Kit Table of Figures Figure 2.1 Architecture of SE5904D SDK ......................10 Figure 2.2 Console firmware update- connections ..................... 15 Figure 2.3 COM port Parameters for Console Firmware update................. 16 Figure 2.4 TFPD32 appearance after execution ....................16 Figure 2.5 SE5904D Boot loader menu ........................
Page 8
SE59XX-SDK User Manual V1.2 Software development Kit Table 3.5 SE5901 Pin Assignment for TB5 to RS-232/RS-422/RS-485 Connector ..........38 Table 3.6 MB5904D Pin Assignment for DB9 to RS-232/RS422/RS-485 Connectors ........39 Table 3.7 MB5904D Pin Assignment for 5-Pin Terminal Block to RS-232/RS-422/RS-485 Connectors ... 39 Table 3.8 SE5901B Pin Assignment for DB9 to RS-232/RS-485 Connector ............
Software development Kit 1 Preface Purpose of the Manual This manual supports you in understanding the software SDK architecture of ATOP’s SE59XX Series and should be a reference guide for application development on this platform. Who Should Use This User Manual This manual is to be used by qualified programmers, network personnel or support technicians who are familiar with network operations and C Language programming.
In Kernel Layer, Linux 3.14.26 is customized to provide complete networking protocols. In Driver Layer, device drivers for all Industrial communication interfaces are provided. In hardware Layer, Customized ARM Cortex-A8 platform and Atop FPGA management core are provided. Figure 2 .1 Archi tecture of SE5904D SDK...
Page 11
SE59XX-SDK User Manual V1.2 Software development Kit...
SE59XX-SDK User Manual V1.2 Software development Kit The foll o wings are the lis t of ap p licati o n p rogra ms in "filesys te m" folder : Table 2.3 List of programs in filesystem folder Folder Name...
SE59XX-SDK User Manual V1.2 Software development Kit Firmware upgrade There are two ways to upgrade the firmware on the SE59XX platform: 2.3.1 Use boot-loader update via console port Prepare a Debug Cable (RJ45 to Serial) and a CAT5E Ethernet cable. Then, follow below figure to connect the Debug port to PC’s COM and CAT5E cable to connect to the Device’s LAN1 Ethernet port to any Host PC’s...
SE59XX-SDK User Manual V1.2 Software development Kit Figure 2.3 COM port Parameters for Console Firmware update With this method, TFTP protocol is used. The TFTP client is already set-up and running inside the SE59XX platform. Thus, the user needs to execute TFTP server in Windows. An open source version is available for download and can be found as “tftpd32”.
SE59XX-SDK User Manual V1.2 Software development Kit Select item 1 to enter "LAN Setting" menu as Figure 2.6, and setup IP/Netmask/Gateway of LAN1 as Figure 2.7 Figure 2 .6 LAN Se t t ings Figure 2.7 LAN1 settings Enter 0 to exit to upper layer menu and select 5 to enter the "TFTP Download" menu, then select 1 to setup TFTP server IP as Figure 2.8...
Figure 2.9 SE59XX connection scheme (example on SE5904D) Now, please power on the device and run Atop’s Device Management Utility from your Host PC. Once the device is running, the utility will list all devices found. If the device doesn’t show up, push the leftmost button (Rescan function).
SE59XX-SDK User Manual V1.2 Software development Kit Note: This example is made with SE5901A. All other models of SE59XX family share the same method. Figure 2.11 Firmware selection Note that the extension file name of upgraded firmware should be .dld...
<YOUR_AP P_FOLDER> is a na me ch osen by yo urself . ( such as “Tes t” ) 2) Foll o w Parag ra ph 2 .6 ab ove to build yo ur a p p licati o n or m o dify “Makefile” foll o wing the /atop _sdk .
Using FTP protocol Se tu p or read FT P acc o unt and passw ord f ro m Atop bo ot-l o ader menu as pe r i m age bel o w. Figure 2 .14 FT P access credentials ...
Remote Login 1) Se tu p or read FT P acc o unt and passw ord f ro m Atop b o ot-l o ader menu as Figure 1- 1 6 2) Use any to ols su p por t ing the telne t p rotoc ol such as "ssh" inside of Wind o ws.
SE59XX-SDK User Manual V1.2 Software development Kit 3 Hardware Specifications Packing List Inside the purchased package, you will find the following items: Table 3.1 Packing List Item Quantity Description SE59XX Industrial Serial Device Server On SE5908 / SE5916 / SE5908A / SE5916A...
SE59XX-SDK User Manual V1.2 Software development Kit Hardware Table 3.3 Hardware features System 32-bit ARM Based TI CPU AM3354 800MHz (except SE5908A/SE5916A use AM3352 1GHz) Flash Memory 32MB SE5901 DDR2 128MB SE5901B DDR2 256MB SE5904D DDR3 256MB SE5900A/08A/16A/MB5908/16 DDR3 256MB...
Page 32
SE59XX-SDK User Manual V1.2 Software development Kit LED Indicator Power x 2 (SE5901- SE5901B – SE5908 – SE5916 x 1) RUN x 1 ALARM x 1 LAN: x 2 (all versions except SE5908A and SE5916A) LED indication x 6 (SE5908A and SE5916A only) COM port: ...
Page 33
SE59XX-SDK User Manual V1.2 Software development Kit...
SE59XX-SDK User Manual V1.2 Software development Kit External Device’s Overview The following figures show particular SE59XX series device’s front and rear panels. SE5901 SE5904D...
Page 35
SE59XX-SDK User Manual V1.2 Software development Kit SE5901B SE5908/16...
Page 36
SE59XX-SDK User Manual V1.2 Software development Kit SE5908A/16A...
Page 37
SE59XX-SDK User Manual V1.2 Software development Kit...
SE59XX-SDK User Manual V1.2 Software development Kit Serial Pin Assignments 3.5.1 SE5901 Pin Assignments for Serial Interfaces DB9 to RS-232/RS-422/RS-485 connectors Figure 3.1 DB9 Pin Number Table 3.4 SE5901 Pin Assignment for DB9 to RS-232/RS-422/RS-485 Connector RS-232 RS-422/4-Wire RS-485 2-Wire RS-485...
SE59XX-SDK User Manual V1.2 Software development Kit 3.5.2 SE5904D Pin Assignments DB9 to RS-232/RS-485/RS-422 connectors Figure 3.3 DB9 Pin Number Table 3.6 MB5904D Pin Assignment for DB9 to RS-232/RS422/RS-485 Connectors RS-232 RS-422 RS-485 Pin# Full Duplex Full Duplex Half Duplex...
Page 40
SE59XX-SDK User Manual V1.2 Software development Kit RxD+ RxD- SG (Signal Ground) SG (Signal Ground) SG (Signal Ground)
SE59XX-SDK User Manual V1.2 Software development Kit Dedicated for COM Dedicated for COM 3.5.4 SE5908A/ SE5916A Pin Assignments DB9 to RS-232/RS-485/RS-422 connectors Figure 3.7 DB9 Pin Number Table 3.10 SE5908A/16A Pin Assignment for DB9 to RS-232/RS422/RS-485 Connectors Pin# RS-232 RS-422...
Page 43
SE59XX-SDK User Manual V1.2 Software development Kit SG (Signal Ground) SG (Signal Ground) SG (Signal Ground)
The following tables list the device node of COM port for each EVM model. Table 4.2 SE59XX device node Device node Major & Minor Device Type Description number ttyATOP0 266 0 Character ATOP COM port 1 ttyATOP1 266 1 Character ATOP COM port 2 ttyATOP2 266 2 Character ATOP COM port 3 ttyATOP3...
SE59XX-SDK User Manual V1.2 Software development Kit Table 4.3 SE59XX Programming commands per device node Device node Ioctl command Command Description ttyATOP0-3 0x9000 Configure SE59XX COM port as one of RS232 / RS485 / RS422 Table 4.4 SE59XX ioctl command of COM Port...
The re are Relay o ut puts on SE5904D, SE5908, SE5916, SE590 0A, SE5908A and SE5916A. The sa mple p rogra m is available in the sof tware/atop _a p p licati o n/utils/atop_sdk folder : Table 4.9 Sample program for Relay Output...
SE59XX-SDK User Manual V1.2 Software development Kit sof tware/atop_a p p licati o n/ut ils/atop_sdk folder : Table 4.10 Sample program for LCM File Name Description l c m _tes t .c A sample program to use the device’s LCM.
SE59XX-SDK User Manual V1.2 Software development Kit 4.3.9 3G/4G Cellular (SE5901B only) The sa mple p rogra m is available in the sof tware/atop_a p p l ication/utils/atop_sdk folder : Table 4.14 Sample program for Cellular functions File Name Description atop_4G_a pn .c...
V1.2 Software development Kit 5 Testing interfaces ATOP provides some simple text programs. Please follow the below instructions to test the interfaces when it’s needed. Test COM port interface – transmit and receive RS232 / RS422 / RS485 l o opback tes t : Execute rs232_loopback under the kernel shell.
SE59XX-SDK User Manual V1.2 Software development Kit atop_tcp_server RS232 115200 & 2) Type "ps -ef" from super terminal program to check if atop_tcp_server is executed as Figure 5.2 Figure 5 .2 P rocess executi o n on SE5904D, exa mple 3) Connect loopback for COM1 and execute TCPtest from MS-Windows as Figure 5.3...
SE59XX-SDK User Manual V1.2 Software development Kit Figure 5.4 Result of loopback test The default mapping table between TCP port number and COM port number: Table 5.1 TCP-port to COM-port mapping COM port TCP port COM 1 4660 COM 2...
Page 52
SE59XX-SDK User Manual V1.2 Software development Kit...
SE59XX-SDK User Manual V1.2 Software development Kit Test Digital Input Upload the test file “di_test” from ./software/atop_application folder into /jffs2 and execute the following command on the kernel shell: ./di_ tes t You can see the message print DI0/1 value.
SE59XX-SDK User Manual V1.2 Software development Kit ./h wd I f watchd og is not cleared or disabled in the source c ode, then sys te m will res ta r t auto m a t ically af te r 1.6 sec.
SE59XX-SDK User Manual V1.2 Software development Kit 5.9.2 Read RTC time: Execute the following command on the kernel shell: ./ge t_ r tc I t will p rocess c o m m a nd “h w cl o ck –r –f /dev/r tc 1” .
SE59XX-SDK User Manual V1.2 Software development Kit 6 Software API Reference Software AP I is to be re fer r ed by the software a p p licati o n to c onfigure sys te m envi ron ment, incl u de user na me, p assw ord and netw ork se t t i ng .
SE59XX-SDK User Manual V1.2 Software development Kit 7 Data Structure Documentation sessiontag Struct Reference 7.1.1 data fields The documentation for this struct was generated from the following file: atop_application/utils/atop_tcp_server/atop_tcp_server.c pthread_t thandler int tid int uartfd int serv_sockfd ...
SE59XX-SDK User Manual V1.2 Software development Kit void AtopSDKSetNetGateway (int eth, char *gw) AtopSDKSetNetGateway Sets the device’s default Gateway IP on the selected Ethernet port void AtopSDKSetNetDefGateway (int eth) AtopSDKSetNetDefGateway Sets the device’s network IP on the selected Ethernet port...
SE59XX-SDK User Manual V1.2 Software development Kit API: AtopSDKSetNetDefGateway Arguments: eth: index of the Eth interface (ethX) - (int) Function: writes default gateway settings to EEPROM Returns: nothing (void) Example code: 110 { char defGW[16]; sprintf(defGW, "%d", eth); AtopEESetDefaultGW(NULL, defGW);...
SE59XX-SDK User Manual V1.2 Software development Kit 52 } 7.3.12 void AtopSDKSetNetMask (int eth, char *mask) API: AtopSDKSetNetMask Arguments: eth: index of the Eth interface (ethX) - (int) mask: subnet mask of port ethX (char) Function: writes subnet mask settings to EEPROM...
SE59XX-SDK User Manual V1.2 Software development Kit EEPROM User Name and Password Settings API Function documentation 7.5.1 void AtopSDKSetUserName (char name) API: AtopSDKSetUserName Arguments: name – new administrator username (char) Function: writes new System User Name to the EEPROM Returns: nothing (void)
SE59XX-SDK User Manual V1.2 Software development Kit onMs: delay on in ms - (u32) offMs: delay off in ms - (u32) Function: sets RUN Led ON and OFF time settings Returns: nothing (void) Example code: not available Alarm LED API Function documentation include/atop_alarmled.h File Reference...
SE59XX-SDK User Manual V1.2 Software development Kit 7.10.2 int AtopGetDI (int index) API: AtopGetDI Arguments: index – defines the number of Digital Input to read value from Function: Reads digital input value (high or low) Returns: Digital Input value (int) 7.11...
7.13 Wi-Fi USB Dongle control APIs documentation These APIs can be used when SE59XX is used with one of the Approved USB to Wi-FI dongles. Please contact ATOP for more information on the supported models. include/atop_libwl.h File Reference 7.13.1 Functions...
SE59XX-SDK Data Structure User Manual Software development Kit Documentation -1 : ERROR – Cannot open file, or get PSK error 0 : Successful Example code: 157 { char *str; // read key from ini dictionary *ini = iniparser_load(ini_file_name);...
SE59XX-SDK Data Structure User Manual Software development Kit Documentation 114 { // read key from ini dictionary *ini = iniparser_load(ini_file_name); if (ini==NULL) { fprintf(stderr, "Cannot open %s\n",ini_file_name); return -1; // setting key_mgmt mode by user input switch (mode) { case 0 : iniparser_set(ini, "network:key_mgmt", "None");...
ATOP INDIA OFFICE: ATOP INDONESIA BRANCH: Abhishek Srivastava Jopson Li Head of India Sales Branch Director Atop Communication Solution(P) Ltd. Wisma Lampung Jl. No. 22, Kensington Terrace, No. 40, Tomang Raya Kensington Rd, Jakarta, Barat, 11430, Indonesia Bangalore, 560008, India...
Need help?
Do you have a question about the SE59XX-SDK and is the answer not in the manual?
Questions and answers