Table of Contents

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.

Fonts

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.

Keyboard

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

Options

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

* indicates the default option.

Function Keys

VT100 Emulated Sequences

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.

Reference Material

VT100 User Guide - http://vt100.net/docs/vt100-ug.zip

Ideas

Change Log

7-Jul-06 1.7

3-Dec-05 1.6

30-Sep-05 1.5

27-Sep-05 1.4

18-Sep-05 1.3

8-Aug-05 1.2

7-Aug-05

Code

rfterm.zip v1.6 rfterm-1.7.zip