| The Datasheet Archive - 100 Million Datasheets from 7500 Manufacturers. |
2003 APPLICATION NOTE Dial-Up Networking with DS80C400 Micro
Top Searches for this datasheetMaxim Notes MICROCONTROLLERS Keywords: PPP, dial-up networking, embedded networking, DS80C400, DS80C390, TINI, remote sensor, networked sensor, networked microcontroller, network micro 2003 APPLICATION NOTE Dial-Up Networking with DS80C400 Microcontroller Abstract: DS80C400 networked microcontroller provides ready solution monitoring controlling sensors/actuators over networks. Data transmitted server analysis storage. This example uses TINI® with DS1923 1-Wire® temperature/humidity sensor packaged iButton® collect data. Discussion TINI implementation included. technology advances, large network availability greatly simplifies process microcontrollers monitoring controlling sensors/actuators. Information sent over network central location analysis corrective action. such application, DS80C400 networked microcontroller provides ready solution. Besides being loaded with extensive peripherals, DS80C400 silicon software implements TCP/IP Tiny InterNet Interfaces (TINI) which includes JavaVirtual Machine (JVM), provides extensive support networking. Although DS80C400 includes Ethernet interface, TINI Runtime Environment (TRE) also supports dial-up networking using point-to-point protocol (PPP). compelling aspect using that both endpoints connection communicate over modems leverage public communication networks software infrastructure. This allows deployment remote embedded networking applications outposts where Ethernet network available, ubiquitous phone switch network (Figure Figure remote DS80C400 running TINI Runtime Environment dials server forward data. Overview general-purpose protocol that supports data transfer over many physical media, including (but limited serial, parallel, Ethernet, cellular phones, such general packet-radio service (GPRS) devices. widely used dial-up networking application because requires little configuration easy only requirement physical media full-duplex capability. communication either synchronous asynchronous. composed three main components: method encapsulating multiprotocol datagram over same link. encapsulation based high-level data-link control (HDLC) format. Some encapsulation fields compressed available bandwidth limited. link control protocol (LCP) that establishes connection, configures link options, detects errors, terminates link. family network control protocols (NCP) that establish configure corresponding network- layer protocols. Operation Internet standard 1661 describes operation state machine going through different stages point-to-point link configured, maintained, terminated. Figure describes simplified state diagram where divided into five distinct phases: dead, establish, authenticate, network, terminate. implements phases except authenticate. Figure This simplified phase diagram illustrates implementation described 1661. Link Dead Phase Initial ending phase link operation. physical layer ready packet transfer yet. When physical layer ready, event generated, proceeds link establishment phase. Link Establishment Phase physical layer link negotiating transport options with peer exchanging configuration packets. Only options independent network-layer protocol configured this stage. Once configure-ACK packet been sent received, generates OPENED event proceeds next stage. Authentication Phase optional phase that authenticates peer. some links, such dial-up networking, desirable link authenticate before network-layer protocol packets exchanged. such implementation, request authentication must sent during link establishment phase. Network-Layer Protocol Phase After link been established authentication succeeded, network-layer protocol configured exchanging packets specific network layer supported. Each network-layer protocol unique must negotiated separately. Link Termination Phase CLOSE event generated when link terminated because carrier loss, authentication failure, linkquality failure, administrative closing link. terminate packets exchanged between peers. network-layer protocol informed closing link takes appropriate action. physical layer disabled after receiving terminate-ACK, timeout. DOWN event then generated, returns link dead phase. TINI TINI uses 1661 framework implementation. serves strictly transport mechanism datagrams over serial link. native network stack, exists below module above serial port drivers. alleviate programming complexity, stages simplified further (Figure Figure This TINI phase diagram illustrates implemented TINI. explained application developer through Java classes com.dalsemi.tininet.ppp package. states event driven. ppp.up() establishes link, authenticates, sets network protocol. Password-authentication protocol (PAP) protocol (CHAP) Once link configured, event generated adds interface network stack network traffic directed that interface. ppp.close() issues CLOSE event, brings link down, returns dead/terminate state. Example shows fragments PPPClient implemented DS80C400. (Get latest TINI firmware from http://files.dalsemi.com/tini/ updated code.) After object created, PPPClient installed object's PPPEventListener. parameters set, link initiated with series atCommand. Once link established, ppp.up() called notify network stack that available network traffic. link terminated with ppp.close(). Example PPPClient implementation public class PPPClient extends Thread implements PPPEventListener, CommPortOwnershipListener{ public void run(){ PPP(); openSerialPort(portNumber); this object event listener ppp.addEventListener(this); local remote address client peer type options ACCM escape octets ppp.setRemoteAccm(0x00000000); ppp.setLocalAccm(0x00000000); ppp.setAuthenticate(false, true); username password ppp.setUsername(username); ppp.setPassword(password); Initialize modem (int dialSequence.length; ++i) atCommand(dialSequence[i]); connected flag connected true; Issue command ppp.up(serialPort); connection established, communicate with remote host sendData(); ppp.close(); closeSerialPort(); Example demonstrates PPPEvent handled. Once link ready, event been received, added network interfaces packets forwarded this interface. Whenever CLOSE event received, network stack removes interface, terminating network activity through PPP. Example PPPEvent method event listener interface public void pppEvent(PPPEvent ev){ switch (ev.getEventType()){ case PPPEvent.UP: connection interfaceActive true; break; case PPPEvent.CLOSED: connection closed (interfaceActive){ interfaceActive false; connected false; break; default: break; Remote Humidity Data-Logger Example this article write powerful, networked application that takes full advantage networking capabilities provided very economical, small form-factor computer. example uses TINI reference design called TINIm400. This module provides low-power, I/O-rich, low-part-count embedded controller data collection module. When combined with TRE, robust networked data-collection systems require minimal software effort. TINIm400 module includes flash ROM, RAM, real-time clock, 1-Wire network, parallel I/O, asynchronous serial ports. This article presents complete example that captures logs data, connects over PSTN (public switched-telephone network) using manage dial-up connections, makes data available remote server. Dial-up networking support makes data logger truly remote. System Overview Figure shows setup demonstrating dial-up networking capabilities using analog modems. phone lines their equivalent available, hardwired serial-to-serial connection also used test setup. Figure remote data-logging system uses generic modems transfer data. test configuration Figure includes following equipment: module-running DataLogger server Windows® 2000 machine-running DataLoggerServer software analog modems-one attached Win2K other attached serial port module humidity sensing circuit-collecting humidity data logging DS80C400 Stamp+ module installed. platform supports ABM, Java programming. embedded firmware implements TCP/IP stack provides framework protocol. connection made using analog modems either side phone line simulator. different phone lines available, public phone network used instead. test interface, dial-up network connection should created. Once connection initiated, following sequence events occurs: TINI modem dials server's modem. server's modem answers incoming call. option negotiation begins. Authentication information transmitted from TINI remote server. server assigns address TINI notifies TINI server's address. Software Hardware Overview Complete source code downloaded from DataLogger.zip. Figure shows humidity data collected using sensor circuit. example sensor uses DS1923 1-Wire temperature/humidity sensor packaged iButton, although 1-Wire device used with DS80C400. Figure TINIm400 data logger collects humidity data using sensor. TINI Client Software TINI DataLogger example demonstrates three concepts: 1-Wire networking, serial communications, TCP/ networking. Brief functionality descriptions most important classes summarized below. DataLogger Class Retrieves parameters from configuration file: /etc/dataLogger.properties Creates instance HumidityLogger capture sample Creates instance PPPDaemon manage connection Initiates outbound connections remote server over network interface such Ethernet HumiditySensor Class Handles communication with, retrieves data from DS1923 HumidityLogger Class Initializes manages humidity sensors Writes data output stream server PPPDaemon Class Dial-up client Establishes TCP/IP connections using interface Manages physical data link Receives event notification Notifies DataLogger errors that occur physical data link PPPSerialLink Class Implements PPPDataLink interface Allows PPPDaemon manage data link Configures serial port data link PPPModemLink Class Subclass PPPSerialLink Manages modem communications Monitors SerialPortEvent.CD (carrier detect) detect modem hangs ModemCommand Class Handles serial communication with modem Throws DataLinkException case timeout while waiting desired response Remote Data-Logging Server DataLoggerServer simple server application developed accept connection from TINI download current log. DataLoggerServer Class Displays data Blocks accept wait socket connection PORT Builds logs charts humidity temperature changes over time Running Example Application files traditionally have been transferred TINI file system using protocol over Ethernet interface. order independent Ethernet interface, ymodem file transfer protocol been added Slush JavaKit. Ymodem allows files transferred TINI file system over JavaKit serial link. Besides application file, DataLogger.tini, /etc/.startup file containing following text should transferred TINI file system. Starting DataLogger application from Startup file setenv FTPServer disable setenv TelnetServer disable setenv SerialServer disable initializeNetwork java /DataLogger.tini This startup file disables serial server allows data-logger application access serial port. Once application startup files have been transferred, resetting TINI allows startup file processed data-logger application started. first thing TINI sends DataLoggerServer integer value that tells server number entries expect. After server reads this value, loops through entries, reading each individual sample. server displays each entry logs this information file. DataLoggerServer written Java requires Java Runtime Environment execution, same execution environment used Slush. www.java.sun.com installation instructions. After running DataLogger several minutes allow acquire samples, DataLoggerServer run. this example each sample time-stamped minute apart. DataLogger runs more than hour, fills sample vector, resulting (MAX_SAMPLE) data samples. runs days, weeks, even months, still gets MAX_SAMPLE samples, they always represent readings taken within last hour. Figure screen sample displays DataLoggerServer operation. Conclusion Implementing dial-up network connection DS80C400 straightforward. TINI Runtime Environment provides user-friendly APIs that conceal details developers concentrate their designs, using utility. Even without traditional phone network, same applications still replacing modem with GPRS wireless phone. TINIm400 configured initiate receive dial-up connections. data logging, central server dial into TINIm400 retrieve data periodic intervals. event local fault, TINIm400 module initiate dial-up connection central server notify system error. using TINIm400 detect local faults, central server dedicated analyzing retrieved data. with embedded module, hardware algorithms used depend specific application. rich capability DS80C400 flexibility TINI Runtime Environment make adding remote sensors/ actuators networks quick. Footnotes silicon software supports IPv4/6 over Ethernet. Application Note 708: Tiny InterNet Interfaces (TINI) Firmware Version later. This example derived from Chapter TINI Specification Developer's Guide, available www.maxim-ic.com/TINIguide. Windows registered trademark Microsoft Corp. 1-Wire registered trademark Dallas Semiconductor Corp. iButton registered trademark Dallas Semiconductor Corp. TINI registered trademark Dallas Semiconductor Corp. Java trademark Microsystems, Inc. Dallas Semiconductor wholly owned subsidiary Maxim Integrated Products, Inc. Application Note 710: http://www.maxim-ic.com/an710 More Information technical questions support: http://www.maxim-ic.com/support samples: http://www.maxim-ic.com/samples Other questions comments: http://www.maxim-ic.com/contact Related Parts DS1672: DS1923: DS2502: DS80C390: DS80C400: QuickView Full (PDF) Data Sheet Free Samples QuickView Full (PDF) Data Sheet QuickView Full (PDF) Data Sheet Free Samples QuickView Full (PDF) Data Sheet Free Samples QuickView Full (PDF) Data Sheet Free Samples DSTINIM400: QuickView Full (PDF) Data Sheet AN710, 710, APP710, Appnote710, Appnote Copyright Maxim Integrated Products Additional legal notices: http://www.maxim-ic.com/legal Other recent searchesV23826-K15-C - V23826-K15-C V23826-K15-C Datasheet U6084B - U6084B U6084B Datasheet STEL-1377Q - STEL-1377Q STEL-1377Q Datasheet STEL-1377S - STEL-1377S STEL-1377S Datasheet L6221 - L6221 L6221 Datasheet DS317x - DS317x DS317x Datasheet DS318x - DS318x DS318x Datasheet AFS8500 - AFS8500 AFS8500 Datasheet ADV601 - ADV601 ADV601 Datasheet
Privacy Policy | Disclaimer |