MiconV3 Interface
Description
Newer devices have started using a simpler protocol to interface with a new microcontroller which appears to control fewer functions than previous devices did. Like previous versions the communication happens over a serial connection that takes place within the main board.
Affected Models
This protocol is most likely used by all Terastations starting with the 3010/5010.
Serial Port Configuration
There is less consistency on what port is used on these devices that there was on previous versions which seemed to exclusively use the second serial port port.
- For Intel-based devices they appear to be connected to the first serial port (/dev/ttyS0)
- For ARM-based devices a USB-to-UART adapter appears to be used (/dev/ttyUSB0)
Setting | Value |
---|---|
Speed | 57600 |
Parity | None |
Data Bits | 8 |
Stop Bits | 1 |
Message format
The message format is much simpler than previous versions consisting of just strings with Windows-Style line terminators (\r\n). It does not include a checksum like the previous version instead relying on some simple return messages.
Commands
Command | Notes |
---|---|
LCD_PUTS <LCD Line> <String> <EOL> | Line numbers start with 0. The device will automatically remove leading spaces from any strings sent. If you wish to send a leading space you can use a Unicode NBSP character ("\u00A0") If a string longer than the 16-character limit is sent it will truncate it without returning any error. |
LCD_CLR | Clears the LCD |
LCD_CONTRAST <NUM> | values 0-63 set contrast higher values wrap around. Needs to be pretty high to be visible, normal is about 50 |
BRIGHT_SET <percent> | values 0-100 set the brightness of all LEDs and LCD backlight. Values greater than 100 get treated as 100. |
LED_OFF <LED#> | |
LED_ON <LED#> | |
LED_BLINK <LED#> <blink rate> | blink rate appears to be milliseconds |
EEPROM_READ <byte#> <#> | returns the string representation of the decimal value of the byte at that address followed by the two-character line break. This isn't the least efficient way to transfer binary data but it's close. |
EEPROM_WRITE <byte#> <value> | I haven't gotten around to trying this |
SOUND <frequency> <duration> | frequency in Hz, duration in milliseconds. Appears to allow very long tones if you want. Running tone is superseded by subsequent commands. Tone can be stopped early by sending values of 0. |
BOOT_END | presumable to disable a watchdog timer on ARM devices |
VER_GET | Returns version string from microcontroller, ex WS5020 1.19 |
BID_GET | returns 0 on WS5220 and 6 on TS3210. |
PSU_GET | returns 0 on WS5220 and invalid on TS3210. I assume something related to rackmount PSUs |
HDD_GET <hdd#> | returns 1 if drive present and 0 if not (hdd# start with 0) *invalid on Intel Devices |
HDD_ON | *invalid on Intel Devices |
HDD_OFF | *invalid on Intel Devices |
FAN_GET <fan #> | Returns fan RPM if fans managed by micon. For a 2-fan device I got reasonable values for 0/1 and "65538" for fan 2 |
FAN_SET <?> <speed> | speed appears to set PWM for all fans, values appear to be 0-100, have not figured out what first argument is. |
FW_UPDATE | Presumably to put the onboard atmega328 into programming mode, not sure when/if I will try this |
REBOOT | shuts off all LEDs and LCD, then on non-Intel devices restarts the device. This is meant to be done at the end of a shutdown after filesystems are unmounted. |
POWER_OFF | shuts off and disables all LEDs and LCD, then on non-Intel devices powers off the device. This is meant to be done at the end of a shutdown after filesystems are unmounted. |
SOUND <Frequency Hz> <Duration ms> | play a sound |
<button name>_PRESSED | received from the port when a button is pressed. On Intel devices this works with the power button even though the button also works as an ACPI power button. |
<button name>_RELEASED <duration> | received from the port when a button is released. |
LED codes
LED Number | Description |
---|---|
0 | Power |
1 | Function |
2 | Info |
3 | Red LCD Backlight |
4 | Green LCD Backlight |
5 | Blue LCD Backlight |
6 | UID? |
7 | Sata1 Error |
8 | Sata2 Error |
9 | Sata3 Error |
10 | Sata4 Error |
11 | Sata5 Error |
12 | Sata6 Error |
13 | Sata7 Error |
14 | Sata8 Error |
15 | Diag |
Response Messages
Response | Notes |
---|---|
DONE | |
UNDEFIND_COMMAND | **their spelling, not mine |
<nothing> | valid commands that aren't implemented for that particular model appear to return nothing rather than "DONE" or an error. |
Tools
There's a Python library with examples for sending commands to these devices:
https://github.com/1000001101000/Python_buffalo_libmicon
There's also a fork of an older C tool which is used to send commands within the Linux installers: