Psion Homepage Logo.

Comms Link Manual

Psion bar.

CONTENTS

  • Introduction
  • Connecting to A Printer
  • Connecting to A PC
  • Connecting to Another Computer
  • Terminal Emulation
  • The Comms Menu
  • Comms Link And OPL
  • Appendices

    Organiser bar.

    1 INTRODUCTION

    The Psion Organiser II Comms Link connects your Organiser to a printer, desktop computer modem, or any device which has an RS232 or R5423 port. What you can do with Comms Link depends on the device that it connects to. Common uses are:

    If you wish to connect to an IBM PC/XT/AT or compatible, Comms Link includes special software (on the floppy disk) which you can run on your PC. If you wish to communicate with any other kind of computer you may need a communications program for that computer.

    The Comms Link software can be used in three different ways:

  • directly from its own menu (the COMMS menu)
  • via the Organiser's built in language - OPL
  • via another Organiser application, for example the Psion Organiser Pocket Spreadsheet.
  • You can also access the power of the Comms Link from within the Organiser programming language, OPL. Accessing Comms Link via OPL gives you more power to perform a greater variety of tasks but requires more effort from you.

    For example, the COMMS menu allows you send a data file to an attached printer, however, by writing an OPL procedure, you can print records which are selected on any criterion and exercise control over the print layout.

    In the third kind of access, Comms Link provides facilities which allow software specially written for the Organiser, to transfer data to and from other devices via the Comms Link cable. An example is in the Organiser Spreadsheet (available as a separate product) which is capable of loading and saving Lotus 1-2-3, Symphony and DIF files from an attached IBM PC/XT/AT or compatible when used in conjunction with Comms Link.

    FITTING THE COMMS LINK CABLE

    The Comms Link cable consists of the industry-standard D25 socket at one end and a fitting to connect it to your Organiser at the other. Actually, this "cable" is more than just a cable because the Organiser-end housing contains the Organiser Comms Link software.

    To use Comms Link, first switch off your Organiser by selecting OFF from the top-level menu. Slide open the door at the top of the Organiser and insert the plug on the cable into the socket, making sure it slides all the way in until you feel a click. The plug will only go in one way, with the Psion name at the top.

    To load the communications software into the Organiser, press the ON/CLEAR key twice. The first press switches the Organiser on and the second press loads the software. Comms Link is now ready for use and a new menu option, COMMS, will have been inserted into the main Organiser menu, just before the last option, OFF.

    The communications software occupies around 4K of memory, so if the internal memory of the machine is already nearly full, the OUT OF MEMORY message may be displayed. If this happens, delete any non-vital files or records or use the TIDY option in the DIARY to clear some memory space, or SAVE your files on a Datapak.

    If no error message is displayed and the COMMS option does not appear, switch the machine off, remove the cable, carefully re-insert it and then try again.

    The connector at the Organiser end contains a socket for the Mains Adaptor lead. You do not have to use a Mains Adaptor when using Comms Link but there are obvious advantages in doing so whenever you are conveniently near a mains socket. You are particularly advised to purchase and use a Mains Adaptor if you intend to regularly receive files to a datapack.

    REMOVING THE COMMS LINK CABLE

    After using Comms Link, switch off the Organiser by selecting OFF and unplug the cable. To remove the cable from the Organiser, press the click switch below the label and pull.

    The software will still be stored in memory however, and should be removed by pressing ON/CLEAR to switch the machine back on and, at the top-level, pressing the ON/CLEAR key again. The COMMS option should now have disappeared from the main menu, and the memory used by Comms Link will have been freed for other uses.

    If the cable is unplugged during use, a DEVICE MISSING error will be reported. For obvious reasons, this should be avoided.

    BACKING-UP YOUR COMMS LINK DISK

    If you have a PC and intend to connect it to your Organiser and to use the Comms Link on the disk, it is recommended that you make a copy of the Comms Link disk in case it is damaged or becomes corrupted. The original disk can then be put in a safe place, separate from the rest of your disks. When you want to use the Comms Link with the PC, you should use the copy, not the original.

    If your computer has a hard disk, you might want to make a sub-directory for Comms Link called. for example, "/CL", and to copy the files on the Comms Link floppy disk to the sub-directory.

    If you do not have a hard disk, you may find it more convenient to make your work disk an operating system disk, in which case you should use the "/s" option when formatting the blank disk which is to take the copy.

    USING THIS MANUAL

    This chapter has covered how to plug in the Organiser side of the Comms Link cable.

    The following four chapters explain how to use Comms Link to connect to

  • a printer;
  • an IBM PC/XT/AT or compatible;
  • any other computer with an RS232 port;
  • a modem as a terminal to a dial-up system (e.g. Electronic Mail).
  • These four chapters intentionally duplicate information so that you only need to read the chapters that are relevant to you.

    The final two chapters are reference-style chapters which contain a description of the software in Comms Link. Chapter 6 describes the operation of the COMMS menu and chapter 7 describes the facilities that are available via the OPL programming language. Additional technical information is provided in appendices at the end of this manual.

    Psion bar.

    2

    CONNECTING TO A PRINTER

    THE RS232 FORT

    Comms Link will connect the Organiser 2 to a printer with an RS232 or "serial" port.

    Some printers (especially matrix printers) have a Centronics compatible parallel port (sometimes just called a "parallel" port and no serial port. The manufacturer of that printer may supply a card (a "serial card") which provides an RS232 port in addition to the parallel port.

    As an alternative to converting your printer, you can purchase a "serial to parallel converter" which is a box with a parallel port at one end and a serial port at the other. Because the converter has to have its own power supply and housing, it will probably cost more than a serial card. However, it is an asset in its own right and may still be useful if you change printers. Converters sometimes have a reasonable amount of their own memory (called a "buffer") which will speed up the time that the organiser takes to transfer data to the printer.

    Having established that you have an RS232 port on your print you need to check the type of connector on the RS232 port.

    The Comms Link cable is terminated with a 25 pin D-type female connector which will plug in to the corresponding male connector (see figure 2.1).


    Figure 2.1 Male and Female Connectors

    If you have identified the serial port and it has a 25 pin D-type male connector, you may skip the rest of this section. For example, the Comms Link cable plugs straight into the connector on a Diablo 630 daisywheel printer with a serial port.

    If the serial port on your printer has a 25 pin female connector, you will need an adaptor which has a 25 pin male connector at each end.

    A Printer Adaptor is available from Psion, but should you wish to make up one yourself, or have one made for you, the wiring diagrams are given in appendix B, "The Comms Link Interface", at the back of this manual. This adaptor, also known as a "gender changer", converts the female connector on the printer to a male connector. Gender changers are widely available and will work with many printers. However, if your printer requires a "Carrier Detect" (pin 8 on the printer port), a simple gender changer may not work. See appendix B for more details.

    If you have an RS232 printer cable which is used to connect your printer to a computer, it is unlikely to be directly suitable for use between the Comms Link connector and the printer, even if the cable will physically connect to the Comms Link connector. However, if you connect your Organiser to a modem and have a Modem Adaptor which will physically fit between the cable and the Comms Link connector, there is a good chance that the cable will be suitable. See chapter 5 or appendix B for a description of a Modem Adaptor)

    SETTING THE COMMUNICATIONS PARAMETERS

    At this stage, it is assumed that:

  • you have fitted the Comms Link cable to the Organiser as described in chapter 1 and the menu item COMMS has been added to the top-level menu
  • you have a printer with a serial port
  • the printer either has a 25 pin D-type male connector or you have an adaptor which converts the printer connector
  • and that the Organiser is physically connected to the printer via the Comms Link cable.
  • Before a printer can receive data from the Organiser, a number of basic communications parameters must be matched between the Organiser and the printer.

    Select COMMS from the top-level menu and you will be presented with the COMMS menu which contains the following options:
    TRANSMIT Transmit a file or procedure
    RECEIVE Receive a file or procedure
    SETUP Set up communications parameters
    TERM Enter terminal mode
    AUTO Run the automatic setup facility
    CAPTURE Enter capture buffer menu
    BOOT Load and run a program stored on the PC

    The values of the communications parameters can be set by using the SETUP option in the COMMS menu. You can find out the correct values of the communications parameters in three ways:

  • By looking in the printer manual, understanding how to set the communications parameters on the printer, and comparing the settings of various switches with tables in the printer manual.
  • By trying a few likely settings and seeing if they work.
  • By using AUTO in the COMMS menu to determine most of the settings automatically and then using one of the above
  • The TERM test is not exhaustive, for example, it does not test that handshaking is operating between the printer and the Organiser. Handshaking is described below, under the heading of the associated parameter, HAND. If handshaking is not operating, you may lose data from the end of longer prints.

    If, as is likely, the above test failed, the next section describes how to use SETUP to modify the communications parameters, followed by descriptions of the relevant parameters.

    If the printer passed all the above tests, the default settings of the basic communications parameters are correct for your printer. You may wish to skip to the section, "Using Comms Link", to find out how you can use the connected printer before reading about the finer points of the relevant communications parameters. If you find that you lose data, you will probably need to change the setting of the HAND parameter.

    USING SETUP

    When you select the SETUP option. you are presented with a list of communications parameters with the name of the parameter on the left of the line and the current setting on the right. Initially, you will see only the first two parameters on the screen. To view the rest of the parameters, use the UP and DOWN cursor keys to scroll through the list.

    The SETUP parameters and the things they set are as follows:
    BAUD Baud rate
    PARITY Parity
    BITS Number of data bits
    STOP Number of stop bits
    HAND Handshaking
    PROTOCOL File transfer protocol
    ECHO Local or remote character echo
    WIDTH Forced line length
    TIMEOUT Time allowed waiting for connection
    REOL Receive end of line character(s)
    REOF Receive end of file character(s)
    RTRN Receive translate character(s)
    TEOL Transmit end of line character(s)
    TEOF Transmit end of file character(s)
    TTRN Transmit translate character(s)

    The first parameter, BAUD, is the most important and nothing will work unless you get it right. You may also have to adjust PARITY, BITS and STOP before the printer will receive all characters correctly. The printer will lose data when you print a significant amount unless you correctly set HAND. Less important, but still relevant to a printer, are PROTOCOL, WIDTH, TIMEOUT, TEOL, TEOF and TTRN.

    To get the printer connection working, adjust one or more of the above communications parameters using the guidance given below then try out the settings using TERM.

    You can exit SETUP by pressing MODE to enter the SETUP menu, which contains the following items:
    EXIT Exit SETUP keeping any changes
    ABANDON Exit SETUP discarding any changes
    EDIT Return to the parameter list to continue editing
    SAVE Save the current SETUP
    LOAD Load a previously saved SETUP
    DIR Read the directory of saved SETUPs
    ERASE Erase a previously saved SETUP
    RESET Reset to the default SETUP settings

    Pressing EXE selects the EXIT item which exits SETUP making the adjusted parameters current. If you wish to use the current values then it is a good idea to select the SAVE option first, to save your setup to a file. The values can then be restored at any time in the future by using the LOAD command.

    If you have been experimenting within the SETUP parameter editor, it is a good idea to set all the parameters back to their original values, using the RESET command, before reading on.

    To edit a parameter value, first select the parameter using the UP and DOWN keys. The selected parameter is indicated with the right arrow symbol after the parameter name. Change the selected parameter either by pressing RIGHT and LEFT to select a value from a list of values or by pressing EXE and then by entering a value. Which method you use depends upon which parameter you are changing; see below, under the relevant parameter heading. Pressing ON/CLEAR sets the selected parameter to its original value.

    BAUD

    The BAUD parameter specifies the Baud rate. This is the rate at which data is sent to the printer and it must be set to match the Baud rate of your printer. When BAUD is selected, press RIGHT and LEFT to change its value.

    The Baud rate specifies the data transfer rate in bits per second. In most cases, dividing by 10 gives the transfer rate in characters per second. Using a faster Baud rate will not necessarily speed up printing from the Organiser. For example, 1200 Baud corresponds to 120 characters per second, which is a lot faster than most printers are able to print.

    If you do not know the Baud rate on your printer or you are unable to figure it out from the printer manual, the most likely settings are 9600 and 1200.

    PARITY, BITS And STOP

    When data is sent down the RS232 line, it is sent one bit at a time (rather than a character at a time) and the PARITY, BITS and STOP parameters specify how each character is converted into a pattern of bits. You do not have to understand what these parameters mean (see chapter 7 if you are interested) but, as with BAUD, they have to match the corresponding parameters in your printer.

    All three parameters are changed in the same way as for BAUD, by pressing RIGHT and LEFT.

    The STOP parameter sets the number of stop bits and may be set to 1 or 2. Change the STOP parameter to 2. Even if your printer is set to use 1 stop bit, it will still work with 2. The converse is not true.

    The BITS parameter specifies the number of data bits in each character and may be set to 7 or 8.

    The PARITY parameter determines whether each character includes an additional bit (the parity bit) and, if so, what the rule is for its value. When used, the parity bit normally represents a simple form of error checking. Although the PARITY parameter may be set to five different values, MARK and SPACE are rarely used. The settings which you should try are NONE (which means there is no parity bit), EVEN and ODD in order of commonest use.

    If you get the BITS and PARITY settings wrong, the printer should still print something but some characters (often about half the characters) are printed incorrectly.

    A good strategy is to set STOP to 2, try out a few BAUD settings, and identify which one gives you some activity. Having established the Baud rate, try out a few settings for BITS and PARITY. The three most likely settings are:
    BITS PARITY
    8 NONE
    7 ODD
    7 EVEN

    Note that some manufacturers include the parity bit in their definition of the data bits. This means that they would call seven data bits and a parity bit eight data bits.

    HAND

    Printers cannot keep up with the rate at which the Organiser can transmit data and there needs to be a means of holding the Organiser up when the internal memory of the printer (its buffer) fills up. This is called "handshaking" or "flow control". The handshaking method used by the Organiser is set by the HAND parameter. Although the Organiser can be set to any combination of three different handshaking methods (8 choices in all), only two of these are in common use by serial printers.

    The first is "DTR handshaking", so called because it uses the DTR (Data Terminal Ready) control pin on the RS232 port. The DTR pin is set high by the printer when it is ready to receive data and low when its buffer is too full.

    The second is called "XON/XOFF handshaking" and is based on the printer sending control characters to pause (XOFF) and restart (XON) the Organiser. The ASCII names for the control characters used are DC1 and DC3 (the "DC" stands for "Device Control") and so "DC 1/DC3 handshaking" means the same thing.

    Most serial printers support both the above methods of handshaking so, if you do not know which is set on your printer, the safest setting of HAND to use is XON+DTR. Setting HAND to NONE will not stop your printer from working at all but you will lose data when you transmit more than the printer can hold in its internal buffer.

    PROTOCOL

    The PROTOCOL parameter sets the file transfer protocol which is used by the TRANSMIT and RECEIVE commands. Although receiving a file is not possible with a printer, the TRANSMIT command may be used to print data files provided that the PROTOCOL parameter is set to NONE. Use LEFT and RIGHT to change the setting.

    WIDTH

    The WIDTH parameter can be used to stop your printer from printing off the right hand edge of the paper. By default, WIDTH is set to NONE and no checks are made on the length of a transmitted line. If you set WIDTH to, say, 70 the Organiser will insert a new line if the number of transmitted characters in one line reaches that limit.

    You may find that your printer already performs this function or that you never output lines that long. In this case, you can leave WIDTH set to NONE.

    The WIDTH parameter is one of the parameters which are not set by pressing the RIGHT and LEFT keys. To change WIDTH, press EXE when WIDTH is the selected parameter and enter the new value by typing the number followed by pressing EXE again. The maximum line length is 250 characters.

    TIMEOUT

    Assuming HAND is set properly, if you attempt any print operation while the printer is "off line" or out of paper, the Organiser will wait indefinitely if TIMEOUT is set to its initial value, NONE.

    However, you can use the TIMEOUT parameter to make print operations, for example, the OPL command LPRINT, fail after the printer has been paused for a specified timeout interval. This feature is only really useful when you are writing a secure OPL program which will inform the program user when a printer has been paused for a suspiciously long time.

    For normal use, you can leave the TIMEOUT parameter set to NONE. You may always escape by putting the printer "on line" by inserting more paper if necessary, or by pressing ON/CLEAR to abort the operation.

    The TIMEOUT parameter is set in the same way as the WIDTH parameter. The number you enter should be between 1 and 255 and specifies an approximate timeout interval in seconds.

    TEOL

    The TEOL parameter specifies the one or two characters which are sent by the Organiser to indicate the end of a line. Initially, this is set to <CR><LF> (a carriage return followed by line feed) and this will be correct for most printers.

    It is possible that your printer will be set to automatically perform a line feed whenever it receives a carriage return, in which case you will get two line feeds at the end of each line and your printed output will be double spaced. If you prefer not to change the setting on your printer, you can change TEOL from <CR><LF> to just <CR>.

    TEOL is changed in a similar way to WIDTH and TIMEOUT. Press EXE when TEOL is the selected parameter and enter the number 13 (the ASCII code for <CR>) followed by pressing EXE again.

    TEOF

    The TEOF parameter specifies the one or two characters which are sent by the Organiser to indicate the end of a file when using TRANSMIT under the COMMS menu. Initially, this is set to <SUB> (also called CONTROL-Z) and has the ASCII value of 26.

    If you wish to use TRANSMIT to print data files (as described at the end of this chapter), you should set TEOF to NONE.

    To clear TEOF, press EXE when TEOF is the selected parameter and press EXE again without entering any data.

    TTRN

    The TTRN parameter provides the means to translate a particular transmitted character to another character or to remove transmitted characters Initially, TTRN is set to NONE and no translation occurs.

    The most common use of TTRN is to translate the <TAB> control character (with ASCII code 9) which is used to separate fields in Organiser data files into a printable character, for example, a comma.

    To set TTRN to translate every occurrence of <TAB> to a comma (ASCII 44), press EXE when TTRN is the selected parameter and enter 9,44 EXE

    AUTO

    If you have failed to find a set of communications parameters which works with your printer, the AUTO command provides an aid to determining BAUD, PARITY, BITS and STOP. The command cycles through all combinations of BAUD, PARITY, BITS and STOP (omitting only MARK and SPACE parity) transmitting a line of text for each combination. The text contains a message which identifies the four parameters so that if your printer receives the text without corruption, you can read the correct values of the parameters to use in SETUP.

    While the program is running, the display continuously shows the combination of the parameters which is currently being transmitted. Press ON/CLEAR to abort AUTO when you are satisfied that you have the correct values, then enter these using SETUP. If you leave AUTO running, it will return to the COMMS menu when it has tried every combination.

    AUTO does nothing to help set the handshake parameter, HAND. Getting the HAND parameter wrong will not stop the printer from working altogether - you will just lose data from the end of longer prints.

    PRINTING WITH COMMS LINK

    When the communications parameters have been set up correctly so that text can be successfully sent to the printer, you can use the printer in the following ways:

  • to print procedure files
  • to print data files
  • to print the contents of the capture buffer
  • to print using an OPL program
  • PRINTING PROCEDURE FILES

    To print the text of an OPL procedure, use the LIST item in the PROG menu. You cannot print a procedure file which has been copied as "object only".

    From the top-level menu, select PROG to view the PROG menu, and then select LIST. The screen will show:
    LIST A:         

    If necessary, press MODE to change the device shown and type the name of a procedure you wish to print. When you press EXE the text of the procedure will be sent via the Comms Link cable to the printer. If the file does not exist on the device shown, or if only the object code of the procedure is saved, then an error message will be displayed. In this case, press SPACE to return to the PROG menu.

    If the file is found and transmitted successfully, you will be returned to the PROG menu.

    PRINTING DATA FILES

    To print any data file stored in the Organiser, including the file MAIN which is used by the top-level FIND and SAVE facilities, use TRANSMIT from the COMMS menu. As described above, both the PROTOCOL and TEOF parameters must be set to NONE.

    Select FILE to transmit a data file and the screen will show:
    FILE PROCEDURE  

    Select FILE to transmit a data file and the screen will show:
    SEND A:MAIN     

    The default file name will be MAIN unless you have previously specified a file name in file transfer, in which case that name will be given instead. If necessary, press MODE to change the device shown and edit the name of the file to be printed.

    Press EXE and the file will be sent to the printer.

    Data files are stored in the Organiser using a TAB character to separate adjacent fields within records. When you print a file, the TAB character will be printed in between the fields in each record. Depending on the content of your data tile and the way your printer responds to TABs, this may produce an unacceptable layout. You can change the way data files appear on the printed page by setting TTRN such that TAB characters are translated into another character, as was described under TTRN, above.

    If you require more control than is possible using TTRN, you can use LPRINT statements in an OPL procedure to produce any layout required. An example OPL procedure is given at the end of this chapter.

    PRINTING THE CAPTURE BUFFER

    The capture buffer is normally used when the Organiser is acting as a terminal to a multi-user computer, for example, an electronic mail service. The capture buffer may be used to store a previously prepared message which can then be transmitted. This usage is described in chapter 5, "Terminal Emulation".

    To print the contents of the capture buffer, select CAPTURE from the COMMS menu and the CAPTURE menu will be displayed. Select TRANSMIT from this menu and the contents of the capture buffer will be sent to the printer. You will then be returned to the CAPTURE menu.

    Press ON/CLEAR to return to the COMMS menu.

    PRINTING FROM OPL

    As you saw earlier, it is quite simple to send a data file to the printer using the TRANSMIT option in the COMMS menu. However, this does not produce a neatly formatted print-out. The way to exercise control over the format of the printing of data files is to use the LPRINT command in OPL.

    Below is an example of a program which will operate on the data file with name "MAIN" (the file used by the top-level FIND and SAVE facilities) stored either in the internal memory or on a Datapak. To use the program, type it in, translate and save it as described in chapter 18 of your main Organiser user manual.

    When the program is run, it first prompts for the device containing the MAIN file to be printed. You should enter A, B or C. Given a device name it then prints all the records in the MAIN file on that device with the fields of each record on separate lines. Records are separated by a blank line.

    This program is designed for printing out an unstructured data file where the number of fields and the meaning of each field varies from record to record. This is often the case for the MAIN file. The program assumes that no record contains more than eight fields. Blank fields are not printed.

    You can either use the program directly or use it as a basis for a more refined program which is more suited to the structure of your data. For example, you may wish to change the maximum number of fields or to include a selection criterion to print only the records which satisfy a particular condition.

    Organiser bar.

    3

    CONNECTING TO A PC

    This chapter describes how Comms Link may be used to connect your Organiser to an IBM PC/XT/AT or compatible which is running the supplied Comms Link software. If your computer does not fall into this category you should skip to the following chapter.

    The advantages of using the Cornms Link software on the PC, compared to some other communications program, are:

  • There are fewer communications parameters to set.
  • The communication is based on an error-checked framing protocol with a negligible chance of receiving corrupted data even when using modems over a dial-up line.
  • The advanced protocol allows communication to be controlled entirely from the Organiser so that you can, for example receive a tile from an unattended PC which is running the Comms Link software.
  • Comms Link provides the basis for advanced communications applications such as loading spreadsheet files from your PC (when used with the Organiser Pocket Spreadsheet).
  • Comms Link allows you to write OPL programs which transfer files (including binary files) between the Organiser and the PC, or to access remote PC files directly from the Organiser.
  • The facilities which are available via OPL are described in chapter 7, "Comms Link and OPL".

    THE RS232 PORT

    Check that your PC has an RS232 port. The term "serial port" is often used, and means the same thing.

    The IBM PC, XT and AT do not have an RS232 port as standard, it is an optional extra. If your PC does not have an RS232 port, you can buy one from your dealer on a plug-in "card". Some IBM compatibles also do not have an RS232 port as standard - these too may be fitted with one on a plug-in card. If in doubt, see your dealer for details. Many IBM compatibles, however, are supplied with an RS232 port as a standard fitting.

    Having established that you have an RS232 port on your PC, you need to check the type of connector on the RS232 port.

    The IBM PC and XT RS232 port, and that on almost all compatibles, has a 25 pin D-type male connector and the Comms Link cable is designed to connect directly to these computers.

    The IBM AT RS232 port, and that of some AT compatibles, has a 9 pin D-type male connector.

    If you have an IBM AT or a compatible with a 9 pin RS232 connector, you will need an AT Adaptor. The AT Adaptor is a cable with a 25 pin male connector at one end and a 9 pin female connector at the other.

    The AT Adaptor is available from Psion, but should you wish to make up one yourself, or have one made for you, the wiring diagrams are shown in an appendix at the back of this manual. If you already use your AT or compatible with a modem, you can use the same cable to connect it to the Organiser.

    SETTING THE COMMUNICATIONS PARAMETERS

    You should have fitted the Comms Link cable to the Organiser as described in the Introduction to this manual. This will add a new item, COMMS, to the top-level menu.

    Select COMMS from the top-level menu and you will be presented with the COMMS menu which contains the following options:
    TRANSMIT Transmit a file or procedure
    RECEIVE Receive a file or procedure
    SETUP Set up communications parameters
    TERM Enter terminal mode
    AUTO Run the automatic setup facility
    CAPTURE Enter capture buffer menu
    BOOT Load and run a program stored on the PC

    USING SETUP

    Before attempting to communicate with the PC, select the SETUP option from the COMMS menu. When you select SETUP, you are presented with a list of communications parameters. The list is arranged with the name of the parameter on the left of the line and the current setting on the right. Use the UP and DOWN cursor keys to scroll up and down the list.

    The SETUP parameters and the things they set are as follows:
    BAUD Baud rate
    PARITY Parity
    BITS Number of data bits
    STOP Number of stop bits
    HAND Handshaking
    PROTOCOL File transfer protocol
    ECHO Local or remote character echo
    WIDTH Forced line length
    TIMEOUT Time allowed waiting for connection
    REOL Receive end of line character
    REOF Receive end of file character
    RTRN Receive translate character
    TEOL Transmit end of line character
    TEOF Transmit end of file character
    TTRN Transmit translate character

    To edit a parameter value, first select the parameter using the UP and DOWN keys. The selected parameter is indicated with the right arrow symbol after the parameter name. Change the selected parameter either by pressing RIGHT and LEFT to select a value from a list of values or by pressing EXE and then by entering a value. Which method you use depends upon which parameter you are changing. This is described below under the relevant parameter heading.

    Pressing ON/CLEAR sets the selected parameter to its original value.

    Only five of the SETUP parameters are relevant to communications with a PC running the Comms Link software. The relevant parameters are BAUD, HAND, PROTOCOL, RTRN and TTRN.

    BAUD

    The BAUD parameter specifies the Baud rate. This is the rate at which data is transferred between the Organiser and the PC and it must be set to match the Baud rate used by the Comms Link program (CL) on the PC.

    If you are connecting the Organiser direct to the PC, rather than via a pair of modems, the BAUD parameter should be set to 9600 (the highest value).

    If you are connecting to the PC via modems, the BAUD parameter must be set to the Baud rate at which the modems are set to operate. If the modems are operating over a dial-up line, the Baud rate will typically be either 2400, 1200 or 300.

    Make sure BAUD is selected, then press RIGHT and LEFT to change it to the desired value.

    The Baud rate specifies the data transfer rate in bits per second. Dividing by 10 gives the approximate transfer rate in characters per second.

    HAND

    The Comms Link protocol contains its own flow control, so handshaking is only required to provide the necessary control signals for modem operation.

    Setting the HAND parameter to RTS+DTR (by using LEFT and RIGHT to change the setting) will work both when connected directly and when connected via a modem.

    PROTOCOL

    The PROTOCOL parameter sets the file transfer protocol which is used by the TRANSMIT and RECEIVE commands and should be set to PSION (by using LEFT and RIGHT to change the setting).

    RTRN And TTRN

    RTRN and TTRN stand for Receive Translate and Transmit Translate and, in communications involving the Comms Link PC software, are only applied to file transfers to and from data files and procedure files on the Organiser. RTRN and TTRN are ignored in transfers involving binary files.

    RTRN and TTRN are typically used to translate <TAB> characters in data files, which separate adjacent fields in a record, to a more convenient delimiter, For example, to convert <TAB>s to a comma and vice versa, set TTRN to translate <TAB> to comma (ASCII 44) by pressing EXE when TTRN is the selected parameter. Then type:

    9,44 EXE

    Now select RTRN to translate comma to <TAB>. Press EXE and type:

    44,9 EXE

    Initially, RTRN and TTRN are set to NONE and no translation occurs.

    LEAVING SETUP

    When BAUD, HAND, PROTOCOL, RTRN and TTRN have been set, press the MODE key and a menu containing the following items is presented:
    EXIT Exit SETUP keeping any changes
    ABANDON Exit SETUP discarding any changes
    EDIT Return to the parameter list to continue editing
    SAVE Save the current SETUP
    LOAD Load a previously saved SETUP
    DIR Read the directory of saved SETUPs
    ERASE Erase a previously saved SETUP
    RESET Reset to the default SETUP settings

    Select EXIT from this menu and you will be returned to the COMMS menu. However, you may wish to select the SAVE option first, to save your setup to a file. The values can then be restored at any time in the future by using the LOAD command.

    MAKING THE CONNECTION

    At this stage, it is assumed that:

  • you have a PC with a serial port
  • the PC has a 25 pin D-type male connector or you have an adaptor which converts it to that connector
  • you have copied the Comms Link program from the supplied disk to either a new floppy disk or to a hard disk
  • you have set the communications parameters under the SETUP option in the COMMS menu as described above
  • Direct Connection

    Plug the Comms Link cable into the PC. Run the Comms Link program on the PC in the normal way by typing: CL ENTER where the current drive (and directory, if you have a hard disk) contains the Comms Link software. If you have a hard disk, you may find it more convenient to use the DOS command PATH to set up a path to the Comms Link directory. The PATH command should be used in your AUTOEXEC.BAT file which will then allow you to run CL from any directory. See your DOS manual for details on how to do this.

    After a short pause, the program display will appear and the PC and your Organiser are ready to communicate.

    As a general rule, when running the Comms Link program from a floppy disk, you should not remove the floppy disk containing the Comms Link program at any time.

    When you have finished communicating with the PC, press Q on the PC keyboard to quit the Comms Link program. You will be prompted to confirm that you want to exit the program altogether; press Y to quit or N to continue using Comms Link.

    Note that you cannot quit the Comms Link program on the PC while a file is being transmitted or received.

    Connecting Via A Modem

    A typical connection between a PC and an Organiser via a telephone is illustrated in figure 3.1:


    Figure 3.1 Connecting via Modems

    The modems are necessary to convert the data from the PC and the Organiser into a form suitable for transmission over a telephone line.

    An arrangement like this, where the PC is attached to a modem and a telephone line, say, at the office, allows you to dial in to the PC from another telephone and transfer files between the PC and your Organiser. In this case, you would leave your PC switched on and running the CL program and leave the modem connected to your PC in auto answer mode. The modem which is connected to the Organiser may be an acoustic coupled modem (where the connection to the telephone line is made via a pair of rubber cups which fit over the telephone handset) or it may plug directly into a telephone socket.

    To connect the Comms Link cable to the modem you will need a Modem Adaptor. These are available from Psion. Alternatively, if you want to make one up yourself, or have one made for you, the wiring details may be found in an appendix at the back of this manual.

    When you run the Comms Link program on the PC, you must specify the Baud rate that the modems are set to. For example, to run the Comms Link program with a Baud rate of 1200, type:

    CL 1200 ENTER

    If you do not specify a Baud rate when running the Comms Link program, the default setting is 9600.

    TRANSFERRING FILES

    At this stage, it is assumed that:

  • your PC is running the CL program
  • your Organiser is either connected directly to the PC or it is connected to a modem and you have successfully dialled up the modem which is connected to your PC.
  • You may now use the TRANSMIT and RECEIVE options in the COMMS menu to transfer files between the two computers. The only file transfer available using the RECEIVE and TRANSMIT commands is between simple text files on the PC and either data files or procedure files on the Organiser. (On the PC, text files consist of a number of lines where each line is terminated by <CR><LF>.)

    Binary files, for example DIARY files, can be transferred using the PSION protocol but you have to write an OPL program to make the transfer. See chapter 7, "Comms Link and OPL", for a description of using Comms Link facilities from OPL. A simple example of using OPL to backup DIARY files to a PC and to restore them is given at the end of this chapter.

    When you select either RECEIVE or TRANSMIT, the screen will show
    FILE PROCEDURE  

    This is a small menu, from which a selection can be made in the usual way. Select FILE to receive or transmit a data file and PROCEDURE to receive or transmit a procedure file.

    Data Files

    Data files consist of a number of records where each record may be split into fields. Records contain up to 254 characters and fields are delimited by the <TAB> character (ASCII 9). Each data file record corresponds to a line within the text file on the PC.

    If, when receiving a data file, the remote file contains lines longer than 254 characters, the RECEIVE command will fail. Incoming <TAB> characters will divide the records into separate fields. Alternatively, the <TAB> characters may be generated by the RTRN option as was described earlier.

    An Organiser data file record may not be empty. Any received blank lines are saved as a record containing a single space character (ASCII 32).

    Procedure Files

    When procedure files are transmitted using the TRANSMIT command, only the source is transmitted. When procedure files are received using the RECEIVE command, a file is created which contains the source only (i.e., no object). You have to translate the procedure (using the IRAN option in the procedure editor under the PROG menu) before you can run a received procedure.

    The first line of a procedure consists of a procedure name followed by a colon and optionally followed by the procedure parameters. When procedures are created under the top-level PROG command, the procedure file name will match the name on the first line. When you receive a procedure, however, the file name may not match the name on the first line.

    It is the procedure file name which is significant when you invoke a procedure in an OPL program, not the name which appears on the first line. (When you edit a procedure on the Organiser, the name of the fist line is changed, if necessary, to agree with the procedure file name.) When receiving a procedure you should be mindful of the significance of the file name when choosing it.

    RECEIVE

    When using RECEIVE and after selecting PROCEDURE, the screen will show the prompt:
    RECV A:         

    Press the MODE key to change the device shown, if necessary. You may now type in the name of the file which is to take the received data. The file name must, as usual, be no longer than eight characters. If you have previously specified a file name in file transfer, that name will be given as a default.

    If you specify a file name which already exists, the display will show:
    A:FNAME EXISTS  
    DELETE Y/N

    where FNAME is the procedure file name which was specified. If you press N you are returned to the previous screen and may now type in a different file name, or press ON/CLEAR to abort the transfer. Press Y and the old procedure will be deleted and replaced by the incoming file.

    If, when receiving a procedure, the first line does not contain a colon, a first line is inserted consisting of a question mark followed by a colon. If the received data contains one or more ASCII control characters (i.e. with ASCII codes which are less than 32) and except for REOL and REOF characters, the RECEIVE command will fail with a BAD PROCEDURE message.

    When using RECEIVE and after selecting FILE, the screen will show the prompt:
    RECV A:MAIN     

    The default file name will be MAIN unless you have previously specified a file name in file transfer, in which case that name will be given instead. You can either accept the default or press ON/CLEAR to clear the input and type another name in.

    If you select the FILE option and you specify a file name which already exists and which contains data, the display will show:
    ERASE APPEND    

    This is another small menu. If ERASE is selected, the incoming file will replace the old data file of that name and its original contents will be lost. If the file being erased contains a large number of records, this may take some time. If the APPEND option is selected, the data in the incoming file will be appended to the original file.

    After you enter the file name, the display will then prompt for the name of the file on the PC:
    RECV A:FNAME    
    FROM:FNAME

    where you are offered the same name as a default file name for the PC. Either accept the default or enter a different PC file name (and path name, if required). If you do not include a path name, the directory which was current when you ran Comms Link will be used on the PC. Since PC path names use the backslash character (\) which cannot be entered from the Organiser keyboard, you should use the forward slash (/) instead. Forward slashes are converted to backslashes by the PC software. Also, as the default name may contain a percent character (%), which is not allowed in PC file names, the PC software converts any percent characters in the file name to an underscore character (_). If the file does not exist on the PC, a FILE NOT FOUND error is displayed and you are given another opportunity to enter the PC file name.

    While data is being received, the screen will show:
    Receiving...    

    If the file transfer is unsuccessful, one of the following error messages will be displayed:

    If possible, look at the PC display for further details of any failure.

    TRANSMIT

    When using TRANSMIT and after selecting PROCEDURE, the screen will show the prompt:
    SEND A:         

    If you have previously specified a file name in file transfer, that name will be given as a default. Press the MODE key to change the device, if necessary, and enter the name of the file which is to be transmitted.

    As with RECEIVE, selecting TRANSMIT then FILE offers as a default the file name you have most recently specified in file transfer. If it is your first file transfer operation the default file name MAIN is offered:
    SEND A:MAIN     

    Press EXE to accept the default or press ON/CLEAR to clear the input and enter another name.

    If the file is not found, a FILE NOT FOUND message will be displayed.

    After you enter the Organiser file name, the display will then prompt for the PC file name:
    SEND A:FNAME    
    TO:FNAME

    where you are offered the same name as a default file name for the PC. Either accept the default or enter a PC file name (and path name, if required). If you do not include a path name, the directory which was current when you ran Comms Link will be used on the PC. Since PC path names use the backslash character (\) which cannot be entered from the Organiser keyboard, the forward slash (/) should be used instead. All forward slashes are converted into backslashes by the PC software. Also, as the default name may contain a percent character (%), which is not allowed in PC file names, the PC software converts any percent characters in the file name to an underscore character (_).

    If the file already exists, the display will show:
    FNAME EXISTS    
    DELETE Y/N

    Press Y and the existing file will be replaced. If you press N you are given another opportunity to enter the PC file name; type in a different file name or press ON/CLEAR to escape.

    While data is being transmitted, the screen will show:
    Sending...      

    If the file transfer is unsuccessful, it will display one of the following error messages:

    If possible, look at the PC display for further details of any failure.

    TRANSFERRING DIARY FILES

    The following example procedure, DBACK, may be used to backup and restore saved DIARY files to and from the PC. The current contents of the diary may be saved to a file using the SAVE option in the DIARY menu (see the main Organiser operating manual for more details).

    When you wish to view the diary file, transfer the file back to the Organiser and use the RESTORE option in the DIARY menu (remember to SAVE you current diary first)

    To use the program, type it in, translate and save it as described in chapter 18 of your main Organiser user manual.

    When the program is run, it first presents the two item menu BACKUP or RESTORE. When you have made your selection it prompts for the local (Organiser) and remote (PC) file names, in the appropriate order. For the local name, you should enter the device, A, B or C, followed by a colon and the saved diary file name.

    Pressing ON/CLEAR during the input stage will abort the program.

    Psion bar.

    These pages should be viewed using Netscape 4.03 or Microsoft Internet Explorer 3.02 at 800x600 pixels.
    Left arrow Barcode Manual ~ Homepage ~ Comms Manual Part 2 Right arrow