Micomparam

From OpenWiz

Jump to: navigation, search

Micomparam is a program that talks to the front panel.

First discovered in Captain Magnus’ Weblog, the micomparam binary controls the front panel display.

micomparam [options]
--raw|-r <raw input>
--text|-t <text>
--response|-R <expected response>
--file|-f <input/output file>
--pause|-p <pause time (mili-sec)>
--hctosys|-S
--systohc|-H
--showhc|-s
--showwakeup|-w
--setwakeup|-W <MMDDhhmm> (decimal)
--reboot|-b
--device|-d <device file:/dev/ttyAM1>
--quiet|-q
--help|-h
useful raw command -r ...
E00100     : get micom sw version
E10101     : booted from eject ?
E10104     : booted from 1234 + PWR ?
E20101     : power control ON
E20100     : power control OFF
510100     : off VFD OFF
510101     : on all VFD ON
510102     : revert VFD
520100     : soft reset VFD
520101     : hard reset VFD
600100     : display clock
60020305   : FF level 5
600105     : Play State STOP
A10100     : Instant Power off
A1010A     : 10 sec delayed Power off
A101FD     : Cancel Power off
530101     : REBOOT

Some additional "undocumented" raw codes:

600100     : 12 hour clock
600101     : 24 hour clock
500101     : sensible front panel brightness
500107     : normal (maximum) front panel brightness
A003EEEETT : Watchdog timer. TT is the timeout time in seconds,
             EEEE is the error number in seconds

The watchdog timer displays Error DDDD on the front panel if another command hasn't been sent to the front panel via micomparam within TT seconds. The displayed error number is decimal, but the command time and error number are hexadecimal. The watchdog timer only shows the error message, it doesn't halt the system (though the error may be displayed because the system has crashed anyway).

The clock commands display the clock in that format, but don't change the "standby" clock format.

The micom protocol

It appears that the raw commands sent to the front panel have the following structure:

PREAMBLE COMMANDCODE ARGC ARGV TRAILER

where:

PREAMBLE 
The value 0xFE, used to mark the start of a message.
COMMANDCODE 
One byte command code
ARGC 
One byte count of arguments for the command.
ARGV 
ARGC number of bytes, which are the arguments to the command.
TRAILER 
The value 0xFF, used to mark the end of a message.

When using micomparam -r, omit the preamble and trailer, as this is added by the utility.

The response appear to have the following structure:

PREAMBLE RESPONSECODE ARGC ARGV TRAILER

where:

PREAMBLE 
The value 0xFE, used to mark the start of a message.
RESPONSECODE 
One byte response code.
ARGC 
One byte count of arguments for the response code.
ARGV 
ARGC number of bytes, which are the arguments to the response.
TRAILER 
The value 0xFF, used to mark the end of a message.
Personal tools