Atop SE59XX-SDK User Manual

Software development kit
Table of Contents

Advertisement

Quick Links

SE59XX-SDK
Software development Kit
Software Development Kit
User Manual
Atop Technologies, Inc
SE59XX-SDK Family
User Manual
May 3
V1.2
rd
, 2018
.
V1.2

Advertisement

Table of Contents
loading
Need help?

Need help?

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.,...
  • Page 4: Table Of Contents

    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 ............
  • Page 9: Preface

    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.
  • Page 10: Introduction To Atop Sdk

    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...
  • Page 12: Description Of Sdk Folders

    .  sof tware : this folder incl u des ATOP library, sa mple c ode and header file . ...
  • Page 13 SE59XX-SDK User Manual V1.2 Software development Kit libatop.so.1.0.0 ATOP library binary...
  • Page 14: Table 2.3 List Of Programs In Filesystem Folder

    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...
  • Page 15: Firmware Upgrade

    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...
  • Page 16: Figure 2.3 Com Port Parameters For Console Firmware Update

    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”.
  • Page 17: Figure 2.5 Se5904D Boot Loader Menu

    SE59XX-SDK User Manual V1.2 Software development Kit Figure 2 .5 SE5904D B o ot l o ade r menu...
  • Page 18: Figure 2.6 Lan Settings

    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...
  • Page 19: Use Device Manager Or Device Management Utility

    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).
  • Page 20: Verify Current Firmware Version

    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...
  • Page 21: Installing A Cross-Compiler

    <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 .
  • Page 22: Download New Applications To The Device

    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 ...
  • Page 23: Login Or Remote Login To The Device

    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.
  • Page 24: Startup Messages

    Flash: 32 MiB MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1 *** Warning - bad CRC, using default environment Net: cpsw Hit ESC to execute ATOP menu: Wait ... 0 Booting from ramdisk ... Kernel image @ 0x82000000 [ 0x000000 - 0x383458 ] ## Loading init Ramdisk from Legacy Image at 84080000 ...
  • Page 25 SE59XX-SDK User Manual V1.2 Software development Kit [ 0.000000] Total of 128 interrupts on 1 active controller [ 0.000000] OMAP clockevent source: timer2 at 24000000 Hz [ 0.000013] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956969942ns [ 0.000033] OMAP clocksource: timer1 at 24000000 Hz [ 0.000293] Console: colour dummy device 80x30...
  • Page 26 [ 1.068218] brd: module loaded [ 1.076954] loop: module loaded [ 1.080664] (hci_tty): inside hci_tty_init [ 1.085470] (hci_tty): allocated 251, 0 [ 1.091197] Atop update device initialize success. [ 1.096857] 2000020.atop_relay: [ 1.100095] Register atop_relay0 success. [ 1.105516] 200000e.atop_cpld: [ 1.108659] Register atop_cpld_ver0 success.
  • Page 27 SE59XX-SDK User Manual V1.2 Software development Kit [ 1.416983] 0x0000000a0000-0x000000100000 : "DTB" [ 1.423378] 0x000000100000-0x000000600000 : "kernel" [ 1.430032] 0x000000600000-0x000001000000 : "rootfs" [ 1.436704] 0x000001000000-0x000001fe0000 : "jffs2" [ 1.446077] at24 0-0050: 8192 byte 24c64 EEPROM, writable, 1 bytes/write [ 1.646744] rtc-pcf8563 0-0051: chip found, driver version 0.4.3 [ 1.653514] rtc-pcf8563 0-0051: low voltage detected, date/time is not reliable.
  • Page 28 [ ] Enabling support for engine "capi" [!] error queue: 2606A074: error:2606A074:engine routines:ENGINE_by_id:no such engine [!] ENGINE_by_id: 260B606D: error:260B606D:engine routines:DYNAMIC_LOAD:init failed [!] Line 18: "engine = capi": Failed to open the engine FAIL Starting network management services: snmpd. Welcome to ATOP system ATOP login:...
  • Page 29: Hardware Specifications

    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...
  • Page 30 SE59XX-SDK User Manual V1.2 Software development Kit LM28-C3S-TI-N SFP Transceiver, 1250Mbps, 850nmVCSEL, Multi-mode, 550m, 3.3V, -20~85°C LM38-C3S-TI-N SFP Transceiver, 1250Mbps, 1310nmFP, Multi-mode, 2km, 3.3V, -40~85°C LS38-C3S-TI-N SFP Transceiver, 1250Mbps, 1310nmFP, Single-mode, 10km, 3.3V, -40~85°C LS38-C3L-TI-N SFP Transceiver, 1250Mbps, 1310nmDFB, Single-mode, 30km, 3.3V, -40~85°C...
  • Page 31: Hardware

    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...
  • Page 34: External Device's Overview

    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...
  • Page 38: Serial Pin Assignments

    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...
  • Page 39: Se5904D Pin Assignments

    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)
  • Page 41: Se5901B Pin Assignments

    SE59XX-SDK User Manual V1.2 Software development Kit 3.5.3 SE5901B Pin Assignments DB9 to RS-232/RS-485/RS-422 connectors Figure 3.5 DB9 Pin Number Table 3.8 SE5901B Pin Assignment for DB9 to RS-232/RS-485 Connector RS-232 RS-485 Pin# Full Duplex Half Duplex Data+ SG (Signal Ground)
  • Page 42: Se5908A/ Se5916A Pin Assignments

    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)
  • Page 44: Software Specifications

    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...
  • Page 45: Network Interface

    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...
  • Page 46: Buzzer

    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...
  • Page 47: Reset Button

    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.
  • Page 48: 4G Cellular (Se5901B Only)

    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...
  • Page 49: Testing Interfaces

    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.
  • Page 50: Figure 5.2 Process Execution On Se5904D, Example

    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...
  • Page 51: Test Buzzer Interface

    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...
  • Page 53: Test Digital Input

    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.
  • Page 54: Test Device Led

    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.
  • Page 55: Read Rtc Time

    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” .
  • Page 56: Firmware Upgrade

    -h 192.168 .4 .238 -u atop - P 123456 -d - t atop & m o squit to_ pub -h 192.168 .4 .238 -u atop - P 123456 -d - t ato p - m "tes t123"...
  • Page 57: Software Api Reference

    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 .
  • Page 58: Data Structure Documentation

    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 ...
  • Page 59: Network Apis Function Documentation

    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...
  • Page 60: Void Atopsdkset4Gapn (Char * Apn)

    SE59XX-SDK User Manual V1.2 Software development Kit Arguments: nothing (void) Function: resets 3G/4G module Returns: nothing (void) Example code: 218 { int fno; int value; fno = open("/dev/atop_3g_reset", O_WRONLY); if (fno > 0) value = 0; write(fno, &value, 1); sleep(1);...
  • Page 61: Void Atopsdkset4Gdisconnect (Void)

    SE59XX-SDK User Manual V1.2 Software development Kit 7.3.5 void AtopSDKSet4GDisconnect (void) API: AtopSDKSet4GDisconnect Arguments: nothing (void) Function: closes a 3G/4G cellular connection and resets the 3G/4G cellular module Returns: nothing (void) Example code: 247 { threeg_disconnect(); AtopSDK4GHWReset(); 250 } 7.3.6...
  • Page 62: Void Atopsdksetnetgateway (Int Eth, Char *Gw)

    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);...
  • Page 63: Void Atopsdksetnetmask (Int Eth, Char *Mask)

    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...
  • Page 64: Eeprom User Name And Password Settings Api Function Documentation

    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)
  • Page 65: Alarm Led Api Function Documentation

    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...
  • Page 66: Use Buzzer Api Documentation

    SE59XX-SDK User Manual V1.2 Software development Kit Arguments: nothing (void) Function: Reads reset button status Returns: button status (int)  0: button not pushed 1: button pushed  Use Buzzer API documentation include/atop_buzzer.h File Reference 7.9.1 Functions void AtopBuzzerOnOff (int value)
  • Page 67: Int Atopgetdi (Int Index)

    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...
  • Page 68: Macros

    SE59XX-SDK User Manual V1.2 Software development Kit Void atop_hwd_clear (void) atop_hwd_clear clears Hardware Watchdog 7.12.2 Macros #define HWD_DEV "/dev/atop_hwd0" 7.12.3 void atop_hwd_clear (void) API: atop_hwd_clear Arguments: nothing (void) Function: kicks hardware watchdog timer (reset) Returns: nothing (void) 7.12.4 void atop_hwd_disable (void)
  • Page 69: Wi-Fi Usb Dongle Control Apis Documentation

    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...
  • Page 70: Void Create_Default_Ini_File (Void)

    SE59XX-SDK Data Structure User Manual Software development Kit Documentation 7.13.2 void create_default_ini_file (void) API: create_default_ini_file Arguments: nothing (void) Function: creates default INI configuration file for Wi-Fi dongle settings Returns: nothing (void) Example code: 13 { FILE *fout; fout = fopen(ini_file_name, "w");...
  • Page 71: Int Get_Ssid (Char Ssid)

    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);...
  • Page 72: Int Parse_Setting (Void)

    SE59XX-SDK Data Structure User Manual Software development Kit Documentation 7.13.6 int parse_setting (void) API: parse_setting Arguments: nothing (void) Function: resets Wi-Fi connection settings (via USB-dongle) Returns: nothing (void) Example code: 226 { char *ssid,*psk,*key_mgmt; // read key from ini dictionary *ini = iniparser_load(ini_file_name);...
  • Page 73: Int Set_Psk (Char Psk_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");...
  • Page 74: Int Set_Ssid (Char Ssid_Name)

    SE59XX-SDK Data Structure User Manual Software development Kit Documentation if ( (8<=strlen(*psk_name)) && (strlen(*psk_name)<=63) ) { iniparser_set(ini, "network:PSK", *psk_name); FILE *fin = fopen("/jffs2/tmpFile", "w"); iniparser_dump_ini(ini, fin); fclose(fin); remove(ini_file_name); rename("/jffs2/tmpFile", ini_file_name); else { printf("Set PSK error!\nPSK length must be between 8 and 63.\n");...
  • Page 75: Se59Xx-Sdk Software Development Kit

    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...

Table of Contents