SLTA-10 Adapter and PSG/3 User’s Guide Revision 3 e ECHELON’ Corporation 078-0160-OlE
Echelon, LON, LonTalk, LonBuilder, NodeBuilder, Neuron, LonManager, LONMARK, LonMaker, LONWORKS, 3120 and 3150 are registered trademarks of Echelon Corporation. LonSupport and LonWorld are trademarks of Echelon Corporation. Other brand and product names are trademarks trademarks of their respective holders.
FCC NOTICE (for USA only) Federal Communications Commission Radio Frequency Interference Statement Warning: This equipment has been tested and found to comply with the limits for a Class B digital device, pursuant to part 15 of the FCC Rules. These limits are designed to provide reasonable protection against harmful interference in a residential installation.
Preface This document describes how to use the SLTA-10 Serial LonTalk@ Adapter to connect a host processor, with an EIA-232 (formerly RS232) serial interface, to a LONWORKS@’ network. The connection to the host processor can be made either directly or remotely through a pair of modems.
Content This manual provides detailed information SLTA-10 Adapter. . Chapter 1 introduces the SLTA-10 Adapter and provides a quick overview. . . Chapter 2 describes the SLTA-10 Adapter hardware. Chapter 3 describes how to attach an SLTA-10 Adapter. Chapter 4 describes the configuration switches of the SLTA-10 Adapter. . Chapter 5 describes the software for the SLTA-10 NSI mode. . Chapter 6 describes the software for the SLTA-10 MIP mode. .
Related Manuals The following Echelon documents are suggested reading for more information: The LCA Object and Data Server Programmer’s Guide describes how to write a 32-bit Windows host application and installation tool that can be used with the SLTA-10 NSI mode. The LONWORKS Host Application Programmer’s Guide describes how to write a host application that can be used with the SLTA-10 MIP mode.
vi Preface
Contents Preface iv Content Related Manuals Web Access 1 2 3 4 SLTA-10 V V Adapter l-l Overview Introduction Two Modes of Operation: SLTA-10 NSI and MIP Modes SLTA-10 NSI Mode Features SLTA-10 MIP Mode Versus the SLTA/2 The SLTA-10 Adapter Configurations Software Availability LNS Compatibility TAP1 Compatibility l-2 l-3 l-4 l-4 l-5 l-5 l-5 l-6 SLTA-10 2-1 Adapter Hardware Mechanical Description Switches, Indicators, and Connectors ESD Warning Connecting Power 2-2 2-4 2-4 2-6 Cabling 3-1
6 7 The SLTA-10 MIP Mode Software SLTA-10 MIP Mode Software Overview Installing the SLTA-10 MIP Mode Adapter Software Installing the Windows 3.
8 9 Using the DOS Driver with SLTA-10 MIP Mode 8-1 Installing the SLTA-10 MIP Mode Driver for DOS Buffer Options Serial Bit Rate Options DOS Device Options Timing Options Network Interface Protocol Options Calling the Network Driver from a Host Application Using the SLTA-10 MIP Mode under Microsoft Windows 3.
11 Using the SLTA-10 Adapter with Overview SLTA-10 Adapter Connection States Command Set Assumptions Translated Characters DTE Connections Network Management Messages EEPROM String Pool Management Product Query Send Modem String Modem Response Query Connection Status Query Install Directory Entry Dial From Directory Hang-up Install Password Install Modem Configuration String Install Hangup String (MIP mode only) Install Dial Prefer Install Hangup Timer Configure Modem Request /Release SLTA Clear EEPROM
Using a Programmable Serial 13-1 Gateway Creating a Serial Gateway SLTA/PSG History Programmable Serial Gateway Hardware Resources Developing a PSG Application with the NodeBuilder Development Tool PSG Software Installation PSGBOR.DTM Firmware Library Support Usage Code Development and Debugging PSG.
xii Preface
1 SLTA- 10 Adapter Overview The SLTA-10 Serial LonTalk Adapter (Models 73351, 73352, 73353, and 73354) is a network interface that enables any host processor with an EIA-232 serial interface to connect to a LONWORKS network. The SLTA-10 Adapter extends the reach of LONWORKS technology to a variety of hosts, including desktop, laptop, and palmtop PCs, workstations, embedded microprocessors, and microcontrollers. The SLTA-10 Adapter has two modes of operation: NSI and MIP modes.
Introduction The SLTA-10 Adapter is the latest addition to the SLTA product family. It is an EIA-232 (formerly RS-232) compatible serial device that allows any host with an EIA-232 interface and proper software to communicate with a LONWORKS network. An SLTA-10 Adapter enables the attached host to act as an application node on a LONWORKS network.
Host Host Application LNS or LonManager Software (optional) Driver Interface Network Driver EIA-232 Interface SLTA-10 Network Adapter . Transceiver Interface Network Interface Figure 1 .
Feature Software used to establish connections via modems Who initiates calls from a remote network Input power options Configuration Switches Network Connector Processor Input Clock Ready to wall mount Transceiver versions available To attach to a modem Supports sleep mode Message Tag 15 available Default Buffer Configuration SLTA- 70 NSI Mode SLTA-10 M/P Mode SLTA-10 NSI Mode SLTN2 SLTA-10 itself or “Helper / Dialer” node 9-30VAC or DC or wall mount supply Externally accessible Color coded, rem
depending on transceiver type. In addition, the SLTA-10 configuration DIP switches are externally accessible. The SLTA-10 enclosure has been improved to allow wall mounting, without requiring a bracket. The SLTA/2 and the SLTA-10 MIP mode use the same drivers and link layer protocol. The SLTA- 70 Adapter Configurations The SLTA-10 Adapter is available with the following transceiver and power supply options: l l Software Transceivers.
Applications based on LNS 1.0 or 1.01 do not have full functionality with respect to the SLTA-10 Adapter and modems because LNS 1.0 and 1.01 have default system behavior that is incompatible with using the SLTA-10 Adapter through modems. For instance, an application based on LNS 1.0 and 1.01 terminates (i.e., shuts down) in a manner that interferes with one the automatic dial-out initiation techniques. In LNS 1.0 or 1.
2 SLTA- 10 Adapter This chapter SLTA-10 Adapter provides User’s Guide a physical description Hardware of the SLTA-10 Adapter.
Mechanical Description Figures 2.1 and 2.2 show the SLTA-10 Adapter in its enclosure. Figure 2.3 shows the SLTA-10 Adapter board without an enclosure. BACK VIEW . ALL DIMENSIONS ARE IN INCHES WITH EQUN. mm DIMENSIONS IN BRACKETS. BACK VIEW Figure 2.
Figure 2.2 shows a 1:l view of the enclosure and may be used as a mounting template. 3.42 [86.86] - P 7 0 0 0 0 0 Figure 2.
Component Side View 0 n W) Service I Button Wl) ( Service LED Neuron@ 3150@ Chip (55) EIA-232 Data Port 1 F w 1 Config. Switch Block (DW lower Indicator LED Transceiver Section (53) Power Input (J2) (Jl) Power Input Network Connector 4 - Figure 2.3 SLTA-10 0 ECHELON 1996 SLTA-10 Adapter Without Enclosure (Typical Component-Side Switches, Indicators, View from Top). and Connectors ESDWarning This product contains components which are sensitive to static electricity.
Table 2.1 describes the external connections and switches/LEDs on the SLTA-10 Adapter. Table 2.1 SLTA-10 Adapter Interfaces Function Interface Service Button S2 Pressing this switch grounds the service request pin on the Neuron Chip within the SLTA-10 Adapter. While this switch is pressed, the service LED should light to maximum intensity.
In tetface Function I Unregulated Black connector for the power input. The mating plug (provided) is Weidmiiller PN 125911. AC/DC Power Input Two-Position Unregulated Female 2.1 mm inside diameter and 5.5 mm outside diameter barrel input connector. For use with Echelon power supplies, models 78010,78020,78030, and 78040. AC/DC Power Input Barrel Connector ( J2 I Power Indicator LED (Green LED) Indicates presence of input power to the SLTA-10 Adapter.
Table 2.2 provides the specifications for power inputs to the SLTA-10 Adapter. The barrel connector input, 52, is a standard female power plug with a 2.1 mm inside diameter and 5.5 mm outside diameter, (LZR Electronics part number HP-114A, Radio Shack catalog number 274-1569, or equal). A surge protector may be required between the AC mains and the power supply as neither the power supply nor the SLTA-10 Adapter include surge protection.
2-8 SLTA-10 Adapter Hardware
3 Cabling and Connections This chapter demonstrates how to attach the SLTA-10 LONWORKSnetwork, a PC, and a modem. Adapter to a To connect an SLTA-10 Adapter to a modem, use a special null modem cable. The SLTA-10 Null Modem Cable (Model 73380) is available for purchase from Echelon. The cable specifications also have been included in this chapter. Note that most off-the-shelf null modem cables will not work in this configuration.
LONWORKSNetwork Connection The SLTA-10 includes a removable screw terminal connector (Jl) for the twisted pair LONWORKS network connection. The Jl should be connected as follows: Polarity Insensitive s!zl 1 RS-485 Cable - 2 Shield Jl Jl Models 73351,73352,73353 Attaching Model 73354 the SLTA- 10 Adapter EIA-232 devices are configured as either Data Circuit-terminating Equipment (DCE) or as Data Terminal Equipment (DTE). A DCE device connects to a DTE device, unless a null modem cable is used.
Table 3.1 PC DB-9 to DB-9 Connection PC Connector DB-9 Male Cable DB-9 Female Cable DB-9 Male RxD Pin 2 Pin 2 Pin 2 TxD Pin 3 Pin 3 Pin 3 1 Pin 5 Pin 5 Pin 5 Signal Name Signal Ground I I I I DB9 Female SLTA-10 WE) PC (DTE) DB-9 female end DB-9 male end Figure 3.1 DB-9 to DB-9 Connection If using a PC or modem equipped with a DB-25 connector, then use a cable equipped on one end with a DB-25 female connector and a DB-9 male connector on the other end.
Table 3.3 DCE Modem to SLTA-10 Adapter Connection Modem Signal Name Cable DB-9 Male Null Modem (DB-9 to DB-9) SLTA-10 (DCE) DB-9 Female Cable DB9 Male RxD-Pin 2 I Pin 2 1Pin 2-3 1Pin 3 1TxD-Pin 3 TxD-Pin 3 Pin 3 Pin 3-2 Pin 2 RxD-Pin 2 Pin 1 Pin l-4 Pin 4 DTR-Pin 4 DCD-Pin1 RTS-Pin DTR-Pin 74 Pins 4 & 7 4.7-6 Pins Pin 6 DSR-Pin 6 GND-Pin 5 Pin 5 Pin 5-5 Pin 5 GND-Pin 5 l-l modem DB-9 male end SLTA-10 DB-9 male end Null Modem Figure 3.
Hardware Configuration This chapter Adapter.
Configuring the SLTA- 10 Adapter Hardware There are eight configuration switches on the SLTA-10 Adapter’s switch block (Sl). These inputs are read by the SLTA-10 firmware to configure or enable features. Figure 4.1 shows the factory default settings for the SLTA-10 Adapter. Changes to the switch configurations will not occur until the power is cycled on the SLTA-10 Adapter. The switches are read immediately after a power reset.
running DOS or Windows cannot guarantee receipt of all characters in an input stream appearing back-to-back on a COM port . ALERT/ACK link protocol (down position) is the default setting for the SLTA-10 Adapter. When the SLTA-10 Adapter uses the ALERTlACK protocol and it wishes to send data to the host, it first sends a single ALERT character (hex 01). The host then responds with an ALERT ACK character (hex FE) to indicate its readiness to accept the rest of the data.
Network Disable (Switch3 / CFG 7) Figure 4.4 SLTA-10 Adapter Network Switch 3 / CFGl Switch 3 / CFGl enables (down position) or disables (up position) network communications after reset. If disabled, the SLTA-10 Adapter will not be able to communicate on the network after a reset until it receives an ~~FLUSH-CANCEL command from the host. The SLTA-10 Adapter prevents network communications by entering a FLUSH state.
If CFGl is set to Network Enable (down position), the SLTA-10 Adapter will enable network communications after a reset by going directly to the NORMAL state, thus allowing communications without requiring the niFLUSH_CANCEL command. If the SLTA-10 Adapter is used with a modem, and the application requires the SLTA-10 Adapter to dial out to a host in response to a message from the network, then CFGl must be set to Network Enabled.
Autobaud (AB) The switch (5) labeled AB on the SLTA-10 Adapter is used to select automatic baud rate detection-the autobaud feature. Autobaud must not be used when the SLTA-10 Adapter is used with a modem. When autobaud is enabled, the SLTA-10 Adapter matches the serial bit rate of a local host. When powered, the SLTA-10 Adapter looks for a ‘0’ byte from the host. The SLTA-10 Adapter cycles through all the serial bit rates until a ‘0’ is recognized.
For the Windows 95198 or NT network driver, there is no /B option. When using these drivers, the serial bit rate is configured using the SLTALink Manager as explained in Chapter 7. 115,200 57,600 bps bps 9600 bps 2400 bps (default) 38,400 bps 1200 bps 19,200 300 bps bps IFigure 4.7 SLTA-10 Adapter Serial Baud Rate Switches 6, 7, and 8 / BAUD[2..0] Table 4.
SLTA- 10 Adapter Buffers The types of messages passed between the host and the SLTA-10 Adapter are determined by EEPROM configuration options. These options are described under Network Interface Configuration Options in Chapter 3 of the LONWORKS Host Application Programmer’s Guide. The Network Disable Option affects whether or not the SLTA-10 Adapter can send and receive application messages.
The NODEUTIL node utility application, available on Echelon’s web site, can be used to modify the MIP mode buffer configuration from a PC host. See the README.TXT file included with NODEUTIL for details. By default, the SLTA-10 NSI-mode program ID consists of 8 bytes of program identification information (80-00-Ol-Ol-03-00-xx-3C, where ‘xx’ is determined by the transceiver being used). The host application must change this program ID to indicate its application.
4-10 Configuration
The SLTA- 10 NSI Mode Software This chapter describes the Windows 95/98 or Windows NT software used with the SLTA-10 NSI mode. This software is available with the LonMaker for Windows Integration Tool (Model 37000), in the Connectivity Starter Kit (Model 58030-Ol), as part of the LNS Developer’s Kit for Windows (Model 34303) and on the Echelon web site (www.echelon.com). Skip this Chapter if you are using the SLTA-10 MIP mode.
SLTA- 10 NSI Mode Software Overview The SLTA-10 Adapter is not shipped with any software. The Windows NT driver and SLTALink Manager software are available with the LonMaker for Windows Integration Tool (Model 370001, in the Connectivity Starter Kit (Model 58030-011, as part of the LNS Developer’s Kit for Windows (Model 34303) and on the Echelon web site (www.echelon.com). The SLTA-10 NSI mode set-up installs three pieces of software: l the SLTA-10 NSI mode Windows 95/98 or NT Driver, .
When prompted for a program name, enter the following: 5. A:\SETUP.EXE If necessary, replace A : with the drive letter which corresponds to the drive containing the SLTA-10 NSI mode installation diskette. 6. When prompted click the button marked ‘Next >“. 7. When prompted for a destination directory, enter the desired installation directory. By default this directory is c : \ 1onwor ks, unless previous LONWORKS products have been installed and have registered a different path in the Windows Registry.
Windows 95/98 and NT Software Installation Results The Windows 95 and NT installation software loads a selection of new files and updated Echelon files to different locations on the PC’s hard drive. The function and location of these files can be found in readme. txt.
6 The SLTA- 10 MIP Mode Software This chapter describes the SLTA-10 MIP mode software shipped with the Connectivity Starter Kit (Model 58030-01) and on the Echelon web site at www.echelon.com. This software is an updated version of the SLTA/2 adapter software. Echelon does not provide a 32-bit Windows MIP mode. driver for the SLTA-10 Skip this Chapter if you are using the SLTA-10 NSI mode.
SLTA-10 MIP Mode Software Overview The SLTA-10 Adapter is not shipped with any software. The SLTA-10 MIP mode software and drivers are supplied in the Connectivity Starter Kit and must be ordered separately. The software includes ANSI C source code for HA, a sample host application for MS-DOS that can be used as a basis for a user-developed host application on other host platforms.
The SLTA-10 Adapter software will be installed in the SLTA sub-directory of your LONWORKS directory, with the exception of the DOS network driver LDVSLTA. SYS. This file will be installed in the BIN sub-directory of your LONWORKS directory. To install the DOS network driver into your CONFIG. SYS file, follow the instructions in Chapter 8. The SLTA directory will contain the following files: l l Read-Me File. The README.
formats. External interface files in version 3 format are contained in the SLTA2\XIF-V3 directory. The SLTA directories contain at least the following files: l NSLTA125.XIF For SLTA-10 Adapter with a TP/XF-1250 transceiver. NSLTA78K.XIF For SLTA-10 Adapter with a TPKF-78 transceiver. NSLTAFTl.XIF For SLTA-10 Adapter with a TP/FT-10 transceiver. Sample Host Application. A sample host application is contained in the HA directory.
l l HA-TEST.NC A Neuron C program which may be loaded into a Neuron emulator and bound to the sample host application for testing. D1SPLAY.H A Neuron C include file to drive the Gizmo 2 I/O module for the test example. Host Connect Utility. A sample host connection utility is contained in the HCU directory, with source code. See Chapter 12 for details. The files supplied are: HCU.EXE Executable file for the Host Connection HCUJlA1N.C The main C source program. HCU.
6-6 The SLTA-10 MIP Mode Software
7 Using the Windows 95/98 or NT Driver and SLTALink Manager with SLTA-10 NSI Mode This chapter describes the SLTALink Manager software, which establishes and configures local and remote links from the host PC to the SLTA-10 Adapter in NSI mode. A local link requires a direct cable connection from the host PC to the SLTA-10. A remote link requires a pair of modems: one attached to the SLTA-10 Adapter and the other attached to the host PC.
Software Overview The SLTALink Manager is a standalone application that can monitor a modem line, answer an incoming phone call, associate the incoming call’s SLTA-10 Adapter (and hence its network) with a LON device, and then launch a pre-determined application for that particular network or SLTA-10 Adapter.
Figure 7.1 SLTALink Manager Main Screen Establishing a Communications Line for Dialing in to a Network Establishing a communications line is the first task to be completed. Figure 7.2 displays the message that appears when Dialing Preferences is chosen from the Line menu. This message will only appear when telephony information has not been provided. This case usually occurs if the computer has never been configured to use a modem. Figure 7.
This message in figure 7.2 may not be visible due to being covered by the SLTALink Manager Dialing Preferences window. Moving the Dialing Preferences window should reveal the message-if it exists. This leftmost window, shown in figure 7.3, will display . . . for the “Dialing from:” indicator if there has been no dialing location created/chosen. “~~~” Figure 7.3 SLTALink Manager Dialing Preferences Window Clicking on Dialing Properties will bring-up the Windows Location Information window (figure 7.
Figure 7.5 Windows Dialing Properties Window Establishing a Communications Line for Calls Dialed out to the PC The next step is to select a line/modem to monitor for incoming calls. Figure 7.6 shows the Monitor Line window that is displayed when “Monitor for SLTA dial-in” chosen from the Line menu. Multiple phone lines or modem can be monitored calls) at the same time by the SLTALink Manager SLTA-10 Adapter User’s Guide (for receiving software.
Figure 7.6 SLTALink Manager Monitor Line Window The option list box will display the list of modems which have been set-up for use on this computer. The list can be created/modified by using the Windows Modem Control Panel. Select the line/modem to be used for incoming calls, then click OK. Establishing Remote and Local Network Sites Choosing Select/Action from the Link menu will display a screen similar shown in figure 7.7. Figure 7.8 shows the default local setup. to the screen Figure 7.
Select “Local SLTA-10” and click Edit. This action will present a window allowing the ability to customize the connection-including changing it from Local to Remote, or modifying the name. SLTALink Configuration Script formats The SLTALInk Configuration dialog can accept a script file for importing values to the dialog’s user interface. Following this step, the configuration values can then be applied tot he SLTA-10 by clicking Apply. Individual configuration items are processed on a line-by-line basis.
NSIConnect=two ClearEEPool=switch digits value NSI Auto-connect: either two digits, or no digits if disabled. The first digit represents the starting dial directory number, the second digit represents the last dial directory number. Either a ‘1’ or a ‘0’ to enable or disable clearing of the EE pool before applying. Example .
The SLTALink Manager software allows a user to create two links with different names but the same Remote Identifier. However, when a network dials-out to a PC with multiple links each with the Remote Identifier, the user has no control over which link is selected, which could result in undesired behavior. Link Type The type of link specifies whether the SLTA-10 is directly connected to the PC (Local), or if the SLTA-10 is at a different location and must be accessed via a set of modems (Remote).
%RESULT% Expands to an unquoted word that represents reason of the connection. the success or fail The startup application will be launched when a dial-in occurs for this link, or optionally, when a manual connection is made to the link. It will not start up if the link is connected to due to an “auto-connect” case. Enabling a Callback If a remote SLTA-10 adapter has callback enabled then it will expect a callback command whenever someone dials in to it.
Security Password The SLTA Adapter may be configured to accept incoming calls and connect the network to the host. Incoming callers may be required to provide a password before the SLTA adapter will connect them to the network. Enable Callback Check this box if you need to enable callback. If a remote SLTA has callback enabled then it will expect a callback command whenever someone dials in to it. The callback command includes a directory index that points to a phone number stored in the remote SLTA.
! Causes a carriage return to be sent. Causes a 500ms pause. The carriage return is not required at the end of the string. Clear EE Pool on Apply Check this box to clear the SLTA’s EEPROM pool before applying the configuration. This will force the clearing and re-programming of the strings that use the EEPROM pool: The Modem Initialization and Dial Prefer strings, and the Dial Directories. If not checked then only the SLTA’s strings that have been changed will be updated.
Diagnostics A number of Diagnostic and testing services are provided via the Diagnostic Screen, accessed through the Devices menu (see figure 7.10). The Test button retrieves status and error counts from the SLTA-10 Adapter. The Service button will cause the SLTA-10 Adapter to broadcast a service pin message on the network. The reset button causes a reset of the Neuron Chip in the SLTA-10 Adapter, but does not clear the Neuron Chip’s system image.
This causes the specified link to be disconnected. /D C:\lonworks\bin\sltalink.exe /# Ymmber” "Remote" /D This overrides the phone number for the link. If you have checked the “Use Country Code and Area Code” option for this link then the number must be in the ‘canonical’ format without a ‘+’ sign and enclosed in double quotes.
Characteristics of a Well-Designed System Well understood strategies used with the SLTA-10 Adapter and the SLTALink Manager for the following system functions are essential for reliable system design: Call Initiation, Call Termination, and Monitoring. Call lnitia tion The four scenarios for call initiation are: dial-in remote PC only, dial-in / dial-out, and callback. to the network only, dial-out to the Dial-In to the Network Only In the most straight-forward case, a user launches an application.
In the third case, a custom Neuron Chip application must be written. All three cases could be used with the same SLTA-10 Adapter. In the dial-out only case, besides the call initiation, the SLTALink Manager must be able to launch the appropriate application - with the correct database and device driver name. One system solution is to create a separate link for each SLTA-10 Adapter. Each link then stores the Remote Identifier of its SLTA-10 Adapter after the first connection.
SLTALink Manager on this PC receives the callback just like any other normal dial-out call and launches the application contained in the link. At this point there may be two copies of the application open. Depending on sharing configuration, the second application may fail because appropriate LNS database in already opened.
and the manual disconnect in the SLTALink Manager, this scenario does not result in the application terminating. This scenario therefore carries the same advantages and disadvantages as those described in the previous paragraph. Monitoring: Application Termination Strategy There are three strategies for terminating the remote LNS monitoring application. The first strategy is to require user intervention to shut down or terminate the application. No special software must be written for this case.
The first is more the second approach places the burden on the host application. direct and is likely to result in the information getting to the host more quickly. The second approach has the primary advantage that no special Neuron Chip application code is required; also, since the call initiation and host application launch may require minutes, the time it takes the host application to poll several network variables is not significant.
Host Monitoring Application Remote LCA SLTALink Manager and Network Driver Modem Dial-out t I Modem Null Modem Cable I ~~~~ I SLTA-10 Adapter Transceiver Interface LNS Server LonWorks Devices Figure 7.
Host Monitoring Application LNS Server Driver Interface SLTALink Manager and Network Driver : I Modem I Dial-in and Dial-out to the LNS Server Modem 1 Null Modem Cable I SLTA-10 Adapter Transceiver Interface LonWorks Devices Figure 7.
Host Host Monitoring Application Monitoring Application Remote LCA Remote LCA SLTALink Manager and Network Driver SLTALink Manager and Network Driver I Modem I I Modem I Dial-in I Modem I Null Modem Cable SLTA-10 Adapter t Transceiver Interface LonWorks Devices Figure 7.
8 Using the DOS Driver with SLTA-10 MIP Mode This chapter describes the DOS network driver supplied with the Connectivity Starter. The driver also is available from the Developer’s Toolbox on Echelon’s web site at www.echelon.com. The DOS network driver provides a device-independent interface between a DOS or Windows 3.1x host application and the SLTA-10 Adapter in MIP mode. The driver is configurable to use one of four PC/AT serial ports, COMl through COM4, at one of eight serial bit rates.
Installing the SLTA-10 MIP Mode Driver for DOS The DOS driver is supplied on the &PPY diskette included with the Connectivity Starter Kit. The latest version of this driver may be obtained from the Echelon web site. The SLTA-10 MIP mode network driver for DOS is installed by adding a DEVICE command to the DOS CONFIG. SYS file. Edit the CONFIG. SYS file to include the line: DEVICE=C:\LONWORKS\BIN\LDVSLTA.SYS [options] Substitute your drive and directory name if other than C : \LONWORKS\BIN.
is determined by the expected incoming traffic and the capability of the host application to process it. If the incoming traffic is bursty, more input buffers are required. If the application cannot process incoming traffic fast enough, the input buffer pool will fill up with unprocessed packets. In that case, the SLTA-10 Adapter will not be able to pass any new data to the host, and the input application buffers in the SLTA-10 Adapter will start to fill up.
DOS Device Options /Pn Sets the serial port to where is l-4 for COMl default is COMl. - COM4. The /Dn Defines the device unit number as a>, where a> is between 1 and 9, so that the DOS device name is “LONl” through “LON9”. The default is 1 for “LONl”. This option can be used to support multiple network interfaces on a single PC. For example, this device name is passed as a parameter to Ixt-open ( ) when using the LonManager API.
Timing Options /Rnn Defines the flush/retry count in 55ms intervals. This value is used in error states for re-transmitting requests and for terminating receive flushes when input errors occur. Normally, this option should not be specified. /Wnnn Includes a delay of arm> microseconds when transmitting downlink. This parameter can be used to pace the rate at which bytes are transmitted downlink to the SLTA-10 Adapter, and may be required for high-performance network management tools.
port from the write function call. The host write functions will not return until the message has been sent downlink. When using the ALERT/ACK link protocol, interrupt latency is not a problem, since the SLTA-to-host protocol includes an acknowledgment of the start of the message. The driver employs timeouts in order to prevent lockout of the write function, and timeouts for clearing various states of the transmitter/receiver when line errors occur.
Disables the buffer request protocol. When this option is enabled, the driver requests the buffer count from the SLTA-10 Adapter using the ~~SBUFC ( OxE7 ) command whenever the interface is opened, or when the interface is reset, and reports an niRESET to the host. The driver keeps track of the number of available output buffers in the SLTA-10 Adapter by examining both uplink and downlink messages.
Calling the Network Driver from a Host Application The SLTA-10 MIP mode network driver for DOS supports the open, close, read, write, and i oc t 1 DOS calls. See Chapter 4 of the Host Application Programmer’s Guide for more details. When the SLTA-10 MIP mode network driver for DOS is loaded during execution of the CONFIG. SYS file, it does not attempt to communicate with the SLTA-10 Adapter. When the network driver is opened with the DOS open call, it establishes communications with the SLTA-10 Adapter.
Host applications that established telephone If you wish functions. execution of your host only communicate to the SLTA-10 Adapter via an alreadyconnection do not need to concern themselves with these to establish or take down telephone connections during the application, use the source code of HCU as a guide. When function code 2 is used, argdx points to the direct-calls structure defined for all LONWORKS standard network drivers for DOS.
Sub-command 2 is used to set the state of the DTR line. is enabled (on) if the mode field is true. In this case, the DTR signal Sub-command 3 is used to set the serial bit rate of the serial interface. The mode field determines the new bit rate as follows: 0:14,400; 1:1,200; 2:2,400; 3:9,600; 4:19,200; 538,400; 657,600; 7:115,200. Using the SLTA- 10 MIP Mode under Microsoft Windows 3.1 x In order to use the SLTA-10 MIP mode network driver for DOS under Microsoft Windows 3.
9 Creating an SLTA- 10 MIP Mode Driver This chapter describes the process of building a network driver for a host that is to be connected to an SLTA-10 Adapter in MIP mode. This chapter also includes a description of the network interface protocol for the SLTA-10 MIP mode. The network interface protocol defines the format of the data passed across the EIA-232 interface, and varies depending on the configuration of the SLTA-10 Adapter and the network driver.
Purpose of the Network Driver The network driver provides a hardware-independent interface between the host application and the network interface. By using network drivers with consistent calling conventions, host applications can be transparently moved between different network interfaces. For example, the standard SLTA-10 MIP mode DOS network driver, together with the Windows 3.1x DLL software, allows DOS and Windows 3.
Host Application r-------‘----------‘-r I -----bWhmw2r_APL _ _ _ _ _ I ---___------------------------------------Application Host Application Layer Interface A Driver services: open/close/ioctl/read/write Input Buffers Output Buffers I I I Host Downlink Flow Control Buffer Request Protocol Uplink Flow Control XON/XOFF Protocol I I Network Driver Interface Transport Protocol (Reliable or None) Interface Link Protocol (ALERT/ACK or Buffered) - -------- Physical Layer Interface (EIA-232) I SLTA
from and written system calls. to the serial device using the UNIX read ( ) and write () The UNIX network driver includes a ldv-pos t-events ( ) function that should be called periodically from the client application in order to assure that the SLTA-10 Adapter traffic is being processed. The DOS network driver serial I/O functions are implemented by MSD-SIO . C, MSD-UART . H, and MSD-IRQC . ASM. These files may all be replaced as long as the required serial I/O functions in MSD-s IO. c are provided.
network driver. The read/write interface is implemented ldv-wr i te ( ) functions for the UNIX network driver in the ldv-read ( ) and The following files are unique to a DOS driver and would probably not be used in a porttoanotherhost: MSD-DRVR.H,MSD-DIFC.C,MSD-FRST.~,MSD-LAST.C, MSD-SEGD.ASM. Network Interface Protocol The network driver implements the host side of the network interface protocol, providing an easy-to-use and interface-independent read/write interface to the host application.
device responds by transmitting the ALERT ACK byte (value FE hex). This low level handshaking process prevents the sender from transmitting the rest of the sequence before the receiving device is ready. Once the ALERT ACK byte is received by the sender it sends the rest of the message without any other interactions. Receiver Sender I 1 ALERT ACK (FE) 1 L I I [ data ] I 1 checksum 1 Figure 9.
transmitting a message. If the ALERT ACK is not received in time, the SLTA-10 Adapter repeats the process by transmitting another ALERT byte. The SLTA-10 Adapter cannot support a full duplex communications process between it and the host. The network driver included with the SLTA-10 Adapter takes this into account. Data frames transmitted to the SLTA-10 Adapter while it is in the process of sending uplink messages will be lost if more than 16 bytes are sent to the SLTA-10 Adapter.
reported to the application, and checksum errors detected by the SLTA-10 Adapter will cause the message to be ignored. This protocol is used when the host is capable of accepting asynchronously occurring input data without losing characters. The host is also relieved of the obligation of responding to an ALERT character within 50 ms. This protocol may therefore be used by an application-level handler calling an interrupt-driven buffered serial device driver.
byte (value FE hex). This low level handshaking process prevents the sender from transmitting the rest of the sequence before the receiving device is ready. Once the ALERT ACK byte is received by the sender it sends the rest of the message without any other interactions. The length byte value describes the length of the network interface command byte plus the length of the data field. This value will always be at least 1.
SLTA- 10 Adapter Timing Data Certain aspects of the SLTA-10 Adapter link and transport fail-safe timeouts in order to control the time spent waiting change when errors occur. layer protocols implement for protocol states to Downlink Byte-to-Byte Receive Timeout The downlink byte-to-byte receive timeout is the maximum allowable period between the end of a single byte data frame sent downlink to the SLTA-10 Adapter, to the end of the next single byte data frame sent downlink to the SLTA-10 Adapter.
Down/ink Buffer Request Protocol The network driver receives application buffers from the host application, translates them to interface buffers, and passes the interface buffers to the SLTA-10 Adapter. There are two types of downlink commands from the host to the SLTA-10 Adaptercommands that can be executed directly by the SLTA-10 Adapter, and commands that need to be buffered in the SLTA-10 Adapter.
A Flush Receive niCOMM or niNETMGMT? Node Reset Receive niFLUSHCANCEL Available? output Available? Receive niCOMM or niNETMGMT message? L(czi&Jm Note: niNETMGMT commands are allowed in the Flush state. Figure 9.5 SLTA-10 Adapter Downlink Flow Control States Following is the sequence of events for transferring an nicoMM or niNETMGMT command downlink to the SLTA-10 Adapter: 1 The SLTA-10 Adapter is initially 9-12 in the NORMAL state.
~ buffer has the same command and queue value sent in step 2, and also contains the data and checksum. Upon completion of this transfer, the SLTA-10 Adapter returns to the NORMAL state. The network driver must preserve the continuity of the type of buffer For example, if the request and the type of message sent downlink.
SLTA-10 Adapter. SLTA-10 Adapter. Presentation This feature has been added to the DOS driver for the Layer Protocol The network driver exchanges LonTalk packets with the host application at the presentation layer. The LonTalk packet enclosed in a command of type niCOMM or niNETMGMT is described in detail in the Host Application Programmer’s Guide. It is summarized here for convenience.
10 Initialization This chapter the SLTA-10 SLTA-10 Adapter describes initializing, Adapter as a network User’s Guide and Installation communicating node.
Initializing an SLTA- 10 Adapter After an SLTA-10 Adapter and its host processor are powered, the host application must initialize the SLTA-10 Adapter. When an SLTA-10 Adapter is initially powered-up or reset, it disables network communications by entering the FLUSH, unconfigured state, unless the SwitchS/CFGl input is set to Network Enable. The FLUSH state prevents the SLTA-10 Adapter from responding to network management messages before the host application has initialized the SLTA-10 Adapter.
2 Cancel the FLUSH state in the SLTA-10 Adapter. LNS applications automatically handle this, and it is done automatically by the SLTA-10 MIP mode DOS network driver after an open command or uplink niRESET if the / Z flag is not specified. The FLUSH state can be manually canceled by sending the niFLUSH_CANCEL message. The FLUSH state can also be disabled by a configuration switch on the SLTA-10 Adapter as described earlier in this chapter.
install the SLTA-10 Adapter in a LonBuilder network using the service pin, you must either connect the SLTA-10 Adapter to a host, and open the network driver (for example, by running HA), or else set SwitchSKFGl to the Network Enable state. When installing the SLTA-10 Adapter node, the channel definition must match the transceiver on the SLTA-10 Adapter. If it does not, the SLTA-10 Adapter will not accept the new values.
11 Using the SLTA-10 Adapter with a Modem This chapter describes the operation of the SLTA-10 Adapter when a remote host computer is connected via a pair of modems to the SLTA-10 Adapter. In this set-up, any node on the network may request the SLTA-10 Adapter to initiate a dial-out operation to connect to the host. In addition, if the SLTA-10 Adapter is functioning in NSI mode, the SLTA-10 Adapter itself may be configured to initiate a dialout operation to connect to the host.
Overview The SLTA-10 Adapter network interface may be attached to the host processor using modems and the switched telephone network. Figure 11.1 illustrates this option. Host ‘w I Modem 1 I Modem I Telephone Network via null modem EIA-232 Interface Network Interface transceiver LONWORKS Network Figure 11 .
updates are addressed to the SLTA-10 Adapter. Alternatively, another node on the local network can command the SLTA-10 Adapter to initiate the connection. In MIP mode, the SLTA-10 Adapter cannot itself initiate any connection; it must be commanded to do so by another node on the local network, or else by the modem’s detection of an incoming call. This means, for example, another node on the local network must initiate the dialing procedure when an alarm is detected that needs to be reported to the host.
Command Set Assumptions The SLTA-10 Adapter uses the following strings received from the modem to interpret the connection state. These strings are consistent with all Hayes AT compatible modems operating in the word response mode (alphabetic responses). [CR] is the hex OD character. CONNECT [any text] [CR] BUSY [CR] VOICE [CR] NO [any text1 [CR] ERROR[CR] The "CONNECT"string may be, and typically is, followed by other informative such as connection serial bit rate or error correction methods in use.
Network Management Messages Network management messages are used to configure the operation of the network, as opposed to delivering application data during operation of the network. All LONWORKS nodes respond to the standard network management messages as described in Appendix B of the Neuron Chip Data Book. For nodes based on the SLTA-10 Adapter, additional network management messages are defined to configure and control the SLTA-10 Adapter.
Table 11 .l SLTA-10 Adapter Network Management Messages These network management messages may be sent from any node on the network to the SLTA-10 Adapter. If an application node wishes to send modem-control network management messages to the SLTA-10 Adapter, it does so using explicit messaging. See Chapter 4 of the Neuron C Programmer’s Guide for details on explicit messaging. The message should be delivered using request/response service, and the message code for modem control messages is always 7D hex.
See the supplied Neuron C program DIALOUT. NC for an example of an application that sends a message to an SLTA-10 Adapter to cause it to dial-out using an attached modem. The example GIZSETUP . NC sends messages to an SLTA-10 Adapter to configure its modem strings using a Gizmo I/O module as the user interface. A node can send these messages using either implicit or explicit addressing.
when (msg-fails(SLTA-tag)) // SLTA-10 Adapter did { not respond to the message ... when (msg-succeeds) { ... } when (resp-arrives(SLTA-tag) { // SLTA-10 Adapter did respond to the message if (resp-in.code == Ox3D) // command executed successfully ... Certain SLTA-10 Adapter network management messages which are designed to send a command string directly to the modem will fail if the connection status is CONNECTED.
l l l One modem hang-up break the connection string. This string is used to hang-up when DTR control does not function. the modem and One dial-out prefix string. This string is sent as a prefx to any dial-out operation to specify the modem dial command and to indicate whether tone or pulse dialing should be used. An &byte dial-in password string. EEPROM storage and allocation for these strings is managed by the MIP mode EEPROM pool.
allocated total size for the string, the total size for that string is automatically extended, if space is available. All pieces of a string should specify the same value for total-size. means that you are starting over with a new string. Otherwise it Once a particular string has been installed in the pool, it may be deleted by reinstalling it with a total size of 0. Alternatively, the Clear EEPROM Pool message may be issued to clear the whole EEPROM string pool.
The length of modem-string is limited to the application and network buffer sizes within the SLTA-10 Adapter node and the node which is communicating with it. The SLTA-10 Adapter as shipped has buffers sizes allowing for a maximum of 46 characters in the modem string sent with this message. The string must be null terminated. If a large string needs to be sent to the SLTA-10 Adapter, use a series of these requests with a single carriage return in the last string.
Connection Status Query The SLTA-10 Adapter’s connection status may be polled with this message. Most modems may be configured with various time-outs for the different stages of establishing a connection. Consult your modem’s documentation for details.
Connection progress may then be checked periodically by interested nodes using the Connection Status Query message. The mode parameter is used to control the connection state of the SLTA-10 Adapter. The values for this parameter are: 1 Initiate a dial-out connection. If the connected, preserve that connection, Adapter’s connection status changes connection is already made, in which dial-out prefm is sent first. 2 Same as ‘l’, but disconnect the new connection.
If the SLTA-10 Adapter is forced to send the hangup string, and this string does not exist in the EEPROM configuration, the response to this message will indicate a failure. If the i f-conf ig byte of this message is non-zero, the SLTA-10 Adapter sends the configuration string to the modem following the hangup process. This provides a remote host with the ability to dial up a remote SLTA-10 Adapter, change the configuration string, hang-up, and reconfigure the modem.
. &D2 is the AT command to enable the Data Terminal Ready (DTR) input of the modem. The modem will hang-up, enter command state, and disable autoanswer when it detects an on-to-off transition of the DTR input. . SO=1 is the AT command to set register SO to 1, meaning that the modem should auto-answer incoming calls on the first ring. This option should be used if remote hosts will be dialing in to the SLTA-10 Adapter. Use "S 0 = 0" if the SLTA-10 Adapter will only be used for dialing out to remote hosts.
Install Dial Prefix The default setting for this string is "ATDT". This string is sent as a prefix for any dial-out operations. This particular sequence instructs the modem to dial using Touch-Tone (DTMF) signaling. If pulse dialing is required, the prefer should be set to "ATDP.
Request/Release SLTA This message may be used to grant ownership access of the SLTA-10 Adapter to any node on the local network. In a design where there may be more than one network node that wishes to control the SLTA-10 Adapter’s connection states, Request/Release provides a method of managing this control. In this case a node will request the SLTA-10 Adapter, and the response to this request will be successful (code Ox3D) if access was granted, or failure (code OxlD) if it was denied.
Install NSlConnecf (NSI mode only) This message writes the NSIConnect byte. A value of OxFF (the default) will disable this feature. When this feature is enabled, the SLTA-10 Adapter initiates a dial-out when it receives an AddMyNSI message.
Modem Compatibility The SLTA-10 Adapter has been tested with the following modems: Best Data Smart One external modem 33,600 bps Data/Fax modem Diamond SupraExpress Hayes Accura US Robotics Sportster Voice external 28.8 faxmodem 336e external faxmodem 336 external fax modem Synchronous communication should be disabled when synchronous modems are connected at lower serial bit rates (less than 4800 bps). Alternatively, data compression can be disabled at lower bit rates. For example, two V.
In all cases both the host side and the SLTA-10 side were set to 115200 baud. Since 56K V.90 or V.FAST modulation is asymmetrical and requires a digital modem and special phone line connections at one end, do not expect a modulation rate of greater than 33.3K when connecting with two of these modems. This is normal. When using the USRobotics modem on the SLTA-10 side, set the DIP switch SW4 on the modem to the DOWN position. This configures the modem for “No echo offline commands”.
Figure 11.3 DOS Virtual Device Driver Configuration Reboot the PC after installing the SLTA-10 driver Screen software. SLTALin k Manager The SLTALink Manager software provides the interface to setup the SLTA-10 for different modes of operation. The remote PC is assumed to have the network database required for the connection application. The LonMaker for Windows tool is assumed for this example. The SLTALink Manager (s 1 t al ink. exe) launches automatically from the Start.Programs.
Figure 11.5 SLTALink Manager Application Screen 3. Confirm that the left panel of the SLTALink status bar shows the ‘Local SLTA-10’. If not, then click on the Link. Select> menu to select the Local SLTA-10. 4. Click on the Manual Connect Link speed button (left-most button on the toolbar) to establish a connection to the local SLTA-10. A successful connection will immediately be reported in trace frame of the SLTALink Manager.
AT!-ATE WOK1 &D2SO=lMOLO Figure 11 .l SLTA-10 Configuration Dialog Setup for Remote Dial-ins 5. The SLTA-10 can now be tested by running the LonMaker for Windows tool and selecting SLTALONl to make the current active local SLTA-10 be the network interface. In the LonMaker for Windows tool, the LonMaker . Status Sumary... command will provide a quick confirmation that the SLTA-10 functions properly and can reach all devices in the target network.
Figure 11.7 Link Description Wizard 8. Provide the dialing information as shown in figure 11-8. Figure 11.8 Dialing Information for the Remote Link 9. 1 l-24 Provide the password that was configured shown in Step 5.
Figure 11.9 Setting the Password for the Remote Link Description 12. Attach the remote SLTA-10 modem to the telephone network. The SLTA10 is now configured to dial-in and perform the network management functions required to diagnose and maintain the network just as if there was a local connection between the host PC and the remote site. To establish the remote connection, connect the modem of the PC operating the network management tool (i.e.
Figure 11 .
12 Using the Host Connect Utility with the SLTA-10 MIP Mode The Host Connect Utility, or HCU, is a standalone DOS utility designed to dial out and make a connection to a remote SLTA-10 Adapter in MIP mode. This utility may be used prior to executing an application based on a LonManager product, or may be called directly from such a product.
HCU Usage The command line arguments for HCU are: HCU [options] . . string(n)] The optional [string1 [options] arguments 1 [@filename] may include: -C or -Ii To indicate to HCU that this is a Connection operation (the default), or a Hangup operation. For example, a host application that needs to communicate with a remote SLTA-10 Adapter can be invoked from a DOS batch file, with preceding and subsequent calls to HCU.
response from the modem before sending the next string. This requires that word (alphabetic) modem responses are enabled in the modem. If the OK response does not appear within 4 seconds, HCU will stop waiting and proceed to the next string. In most cases the command string arguments need to be terminated with a carriage return. The carriage return is represented by the “ ! ” character. HCU will interpret the “! ” character by sending a carriage return (OxOD) to the modem.
is a connection operation, the selected network interface the -X option is specified, modem support is disabled. protocol is enabled. If Finally, if the user has indicated that a password is to be used, HCU will send the password command plus the password to the remote SLTA-10 Adapter, and wait for a response. If the response does not appear within five seconds, or if the response is not an acknowledgment, the process is repeated up to two additional times.
hcu -b9600 -pSLTA-2.0 Qdial.cmd if not errorlevel 1 hostapp.exe n ---+++---athO ! fl hcu -h If using a Windows-based network management application, a connection can be created by using HCU and then closing the DOS box before initializing the connection with lxt-open () . Suggested Modem Configurations Following is a list of configuration settings that are suggested for optimal operation of both HCU and for SLTA-10 Adapter to host phone links.
Table 12.1 HCU Progress Strings deuname: No such file or directory or Not ready reading device devname Dialing or Hanging up Indicates that HCU could not open the device deuname. Indicates the HCU operation. Device initialization devname Indicates a problem with initializing Could not open file filename Indicates a problem with opening the string argument Password Format error, abort Indicates there was a problem interpreting argument. Modem Response Timeout Indicates string.
13 Using a Programmable Serial Gateway This chapter describes how to develop a gateway for a user-defined EIA-232 serial protocol. The SLTA-10 is shipped with SLTA firmware that allows it to be used as a LonTalk network interface for network management, monitoring, and control. When the SLTA firmware is installed, the data passed between the firmware and the host application via the EIA-232 port is in the format of LonTalk protocol application buffers.
Creating a Serial Gateway For applications of the SLTA hardware platform, which cannot use the LonTalk network interface protocol on the EIA-232 link, the SLTA hardware may be programmed for other data formats using Neuron C. For example, the SLTA hardware may be used to connect ASCII devices such as printers, modems, and terminals to a LONWORKS network.
Each of the serial adapters listed above may also be ordered without firmware. The hardware is identical, but no firmware is shipped with the device. The user must provide firmware using the functions described below.
Developing a PSG Application Development Tool with the NodeBuilder Developing an application for the PSG/3 serial gateway is similar to developing application for any other custom device. Follow the device creation procedure outlined in Chapter 5 of the NodeBuilder User’s Guide. an Warning: The PSG Software relies on the software update provided in NodeBuilder Patch 5.
PSG2OR.DTM PSG/3’s are modified to ignore DIP switch #4. The NSI memory map is the only available memory map. Firm ware Library Support To aid in programming the custom serial gateway application, a firmware library (PSG. LIB) provides hardware access functions callable from Neuron C. (PSG. LIB replaces and supercedes the SLTA . LIB library that shipped with the SLTrY2 and PSG-10 products.) The include files also have been renamed to PSG. H and PSGREG. H.
Usage A single programmable serial gateway library (PSG. LIB) is included with the PSG software. Depending on the hardware you intend to use, one of the following #defines must be defined in your source ( . NC). #define SLTASIP When targeting PSG-10 #define SLTA2 When targeting PSGI2 #define PSG20 When targeting PSG/3 or PSG-20 This will control which low-level I/O access functions #define before the #include statement. #include #define #include are used.
Code Development and Debugging The PSG applications can be debugged only with the NodeBuilder Development Tool. The LonBuilder Development Tool may be used to develop/load/export applications, however no debugging facilities are available. 1. Use the Nodebuilder tool with the PSGBOR device templates above to create the following default [dummy] program: #include #define #include described PSG20 when (reset) { 3 2. Export the program to Motorola S Records or Intel HEX format.
PSG.LlB Functions void slta-init(slta-format, slta-baud, slta-intfc); This function initializes the UART. It sets up the frame format, the serial interface bit rate, and the modem handshake lines. The frame format parameters are listed in PSG.
unsigned slta-configlvoid); This function reads the configuration inputs. Each input corresponds to a bit in the value returned by sl ta-conf ig ( ) . All of the configuration inputs are available for application use. The model PSG/3 DIP switches, described in Chapter 11, are only valid for the standard SLTA firmware. An application which uses the software in PSG. LIB may allocate these inputs for any purpose. To set the serial bit rate and other parameters, see the function s 1 ta-ini t ( 1.
boolean slta-rxrdy(void); This function returns TRUE if the UART has one or more characters in its input FIFO buffer and FALSE otherwise. The UART used in the programmable serial gateways has a 16-character input FIFO buffer. long slta-getchar(void); This function tests to see if a character is waiting in the UART’s input FIFO buffer. If there is no character waiting, the function returns - 1.
UART Registers The UART registers are located at address OxE780 - OxE787. datasheet for register usage information. See the UART PROM / FLASH Specifications The following specifications apply to PROM and FLASH. PROM (90ns) FLASH 29C512 or 29COlO Differences Between PSG/2 and PSG/S The following differences exist between PSGI2 and PSG/3. . PSG/S supplies DIP switches instead of the PSG/2’s internal . PSG/3 no longer supports a 9V battery. . PSGI3 does not require a control module.
Porting PSGl2 Code to the PSGl3 Use the following 13-12 steps to port an existing supplied application from a PSG/2 to a PSG/3. 1. Use the device template in the PSG/3 software distribution. 2. Change all references to cs 1 ta . h> to reference cpsg . h>. 3. Change all references to csltareg.h>to 4. Change #define SLTASIP or #define SLTA2 to #define PSG. 5. Recompile your application cpsgreg.h>. and link with the PSG. LIB library.
14 Modem Troubleshooting This chapter provides solutions to problems attached to an SLTA-10 Adapter.
Troubleshooting A Host/Modem - ModemISLTA-10 Adapter configuration has many user-selected options including the choice of modems, configuration of the modems, the operating system of the host, the network interface link protocol, and the serial bit rates of both the host/modem link layer and the SLTA-10 Adapter modem link layer. The most common problem Cable specified in Chapter SLTA-70 Adapter is a failure 3.
SLTA-70 Adapter to Host Link Fails Partially This can be observed as retries at the link layer when certain downlink or uplink transfers are attempted. This can be due to any of the following conditions (in order of likelihood): l l l l Extreme-case delays in either the modem or the connection. In this case the DOS network driver’s calculated timeout values are too short. Increase the basic timeout value for the driver using the lRnn option. Start with 10 for nn and go up.
14-4 Modem Troubleshooting
Appendix A LONWORKSDLL Interface Software This appendix describes the function and use of the LONWORKSDLL interface software provided with Echelon’s Connectivity Starter Kit.
Introduction Microsoft Windows 3.1x supports access to DOS drivers through an interface layer called DOS Protected Mode Interface (DPMI). This interface standard defines the requirements to switch the processor between protected (Windows) and Real (DOS) mode operation, and also the mechanisms for proper data transfer between code running in these operating environments. Using DPMI, the same driver may be used in DOS, Windows 3.1x, and Windows 95198 without modification.
ldv-close Purpose Terminates access to the network interface hardware. Syntax #include short ldv-close(short handle); See Also ldv-open0 Returns LDV-OK (0) LDV-NOT-OPEN (3) Device closed successfully. Invalid handle or device not open. Parameters handle short Device identifier SLTA-10 Adapter User’s Guide returned by ldv-open ().
ldv-get-version Purpose Returns the current version of the driver DLL as a text string. Format of the version string is “M.mm[.sss]” where M is the major release number, mm is the minor release number, and [.sssl is an option sub-release number. All numbers are decimal. Using this function allows your application to verify that a compatible version of the driver WLDV.DLL isloaded: Syntax #include const char far * ldv-get-version(void) See Also None.
ldvjoctl Purpose Ldv-octl error codes are the same as for ioctl(); the number of bytes actually transferred. -1 implies invalid handle, func, or device type. Only DOS device drivers are allowed. Syntax int ldv-ioctl (int handle, unsigned char func, pVoid argdx, See Also 1dv.
ldv-open Purpose Initializes the network interface hardware for access by a Windows application. A Windows application can open multiple network interfaces. In the case of DOS drivers, this is done by loading multiple drivers in CONFIG. SYS. Initialization required to prepare the SLTA-10 Adapter is performed by this function. Different drivers and hardware interfaces could require different initialization and configuration requirements.
ldv-read Purpose Retrieves an available message from the network interface hardware. The function returns immediately when no messages are available. An error is returned when the next available message is longer than the specified buffer length. Syntax #include short ldv-read(short handle, void far *msg-p, short len); See Also ldv-write0 Returns LDV-OK (0) Message read and placed in the buffer pointed to by msg-p. Invalid handle or device not open. Error occurred accessing device.
ldv-write Purpose Delivers a message to the network interface hardware. Syntax #include short ldv-write(short short handle, void far *msg-p, len); See Also ldv-read0 Returns Message written successfully. Invalid handle or device not open. Error occurred accessing device. No message buffers available.
ECHELON” DECLARATION OF CONFORMITY LonTalk Adapters (SLTA-10, PSG/3, PSG/20) Application of Council Directive: 89/336/EEC; 73/23/EEC Manufacturer’s Name: Echelon Corporation Manufacturer’s Address: 415 Oakmead Parkway Sunnyvale, CA 94086 USA Manufacturer’s in Europe Address: Echelon BV Printerweg 3 3821 AP Amersfoort The Netherlands Product Model Number: 73301,73302,73303,73304 73351,73352,73353,73354, 73381,73382,73383,73384 Type of Equipment: Information Standards to which: Conformity i