Skip to content

WebSocket API

Kalani Helekunihi edited this page Oct 25, 2023 · 3 revisions

O.MG Platform WebSocket API

API Version: v3.0-221025

Please note that this API will change as the firmware is updated. If you end up utilizing the API outside of the official frontend, please let us know so we can better coordinate any changes.

Below is a description of each websocket command for interfacing with the O.MG Firmware. By default, all of this is handled by the JavaScript frontend that is served up when you point your web browser at the IP address of the cable. The JavaScript is our frontend, and it speaks to the websocket that is operated by our backend. However, you can interface directly with the backend's websocket using a python script, another piece of hardware, or anything capable of operating on the same network as the O.MG device.

WebSocket Server Endpoint

ws://${hostname}/d/ws/issue

Features

O.MG Devices use a unified firmware, despite hardware differences between Tiers that offer unique capabilities. Because of this, some commands may not be present on some tiers. If called on an unsupported device, you will likely receive a message stating: " Unrecognized Command". To simplify error handling within your application, we have broken down these capabilities into Feature Flags and Groups to determine which commands exist for your device.

Global

'CFError': 'Filesystem Error',
'CFGet': 'Filesystem Get',
'CFList': 'Filesystem List',
'CI': 'Firmware Version',
'CNGet': 'USB Descriptors Get',
'CNSet': 'USB Descriptors Set',
'CR': 'Reboot',
'CTErase': 'Setting Erase',
'CTError': 'Setting Error',
'CTGet': 'Setting Get',
'CTList': 'Setting List',
'CTSet': 'Setting Set',
'CV': 'System Version',
'CW': 'WiFi Configure',
'CWInfo': 'WiFi Show Config',
'CWStatus': 'WiFi Show Status',
'FE': 'Flash Erase',
'FR': 'Flash Read',
'FW': 'Flash Write',
'FX': 'Flash Write as Hex',
'SVStatus': 'Service Status',

Payload

'CE': 'Payload Execute',
'CEError': 'Payload Error',
'CEStatus': 'Payload Status',
'CJ': 'Mouse Jiggler Enable/Disable',

Debug

'E': 'Echo',

Keylog

'CLDelete': 'Keylog Delete',
'CLRead': 'Keylog Read',
'CLStart': 'Keylog Start',
'CLStatus': 'Keylog Status',
'CLStop': 'Keylog Stop',

HIDX

'CH': 'HIDX Status',
'CHStart': 'HIDX Start',
'CHStop': 'HIDX Stop',
'CHStatus': 'HIDX Status',
'SFErase': 'Sequential File Erase',
'SFInfo': 'Sequential File Info',
'SFRead': 'Sequential File Read',

C2

'C2Config': 'C2 Config',
'C2Status': 'C2 Status',

Stealth

'CD': 'Self Destruct',
'CU': 'USB Enumeration Enable/Disable',

Feature Groups to Tier Mapping

Plug Basic: 	['global', 'syslog', 'debug', 'payload']
Plug Elite: 	['global', 'syslog', 'debug', 'payload', 'c2', 'hidx', 'stealth']
Cable & Adapter Basic: 	['global', 'syslog', 'debug', 'payload', 'stealth']
Cable & Adapter Plus: 	['global', 'syslog', 'debug', 'payload', 'keylog', 'stealth']
Cable & Adapter Elite: 	['global', 'syslog', 'debug', 'payload', 'keylog', 'c2', 'hidx', 'stealth']

Commands

CD: Self Destruct

Description: Perform a Self Destruct on the O.MG Backend.

Request

CD1: Self Destruct (Full)
Completely erase all data and disconnect data lines to make device behave
"broken". You will need to reflash the firmware to recover.

CD2: Self Destruct (Neuter)
Erase all data, but leave data lines connected, so it behaves like a
normal device. You will need to reflash the firmware to recover.

Response

WebSocket will not send a response indicating Self Destruct was completed.

CE: Payload Execute

Description: Execute a Payload on the O.MG Backend.

All commands within Payload Execute must contain the header: "CE200101",
and the footer: "300101" If a Payload must be split between multiple subsequent messages, each header and footer value should be incremented by 1. Example: "200102" & "300102" Messages may optionally use a CRC-16/AUG-CCITT checksum for the entire payload, wrapped within square brackets. Example: CE[D3C0]200101 ... 300101

IF_PRESENT

IF_PRESENT is a GeoFencing command that will check if a certain SSID or
BSSID is visible from the O.MG Device, and if an optional parameter SIGNAL
is sent, is at least a certain RSSi.

IF_PRESENT requires either an SSID or BSSID parameter, but not both.
IF_PRESENT supports an optional SIGNAL parameter, where if used determines
a minimum RSSi Signal Strength to allow continued execution of the
payload. All values are encoded as HEX.

SSID mode uses a command prefix of "24"
BSSID mode uses a command prefix of "25"
IF_PRESENT uses a command header of "0106"
IF_PRESENT uses a command footer of "0307"

IF_PRESENT SSID Encoding:
${cmdPrefix}${cmdHeader}${cmdPrefix}${ssid}${cmdPrefix}${cmdFooter}

IF_PRESENT SSID Example Payload:
IF_PRESENT SSID="someValue"

Output:
24010624736F6D6553534944240307

IF_PRESENT SSID Signal Encoding:
${cmdPrefix}${cmdHeader}${cmdPrefix}${ssid}${cmdPrefix}02${signal}${cmdPrefix}${cmdFooter}

IF_PRESENT SSID Example Payload:
IF_PRESENT SSID="someValue" SIGNAL="50"

Output:
24010624736F6D6553534944240250240307

IF_PRESENT BSSID Encoding:
${cmdPrefix}${cmdHeader}${cmdPrefix}${bssid}${cmdPrefix}${cmdFooter}

IF_PRESENT BSSID Example Payload:
IF_PRESENT BSSID="AA:BB:CC:DD:EE:FF" SIGNAL="50"

Output:
2401062441413A42423A43433A44443A45453A4646240307

IF_PRESENT BSSID Signal Encoding:
${cmdPrefix}${cmdHeader}${cmdPrefix}${bssid}${cmdPrefix}02${signal}${cmdPrefix}${cmdFooter}

IF_PRESENT BSSID Example Payload:
IF_PRESENT BSSID="AA:BB:CC:DD:EE:FF"

Output:
2401062441413A42423A43433A44443A45453A4646240250240307

IF_NOTPRESENT

IF_NOTPRESENT is a GeoFencing command that will check if a certain SSID or
BSSID is not visible from the O.MG Device, and if an optional parameter
SIGNAL is sent, is at least a certain RSSi.

IF_NOTPRESENT requires either an SSID or BSSID parameter, but not both.
IF_NOTPRESENT supports an optional SIGNAL parameter, where if used
determines a minimum RSSi Signal Strength to allow continued execution of
the payload.
All values are encoded as HEX.

SSID mode uses a command prefix of "26"
BSSID mode uses a command prefix of "27"
IF_PRESENT uses a command header of "0106"
IF_PRESENT uses a command footer of "0307"

IF_NOTPRESENT SSID Encoding:
${cmdPrefix}${cmdHeader}${cmdPrefix}${ssid}${cmdPrefix}${cmdFooter}

IF_NOTPRESENT SSID Example Payload:
IF_NOTPRESENT SSID="someValue"

Output:
26010626736F6D6553534944260307

IF_NOTPRESENT SSID Signal Encoding:
${cmdPrefix}${cmdHeader}${cmdPrefix}${ssid}${cmdPrefix}02${signal}${cmdPrefix}${cmdFooter}

IF_NOTPRESENT SSID Example Payload:
IF_NOTPRESENT SSID="someValue" SIGNAL="50"

Output:
26010626736F6D6553534944260250260307

IF_NOTPRESENT BSSID Encoding:
${cmdPrefix}${cmdHeader}${cmdPrefix}${bssid}${cmdPrefix}${cmdFooter}

IF_NOTPRESENT BSSID Example Payload:
IF_NOTPRESENT BSSID="AA:BB:CC:DD:EE:FF"

Output:
260106 2641413A42423A43433A44443A45453A4646 260307

IF_NOTPRESENT BSSID Signal Encoding:
${cmdPrefix}${cmdHeader}${cmdPrefix}${bssid}${cmdPrefix}02${signal}${cmdPrefix}${cmdFooter}

IF_NOTPRESENT BSSID Example Payload:
IF_NOTPRESENT BSSID="AA:BB:CC:DD:EE:FF" SIGNAL="50"

Output:
2601062641413A42423A43433A44443A45453A4646260250260307

WAIT_FOR_PRESENT

WAIT_FOR_PRESENT is a GeoFencing command that will check if a certain SSID
or BSSID is visible from the O.MG Device, and if an optional parameters
MINUTES or INTERVAL is sent determines how long to wait in minutes, and
how often to retry in seconds.

WAIT_FOR_PRESENT requires either an SSID or BSSID parameter, but not both.
WAIT_FOR_PRESENT supports an optional MINUTES parameter, where if used
determines how long to look for the SSID or BSSID. If you wish to run
indefinitely, set value to "00".
WAIT_FOR_PRESENT supports an optional INTERVAL parameter, which if used
determines how often to look for the SSID or BSSID. If you wish to run
continuously, set value to "00".
All values are encoded as HEX.

SSID mode uses a command prefix of "28"
BSSID mode uses a command prefix of "29"
IF_PRESENT uses a command header of "0106"
IF_PRESENT uses a command footer of "0407"

WAIT_FOR_PRESENT SSID Encoding:
${cmdPrefix}${cmdHeader}${cmdPrefix}${ssid}${cmdPrefix}02${minutes}${cmdPrefix}03{interval}${cmdPrefix}${cmdFooter}

WAIT_FOR_PRESENT SSID Example Payload:
WAIT_FOR_PRESENT SSID="someValue"

Output:
28010628736F6D6553534944280200280300280407

WAIT_FOR_PRESENT BSSID Encoding:
${cmdPrefix}${cmdHeader}${cmdPrefix}${bssid}${cmdPrefix}02${minutes}${cmdPrefix}03{interval}${cmdPrefix}${cmdFooter}

WAIT_FOR_PRESENT BSSID Example Payload:
WAIT_FOR_PRESENT BSSID="someValue"

Output:
2901062941413A42423A43433A44443A45453A4646290200290300290407

WAIT_FOR_NOTPRESENT

WAIT_FOR_NOTPRESENT is a GeoFencing command that will check if a certain
SSID or BSSID is not visible from the O.MG Device, and if an optional
parameters MINUTES or INTERVAL is sent determines how long to wait in
minutes, and how often to retry in seconds.

WAIT_FOR_NOTPRESENT requires either an SSID or BSSID parameter, but not
both.
WAIT_FOR_NOTPRESENT supports an optional MINUTES parameter, where if used
determines how long to look for the SSID or BSSID. If you wish to run
indefinitely, set value to "00".
WAIT_FOR_NOTPRESENT supports an optional INTERVAL parameter, which if used
determines how often to look for the SSID or BSSID. If you wish to run
continuously, set value to "00".
All values are encoded as HEX.

SSID mode uses a command prefix of "2A"
BSSID mode uses a command prefix of "2B"
IF_PRESENT uses a command header of "0106"
IF_PRESENT uses a command footer of "0407"

WAIT_FOR_NOTPRESENT SSID Encoding:
${cmdPrefix}${cmdHeader}${cmdPrefix}${ssid}${cmdPrefix}02${minutes}${cmdPrefix}03{interval}${cmdPrefix}${cmdFooter}

WAIT_FOR_NOTPRESENT SSID Example Payload:
WAIT_FOR_NOTPRESENT SSID="someValue"

Output:
2A010628736F6D65535349442A02002803002A0407

WAIT_FOR_NOTPRESENT BSSID Encoding:
${cmdPrefix}${cmdHeader}${cmdPrefix}${bssid}${cmdPrefix}02${minutes}${cmdPrefix}03{interval}${cmdPrefix}${cmdFooter}

WAIT_FOR_NOTPRESENT BSSID Example Payload:
WAIT_FOR_NOTPRESENT BSSID="someValue"

Output:
2B01062B41413A42423A43433A44443A45453A46462B02002B03002B0407

VID

VID is a USB Device ID Editing command, used to set the USB Device Vendor
ID used by the O.MG Device.

VID is a 4 digit Hex number.

VID Encoding:
0E${VID}

VID Example Payload:
VID 1234

Output:
0E1234

PID

PID is a USB Device ID Editing command, used to set the USB Device Product
ID used by the O.MG Device.

PID is a 4 digit Hex number.

PID Encoding:
0F${PID}

PID Example Payload:
PID 5678

Output:
0F5678

MAN

MAN is a USB Device ID Editing command, used to set the USB Device
Manufacturer Name used by the O.MG Device.

MAN is an ASCII String converted to Hex.

MAN Encoding:
15010615${MAN}150207

MAN Example Payload:
MAN O.MG

Output:
150106154F2E4D47150207

PRO

PRO is a USB Device ID Editing command, used to set the USB Device Product
Name used by the O.MG Device.

PRO is an ASCII String converted to Hex.

PRO Encoding:
16010616${MAN}160207

PRO Example Payload:
PRO Cable

Output:
160106164361626C65160207

SER

SER is a USB Device ID Editing command, used to set the USB Device Serial
Number used by the O.MG Device.

SER is an ASCII String converted to Hex.

SER Encoding:
17010617${SER}170207

SER Example Payload:
SER 123456789

Output:
17010617313233343536373839170207

REBOOT

REBOOT will tell the O.MG Device to perform a soft reboot.
REBOOT Encoding:
180000

REBOOT Example Payload:
REBOOT

Output:
180000

KEYLOGGER

KEYLOGGER will tell the O.MG Device to start the keylogger. It contains
one required parameter: MODE.

MODE allows the user to set HID vs KEY modes, or stop the Keylogger, and
is done by setting the Hex value as follows:
OFF = 00
HID = 01
KEY = 02

KEYLOGGER ON Encoding:
19${mode}00

KEYLOGGER HID ON Example Payload:
KEYLOGGER HID ON

Output:
190100

KEYLOGGER OFF Encoding:
1A${mode}00

KEYLOGGER OFF Example Payload:
KEYLOGGER OFF

Output:
1A0000

USB

USB will tell the O.MG Device to start the USB Interface. It contains one
required parameter: STATUS.

STATUS allows the user to start or stop the USB Interface, and is done by
setting the Hex value as follows:
OFF = 00
ON = 01

USB ON Encoding:
1000${status}

USB ON Example Payload:
USB ON

Output:
100001

USB OFF Encoding:
1000${mode}

USB OFF Example Payload:
USB OFF

Output:
100000

JIGGLER

JIGGLER will tell the O.MG Device to start the Mouse Jiggler. It contains
one required parameter: STATUS.

STATUS allows the user to start or stop the Mouse Jiggler, and is done by
setting the Hex value as follows:
OFF = 00
ON = 01

JIGGLER ON Encoding:
1100${status}

JIGGLER ON Example Payload:
JIGGLER ON

Output:
110001

JIGGLER OFF Encoding:
1100${mode}

JIGGLER OFF Example Payload:
JIGGLER OFF

Output:
110000

STRING

STRING will tell the O.MG Device to type a USB HID Usage ID Encoded
String.

STRING values must be encoded as USB HID Usage IDs, in type Hex.
The character format is 3 HEX Bytes long.
The first byte indicates which device to use. By default, Device ID 01 =
Keyboard.
The second byte indicates if a modifier is used on a key press (CTRL, ALT,
SHIFT, GUI, etc.).
The third byte is the USB HID Usage ID indicating the key position.

Example using EN-US Locale:
010004 = a (keyboard no modifier key position 04)
010204 = A (keyboard left-shift modifier key position 04)

STRING Encoding:
200101${string}300101

STRING Example Payload:
STRING This is a test.

Output:
01021701000B01000C01001601002C01000C01001601002C01000401002C010017010008010016010017010037

SELF_DESTRUCT

SELF_DESTRUCT will tell the O.MG Device to Self Destruct, erasing all data
and depending on mode either leaving Data Pins connected - allowing for
use as a passive cable - or disconnected - preventing use as a passive
cable. It contains one required parameter: MODE.

MODE determines if Self Destruct should perform a FULL or PARTIAL Self
Destruct.
FULL = 13
PARTIAL = 14

SELF_DESTRUCT FULL Encoding:
130000

SELF_DESTRUCT FULL Example Payload:
SELF_DESTRUCT FULL

Output:
130000

SELF_DESTRUCT PARTIAL Encoding:
140000

SELF_DESTRUCT PARTIAL Example Payload:
SELF_DESTRUCT PARTIAL

Output:
140000

USB_RESET

USB_RESET will tell the O.MG Device to perform a soft reset on the USB
Interface.

USB_RESET Encoding:
1B2700

USB_RESET Example Payload:
USB_RESET

Output:
1B2700

DELAY

DELAY will tell the O.MG Device to pause execution for a certain number of
deciseconds. It contains one required parameter: TIME, and is a HEX value.

DELAY Encoding:
1D${time}

DELAY Example Payload:
DELAY 2000

Output:
1D07D0

MOUSE

MOUSE will tell the O.MG Device to create a Mouse device, which can
Relative MOVE or CLICK. It contains two required parameters: X and Y and
are positive or negative HEX values, within -FF and FF. It contains one
optional parameter: CLICK, which accepts a Button ID between 1 and 16 in
HEX.

If X or Y are a positive number, cmdPrefix is: 03
If X or Y are a negative number, cmdPrefix is: 04

MOUSE MOVE Encoding:
${cmdPrefix}${x}${y}

MOUSE CLICK Encoding
05000${click}

MOUSE Example Payload:
MOUSE MOVE 50 50
MOUSE CLICK 1

Output:
033232050001

CEError: Payload Error Response

Description: Payload Execution Error Response Message. If for some reason
a payload is unable to execute, the Backend will response with CEError and
a message to indicate what prevented execution. This is not a valid
WebSocket request, and is purely a response message if CE fails to
execute.

Response

CEError\t${errorMessage}

CEStatus: Payload Status

Description: Payload Execution Status Message. You can call CEStatus to
determine if the Payload Processor is IDLE, LOADING, or RUNNING.

Request

CEStatus

Response

CEStatus\tIdle = Payload is not running.
CEStatus\tLoading = Payload is preparing for execution, but has not
started.
CEStatus\tRunning = Payload is running.

CFError: OFAT Error

Description: OFAT Filesystem Error Response Message. If a requested file
does not exist, or could not be modified, the Backend will response with
CFError and a message to indicate what failed. This is not a valid
WebSocket request, and is purely a response message if CFGet, or CFList
fails to execute.

Response

CFError\t${errorMessage}

CFGet: OFAT Get

Description: Request Flash Sector and Length of a file contained in the
OFAT Filesystem.

Request

CFGet\tpayload1

Response

CFGet\tpagempfs\tb0\t4

Parameter 1 is the filename. Parameter 2 is the flash sector number.
Parameter 3 is the length in sectors.

CFList: OFAT List

Description: Request Flash Sector and Length of all files contained in the
OFAT Filesystem.

Request

CFList

Response

CFList\t{"pagempfs":["80","38"],"installer":["a6","1"],"settings":["a7","4"],"reserve1":["ab","4"],"scandata":["af","1"],"payload1":["b0","4"],"payload2":["b4","4"],"payload3":["b8","4"],"payload4":["bc","4"],"payload5":["c0","4"],"payload6":["c4","4"],"payload7":["c8","4"],"bootscript":["cc","4"],"bootchk":["d0","1"],"keylog":["d4","294"]}

Within the array, Parameter 1 is the filename. Parameter 2 is the flash
sector number. Parameter 3 is the length in sectors.

CI: Device Info System

Description: Get Device MAC Address, Uptime, and Restart Reason

Request

CI

Response

CI 70:03:9f:c5:3a:05 2M 4 00000000 00000000
2600.9 23 00000000

Parameter 1 is the MAC address.
Parameter 2 is the Flash Memory Size.
Parameter 3 is the Startup Reason.
Parameter 4 is the Address that caused reset.
Parameter 5 is Flash Address that caused reset.
Parameter 6 is the Device Uptime in Seconds.
Parameter 7 is the Heap Free Space in KB
Parameter 8 is a Fault Bit Flag

Restart reasons are:
0 Normal Startup By Power On;
1 Hardware Watchdog Reset ${parameters[4]} ${parameters[5]} ${parameters[7]} ${parameters[8]};
2 Exception Reset ${parameters[4]} ${parameters[5]} ${parameters[7]} ${parameters[8]};
3 Software Watchdog Reset ${parameters[4]} ${parameters[5]} ${parameters[7]} ${parameters[8]};
4 Software Restart;
5 Wake from Deep-Sleep;
6 External System Reset;

Fault Bit Flags are:
0 Payload VID Error
1 Payload PID Error
2 Flash and Map Size Not Equal

CJ: Jiggler Toggle

Description: Enable or Disable Mouse Jiggler

Request

CJ0: Disable Mouse Jiggler
CJ1: Enable Mouse Jiggler

Response

CJ0
CJ1

CLDelete: Keylogger Log Delete

Description: Delete the Keylog from Flash.

Request

CLDelete

Response

CLDelete

CLRead: Keylogger Log Read

Description: Perform either a ReadDirect or ReadNext from the Keylog.
Parameter 1 is required, specifying the client-side Maximum Request Buffer
in Bytes. Note, backend has a maximum size of 1280 Bytes. Parameter 2 is
optional, and if passed specifies the Report Number to start from.

Request

CLRead\t1280: Keylog ReadNext for 1280 Bytes
CLRead\t1280\t0: Keylog ReadDirect for 1280 Bytes starting at Report
ID 0

Response

CLRead\t${type}\t${length}\t${nextReportID}\t${data}

Type is which Report Type this message contains. Values are:
H = HID
K = Keystrokes
D = Diagnostics

Length is size of response in Bytes.

Next Report ID is the Next Report ID, allowing for contiguous read of log
when in ReadDirect mode.

Data is the raw data of the Keylog.

CLSetCursor: Keylogger Log Set Cursor Position

Description: Keylog contains a cursor position to mark last read, and is
updated automatically any time a CLRead ReadNext command is used. If you
wish to reset the Cursor to an arbitrary Report ID, you can use this
command.

Request

CLSetCursor\t0: Reset Cursor to Report ID 0 (Start of File)

Response

CLSetCursor\t0

CLStart: Keylogger Start

Description: Start the keylogger. There is one required parameter to
specify the Report Type (H for HID or K for KEY)

Request

CLStart\tk: Start Keylog in Key mode.
CLStart\th: Start Keylog in HID mode.

Response

CLStart\tk
CLStart\th

CLStatus: Keylogger Status

Description: Print the status of the Keylogger Process.

Request

CLStatus

Response

CLStatus\t26\t10000000f05f1200000000000000000000000000000001000000

Parameter 1 determines the number of bytes, and with it the expected
parsing format.
Parameter 2 is a Hex String composed of multiple little-endian encoded
values.

Bytes 1-4: Keylogger Space Used
Bytes 5-8: Keylogger Space Free
Bytes 9-12: Keylogger Data Waiting
Bytes 13-16: Keylogger Overflow Count
Bytes 17: Keylogger Status
Bytes 18: Keylogger Capture Mode
Bytes 19-22: Keylogger Last Report ID
Bytes 23-26: Next Report ID

CLStop: Keylogger StopDescription:

Description: Stop the Keylogger Process.

Request

CLStop

Response

CLStop

CNGet: USB Device IDs Get

Description: Get the USB Device IDs that will be used when USB is on.

Request

CNGet

Response

CNGet\td3c0\td34d\tO.MG\tO.MG\t999

Parameter 1 is the USB Vendor ID
Parameter 2 is the USB Product ID
Parameter 3 is the USB Manufacturer Name
Parameter 4 is the USB Product Name
Parameter 5 is the USB Serial Number

CNSet: USB Device IDs Set

Description: Set the USB Device IDs that will be used when USB is on.

Request

CNSet\td3c0\td34d\tO.MG\tO.MG\t999

Response

CNGet\td3c0\td34d\tO.MG\tO.MG\t999

Parameter 1 is the USB Vendor ID
Parameter 2 is the USB Product ID
Parameter 3 is the USB Manufacturer Name
Parameter 4 is the USB Product Name
Parameter 5 is the USB Serial Number

CR: Reboot

Description: Perform a soft reboot of the Backend.

Request

CR1

Response

CR1

CTErase: Setting Erase

Description: Erase a Setting from the Key:Value flash store.

Request

CTErase\tkeymap

Response

CTErase\tkeymap

CTError: Setting Error

Description: Error handler for the CT Settings Store. If a requested key
does not exist, or could not be modified, the Backend will response with
CTError and a message to indicate what failed. This is not a valid
WebSocket request, and is purely a response message if CTGet, CTSet, or
CTList fails to execute.

Response

CTError\t${errorMessage}

CTGet: Setting Get

Description: Get a Setting from the Key:Value flash store.

Request

CTGet\twifiset

Response

CTGet\twifiset\t1

CTList: Setting List

Description: List all Settings from the Key:Value flash store.

Request

CTList

Response

CTList\t{"wifiset":"1"}

CTSet: Setting Set

Description: Set a Setting from the Key:Value flash store.

Request

CTSet\twifiset\t1

Response

CTSet\twifiset\t1

CU: USB Toggle

Description: Enable or Disable the USB Interface

Request

CU0: Disable USB Interface
CU1: Enable USB Interface

Response

CU0
CU1

CV: Device Info Firmware

Description: Request Device Backend Firmware Version, Type, and Status

Request

CV

Response

CV\tv2.0.220322\tck\tg
Parameter 1 is Backend Firmware Version.
Parameter 2 is the Device Type
Parameter 3 is Status

CW: Wifi Configuration

Description: Allows setting the WiFi Mode, SSID, and Password.
Parameter 1 comes immediately after CW, but before the tab \t character,
and designates the WiFi Mode.
1 = Station
2 = AP
Parameter 2 is the SSID, and supports ASCII between 1 and 32 characters in
length.
Parameter 3 is the Password, and supports ASCII beteween 8 and 64
characters in length. No value = Open.

Request

CW1\tOMG\t12345678

Response

CW1\tOMG\t12345678

E: Echo

Description: Perform a Ping/Pong style Echo to Backend.

Request

E

Response

E

FE: Flash Erase Sector

Description: Erase a Sector (4096 Bytes) of flash memory by Sector ID.

Request

FE\t100

Response

FE\t100

FM: Flash Rewrite Sector

Description: Re-Write a Sector (4096 Bytes) of flash memory by Sector ID.

Request

FM\t100\t${data}

Response

FM\t100

FR: Flash Read Sector

Description: Read from of flash memory by Flash Address for a certain
length in Bytes.

Request

FR\t409600\t512

Response

FR\t409600\t512\t${data}

FW: Flash Write Sector

Description: Write a Sector (4096 Bytes) of flash memory by Sector ID.

Request

FW\t100\t${data}

Response

FW\t100

I: Device Info

Description: Request Device IP Address, System Name, and System
Description

Request

I

Response

I 192.168.1.245 0.0.0.0 OMG_C53A05 O.MG O.MG 21168
Parameter 1 is the IP Address.
Parameter 3 is the System Name.
Parameter 4 is the System Description.

WI: WiFi Inquire

Description: Get the current WiFi Configuration

Request

WI

Response

WI1\tOMG\t12345678\t1
Parameter 0 is the Mode. WI1 = Station Mode, WI2 = AP Mode
Parameter 1 is the SSID
Parameter 2 is the Password
Parameter 3 is the 2.4GHz Channel Number

WX: WiFi Query RSSi and IP Address

Description: Request the WiFi Radio RSSi (Signal Strength) and IP Address
(Hex Encoded)

Request

WX

Response

WX-55 f501a8c0

USB HID Usage Translation Table

en-US Mappings

USB HID Usage ID Base Layer (No Shift) Shift Layer
04 a A
05 b B
06 c C
07 d D
08 e E
09 f F
0a g G
0b h H
0c i I
0d j J
0e k K
0f l L
10 m M
11 n N
12 o O
13 p P
14 q Q
15 r R
16 s S
17 t T
18 u U
19 v V
1a w W
1b x X
1c y Y
1d z Z
1e 1 !
1f 2 @
20 3 #
21 4 $
22 5 %
23 6 ^
24 7 &
25 8 *
26 9 (
27 0 )
2d - _
2e =
2f [ {
30 ] }
31 \ |
33 ; :
34 ' "
35 ` ~
36 , <
37 . >
38 / ?

Modifiers

USB HID Usage ID Modifier
01 CONTROL
01 CTRL
10 RCONTROL
10 RCTRL
02 SHIFT
20 RSHIFT
04 ALT
04 OPTION
40 RALT
40 ALTGR
40 ROPTION
08 GUI
08 WINDOWS
08 COMMAND
80 RGUI
80 RWINDOWS
80 RCOMMAND

Global Mappings

USB HID Usage ID Key Name
00 NOKEY
28 ENTER
29 ESC
2a BACKSPACE
2b TAB
2c SPACE
39 CAPSLOCK
3a F1
3b F2
3c F3
3d F4
3e F5
3f F6
40 F7
41 F8
42 F9
43 F10
44 F11
45 F12
46 PRINTSCREEN
47 SCROLLLOCK
48 PAUSE
49 INSERT
4a HOME
4b PAGEUP
4c DELETE
4d END
4e PAGEDOWN
4f RIGHTARROW
50 LEFTARROW
51 DOWNARROW
52 UPARROW
53 NUMLOCK
54 KPAD_SLASH
55 KPAD_ASTERISK
56 KPAD_MINUS
57 KPAD_PLUS
58 KPAD_ENTER
59 KPAD_1
5a KPAD_2
5b KPAD_3
5c KPAD_4
5d KPAD_5
5e KPAD_6
5f KPAD_7
60 KPAD_8
61 KPAD_9
62 KPAD_0
63 KPAD_DOT
64 102ND
65 COMPOSE
66 POWER
67 KPEQUAL
68 F13
69 F14
6a F15
6b F16
6c F17
6d F18
6e F19
6f F20
70 F21
71 F22
72 F23
73 F24
74 OPEN
75 HELP
76 PROPS
77 FRONT
78 STOP
79 AGAIN
7a UNDO
7b CUT
7c COPY
7d PASTE
7e FIND
7f MUTE
80 VOLUMEUP
81 VOLUMEDOWN
82 LOCKING_CAPSLOCK
83 LOCKING_NUMLOCK
84 LOCKING_SCROLLLOCK
85 KPAD_COMMA
86 KPAD_EQUAL
87 RO
88 KATAKANAHIRAGANA
89 YEN
8a HENKAN
8b MUHENKAN
8c KPJPCOMMA
8d INT7
8e INT8
8f INT9
90 HANGEUL
91 HANJA
92 KATAKANA
93 HIRAGANA
94 ZENKAKUHANKAKU
95 LANG6
96 LANG7
97 LANG8
98 LANG9
99 ALTERASE
9a SYSREQ
9b CANCEL
9c CLEAR
9d PRIOR
9e RETURN
9f SEPARATOR
a0 OUT
a1 OPER
a2 CLEAR
a3 CRSEL
a4 EXSEL
b0 KPAD_00
b1 KPAD_000
b2 KPAD_THOUSANDSSEPARATOR
b3 KPAD_DECIMALSEPARATOR
b4 KPAD_CURRENCYUNIT
b5 KPAD_CURRENCYSUBUNIT
b6 KPAD_LEFTPAREN
b7 KPAD_RIGHTPAREN
b8 KPAD_{
b9 KPAD_}
ba KPAD_Tab
bb KPAD_Backspace
bc KPAD_A
bd KPAD_B
be KPAD_C
bf KPAD_D
c0 KPAD_E
c1 KPAD_F
c2 KPAD_XOR
c3 KPAD_^
c4 KPAD_%
c5 KPAD_<
c6 KPAD_>
c7 KPAD_&
c8 KPAD_&&
c9 KPAD_|
ca KPAD_||
cb KPAD_:
cc KPAD_#
cd KPAD_Space
ce KPAD_@
cf KPAD_!
d0 KPAD_MEMSTORE
d1 KPAD_MEMRECALL
d2 KPAD_MEMCLEAR
d3 KPAD_MEMADD
d4 KPAD_MEMSUB
d5 KPAD_MEMMULT
d6 KPAD_MEMDIV
d7 KPAD_PLUSMINUS
d8 KPAD_CLEAR
d9 KPAD_CLEARENTRY
da KPAD_BINARY
db KPAD_OCTAL
dc KPAD_DECIMAL
dd KPAD_HEXADECIMAL
e0 LEFTCTRL
e1 LEFTSHIFT
e2 LEFTALT
e3 LEFTMETA
e4 RIGHTCTRL
e5 RIGHTSHIFT
e6 RIGHTALT
e7 RIGHTMETA
e8 MEDIA_PLAYPAUSE
e9 MEDIA_STOPCD
ea MEDIA_PREVIOUSSONG
eb MEDIA_NEXTSONG
ec MEDIA_EJECTCD
ed MEDIA_VOLUMEUP
ee MEDIA_VOLUMEDOWN
ef MEDIA_MUTE
f0 MEDIA_WWW
f1 MEDIA_BACK
f2 MEDIA_FORWARD
f3 MEDIA_STOP
f4 MEDIA_FIND
f5 MEDIA_SCROLLUP
f6 MEDIA_SCROLLDOWN
f7 MEDIA_EDIT
f8 MEDIA_SLEEP
f9 MEDIA_COFFEE
fa MEDIA_REFRESH
fb MEDIA_CALC
Clone this wiki locally