RF Term

The RFTerm program allows a Cybiko to act as a 'wireless terminal'.
As you can see, box drawing, cursor positioning, underlining & inverse characters are fully supported.

This application is designed to work in conjunction with a second Cybiko which is running the Serial Relay program that allows RS232 traffic to be xferred, wirelessly, between Cybikos. It can also operate as a directly cabled RS232 serial VT terminal as well.

vttest.jpg

The remote screen running this app is typically handheld and not connected to an RS232 port, instead receiving info to be displayed and returning keystrokes to the host Cybiko that is driving it.

The RFTerm screen simply displays whatever text is sent via the wireless link. Screen and device management is achieved by a set of control codes (rather like VT100 codes) that allow the controlling device to clear the screen, set the font, position the cursor etc…

To use the serial port you need the comport.dl driver and a Cybiko Classic.

Three font sizes are supported :

lf_1.jpg 5×7 mf_1.jpg 4×6 sf_1.jpg 3×5

We aim to minimise the volume of wireless comms needed to achieve a given display. e.g. hold pre-prepared screens on the 'remote screen' Cybiko and have them invoked by a single control code from the host. A radical extension of this would be a PC based 'screen designer' program that allowed static screens to be defined with placeholders that were dynamically refreshed by data from the host Cybiko at runtime.

Keypresses on the remote screen keypad are simply sent back to the host via the wireless link.

Any key pressed will be sent to remote registered program. There are however some special keys used to interact with the RFTerm program.

  • SELECT - Will present a dialog of other cybiko units in the area to communicate with.
  • Shift-SELECT - Locate a debug partner. All communication to and from this unit will also be forward to another cybiko
  • Fn-SELECT - Screen dump to the file RFTerm.scr
  • Fn-ENTER - Present the options screen, these are described below.
  • ESC - Quit the application. A Dialog to confirm will be shown.

The options screen is accessed by pressing the 'Fn-ENTER' key.
Currently, the following options are provided :

  • Tx/Rx Type - This menu option is only available when running on a Classic. It allow the program to operate in either RF* mode or in RS232 mode directly cabled.
    • Serial Settings - Sub menu to setup serial port parameters.
  • Partner Type - the program that will receive messages transmitted from RFTerm either SerialRelay*, or Repeater
  • Set Font - choose the default font size: 3×5, 4×6, 5×7*, or 7×8
  • Local echo - determines whether locally typed characters are echoed to the local screen
  • Power - Sets the wireless Tx to low*, or high power
  • Enter Key - Send either CR*, or CR/LF
  • CR Handling - When an inbound CR is received should an LF be automatically added?
  • Cursor key state - Toggle between application or normal mode. The difference is the preceding escape sequence, in Normal mode <ESC>[ is used, in application mode the sequence <ESC>O is used.
  • Cursor mode - Flashing* / Solid
  • Backspace key - send either Ctrl-H (8)* or Ctrl-? (127)
  • Remote quit notify - when the Serial Relay program exits do we want a notification dialog. Off/On*
  • Bell action - what to do when the terminal receives a CTRL-G chr(8) character.
    • Do nothing
    • Sound the beeper*
    • Vibrate

* indicates the default option.

  • Use %xx and hex to embed special characters.
  • <Enter> to change a setting
  • <Arrows> to navigate
  • <Esc> to exit

The list of VT100 escape sequence supported by this emulator is presented here.

Key Mappings

Some of the special keys on the VT100 have been mapped to the cybikos special row of function keys.

PF1 - Fn1 (Squiggly @ symbol)   <ESC>OP
PF2 - Fn2 (Telephone)           <ESC>OQ
PF3 - Fn3 (Mans face)           <ESC>OR
PF4 - Fn4 (Alarm clock)         <ESC>OS

Cursor Control

Cursor
Home
<ESC>[{ROW};{COLUMN}H

Sets the cursor position where subsequent text will begin. If no row/column parameters are provided (ie. <ESC>[H), the cursor will move to the home position, at the upper left of the screen.
Cursor
Up
<ESC>[{COUNT}A

Moves the cursor up by COUNT rows; the default count is 1.
Cursor
Down
<ESC>[{COUNT}B

Moves the cursor down by COUNT rows; the default count is 1.
Cursor
Forward
<ESC>[{COUNT}C

Moves the cursor forward by COUNT columns; the default count is 1.
Cursor
Backward
<ESC>[{COUNT}D

Moves the cursor backward by COUNT columns; the default count is 1.
Force Cursor
Position
<ESC>[{ROW};{COLUMN}f

Identical to Cursor Home.

Erasing Text

Erase
in Line
<ESC>[ Ps K

Parameters
0 - Erase from the active position to the end of the line, inclusive (default)
1 - Erase from the start of the screen to the active position, inclusive
2 - Erase all of the line, inclusive
Erase
in Display
<ESC> [ Ps J

Parameters
0 - Erase from the active position to the end of the screen, inclusive (default)
1 - Erase from start of the screen to the active position, inclusive
2 - Erase all of the display – all lines are erased, changed to single-width, and the cursor does not move. Also equiv of CTRL-L chr(12)

Font modifiers

Underline <ESC>[4m
Reverse Video <ESC>[7m
Reset colour attributes to default <ESC>[0m

Graphics

Support for line drawing characters is available for the 5×7 font only. This table describes the font mapping http://vt100.net/docs/vt220-rm/table2-4.html

Enter GR mode <ESC>(0
Exit GR mode <ESC>(A or <ESC>(B

Loading of bitmaps as defined in the RFTerm.scr file. This file contains a list of bitmaps and their X,Y coordinate.
Sample RFTerm.scr file:

 Image1.pic,15,10
 Image2.pic,25,30
Load bitmap <ESC>[{INDEX};{ROW};{COL}b

{INDEX} must be supplied and starts at 0 for the 1st entry
{ROW} {COL} a user supplied (x,y) coordinate if not present then the default supplied in the RFTerm.scr file will be used.

Music

The cybiko has the ability to play .mus files, using the same sort of mapping as was done for the Graphics.

Play music file <ESC>[{INDEX}s

{INDEX} must be supplied and starts at 0 for the 1st entry

The music file will be called RFTerm.snd and will contain a lines of text identifying that .mus file that you wish to play.

Example RFTerm.snd file

beep.mus
burp.mus
away.mus

If the following sequence was sent to RFTerm it would play burp.mus

  <ESC>[1s

Misc

It would be useful to be able to get answer back strings from RFTerm in response to queries posted by the driving application.

To this extent this escape sequence can offer up information back to caller about the state of play on a cybiko.

Answer back <ESC>[{INDEX};{X};{Y}a

{INDEX} is mandatory and represents one of the answer back questions

If {X};{Y} are supplied then instead of the string being sent to the invoker it will be displayed onto the RFTerm screen at the coordinates x;y identified by the two optional components
Index values

The following table identifies the possible answer back items that can be queried.

Description Value Length Options
Battery Life 1 3 The battery life range 0-100
Nick name 2 8 Name of the cybiko
Date 3 9 Local cybiko date dd-mon-yy
Time 4 8 Local cybiko time 24hh:mi:ss
Uptime 5 11 Time since reboot dd:hh:mi:ss

Screen Dump

Pressing the Fn-Select keysequence will cause a screendump '.pic' file to be created on the Cybiko filesystem. This can easily be uploaded to a PC and converted to a bitmap. e.g. The default filename is “RFTerm.pic”

1. rfterm.jpg 2. 3.

  1. File Missing?
  2. See test directory in ZIP file.
  • Options - there are a great many options that might be defined to control the behaviour of the terminal. These include …
    • Cursor style … block/underline/vertical
    • Logging … record printable data to a textfile on the Cybiko. Have to think about when to flush this file …
    • Inverse video mode.
    • Recognise XON/XOFF characters (or not).
  • Pre-defined Strings - rather than send very long strings over the wireless link, it would be neat it these strings could be pre-loaded into a .dat file that is held locally on the Cybiko that runs RFTerm. An escape sequence would then cause a given string to be displayed.
  • Scrollback - maintain a screen buffer and allow user to scrollback thru this.
  • Time/Date - an escape code to print the current data and/or time.
  • Nickname - an escape code that prints the nickname of the current 'Partner Cybiko' that is running serialrelay
  • Battery - an escape code that prints the current %age battery power remaining.

7-Jul-06 1.7

  • Added the ability to be able to define function keys using FN and one of the numeric keys. Function keys can send an arbitary string of up to 32 characters in length.

3-Dec-05 1.6

  • To save power if RFTerm is operating in Direct serial mode the RF subsystem will be disabled. Re-enable the RF subsystem when the program quits.

30-Sep-05 1.5

  • It now has the ability to auto detect the hardware that it is running on, either Classic or Extreme and provide additional configuration options via FN-ENTER.
    If its running on a classic then you get some additional menu options on the settings page that allow you to also run it as a RS232 terminal ala VTTerm by Jeff Frohwein.

    TX/Rx Type: (RF or RS232)
    Serial Settings…

27-Sep-05 1.4

  • Answer back support.

18-Sep-05 1.3

  • Added music playing support.

8-Aug-05 1.2

  • Added remote debug capability. SHIFT-SELECT will allow you to select a cybiko to which all Tx/Rx data will be sent. This cybiko should be running a copy of RFTerm so that the debug information can be displayed.
  • key fixup with flashing cursor

7-Aug-05

  • Bitmap support, Flashing cursor, CR interpretation option