Skip to content

Commands: System

BPI Services Dev edited this page Feb 11, 2019 · 4 revisions

System device

The main iMatch device. Provides the following functions:

  • datetime returns the current datetime of the iMatch when params is left empty. Needs to be set on startup! The datetime format is an 8-tuple: (year, month, day, weekday, hours, minutes, seconds, subseconds)
  • info returns firmware version, revision and build data in the response along with a flag indicating if fastflash is supported in the firmware.
  • echo returns the supplied params as data in the response.
  • led sets the specified led to the specified color. The params format is a 2-tuple (led,color).
    • led possible values are either 1 (left led) or 2 (right led)
    • color possible values are:
      • 0 (off)
      • 1 (red)
      • 2 (green)
      • 3 (yellow)
      • 4 (blue)
      • 5 (cyan)
      • 6 (magenta)
      • 7 (white)
  • flash flashes 128 bytes to the firmware. The params format is a base64 string of the firmware bytes.
    • flash_loaded tells the device that the firmware upload is complete and to restart into the new version. The params format is a 3-tuple (total length, checksum, skip CRC).
  • firmware_update tells the device to listen for raw bytes if fastflash is supported in the firmware. This can be determined from the response of the info method. The params format is a 3-tuple (total length, checksum, skip CRC). Once in the raw bytes mode, the firmware can be transmitted 256 bytes at a time.

Clone this wiki locally