Advertisement

Quick Links

JetOS95

User Manual

www.korenix.com

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the JetBox9500 series and is the answer not in the manual?

Questions and answers

Summary of Contents for Korenix JetBox9500 series

  • Page 1: User Manual

    JetOS95 User Manual www.korenix.com...
  • Page 2: Copyright Notice

    Korenix assumes no liabilities resulting from errors or omissions in this document, or from the use of the information contained herein. Korenix reserves the right to make changes in the product design without notice to its users. Acknowledgments Korenix is a registered trademark of Korenix Technology Co., Ltd.
  • Page 3: Table Of Contents

    Table of Content Copyright Notice ........................2 Acknowledgments........................2 Table of Content ........................3 Chapter 1 Overview ........................6 Applied Models ......................6 Chapter 2 Getting Start ........................7 System login ........................7 2-1-1 Serial Console ......................7 2-1-2 Telnet Console ....................... 8 2-1-3 SSH Console......................
  • Page 4 4-20 keepalived ........................42 4-21 PTPD ..........................47 4-22 PTPDv2 ......................... 48 Chapter 5 Korenix Feature ......................51 Ethertool ........................51 Vconfig ......................... 52 Diocfg ........................... 53 Poecfg ........................... 54 Chapter 6 Programmer’s Guide ....................55 Toolchain Introduction ....................55 6-1-1 Compiling Applications and Libraries..............
  • Page 5 Korenix | Overview...
  • Page 6: Chapter 1 Overview

    Chapter 1 Overview The advantage of adopting Korenix JetBox series is ready-to-use. Korenix is devoted to improve the usability of embedded computer in industrial domain. Besides operating system, Korenix provides device drivers, protocol stacks, system utilities, supporting services and daemons to make system integration simple. Further, Korenix provides application development toolkits for users to build up their own applications easily.
  • Page 7: Chapter 2 Getting Start

    IP address in order to connect to the serial console utility. Use the serial console port settings shown below. Baud rate 115200bps Parity None Data bits Stop bits Flow Control None Serial console port setting Once the connection is established, the following windows will open. Korenix | Getting Start...
  • Page 8: Telnet Console

    To connect to a hub or switch connected to your local LAN, use a straight-through Ethernet cable. The default IP address and netmasks are shown above. To login, type the Login name and password as requested. The default values as following: Getting Start | Korenix...
  • Page 9: Ssh Console

    Start from firmware v1.3, JetBox9500 supports an SSH Console to offer users with better security options. Click on the link putty to download PuTTy(freeware) and set up an SSH console for JetBox 9500 in a Windows environment. The following figure shows an example of the configuration that is required. Korenix | Getting Start...
  • Page 10: Configure Ethernet Interface

    In this section, we use the serial console to modify JetBox9500’s network settings  Change Network Configuration Follow the instructions given in a previous section to access JetBox9500’s Console Utility via the serial Console port, and then type 'vi /etc/network/interfaces' to edit network configuration file with vi editor. Getting Start | Korenix...
  • Page 11 The default IP addresses are 192.168.10.1. iface lan inet static address 192.168.10.1 netmask 255.255.255.0 broadcast 192.168.10.255 network 192.168.10.0 Dynamic IP addresses: By default, the Jetbox9500 is configured for “static” IP addresses on LAN port and Korenix | Getting Start...
  • Page 12: Static And Dynamic Ip Address

    Same the previous section, IP settings can be modified over the network, too. There is another way to change the IP address without modifying the file /etc/network/interfaces, but the new settings will not be saved to the flash disk. Getting Start | Korenix...
  • Page 13: Test Program Developing - Hello.c

    JetBox9500. In general, program development involves the following seven steps. Step 1: Connect the JetBox9500 to a Linux PC. Step 2: Install Toolchain on the Linux PC. Step 3: Set the cross compiler and PATH environment variables. Step 4: Code and compile the program. Korenix | Getting Start...
  • Page 14: Installing The Toolchain (Linux)

    Toolchain requires approximately 208 MB of hard disk space on your PC. The JetBox9500 Toolchain is included with JetBox9500 SDK, which can download from Korenix web site. To install the Toolchain, it is simply a matter of extracting a tarball at the proper place: tar jxvf jetbox9500-toolchains.tar.bz2 –C /...
  • Page 15: Uploading "Test" To Jetbox9500 And Running The Program

    331 Password required for root Password: 230 User root logged in Remote system type is UNIX. Using binary mode to transfer files. ftp> cd /home/ 250 CWD command successful ftp> put helloworld local: helloworld remote: helloworld Korenix | Getting Start...
  • Page 16 4455 bytes sent in 4.1e-05 secs (108658.54 Kbytes/sec) ftp> exit 221 Goodbye. 3. From the JetBox9500 console, type: # chmod +x helloworld # ./helloworld The word hello world will be printed on the screen. Please read Chapter 6 for more detail about Toolchain. Getting Start | Korenix...
  • Page 17: Chapter 3 System Feature

    To determine the hardware capability of your JetBox, and what kind of software functions are supported, check the version numbers of your JetBox’s hardware, kernel, and user file system. Contact Korenix to determine the hardware version. You will need the Production S/N (Serial number), which is located on the JetBox9500’s back label.
  • Page 18 /etc/rc<n>.d/ only contains links to the /etc/init.d/. Here is an example of starting and stopping the ssh daemon: You can start the service by adding the first argument start, and stop the service by adding the System Feature | Korenix...
  • Page 19: Setting Run-Level

    Use #hwclock to query the current RTC time Use the following command to set system time from hardware clock: #hwclock -s The following figure illustrates how to update the system time and set the RTC time. Korenix | System Feature...
  • Page 20: Adjust System Time

    The JetBox has a built-in NTP (Network Time Protocol) client that is used to initialize a time request to a remote NTP server. Use #ntpdate to update the system time. #ntpdate time.stdtime.gov.tw #hwclock –w NTP client request Visit http://www.ntp.org for more information about NTP and NTP server addresses. System Feature | Korenix...
  • Page 21: Ntp Server

    /etc/crontab, checking each command to see if it should be run in the current minute. Crontab syntax : A crontab file has five fields for specifying day, date and time followed by the command to be run at that interval. command to be executed Korenix | System Feature...
  • Page 22: Connect Peripherals

    While plug-in a USB mass storage or a SD card, use #dmesg command can help showing USB-storage device status. usb-storage device scan status JetBox9500 support auto-mount external storage, just use mount command to check the mount point. System Feature | Korenix...
  • Page 23 /media/sd0 can un-mount the previous mounted directory. NOTE To be able to unmount a device, you have to close all the open files in it. Type sync can help commits all pending writes, which can then be removed in a safe way. Korenix | System Feature...
  • Page 24: Network Feature

    Chapter 4 Network Feature In this chapter, we explain how to configure JetBox various communication functions. Telnet Service name telnetd A Telnet server Description Config files /etc/inetd.conf Start file /etc/init.d/rcS Start command Stop command Support command Default Enabling the Telnet server The following example shows the default content of the file /etc/inetd.conf.
  • Page 25: Ftp

    Edit the /etc/proftpd.conf and add the following line, then restart the FTP server. RootLogin on To set up DNS client, you need to edit two configuration files: /etc/resolv.conf, /etc/hosts (optional) /etc/hosts - The static table lookup for host names Korenix | Network Feature...
  • Page 26: Web Server

    The GoAhead web server’s main start file is /etc/init.d/S70webs, with the default homepage located at /web/home.htm. The web server default listening port is 8080. The default Web homepage is in the following directory: /web Network Feature | Korenix...
  • Page 27: Iptables

    Different kernel modules and programs are currently used for different protocols; iptables applies to IPv4, ip6tables to IPv6, arptables to ARP, and ebtables as a special for Ethernet frames. A firewall using iptables is said to be a stateful firewall. Korenix | Network Feature...
  • Page 28 Remove rules To delete the first rule in the chain, we would do: iptables -D INPUT 1 List rules To list the rules we have on our system use: iptables -L Network Feature | Korenix...
  • Page 29: Nat

    NAT. iptables -t nat -A POSTROUTING -o wan -j MASQUERADE iptables -A FORWARD -i wan -o lan -m state --state RELATED,ESTABLISHED -j ACCEPT iptables -A FORWARD -i lan -o wan -j ACCEPT Korenix | Network Feature...
  • Page 30: Dail-Up Service

    Telnet link, and links established using a modem over a telephone line. Usually pppd is called by other daemon, like PPPoE, PPTP, and Wvdial. PPPoE Service name pppoe Description Point-to-Point Protocol over ethernet Config files /etc/ppp/pppoe.conf Start file Network Feature | Korenix...
  • Page 31 INTERFACE >>> Enter the Ethernet interface connected to the DSL modem (default eth0): wan Do you want the link to come up on demand, or stay up continuously? >>> Enter the demand value (default no): no Korenix | Network Feature...
  • Page 32: Nfs

     http://nfs.sourceforge.net/nfs-howto/  http://nfs.sourceforge.net/nfs-howto/ar01s04.html 4-11 E-Mail program name sendmail A email client Description Usage: sendmail [-w timeout] [-U user] [-P password] [-X] -t to [-t to]... [-n] [-s subject] [-c charset] server[:port] from [body] [attachment ...] Options: Network Feature | Korenix...
  • Page 33: Snmp

    Use openssl connection helper for secured servers Request delivery notification to sender -s subject Subject -c charset Assumed charset for body and subject [utf-8] Example: sendmail -U sender@korenix.com -P mypassword -t receiver@korenix.com -s 'A subject' smtp.korenix.com sender@korenix.com /home/mail-content 4-12 SNMP Service name snmpd Description...
  • Page 34: Openswan

    VPN virtual interface. For more information, download the step-by-step how to from Korenix website: http://www.korenixembedded.com/support/faqs/vpn 4-14 OpenSwan...
  • Page 35: Pptp Client

    IPsec encryption/authentication system, running the specified command with the specified arguments as if it had been invoked directly. For more information, download the step-by-step how to from Korenix website: http://www.korenixembedded.com/support/faqs/vpn Or read OpenSwan Wiki: http://wiki.openswan.org/...
  • Page 36 "pptp $SERVER --nolaunchpppd" name $DOMAIN\\$USERNAME remotename PPTP require-mppe-128 file /etc/ppp/options.pptp ipparam $TUNNEL_NAME Start the tunnel using the pppd command: pppd call $TUNNEL_NAME The following picture is the success output with tunnel name “test” and server ip address “192.168.1.54”. Network Feature | Korenix...
  • Page 37: Pptp Server

    Edit the configuration file: /etc/pptpd.conf for IP ranges and option file, for example: option /etc/ppp/options.pptpd localip 192.168.0.1 remoteip 192.168.0.234-238,192.168.0.245 Add user/password lists to /etc/ppp/chap-secrets: username pptpd password * Leave the /etc/ppp/options.pptpd unchanged. Start the tunnel using the command: /etc/init.d/pptpd start 4-17 Routing -- Zebra Daemon Service name zebra Korenix | Network Feature...
  • Page 38 2. Telnet localhost <port> ,e.g. port 2601 connects to the ospfd. Zebra uses ports from 2600 to 2607 for daemon connections. Service zebra ripd ospfd bgpd isisd Port 2601 2602 2604 2605 2607 Example: 1. Start zebra: /etc/init.d/zebra start 2. Type vtysh to enter Zebra shell Network Feature | Korenix...
  • Page 39 3. Query for supported command with ‘?’ 4. Display the current running config: # sh run 5. Enter config mode: JetBox # config terminal 6. Change hostname to KorenixRouter: JetBox (confg) # hostname KorenixRouter Korenix | Network Feature...
  • Page 40: Ser2Net

    Parity : none Stop bit : 1 Hardware flow control : none State : raw state timeout : never timeout modem mode : none Edit /etc/ser2net.conf add the following line: 62001:raw:0:/dev/ttyS1:9600 NONE 1STOPBIT 8DATABITS LOCAL -RTSCTS Network Feature | Korenix...
  • Page 41: Fastpath

    # fastpath -A -s 192.168.1.1 -d 192.168.10.101  List current fastpath rules: # fastpath –L [root@JetBox 9530 /etc]# fastpath -L FastPath Show... rulenum Lan IP Wan IP 192.168.10.101 192.168.1.1  Remove a fastpath rule by rule number: # fastpath -D 0 Korenix | Network Feature...
  • Page 42: Keepalived

    MAC address. 4-20 keepalived Service name keepalived keepalived implements an independent VRRPv2 stack to handle Description director failover. It can deal with the Linux Virtual Server (LVS) framework. Config files /etc/keepalived/keepalived.conf Network Feature | Korenix...
  • Page 43  Start keepalived with VRRP subsystem only: # keepalived -P Virtual Router Redundancy Protocol (VRRP) is an IETF standard that provides a redundant router mechanism to increase the reliability of existing networks. The VRRP process provides Korenix | Network Feature...
  • Page 44 VG2 { vrrp_sync_group VG2 { group { group { VI_WAN VI_WAN VI_LAN VI_LAN vrrp_instance VI_WAN { vrrp_instance VI_WAN { state MASTER state BACKUP interface wan interface wan virtual_router_id 151 virtual_router_id 151 priority priority advert_int 1 advert_int 1 Network Feature | Korenix...
  • Page 45 The linkbeat_use_polling keyword When device become unavailable, both wan and lan port will stop send vrrp packet. But if you Korenix | Network Feature...
  • Page 46 152 virtual_router_id 152 priority 150 priority 100 advert_int 1 advert_int 1 authentication { authentication { auth_type PASS auth_type PASS auth_pass 1111 auth_pass 1111 virtual_ipaddress { virtual_ipaddress { 192.168.2.1/24 brd 192.168.2.1/24 brd Network Feature | Korenix...
  • Page 47: Ptpd

    -w NUMBER specify one way delay filter stiffness -b NAME bind PTP to network interface NAME -u ADDRESS also send uni-cast to ADDRESS -l NUMBER,NUMBER specify inbound, outbound latency in nsec -o NUMBER specify current UTC offset Korenix | Network Feature...
  • Page 48: Ptpdv2

    Precision Time protocol (PTP) version 2 daemon Config files Start file Start command ptpd2 Default down Usage: Ptpv2d runs on UDP/IP , P2P mode by default run in command line (non-daemon) mode -f FILE send output to FILE Network Feature | Korenix...
  • Page 49 Example:  Start ptpd2 in slave mode: # ptpd2 -g  Start ptpd2 in master mode : # ptpd2 The PTP daemon (PTPd) implements the Precision Time protocol (PTP) as defined by the Korenix | Network Feature...
  • Page 50 IEEE 1588 standard. PTP Version 1 implements IEEE-1588-2002, and PTP Version 2 implements IEEE-1588-2008. PTP was developed to provide very precise time coordination of LAN connected computers. Network Feature | Korenix...
  • Page 51: Chapter 5 Korenix Feature

    Chapter 5 Korenix Feature Ethertool program name ethtool LAN switch port configuration tool Description Usage: ethtool DEVNAME (get port status) ethtool -a DEVNAME (get flow control) ethtool -A DEVNAME (set flow control) [ rx on|off ] ethtool -q DEVNAME (get QoS)
  • Page 52: Vconfig

    [vlan-name] [skb_priority] [vlan_qos] set_name_type [name-type] Example:  Add a vlan interface # vconfig add lan 2 untag 1,2,3,4  Delete a vlan interface # vconfig rem lan.2  Show all vlan interface # vconfig show Korenix Feature | Korenix...
  • Page 53: Diocfg

     Set DO 7 to High # diocfg -s 7 1 Set data of DO7 to High NOTE The DIO number range is 0~7. The DIO types are configurable. Default all DIO type are set with DI. Korenix | Korenix Feature...
  • Page 54: Poecfg

    Power 3.41W  Turn off POE on port 1 # poecfg -s 1 0 Set PoE Port 1 to Off # poecfg -g 1 PoE Port 1 control status is Off power delivery status is Off Korenix Feature | Korenix...
  • Page 55: Chapter 6 Programmer's Guide

    Jetbox9500. The cross-compiling toolchain that comes with Jetbox9500 contains a suite of Korenix compilers and other tools, as well as the libraries and headers that are necessary to compile applications for Jetbox9500.
  • Page 56: Compiling Applications And Libraries

    Generates indexes to archives (static libraries) armeb-linux-readelf Displays information about ELF files armeb-linux-size Lists object file section sizes armeb-linux-strings Prints strings of printable characters from files (usually object files) armeb-linux-strip Removes symbols and sections from object files (usually debugging information) Programmer’s Guide | Korenix...
  • Page 57: Device Api

    Please use the desktop Linux’s man page for detailed documentation: #man ioctl The device node is located at /dev/rtc0. Jetbox supports Linux standard simple RTC control. You must include <linux/rtc.h> Korenix | Programmer’s Guide...
  • Page 58: Watch Dog Timer

    The driver returns the real timeout used in the same variable, and this timeout might differ from the requested one due to limitation of the hardware. int timeout = 45; ioctl(fd, WDIOC_SETTIMEOUT, &timeout); printf("The timeout was set to %d seconds\n", timeout); Programmer’s Guide | Korenix...
  • Page 59 Starting with the Linux 2.4.18 kernel, it is possible to query the current timeout using the GETTIMEOUT ioctl. ioctl(fd, WDIOC_GETTIMEOUT, &timeout); printf("The timeout was is %d seconds\n", timeout); Korenix | Programmer’s Guide...
  • Page 60: Chapter 7 Appendix

    Chapter 7 Appendix Firmware Upgrade Firmware upgrade can be done by the “firmware-up” command. # firmware-up Usage: -f [firmware file] -t [firmware file] [tftp server] -w [http or ftp url] For example, put the new firmware in a USB storage and plug-in to JetBox9500. After it automatic mounted, you can upgrade with the following command: firmware-up -f /media/sd0/Jetbox95-20100916.bin Where /media/sd0 is the usb mounted directory, and Jetbox95-20100916.bin is the firmware...
  • Page 61: Usb Driver For Gsm Modems

    DIP Switch to setup hardware, use setserial command to tell the JetCard driver to change RS-485 mode is necessary. (Only RS-485 need to invoke setserial command) RS485 2W setserial -a /dev/ttyS1 mode 485_2W_ON card 1608 setserial -a /dev/ttyS1 mode 485_2W_OFF card 1608 RS485 4W Korenix | Appendix...
  • Page 62: Software Specification

    -a /dev/ttyS1 mode 485_4W_ON card 1608 setserial -a /dev/ttyS1 mode 485_4W_OFF card 1608 Software Specification Item Protocol Notes JetBox 9500 Boot Loader Red-boot Kernel 2.6.20 CHAP IPv4 IPv6 ICMP File System JFFS2 Ext2 Appendix | Korenix...
  • Page 63 SSH support package 4.6p1 openssl SSL support package 0.9.7m openvpn OpenVPN VPN tool 2.0.9 openswan IPsec Ipsec for Linux 2.4.9 pppd PPP protocol for Linux 2.4.4 rp-pppoe PPPoE PPPOE support package pptp-linux PPTP PPTP protocol for Linux 1.7.0 Korenix | Appendix...
  • Page 64: Busybox Command

    & group & user chmod change file owner chown change file group chgrp Sync file system, let system file buffer be saved to hardware sync move file Appendix | Korenix...
  • Page 65 Korenix | Appendix...
  • Page 66 Utility used to record logs of all the significant events syslogd Utility which intercepts and logs all messages from the Linux kernel and sends to the klogd ‘syslogd’ Utility to send arbitrary text messages to the system log logger Appendix | Korenix...
  • Page 67 / power off/on the server reboot halt the server halt estimate file space usage show system’s host name hostname Send specified signal to the specified process or process group kill/killall For complete command usage and explanation, please refer to following website: Korenix | Appendix...
  • Page 68 Appendix | Korenix...
  • Page 69: Ser2Net Manual

    Note also that this filename must be specific wi th the full path, as ser2net will change directory to “/” when it becomes a daemon. when it If UUCP locking is enabled, this will disable the use of UUCP locks. Korenix | Appendix...
  • Page 70: Control Port

    TCP port or from the serial port Note that data monitoring is best effort, if the controller port cannot keep up the data will be silently dropped. A controller may only monitor one thing and a port may only be monitored by one controller. monitor stop Stop the current monitor. Appendix | Korenix...
  • Page 71 [host,]port, such as 127.0.0.1,2000 or localhost,2000. If this is specified, it will only bind to the IP address specified for the port. Otherwise, it will bind to all the ports on the machine. state Either raw or rawlp or telnet or off. disables the port from accepting Korenix | Appendix...
  • Page 72 “ser2net” is for the data ports and “ser2net -control” is for the control ports. Signals SIGHUP If ser2net receives a SIGHUP, it will reread it configuration file and make the appropriate changes. If an inuse port is changed or deleted, the actual change will not occur until the port Appendix | Korenix...
  • Page 73: Revision History

    See Also telnet(1) hosts_access(5) Known Problems None. Author Corey Minyard <minyard@acm.org> Revision history V0.0.9 by 2011/3/8 update for JetOS93 v1.3 release Customer Service Korenix Technology Co., Ltd. Business service: sales@korenixembedded.com, sales@korenix.com Customer service: koreCARE@korenix.com Web Site: http://www.korenixembedded.com, http://www.korenix.com Korenix | Appendix...

This manual is also suitable for:

Jetbox9400 seriesJetbox5400 seriesJetcard5400

Table of Contents