-
DNI Smart Grid Data Collector SGDC-D22 User Manual Rev. 1.9 2017/01/19 Notice: 1. Delta Networks Inc. reserves the right to change specifications detailed in this document at any time without notice, and assumes no responsibility for any errors within this document. 2. This document contains proprietary technical information in which is the property of the Delta Networks Inc.
-
Doc #: 1ANSU-160004 Table of Contents 1. 2. 3. 4. 5. 6. 7. Introduction ............................................................................................................................................................ 1 1.1. GENERAL DESCRIPTION ................................................................................................................................................... 1 1.2. TARGET APPLICATIONS ......................................................................
-
Doc #: 1ANSU-160004 8. 9. 7.4. FTP & SCP .................................................................................................................................................................... 24 7.5. HTTP ............................................................................................................................................................................ 25 7.6. NTP & RTC ..............................................................................................
-
Doc #: 1ANSU-160004 Revision History Version Date Author Description 1.0 2012/5/9 DNI SG Team Initial Release. 1.1 2012/5/23 DNI SG Team Add Linux Kernel Upgrade & Backup section. Add & modify sections below - Communication Settings - Daemons & Utilities - I/O Control 1.2 2012/6/4 DNI SG Team 1.3 2012/10/12 DNI SG Team Modify some configurations. 1.4 2013/11/29 DNI SG Team Add SIM & SD card installation. 1.5 2014/4/29 DNI SG Team Add ZigBee feature for SGDC-D23.
-
Doc #: 1ANSU-160004 1. Introduction 1.1. General Description DNI data collector SGDC-D22 is a 3G version ARM9 based embedded system with 3G for WAN communication and Ethernet port, RS-232 and RS-422/485 interfaces for LAN communication as well to collect data from devices via LAN communication and forward to data center via WAN communication.
-
Doc #: 1ANSU-160004 1.4. Regulation declaration The changes or modifications not expressly approved by the party responsible for compliance could void the user’s authority to operate the equipment. To comply with the FCC RF exposure compliance requirements, this device and its antenna must not be co-located or operating to conjunction with any other antenna or transmitter.
-
Doc #: 1ANSU-160004 2. Platform Description 2.1. Hardware Information DNI data collector incorporates the following hardware components as shown in Figure 2. Figure 2, DNI data collector hardware components. Feature Main Board 3G Daughter Board Description With CPU, memory and major interfaces of data collector. With 3G module and LED indicators.
-
Doc #: 1ANSU-160004 The interfaces of data collector are illustrated as following table. Interface Description Power A 3-pin terminal block to connect 12-48VDC V+, V and GND. Reset Button Hardware reset button. Support back to factory default setting function. Ethernet Port RJ45 port for Ethernet connection. Antenna External antenna with SMA connector. Console Port Local port for direct connecting to concentrator (RJ45 connector). Wall Mount 2 L shape parts for wall mount installation.
-
Doc #: 1ANSU-160004 Interface Description Note SIM Card & SD Card Slots1 RS-485 pin define: Serial Port Device Name Software Switch Command RS-485 (2-wire) /dev/ttyM1 setport 1 PIN 1: GND PIN 2: DATA(A) PIN 3: DATA(B)+ setport 0 PIN 1: GND PIN 2: RX PIN 3: RX+ PIN 4: TX+ PIN 5: TX RS-422 (4-wire) /dev/ttyM1 Hardware PIN Definition LED display: Feature Note Power Power indicator Turn on when power on.
-
Doc #: 1ANSU-160004 Utilities File System type Toolchain Busybox 1.19.3 Jffs2 Gcc v4.2.4, Glibc v2.6.1, GDB v6.3 DNI SGDC-D22 User Manual i.
-
Doc #: 1ANSU-160004 3. Tool Chain Installation 3.1. Environment Host OS: Ubuntu 10.04 STLinux image file: STLinux-2.3-spear-20091209.iso http://ftp.stlinux.com/pub/stlinux/2.3/iso/ 3.2. Installing STLinux on Ubuntu Please refer to the installation guide at http://www.stlinux.com/faq?q=node/361. Installation steps: Make /bin/sh bash Installing RPM on Ubuntu Populating the RPM databases with "Provides" Download “STLinux_deps” rpm file at http://www.stlinux.
-
Doc #: 1ANSU-160004 Install STLinux Mount image file “STLinux-2.3-spear-20091209.iso” then install it. After installation completed, STLinux package would be place at /opt/STM/STLinux-2.3/. 3.3. Add Tool Chain Path Add tool chain path at ~/.bashrc then re-login. Test tool chain DNI SGDC-D22 User Manual i.
-
Doc #: 1ANSU-160004 4. Getting Started 4.1. Connect to PC DNI data collector provides two interfaces for PC to login, configure and maintenance. Users can connect to a PC through a serial console port (RS-232) or by using SSH utility over the network connection. This section will describe how to connect DNI data collector to PC through these two interfaces. 4.1.1.
-
Doc #: 1ANSU-160004 Figure 4, PuTTY Configuration for Serial Connection. 4.1.2. SSH Utility (Network) By default, DNI data collector enables the SSH service to support remote log in. The default network IP of DNI data collector is 192.168.1.100. Please also make sure that the IP used by PC is also in the 192.168.1.x subnet. The network cable can be connected directly between a PC and a DNI data collector. Figure 5, PuTTY Configuration for SSH Connection. DNI SGDC-D22 User Manual i.
-
Doc #: 1ANSU-160004 4.2. SIM Card and SD Card Installation The SIM card and SD card slots are behind the left side cover gate of the SGDC-D22. Please refer to the following picture and instructions to install SIM card and SD card. 1. Open the cover gate by rotating the screw in anti-clockwise way. 2. Insert the SIM card and SD card into the slot in correct direction. (The unfilled corner is on the right side.) 3.
-
Doc #: 1ANSU-160004 4.3. Login Data Collector Once the connection (either serial or SSH) is established, a prompt for login will be shown in the window. The default account for log in is root. The default password for root is ‘dnidni’. First time to log in through SSH, some terminal emulator may show alerts that the host key is unknown, please accept it and continue the log in procedure. Figure 7, Data collector Log In Example Output (Serial). Figure 8, Putty Security Alert.
-
Doc #: 1ANSU-160004 Figure 9, Data collector Log In Example Output (SSH). DNI SGDC-D22 User Manual i.
-
Doc #: 1ANSU-160004 5. The First Program 5.1. Compile helloworld.c Use cross compiler at host to compile the program for data collector. Use “file” command to check the program after compiling. # arm-linux-gcc helloworld.c -o helloworld # file helloworld Result: 5.2. Send Files to Data Collector Use “scp” command at host to send the file to data collector. # scp helloworld root@192.168.1.10:/var Result: 5.3. Execute Program at Data Collector Execute the program at the data collector.
-
Doc #: 1ANSU-160004 6. Communication Settings 6.1. Static IP on eth0 To set the static IP for DCU in eth0, please edit /etc/network/interfaces # vi /etc/network/interfaces auto eth0 iface eth0 inet static address 192.168.1.100 network 192.168.1.0 netmask 255.255.255.0 broadcast 192.168.1.255 gateway 192.168.1.254 And you can apply this configuration by executing the following command: # set-static-ip 6.2. DHCPD and DHCP Client DCU can act as a DHCP server to assign IP to the client in the same network.
-
Doc #: 1ANSU-160004 To act as dhcp server or client on booting, it can be configured in /etc/rc.d/rc.local. 6.3. 3G Before using 3G communication, please insert a SIM card into the slot on the 3G module. The position of the SIM slot and the direction of SIM card please refer to the section 4.2. DNI data collector uses pppd to handle the 3G connection. 3G service providers have their own setting such as APN and dial number. Please contact the provider to get the correct values.
-
Doc #: 1ANSU-160004 Figure 11, Change Dial Number. After confirm the APN and the dial number, use the following command to connect a 3G service. # 3g-connect You also can get RSSI value and reflash the signal strength led status by using the following command. # get-rssi-ber To get imsi code, use the command below. # getimsi Use the command below to disconnect the 3G service. # 3g-disconnect 6.4. PPPoE over eth0 To access Internet via the service form your ISP, e.g.
-
Doc #: 1ANSU-160004 When ADSL modem is ready to use, please use Ethernet cable to connect DCU and ADSL modem and execute the following command to connect to your ISP. First, you need to setup the parameters for the PPPoE connection.
-
Doc #: 1ANSU-160004 When you want to disconnect, use the following command to disconnect the PPPoE connection. # pppoe-stop DNI SGDC-D22 User Manual i.
-
Doc #: 1ANSU-160004 7. Daemons & Utilities 7.1. Ramdisk To mount a virtual disk on the memory, you can execute the following command to create a ramdisk. Create a directory for ramdisk: # mkdir –p /var/ramdisk Allocate a specific memory size and mount it to the ramdisk: # mount –t tmpfs none /var/ramdisk –o size=16M Finally, you can use df command to check the information of the ramdisk you created. # df Figure 13, Mount a ramdisk with 16MB size.
-
Doc #: 1ANSU-160004 7.2. NFS (Network File System) Before using NFS, a NFS server is needed. To create a NFS server on your PC, please refer to: Linux: http://tldp.org/HOWTO/NFS-HOWTO/server.html Windows: http://sourceforge.net/projects/freenfs/ When your NFS server is ready, please execute the following commands to connect to your NFS server.
-
Doc #: 1ANSU-160004 7.3. Telnet & SSH Service Telnet and SSH can be used to remote login to the DCU. SSH uses encryption transportation, and the transportation on Telnet is only by ACSII code. You can turn on those services on the /etc/inetd.conf to make them as auto-run daemon after booting. # vi /etc/inetd.
-
Doc #: 1ANSU-160004 There will be a notification to user to update the key on your PC, when SSH protocol is used. Press “Yes” to allow this operation. Figure 16, Notification for key updating. Figure 17, Login to the DCU via telnet or SSH. Default username/password: root/dnidni After login, you can operate the DCU remotely. DNI SGDC-D22 User Manual i.
-
Doc #: 1ANSU-160004 7.4. FTP & SCP FTP and SCP can be used for file transmission to the DCU. Ftp is the normal way to transmit file on the internet, and SCP is a file transmission way on the SSH protocol. You can turn on those services on the /etc/inetd.conf to make them as auto-run daemon after booting. # vi /etc/inetd.
-
Doc #: 1ANSU-160004 7.5. HTTP DCU can act as a simple HTTP WEB server, and you can follow the command below to build up your own web server. Create a folder for WEB server and create a homepage. # mkdir –p /home/htdocs # echo "
It works!
" >> /home/htdocs/index.html You can turn on those services on the /etc/inetd.conf to make them as auto-run daemon after booting. # vi /etc/inetd.
-
Doc #: 1ANSU-160004 You can use browser to show the page you created if the httpd is running well. Figure 19, Web page from Http server. DNI SGDC-D22 User Manual i.
-
Doc #: 1ANSU-160004 7.6. NTP & RTC NTP protocol is used to synchronize the time between DCU and the time server. You need to find a NTP server and use the following command to adjust the time on DCU. # ntpdate If there is no NTP server that DCU can reach, you can also adjust Linux system time manually. # date MMDDhhmmYYYY After adjusting Linux system time, you need to save the correct time to the HW RTC. Please execute the following command to save time to RTC.
-
Doc #: 1ANSU-160004 7.7. SSL OpenSSL is used to encrypt and decrypt on different algorithm for different purpose. You can use the command to check what kind of command and algorithm are supported. # openssl –h Figure 21, OpenSSL commands and algorithms supported. DNI SGDC-D22 User Manual i.
-
Doc #: 1ANSU-160004 7.8. Sendmail via SMTP Sendmail is used to send a mail via SMTP protocol, the following command is an example to send a mail from DCU to Gmail SMTP server, and Gmail SMTP server will help you to send the mail to the receiver’s mail server. Use vi to create an example mail: # vi /var/mailtest Subject: This is a mail test CC: xxxx@gmail.com To: yyyy@gmail.com From: zzzz@gmail.com This is a test After editing the test mail content, please use the following command to send it out.
-
Doc #: 1ANSU-160004 8. I/O Control 8.1. Data Collector ID To get DCU id, execute the following command. # getuid 8.2. System Ready LED To get turn on or turn off the ready led, execute the following command. # sysrd-led-on # sysrd-led-off 8.3. Buzzer To control the buzzer, execute the following command with the unit in millisecond. # buzzer 8.4. Reset Button The action of the reset button is programmable. The default action is: < 5 seconds: Reset the device.
-
Doc #: 1ANSU-160004 8.6. SD Card SD card is designed to be mounted automatically. When a SD card is inserted into the SD card slot, there will be directory on /var/sd. The mount point will be removed when the SD card is removed. 8.7. Combine WDT Into Your Program DNI data collector provides a watchdog timer which has a 32- bit down counter with a programmable timeout value. On timeout it generates an interrupt and reset signal.
-
Doc #: 1ANSU-160004 The WDT interface IOCTL options: IOCTL Code Usages WDIOC_GETSUPPORT The fields returned in the ident structure are: identity: A string identifying the watchdog driver firmware_version: the firmware version of the card if available. options: A flags describing what the device supports.
-
Doc #: 1ANSU-160004 9. Linux Kernel Upgrade & Backup Upgrade: Use FTP or SCP to put your kernel image into the device directory /var and execute the following command on the device to upgrade the kernel image. # flashcp –v /var/ /dev/mtd3 Figure 22, Upgrade Linux kernel image. When it is done, please reboot your device to apply the kernel image you upgraded. Backup: Execute the following command to backup the current kernel image on the device to the /var directory.
-
Doc #: 1ANSU-160004 Figure 23, Backup Linux kernel image from DCU. When it is done, you can restore the kernel.img via FTP or SCP to your remote computer. DNI SGDC-D22 User Manual i.
-
Doc #: 1ANSU-160004 10. Reference ST Microelectronics: http://www.st.com/internet/com/home/home.jsp NXP: http://www.nxp.com/#/homepage DNI SGDC-D22 User Manual i.