Home
Developer Resources
QNX RTOS v4
QNX RTOS v4 Knowledge Base

QNX RTOS v4 Knowledge Base

Foundry27
Foundry27
QNX RTOS v4 project
Resources

QNX RTOS v4 Knowledge Base

Title Installing Phindows
Ref. No. QNX.000009508
Category(ies) Configuration
Issue How do I install and configure Phindows?




Solution Installing Phindows
You install Phindows onto a Windows computer by running A:INSTALL from the supplied Phindows floppy diskette. If you have the product suite CD, the installation program is in D:Archiveswin32x86Phindows.120phindows.exe
The Phindows install program copies the necessary files into the USRPHOTON directory. It also creates a FONT and CACHE directory there for placing cached Photon font and image data. It is a good idea to make a Phindows icon as well.

Starting Phindows
To launch Phindows, click on the Phindows icon (or run USRPHOTONPHINDOWS.EXE).Phindows will then pop up a Connect dialog where you can specify the type of connection (TCP/IP or direct-connect serial). Various connection options are available, but the defaults will usually work well.  Once you have chosen the connection parameters, click on Apply to cause Phindows to connect with these parameters. To permanently record these setting before making the connection, click on  Apply & Save. These saved settings will become the default settings for all future Phindows sessions.
If a TCP/IP connection is requested, then the Internet address of the QNX computer you're connecting to must also be specified (e.g.: 198.53.31.1). If the remote computer has been configured properly, you should see a Photon login prompt, at which point you are connected
and running Photon!

If a serial connection is requested (Windows 95 and NT only), then you must specify the COM port (e.g.: COM1 or COM2) and baud rate. If you don't specify a baud rate, the current Windows default settings will be used. With a serial connection, Phindows initially acts as a simple text terminal that lets you type AT commands directly to the modem (e.g.: ATDT1-613-591-0934). Once connected, you should login to QNX and then issue the command: /usr/photon/bin/phrelay. This will cause Phindows to drop out of text-terminal mode and begin acting as a Photon graphical terminal. A Photon login screen should appear at this point.

Configuring for TCP/IP Use
If TCP/IP is being used, there are several configuration issues that need to be taken care of before you can use Phindows. First, the remote QNX host must have TCP/IP installed and running. In addition, inetd must be running  with the following additional items added to the indicated TCP/IP configuration files:
In /etc/inetd.conf, add the line:
phrelay stream tcp nowait root /usr/photon/bin/phrelay phrelay
In /etc/services, add the line:
phrelay 4868/tcp
These two entries will cause inetd to listen for incoming requests to establish a new Photon session. When a request is detected (from a remote Phindows client in our case), inetd will automatically establish a full TCP/IP connection and launch phrelay on that connection. Phindows will then be fully connected to the local machine. All that remains now is to configure the Windows client to support TCP/IP. The exact way to do this depends on the type of Windows platform you're using, what services have already been installed on that client, and whether Ethernet
or dialup networking over SLIP/PPP is being used (see the Microsoft documentation for help with this).  In general, Windows 95 and Windows NT come ready to use TCP/IP out of the box. Windows 3.11 platforms can use Phindows over TCP/IP, but both Win32s and WINs SOCK must be installed and working first (both of these are available free of charge from the Microsoft ftp site ftp.microsoft.com).
Data Compression Options
The Phindows Connect dialog lets you specify one of three data compression options:
1) Byte-Pair Encoding (BPE)
performs the best data compression and is recommended for all serial connections. Although BPE is  inexpensive to decode (both in memory and CPU usage), it does require a fair amount of CPU time on the host QNX machine. When link speeds are low (such as with modem links), the extra cost in CPU time on the sending side is well worth the tradeoff.
2)Run Length Limited (RLL)
provides good data compression. Although not as highly compressed as BPE, RLL encoding is both quick to decode and encode.  RLL encoding is recommended for network TCP/IP connections because it places less CPU load on the QNX host, yet provides fair compression.
3)None.
With data compression turned off, Photon draw events will be transmitted as is. This might make sense if the connection bandwidth is VERY high (say 100Mb Ethernet), making the extra processing time involved in data compression an unnecessary step.

Data Caching Options
Phindows makes very extensive use of data caching techniques to minimize the amount of data that needs to be transmitted from the host to the client machine. Thanks to this intensive data caching, Phindows is usable even on modem-link speeds as low as 9600 baud! Most large static data objects in Photon are tagged with a unique 32-bit id (tag). Tagged objects include bitmap data, image data, and color palettes. These objects are generally tagged when first created by the Photon program developers. This process is accomplished automatically by the Photon development tools, so the program developer is, for the most part, not even aware that this is taking place.  Photon passes these tags along with the data objects as they flow through the Photon event space. The end result is that Photon graphics drivers (such as phrelay) will almost always have available a small, unique, precalculated tag to identify the larger Photon graphical objects.  Phrelay (the host side of a Phindows connection) has the job of transmitting the graphical Photon events over a communications link to a Phindows client. Phrelay and Phindows use a private protocol that allows these large graphical objects to be sent only once to the remote client. All subsequent references to that data object are made by passing the small tag, knowing that the Phindows client has a local copy of the entire data object. Over time, commonly encountered objects (such as icons and backdrops) will all be cached.
Phindows not only caches these tagged data objects in local memory, but also spills least-recently used objects to disk automatically and saves all cached objects to disk when Phindows is closed. The next time Phindows starts up, it preloads its in-memory cache from the most recently encountered disk
cache and informs the remote phrelay session which objects it already knows about. This means that once a graphical object is seen once within Phindows, it will, in general, never have to be transmitted again, even in subsequent Phindows sessions.  The Phindows Connect dialog lets you tune the sizes of the
in-memory data cache and of the maximum amount of disk storage to reserve for most recently encountered objects. The default values of 1024K for RAM cache and 20M for disk cache are usually adequate.

Automating your connection
If you don't want the connect dialog to appear each time you make a connection, create a shortcut for Phindows or add Phindows to the Start menu.  If your making a TCP/IP connection, specify the TCP/IP address of the QNX computer you're connecting to on the command line with the -t.  For serial connections, add the -m option.(eg.:C:photonPHINDOWS.EXE -t204.34.53.1)

Command-line Options
PHINDOWS.EXE supports several command-line options. These parameters are usually added to the command when you create the Icon or Shortcut to launch Phindows.
The options are:
-t inet_addr
TCP/IP address of QNX host (e.g.: 198.53.31.1).
-m commport
Direct connect serial port (default: com1)
-b baud commbaud
Specify the effective link speed. If a direct serial connection is used then the comm ports baud rate will be set to this value as well unless a specific baudrate is given (commbaud). If no baud is specified then the Windows default is used.

-n node
Connect to already running Photon on specified node.
-u Unlocked mode
Allows independent browsing of Photon session.
-i input_group
Connect to a specific Photon input group (default: 1)
-x offset
Create Photon region at this x offset (default: 0)
-y offset
Create Photon region at this y offset (default: 0)
-h height
Initial window height (default: 460)
-w width
Initial windows width (default: 620) -H 1,t2,t3 Specify mouse holdoffs (default t1=1.2*9600/baud, t2=t1/2, t3=t1/4).
t1 is the holdoff time for normal mouse motion.
t2 is the holdoff time when the a mouse button is pressed.
t3 is the holdoff time when a drag cursor is being moved.
-K key
Specify a private key for data encryption.
-s service
Request this Photon service to be automatically started.
-U userid: password
Initially login to this QNX userid (used with -s).
-k Startup in kiosk (full screen) mode.
Note that if neither -t nor -m is specified, then Phindows will pop up the Connect dialog asking for communications parameters.