UI-View32 add-on TWP server

(TinyWebPages server)

by Chris van Gorp PA7RHM ( UI-View32 is written by Roger Barker G4IDE , TinyWebPages invented by Bob Bruninga)


Using the TWP server  Defining commands  Menu Options  Installing UI_TWP  Error Messages  Settings (.INI file) Release Notes


The UI_TWP server  is an UI-View32 add-on which listens to queries and responds with messages and / or APRS objects.

TWP or TinyWebPages was invented by Bob Bruninga .  

Anybody in the local area of a TWP server can obtain local information.

This implementation of TWP is optimized for ease of use. To trigger the UI_TWP server a message to QDOS or QUERY is needed.
The messages sent by UI_TWP are short enough to fit in the THD7 handheld.

 

 

Using the TWP server

top

 

Startup

The UI_TWP server is normally started with the 'Extra option' of UIView32 which supports external programs (also known as ADD-ONS

The distribution of UI_TWP contains a .XTR file. For more information please see the online help of UIView32

During startup the following is done:

-get stationid from uiview32.ini

-get position of station from uiview32.ini

-checking if remote commands from ANYBODY are allowed
-checking if the Message option 'Don't show from me' is unchecked

-read the commands from UI_TWP.TXT

-read the overlay file Overlays\UI_TWP.POS (and see if objects can be defined for the commands defined in UI_TWP.TXT

-calculate the distance from the object to the station (if this distance is greater then 25 km then the object is not defined and will not be created (transmitted). (The nature of TWP is to serve the local area and not the nation).

 

Scanning APRS data

All APRS data is scanned for callsign QDOS or QUERY . If found the TWP server will announce itself:

  1. an object is created named TWP<callsign>, where callsign is the callsign of the station running the TWP server. This object serves as an indicator of the presence of the TWP server.

  2. A message is sent to the sender of the message to QDOS or QUERY

Processing queries

If a query matches one of the built-in or user defined commands then the server will respond by send the response and, if defined, create an object with the name of the command.

If the same query is received within 15 minutes then no response will be sent. A logging message will show that a similar message was already sent.

This feature is to reduce unwanted traffic.

If a request arrives at the UI_TWP server over more then 1 hop the reply message will not be sent. The UI_TWP server serves the local area (close to the UI_TWP server) , so distant requests are ignored.

Logging (what is the server doing)

In the logging text-box all the activities of the server are displayed. Information about the starting up/shutting down , receiving queries and sending of a response are listed here.

All this information is also written to the logfile UI_TWP.LOG on the Windows TEMP directory. You should delete this if it becomes too big.

 

Shutdown

When the server is shutdown it deletes all objects it created during its last run. 

You can check the logfile on this

 

 

Defining commands

top

 

Note: UI_TWP is not case sensitive.

Built in commands:

Internal command  Response
?DATE Date and time   (format depends on regional settings of PC running the UI_TWP server)
?TIME Date and time   (format depends on regional settings of PC running the UI_TWP server)
?? or ?INFO or ?HELP or ?I or ?IN or ?INF or ?H or ?HE or ?HEL  A list of commands 
?VER The version of UI_TWP
?UP The uptime of the UI_TWP server

 

Define your own commands 

You define your own commands by editing the file UI_TWP.TXT

A command definition consists of 2 lines:

  1. the command as it should be send (including ?)

  2. the response, proceeded by the '>' character.

Example:

# next follows the MILK command

?MILK

>No milk today

# end of the MILK command

 

Restrictions:

-Command length 

  the maximum command length is 6 character (including the ?)

-Number of commands

  the maximum number of commands is 10.

Suggested commands

Note that the word Local is used on every line. Again it is stressed that the UI_TWP server should only send messages / objects about LOCAL  information.

Command Meaning
SHOP The local general store
POL The Local Police Station
TRAIN The Local Train Station
BUS The local bus station
BANK Cash Card Point
2RPT The local 2 meter repeater 
70RPT  The local 70 cm repeater
NET Date time frequency of the local Net
HOS The local hospital
HAM  The local HAM store
CLUB The local Club event

 
 

 

Format of UI_TWP.TXT file

# File UI_TWP.TXT

# this file holds the commands and their responses for the TinyWebPages server
# all lines beginning with the hash '#'  character are treated as comment lines.

#

#  Start your command as it should be entered by the user (including the '?' question mark)

#  

# this is the response length for the THD7 
?POL
>Police station Schiedam
# Ham store
?HAM
>vd Bent Schiedam
?HOS
>hospital Schiedam
?2RPT
>145.6xx noCTCSS
?70RPT
>70 cm repeater

?NET
>Zo 11:00 145.525 R37W

# etc. ...

 

 

Adding an Object to the response

You can have the TWP server to create an object which can be a navigation aid.

 

 

The TWP server searches an overlay in the file UI_TWP.POS in the UIView32 folder OVERLAYS.

If there is an overlay-entry with exactly the same name as the command then the position and the symbol information of the overlay-item is copied.

Every time a request is received UI_TWP sends the response and if it has the object information the object is created as well.

 

Example:

In the above UI_TWP.TXT file is the command ?HOS

UI_TWP searches the overlayfile for an entry named HOS , it copies the symbol (h) and the positional data (5154.70N/00423.61E).

Note that the other information is not used! The command response always originates from the UI_TWP.TXT file

 

Format of OVERLAYS\UI_TWP.POS

* Overlays van Chris PD0RHM
POL!5155.38N/00422.93E!Politie Schiedam
POL>Politie Schiedam
HOS!5154.70N/00423.61EhZiekenhuis Schiedam
HOS>Ziekenhuis Schiedam

 

 

 

The OBJECT's name

Since more then 1 UI-View user may be running this program the object must have a unique name.

The prefix of the object's name is the same as the command (and the same as the entry in the overlay file). TWP-server will try a suffix from 0 to 99 until a unique, non existing objectname is found.

 

 

 

 

Menu options

top

 

Menu Option Sub-Option Purpose
File Exit   Exit the program. All settings are saved, all windows are closed. However the OBJECT that was created by the program at the solution position is NOT deleted.
Reload definition      This will reload the definitions of the UI_TWP server (file UI_TWP.TXT and overlay file UI_TWP.POS
Help About   This will print some program information in one of the text-boxes of UI_TWP
  Help or F1   This will show the online help information. Pressing this option again will close the Help window.
The size and location of the help window can be adjusted. These values are stored in the .INI file so that any future use of Help will open up the window at your favourate size and position.

 

Installing UI_TWP

top

 

You install UI_TWP by these steps:

  1. Extracting the files from the ZIP archive to the UI-View32 folder (the folder that holds uiview32.exe)

  2. Define commands by creating and edit the file UI_TWP.TXT ( you can use UI_TWP_EXAMPLE.TXT as an example)

  3. Define objects by creating and editing the file OVERLAYS\UI_TWP.POS (you can use UI_TWP_EXAMPLE.POS as an example)

 

This is the list of files that is used by UI_TWP:

Directory Filename Remarks
UIView32 Ui_twp.exe the program file
UIView32 Ui_twp.txt  the command configuration file
UIView32\OVERLAYS Ui_twp.pos the overlay file with object information (See documentation UI-View32)
UIView32 Ui_twp.html   the HTML help file
UIView32  Ui_twp.xtr File to add UI_TWP to the UI-View32 File menu. (See documentation UI-View32)
UIView32 UI_TWP.INI File to holds settings of UI_TWP
Windows-TEMP UI_TWP.LOG The UI_TWP logfile. You may delete this file if it becomes too big

 

    

 

Settings (.INI file)

top

 

Most of the values and options you enter in the UI_TWP screen are saved in the UI_TWP.ini file.

When you close down the program or when you select menu ‘File, Save settings’ these values are saved.

When you start UI_TWP , these values are restored from the UI_TWP.ini file.

The followings items are stored in the UI_TWP.ini file:

 

Item Meaning/purpose Default value

Section [SETUP]

LEFT Left position of the top left corner of the UI_TWP window  If value of LEFT is outside screen area LEFT will be calculated so that the window is centered on the screen.
TOP Top position of the top left corner of the UI_TWP window  If value of TOP is outside screen area TOP will be calculated so that the window is centered on the screen.
MINIMIZED True if the UI_TWP window is minimized FALSE

Section [HELP]

HELP_LEFT Left position of the top left corner of the UI_TWP-HELP window If value of HELP_LEFT is outside screen area HELP_LEFT will be calculated so that the window is centered on the screen.
HELP_TOP Top position of the top left corner of the UI_TWP-HELP window If value of HELP_TOP is outside screen area HELP_TOP will be calculated so that the window is centered on the screen.
HELP_WIDTH The width of the UI_TWP-HELP window  
HELP_HEIGHT The height of the UI_TWP-HELP window  
HELP_MINIMIZED True if the UI_TWP-HELP window is minimized FALSE

 

!!!  If you are not sure what you are doing, DO NOT edit the UI_TWP.ini file  !!!

 

 

Error messages

top

 

 

 

Error message Meaning

Messages seen on the logging area and on the message-box

 
Another instance of this program is already running You tried to start UI_TWP while it is already running
Unable to locate UIVIEW32.EXE file, install this add-on in the UIView32 directory UI_TWP is not installed in the UI-View32 folder
Your current version of uiview32 (1.5.0.2) is invalid for this add-on, minimum version 1.61, maximum version 1.69 is required UI_TWP is not able to work with a version of UI-View32 other than specified. You should consider an upgrade of either UI-View32 or UI_TWP.
  UI-View32 is not installed properly, look at other messages you received from UI-View or UI_TWP
You must first set the UIView32 menu 'Option, Remote Commands' to 'Anyone' In order to let every use the TWP server this option must be set.
You should first set the UIView32 menu 'Option, Remote Commands' to 'Anyone'
You now only can process your own remote commands!
This informational message is to tell you that only TWP server request by your callsign are processed. 
You should uncheck the Message option 'Don't show from me' 
You cannot send commands to your own TWP server (using the same callsign)!
The Message window option 'Don't show from me' not only prevents the messages from being put in the message window, it also prevents the processing of the message.
Here is what you should do:
Go to the Messages window, choose Options and uncheck 'Don't show from me'
Error getting station callsign from UIView32.INI There should be an entry for stationid in the UIView32.ini file.
More then nnnn commands defined in UI_TWP.TXT file. You defined more then nnnn commands. Reduce the number of commands in the file UI_TWP.TXT
Can not open TWP definition file 'ui_twp.txt' The UI_TWP definition file can not be opened. The next line of the error message gives the Windows error message. Think of the following root causes:
- the file is missing (File not found)
- you do not have permission to read the file
Can not open overlay file '\overlays\ui_twp.pos' The overlay definition file can not be opened. The next line of the error message gives the Windows error message. Think of the following root causes:
- the file is missing (File not found)
- you do not have permission to read the file
Error getting station latitude from UIView32.INI There should be an entry for latitude in the UIView32.ini file.
Error getting station longitude from  UIView32.INI There should be an entry for longitude in the UIView32.ini file.
Command 'XXXXXXX' is more then 'n' characters The command you defined in UI_TWP.TXT is more then the given number of characters in length
Response 'YYYYYYYY' is more then 'n' characters The response you defined in UI_TWP.TXT is more then the given number of characters in length

Messages only seen on the logging area

 
File UI_TWP.TXT has changed, reloading definition files. Everytime you change the UI_TWP.TXT file, UI_TWP reloads the definition from both UI_TWP.TXT and UI_TWP.POS in the overlays directory.
Msg not send: effective digi path digi1,digi2 contains more then 1 hop The requestor is more then 1 hop from the UI_TWP server. Since the UI_TWP server is only for local requests the msg is not send
   
QDOS or QUERY seen in APRS destination (QDOS ). The received APRS data contains the destination callsign QDOS  or QUERY , now the request text is processed.
Ignored (double) When sending a message to the virtual destination callsign QDOS or QUERY no ack is received by the sender, so retransmissions from the sender will occur , also retransmissions by digipeater(s) will occur. These copies of the original message are ignored.
Throttle down
Throttled down, ignoring this message
Throttle up
When the number off messages received by the TWP server exceeds a threshold, the request processing is throttled down for a while until the number is below the threshold again. 

 

 

Release Notes

top

Prior to the first release the software was tested by Bart and Andy

The first released version was version 1.1.0 release date 31-jul-2001

Known bugs

  1. When UI_TWP loads object information from the UI_TWP.POS overlay file it checks if objects are not too far from the UI_TWP server station. It appears that the calculated distance is incorrect.

Version 1.2.0 release date 15-apr-2002

Bugs reported

Bugs fixed

New features

Version 1.3.0 release date 20-aug-2002

Bugs reported : 

Known bugs

New features

Versions 1.4.x are test versions and are only sent to testers

Version 1.5.0 release date 25-aug-2002
This release was tested with lots of help from Ben PD2BS

Bugs reported : 

Known bugs

New features / enhancements

 

Version 1.5.4 release date 25-jan-2003
This release was tested with lots of help from Ben PD2BS

Bugs reported : 

Known bugs

New features / enhancements

Version 1.5.5 release date 10-apr-2004
 

Bugs reported : 

Known bugs

New features / enhancements