Skip to content

RFranco

Plain ASCII lines, a password prompt, and Spanish. Lots of Spanish. The friendliest protocol in the building, which isn't saying much.

Commands

One command per line. Case doesn't matter. Lines end in CR, LF, CRLF or LFCR, and they can show up in as many pieces as the line feels like.

Command Reply Needs the key?
C CLAVE:, then the next line is the key no
ESTADO ESTADO= followed by 7 status bits no
TOTALES play, win and plays totals, one per line no
REGISTROS the detailed registers, then the two door counters yes
anything else ERR COMANDO no

Every reply line ends in CRLF. Every command gets echoed back first, before its reply.

The key

  1. Send C. The machine answers CLAVE: (key).
  2. Send the key. The default is RF, case doesn't matter.
  3. Right key gets OK. Wrong key gets ERR CLAVE and you're logged out.

If the line after C is another C, the machine just prompts CLAVE: again instead of treating C as a wrong password. Some readers do that. Patience is cheaper than a support call.

REGISTROS without the key gets ERR CLAVE. No key, no registers.

A real session

Generated by running the simulator with play = 1000, win = 950, plays = 77:

>> REGISTROS
<< REGISTROS
<< ERR CLAVE
>> C
<< C
<< CLAVE:
>> RF
<< RF
<< OK
>> ESTADO
<< ESTADO
<< ESTADO=1100000
>> TOTALES
<< TOTALES
<< total...e  1000
<< total...s  950
<< total...pa  77
>> FOO
<< FOO
<< ERR COMANDO

Line formats

Totals and registers are label value, two spaces in between. The reader splits on the spaces and takes the number.

The labels have dots exactly where the legacy reader's regex has wildcards:

REX_TOT = rb"^total\.[\.e,\.s,pa]"
REX_REG = rb"^(mo\.[e,s]|bil[le,ls,ho]|partid\.a\.[1,2,3])"

Don't "fix" the labels into real words. The regex is the boss here.

TOTALES

Label Meter
total...e play
total...s win
total...pa plays

REGISTROS

Labels Meters
partid.a.1 to partid.a.3 bet_1 to bet_3
mo.e.10c, mo.e.20c, mo.e.50c, mo.e.1e, mo.e.2e in_10c, in_20c, in_50c, in_1e, in_2e
mo.s.10c, mo.s.20c, mo.s.50c, mo.s.1e, mo.s.2e out_10c, out_20c, out_50c, out_1e, out_2e
bille.5e to bille.50e in_5e, in_10e, in_20e, in_50e
bills.5e to bills.50e out_5e, out_10e, out_20e, out_50e
bilho.5e to bilho.50e in_h_5e, in_h_10e, in_h_20e, in_h_50e
Puerta doorsup_c
PuertaInf doorinf_c

The order on the wire is the order in REGISTROS_LAYOUT, then the two door lines.

ESTADO

Seven characters, 0 or 1. Bit N comes from meter rfranco_status_N. Anything non-zero is 1. Bits you never set default to 1, 1, 0, 0, 0, 0, 0.

Knobs

These are constructor arguments on RFrancoSimulator. The CLI uses the defaults.

Argument Default What it does
key "RF" The password. Case doesn't matter.
require_key True False skips the login and opens REGISTROS to everyone.
echo_commands True False stops echoing commands back.