[Previous] [Contents] [Index] [Next]

Setting up a Connection

This chapter shows you how to set up different types of connections to the Internet and how to do a basic and advanced setup of the dialer, including creating and using the login script. Topics include:

Before you run Voyager you need to set up a connection to the Internet or an Intranet. There are many different ways to get connected, including:

QNX network connection

If you have a network connection to the Internet, you can point Voyager at a node running Socket (or Socklet) that has access to the Internet. This is done by setting the SOCK environment variable to the appropriate node number (node_ID) before starting Voyager.

To run a socket

At the QNX prompt (or in a pterm) type:

export SOCK=node_ID
voyager &


SOCK=node_ID voyager &

For more information about: See the:
SOCK Chapter on Socket Programming in QNX in the TCP/IP Programmer's Guide.
" socks.conf man page in the TCP/IP User's Guide.
Socket (or Socklet) Socket man page in the TCP/IP User's Guide.

Proxy server connection

Using a proxy server to connect to the Internet is a popular method due to the increased need for security with the direct connection method. Before configuring Voyager to use a proxy server, you need to know the IP address and port number of each proxy server you'll be using. As a minimum, you need the IP address and port of an HTTP proxy server.

Setting up an HTTP proxy server

For example, to set up the HTTP proxy server:

  1. Bring up the WWW Configuration dialog. Click the Options menu, then click Configuration.
  2. Click the Connection tab.
  3. Click Use Proxy Server. This lets you enter information in the proxy server fields.
  4. In the HTTP Proxy field, type the IP address of the HTTP proxy server and its Port number in the adjacent field.
  5. If you have additional proxy servers or have a proxy server that supports multiple protocols (e.g. FTP) continue to fill in the rest of the fields as required.
  6. In the Proxy Overrides field, specify the IP addresses of host computers that are part of an Intranet and that shouldn't go through the proxy server. Separate the hosts with commas. Wildcards are supported.
  7. Click Apply and Ok.

If the HTTP proxy server is running and accessible, you should now be able to browse the Internet.

SOCKS host connection

To use a SOCKS host, you'll need the IP address and port number (usually 1080) of the SOCKS host. Use the procedure just described for setting up an HTTP proxy server and fill in the SOCKS Host field. For further information, see the appendix on "SOCKS" in the TCP/IP Programmer's Guide and the socks.conf man page in the TCP/IP User's Guide.

Dialup connection

If you don't have a direct connection to the Internet, you need to establish your connection using the Internet Dial-up Connector. With this dialer, you can set up and make a connection to your ISP. The dialer supports login scripts and basic TCP/IP configurations to automate your connection.

To start the dialer

Open a pterm and type:

dialer &

Typical ISP setup

The first time you run the dialer, it prompts you to set up a new ISP:

ISP Setup

ISP setup

If an ISP has already been set up, then the dialer window appears:


Internet Dial-up Connector

To set up an ISP

In the ISP Setup dialog:

  1. Give the ISP a descriptive name.
  2. Type the Name Server Address (provided by your ISP).
  3. Type the Phone No. (e.g. 9,123-4567 or 1234567).
  4. Click Modem Settings and make sure the values are correct (e.g. device, baud rate, etc.).
  5. If your ISP uses a simple username and password to establish a PPP connection, leave the Login Script field blank.
  6. Type the User Name.
  7. Optional: Type a Password. If you leave this field blank, you'll have to type the password each time you connect to the ISP.

If you need to do only a typical ISP setup and pppd is running, you should now be able to browse the Internet. If the pppd program isn't already installed and configured, see your TCP/IP User's Guide ("Setting up QNX PPP" section in the Configuration chapter and the pppd man page).

Advanced ISP setup

The typical ISP setup just described works for most cases. If you can't make a connection with the typical ISP setup, you may need to change the default TCP/IP and modem settings and to create a login script.

TCP/IP Settings

There are two TCP/IP settings:

ISP Address
This is the IP address of your ISP. It's assigned automatically when you connect to the ISP. If your ISP tells you to specify this address, type the value here.


Your Address
This is your IP address. Most ISP providers will dynamically allocate one to you when you make a connection. If you have a fixed IP address that never changes, then you should type it here.


Modem Settings

In the Device (Port) field, type the pathname of the port your modem is using. The Initialization String and Baud Rate fields normally don't need to be changed. The Initialization String is ATZ by default.

Login Script

The dialer has a builtin login script that does the following:

  1. Wait for a login prompt from your ISP and then issue your username.
  2. Wait for a password prompt from your ISP and then issue your password.
  3. Run pppd.

If your login process is different, you'll need to create a login script. For example, suppose your ISP has a two-level login process. You could create a login script that looks like this:


Wait for: Reply with: Status:
*login* pppuser Connected...
*password* xyzzy
*login* $USER Logging in...
*password $PASSWORD

To use the default script

=>> Leave the Login Script field blank.

To create a login script

  1. Go to the ISP Setup dialog.
  2. Type a meaningful name in the Login Script field. Don't use connection as the login script name. This file contains your ISP setup.
  3. Click Edit Script. The Script editor displays a login script.
  4. Click Done when you're finished. This creates a login script file.

Script editor

Here's the Script editor displaying the default login script:

Script Editor

Script Editor

To edit a row

  1. Click a row.
  2. Tab to a field in the row at the bottom of the Script editor and type in your change.
  3. Click Modify. If you don't, the changes to a row won't be saved.
  4. Click Done when you're finished editing to save all your changes.

Login script elements

Login script element Description
Wait For The dialer receives characters from the remote host until there's a match with the pattern in the Wait For entry. The dialer uses the POSIX function fnmatch (pattern, line, FNM_QUOTE) to do the match.

The syntax for patterns is similar to the shell's filename patterns except that a forward slash (/) is treated as an ordinary character.

All Wait For checks are done in lower case, which means that "LOGIN" and "login" will match.

If a pattern consisting of a single backslash (\) is used in the first line of a script, the dialer proceeds without waiting for characters from the remote host.
Reply With When the dialer has a match for the Wait For entry, the dialer emits the reply in the Reply With entry to the remote host.

The dialer then emits a CR character unless the reply ends with a backslash (\). For other special character sequences, see the " Reply character sequences " section below.
Status In this field, compose a status message reflecting a stage during the login process. Status messages are displayed in the dialer status window.


Patterns use these special characters:

Special character Description
? Match any single character.
* Match any sequence of characters, including an empty string.
[...] Match a single character specified in the bracket expression.
\ Quote the following character.

For example, *\** will match any line of characters containing an asterisk.

Reply character sequences

Here are the special character sequences that can be used in a reply:

Special character sequence Description
$USER User Name specified in the ISP entry
$PASSWORD Password specified in the ISP entry
\r CR character
\n Newline character
\xhh Single character whose hex representation follows as hh
\B 500 msec break on the line
\D Drop the line for 1 second
\Phh Pause for hh 1/10's of a second where hh is hex representation
\d# Set the number of data bits (# is 5, 6, 7, or 8)
\s# Set the number of stop bits (# is 1 or 2)
\p# Set the parity (# is n=none, e=even, o=odd, m=mark, or s=space)

[Previous] [Contents] [Index] [Next]