OpenRGB SDK Documentation

August 29, 2026 ยท View on GitHub

OpenRGB provides a network-based Software Development Kit (SDK) interface for third-party software applications to integrate with OpenRGB to control lighting on OpenRGB-supported devices. This protocol is a binary, packet-based protocol designed for efficient, lightweight transfer of lighting data over a TCP/IP connection. It may be used locally or over a physical network between computers. The protocol is versioned. Client and server must negotiate a minimum supported protocol version upon connection. The selected protocol version determines what capabilities are available and can change packet format for certain packets as new information is added to the protocol.

The protocol mimics the RGBController API closely. It can be thought of as "RGBController over IP" in that the protocol is designed so that a network RGBController object can be created on the client that is a direct copy of the real RGBController object on the server. Calls to the network client RGBController object send packets to the server which trigger calls to the real object, updating the necessary object data before the call.

Protocol Versions

Protocol VersionOpenRGB ReleaseDescription
00.3Initial (unversioned) protocol
10.5Add versioning, add vendor string
20.6Add profile controls
30.7Add brightness field to modes, add SaveMode()
40.9Add segments field to zones, plugin interface
51.0rc1Add zone flags, controller flags, effects-only zones, alternative LED names, add ClearSegments and AddSegments
6*1.0Add matrix map segments, per-zone modes, remote SettingsManager and ProfileManager, update callbacks

* Denotes unreleased version, reflects status of current pipeline

Protocol Basics

The default port for the OpenRGB SDK server is 6742. This is "ORGB" on a telephone keypad.

Each packet starts with a header that indicates the packet is an OpenRGB SDK packet and provides the device and packet IDs. The header format is described in the following table.

NetPacketHeader structure

SizeFormatNameDescription
4char[4]pkt_magicMagic value, "ORGB"
4unsigned intpkt_dev_idDevice ID
4unsigned intpkt_idPacket ID
4unsigned intpkt_sizePacket Size

pkt_magic: Always set this to the literal value "ORGB".

pkt_dev_id: The device index that the command is targeting.

pkt_id: The command ID, see IDs table below

pkt_size: The size, in bytes, of the packet data

Packet IDs

The following IDs represent different SDK commands. Each ID packet has a certain format of data associated with it, which will be explained under each ID's section of this document. Gaps have been left in the ID values to allow for future expansion. The same ID values are often used for both request and response packets.

ValueNameDescriptionProtocol Version
0NET_PACKET_ID_REQUEST_CONTROLLER_COUNTRequest RGBController device count/device IDs from server0
1NET_PACKET_ID_REQUEST_CONTROLLER_DATARequest RGBController data block0
10NET_PACKET_ID_ACKAcknowledgement6
40NET_PACKET_ID_REQUEST_PROTOCOL_VERSIONRequest OpenRGB SDK protocol version from server1*
50NET_PACKET_ID_SET_CLIENT_NAMESend client name string to server0
51NET_PACKET_ID_SET_SERVER_NAMESend server name string to client6
52NET_PACKET_ID_SET_CLIENT_FLAGSSend client flags to server6
53NET_PACKET_ID_SET_SERVER_FLAGSSend server flags to client6
100NET_PACKET_ID_DEVICE_LIST_UPDATEDIndicate to clients that device list has updated1
101NET_PACKET_ID_DETECTION_STARTEDIndicate to clients that detection started6
102NET_PACKET_ID_DETECTION_PROGRESS_CHANGEDIndicate to clients that detection progress changed6
103NET_PACKET_ID_DETECTION_COMPLETEIndicate to clients that detection completed6
120NET_PACKET_ID_GET_I2C_BUS_INFORequest list of I2C bus info6
121NET_PACKET_ID_GET_HID_DEVICE_INFORequest list of HID device info6
122NET_PACKET_ID_GET_USB_DEVICE_INFORequest list of USB device info6
123NET_PACKET_ID_GET_SERIAL_PORTSRequest list of serial ports6
124NET_PACKET_ID_GET_USB_SERIAL_PORTSRequest list of USB serial port info6
140NET_PACKET_ID_REQUEST_RESCAN_DEVICESRequest server to rescan devices5
150NET_PACKET_ID_PROFILEMANAGER_GET_PROFILE_LISTGet profile list2
151NET_PACKET_ID_PROFILEMANAGER_SAVE_PROFILESave current configuration in a new profile2
152NET_PACKET_ID_PROFILEMANAGER_LOAD_PROFILELoad a given profile2
153NET_PACKET_ID_PROFILEMANAGER_DELETE_PROFILEDelete a given profile2
154NET_PACKET_ID_PROFILEMANAGER_UPLOAD_PROFILEUpload a profile to the server in JSON format6
155NET_PACKET_ID_PROFILEMANAGER_DOWNLOAD_PROFILEDownload a profile from the server in JSON format6
156NET_PACKET_ID_PROFILEMANAGER_GET_ACTIVE_PROFILEGet the active profile name6
157NET_PACKET_ID_PROFILEMANAGER_ACTIVE_PROFILE_CHANGEDIndicate to clients active profile has changed6
158NET_PACKET_ID_PROFILEMANAGER_PROFILE_LOADEDNotify active client that profile has loaded6
159NET_PACKET_ID_PROFILEMANAGER_PROFILE_ABOUT_TO_LOADIndicate to clients profile about to load6
160NET_PACKET_ID_PROFILEMANAGER_PROFILE_LIST_UPDATEDIndicate to clients profile list updated6
161NET_PACKET_ID_PROFILEMANAGER_CLEAR_ACTIVE_PROFILEClear the active profile6
200NET_PACKET_ID_PLUGINMANAGER_GET_PLUGIN_LISTGet list of plugins4
201NET_PACKET_ID_PLUGINMANAGER_PLUGIN_SPECIFICInteract with a plugin4
250NET_PACKET_ID_SETTINGSMANAGER_GET_SETTINGSGet settings for a given key in JSON format6
251NET_PACKET_ID_SETTINGSMANAGER_GET_SETTINGS_SCHEMAGet settings schema for a given key in JSON format6
252NET_PACKET_ID_SETTINGSMANAGER_MODIFY_SETTINGSModify settings for a given key in JSON format6
253NET_PACKET_ID_SETTINGSMANAGER_SET_SETTINGSSet settings for a given key in JSON format6
254NET_PACKET_ID_SETTINGSMANAGER_SAVE_SETTINGSSave settings6
300NET_PACKET_ID_LOGMANAGER_CLEAR_LOG_BUFFERLogManager::ClearLogBuffer()6
301NET_PACKET_ID_LOGMANAGER_GET_LOG_BUFFERLogManager::GetLogBuffer()6
302NET_PACKET_ID_LOGMANAGER_GET_LOG_LEVELLogManager::GetLogLevel()6
303NET_PACKET_ID_LOGMANAGER_SET_LOG_LEVELLogManager::SetLogLevel()6
304NET_PACKET_ID_LOGMANAGER_LOGGED_ENTRYLogManager::LogEntry Callback6
1000NET_PACKET_ID_RGBCONTROLLER_RESIZEZONERGBController::ResizeZone()0
1001NET_PACKET_ID_RGBCONTROLLER_CLEARSEGMENTSRGBController::ClearSegments()5
1002NET_PACKET_ID_RGBCONTROLLER_ADDSEGMENTRGBController::AddSegment()5
1003NET_PACKET_ID_RGBCONTROLLER_CONFIGUREZONERGBController::ConfigureZone()6
1004NET_PACKET_ID_RGBCONTROLLER_CONFIGUREDEVICERGBController::ConfigureDevice()6
1005NET_PACKET_ID_RGBCONTROLLER_SETHIDDENRGBController::SetHidden()6
1050NET_PACKET_ID_RGBCONTROLLER_UPDATELEDSRGBController::UpdateLEDs()0
1051NET_PACKET_ID_RGBCONTROLLER_UPDATEZONELEDSRGBController::UpdateZoneLEDs()0
1052NET_PACKET_ID_RGBCONTROLLER_UPDATESINGLELEDRGBController::UpdateSingleLED()0
1100NET_PACKET_ID_RGBCONTROLLER_SETCUSTOMMODERGBController::SetCustomMode()0
1101NET_PACKET_ID_RGBCONTROLLER_UPDATEMODERGBController::UpdateMode()0
1102NET_PACKET_ID_RGBCONTROLLER_SAVEMODERGBController::SaveMode()3
1103NET_PACKET_ID_RGBCONTROLLER_UPDATEZONEMODERGBController::UpdateZoneMode()6
1130NET_PACKET_ID_RGBCONTROLLER_SETDEVICESPECIFICCONFIGURATIONRGBController::SetDeviceSpecificConfiguration6
1131NET_PACKET_ID_RGBCONTROLLER_SETDEVICESPECIFICZONECONFIGURATIONRGBController::SetDeviceSpecificZoneConfiguration6
1150NET_PACKET_ID_RGBCONTROLLER_SIGNALUPDATERGBController::SignalUpdate()6

* The NET_PACKET_ID_REQUEST_PROTOCOL_VERSION packet was not present in protocol version 0, but clients supporting protocol versions 1+ should always send this packet. If no response is received, it should be assumed that the server is using protocol 0.

Device IDs

The OpenRGB SDK is used to allow a client to access one or more RGBControllers on the server. As there are usually more than one controllers on the server, an identifier is needed to specify which controller the client wants to access. The pkt_dev_id field in the header is used for this purpose. Originally, OpenRGB used a simple indexing scheme, where the value of pkt_dev_id is the index in the server's controllers list. Starting with protocol version 6, however, OpenRGB switched to using a unique ID scheme, where each controller detected on the server is assigned a unique ID and then the server sends a list of these unique IDs to the client. If the list changes, the IDs of any existing controllers stay the same but new controllers have new unique IDs, allowing the client to keep track of which controllers stayed the same and which have changed. The control flow for both schemes is described below.

Protocol versions 0-5 (indexed IDs)

In this scheme, the client starts by sending NET_PACKET_ID_REQUEST_CONTROLLER_COUNT to the server, which returns the count of controllers in the list. The client then sends NET_PACKET_ID_REQUEST_CONTROLLER_DATA with pkt_dev_id for each controller index 0 to [count - 1], waiting for each controller data response before moving on to the next controller. Following this, any accesses to the controllers use the index for the pkt_dev_id field of any NET_PACKET_ID_RGBCONTROLLER packet. If the device list changes (indicated by the server sending NET_PACKET_ID_DEVICE_LIST_UPDATED), the indexes on the client side may no longer match those on the server side. The client must immediately stop using the existing indexes, clear its list of controllers, and obtain the new list by performing this sequence again.

Protocol versions 6 and above (unique IDs)

In this scheme, the client starts by sending NET_PACKET_ID_REQUEST_CONTROLLER_COUNT to the server, which returns both the count of controllers in the list as well as a list of unique 32-bit IDs. Each unique ID represents one controller in the server's list. The order of these unique IDs also matches the order of controllers in the server's list. The client then sends NET_PACKET_ID_REQUEST_CONTROLLER_DATA with pkt_dev_id for each unique ID in the list, waiting for each controller data response before moving on to the next controller. Following this, any accesses to the controllers use the unique ID for the pkt_dev_id field of any NET_PACKET_ID_RGBCONTROLLER packet. If the device list changes (indicated by the server sending NET_PACKET_ID_DEVICE_LIST_UPDATED), the client must request a new list of unique IDs by sending NET_PACKET_ID_REQUEST_CONTROLLER_COUNT again. Once the response is received, the client should compare the new list of unique IDs against its existing list. Unique IDs that were in its existing list that no longer exist in the new list should be deleted on the client as these controllers are no longer present. Unique IDs that exist in the new list but did not exist in the existing list are newly added controllers and the client should request these by sending NET_PACKET_ID_REQUEST_CONTROLLER_DATA with pkt_dev_id for each newly added unique ID, waiting for each controller data response before moving on to the next controller. Unique IDs that are present in the existing list as well as the new list are controllers that have not changed on the server side, so the client does not need to re-request these controllers and can continue using them as is.

Packet-Specific Documentation

NET_PACKET_ID_REQUEST_CONTROLLER_COUNT

Request [Size: 0]

The client uses this ID to request the number of controllers on the server. The request contains no data.

Response [Protocol 0-5 Size: 4] [Protocol 6+ Size: 4 + (4 * number of controllers)]

The server responds to this request with the number of controllers in the device list. For protocol versions below 6, the response contains a single unsigned int, size 4, holding this value.

For protocol versions 6 and above, the response contains a single unsigned int, size 4, holding this value followed by a list of unsigned ints, each size 4, representing the unique IDs of each controller in the device list. See the Device IDs section for more information.

NET_PACKET_ID_REQUEST_CONTROLLER_DATA

Request [Protocol 0 Size: 0] [Protocol 1+ Size: 4]

The client uses this ID to request the controller data for a given controller. For protocol 0, this request contains no data. For protocol 1 or higher, this request contains a single unsigned int, size 4, holding the highest protocol version supported by both the client and the server. The pkt_dev_id of this request's header indicates which controller you are requesting data for. See the Device IDs section for more information.

NOTE: Before sending this request, the client should request the protocol version from the server and determine the value to send, if any. If the server is using protocol version 0, even if the SDK implementation supports higher, send this packet with no data.

Response [Size: Variable]

The server responds to this request with a large data block. The format of the block is shown below. Portions of this block are omitted if the requested protocol level is below the listed value. The receiver is expected to parse this data block using the same protocol version sent in the request (or protocol 0 if the request is sent with no data).

SizeFormatNameProtocol VersionDescription
4unsigned intdata_size0Size of all data in packet
VariableDevice Datadevice_data0See Device Data block format table

Device Data

The Device Data block represents an entire RGBController. This data block is provided by RGBController::GetDeviceDescriptionData(). Portions of this block are omitted if the requested protocol level is below the listed value.

SizeFormatNameProtocol VersionDescription
4inttype0RGBController type field value
2unsigned shortname_len0Length of RGBController name field string, including null termination
name_lenchar[name_len]name0RGBController name field string value, including null termination
2unsigned shortvendor_len1Length of RGBController vendor field string, including null termination
vendor_lenchar[vendor_len]vendor1RGBController vendor field string value, including null termination
2unsigned shortdescription_len0Length of RGBController description field string, including null termination
description_lenchar[description_len]description0RGBController description field string value, including null termination
2unsigned shortversion_len0Length of RGBController version field string, including null termination
version_lenchar[version_len]version0RGBController version field string value, including null termination
2unsigned shortserial_len0Length of RGBController serial field string, including null termination
serial_lenchar[serial_len]serial0RGBController serial field string value, including null termination
2unsigned shortlocation_len0Length of RGBController location field string, including null termination
location_lenchar[location_len]location0RGBController location field string value, including null termination
2unsigned shortnum_modes0Number of modes in RGBController
4intactive_mode0RGBController active_mode field value
VariableMode Data[num_modes]modes0See Mode Data block format table. Repeat num_modes times
2unsigned shortnum_zones0Number of zones in RGBController
VariableZone Data[num_zones]zones0See Zone Data block format table. Repeat num_zones times
2unsigned shortnum_leds0Number of LEDs in RGBController
VariableLED Data[num_leds]leds0See LED Data block format table. Repeat num_leds times
2unsigned shortnum_colors0Number of colors in RGBController
4 * num_colorsRGBColor[num_colors]colors0RGBController colors field values
2unsigned shortnum_led_display_names5Number of LED alternate name strings
VariableLED Display Name[num_led_display_names]led_display_names5See LED Display Name Data block format table. Repeat num_led_display_names times
4unsigned intflags5RGBController flags field value
2unsigned shortdisplay_name_len6Length of RGBController display name field string, including null termination
display_name_lenchar[display_name_len]display_name6RGBController display name field string value, including null termination
4unsigned intconfiguration_len6Length of RGBController configuration field string, including null termination
configuration_lenchar[configuration_len]configuration6RGBController configuration field string value, including null termination

Mode Data

The Mode Data block represents one entry in the RGBController::modes vector. This data block is provided by RGBController::GetModeDescriptionData(). Portions of this block are omitted if the requested protocol level is below the listed value.

SizeFormatNameProtocol VersionDescription
2unsigned shortmode_name_len0Length of mode name string, including null termination
mode_name_lenchar[mode_name_len]mode_name0Mode name string value, including null termination
4intmode_value<6*Mode value field value
4unsigned intmode_flags0Mode flags field value
4unsigned intmode_speed_min0Mode speed_min field value
4unsigned intmode_speed_max0Mode speed_max field value
4unsigned intmode_brightness_min3Mode brightness_min field value
4unsigned intmode_brightness_max3Mode brightness_max field value
4unsigned intmode_colors_min0Mode colors_min field value
4unsigned intmode_colors_max0Mode colors_max field value
4unsigned intmode_speed0Mode speed value
4unsigned intmode_brightness3Mode brightness value
4unsigned intmode_direction0Mode direction value
4unsigned intmode_color_mode0Mode color_mode value
2unsigned shortmode_num_colors0Mode number of colors
4 * mode_num_colorsRGBColor[mode_num_colors]mode_colors0Mode color values

* The mode_value field was removed starting with protocol version 6. This is an internal-use-only field that does not need to be exposed to clients. For protocol versions 5 and below, the client must track the mode_value received from the server and send it back as part of the UpdateMode/SaveMode packets.

Zone Data

The Zone Data block represents one entry in the RGBController::zones vector. This data block is provided by RGBController::GetZoneDescriptionData(). Portions of this block are omitted if the requested protocol level is below the listed value.

SizeFormatNameProtocol VersionDescription
2unsigned shortzone_name_len0Length of zone name string, including null termination
zone_name_lenchar[zone_name_len]zone_name0Zone name string value, including null termination
4intzone_type0Zone type value
4unsigned intzone_leds_min0Zone leds_min value
4unsigned intzone_leds_max0Zone leds_max value
4unsigned intzone_leds_count0Zone leds_count value
2unsigned shortzone_matrix_len0Zone matrix map length if matrix_map exists, otherwise 0 if matrix_map NULL
zone_matrix_lenMatrix Map Datazone_matrix_map0See Matrix Map Data block format table, only if matrix_map exists.
2unsigned shortnum_segments4Number of segments in zone
VariableSegment Data[num_segments]segments4See Segment Data block format table. Repeat num_segments times
4unsigned intzone_flags5Zone flags value
4intzone_active_mode6Zone active_mode field value
2unsigned shortzone_num_modes6Number of modes in zone
VariableMode Data[zone_num_modes]zone_modes6See Mode Data block format table. Repeat zone_num_modes times
2unsigned shortzone_display_name_len6Length of zone display name string, including null termination
zone_display_name_lenchar[zone_display_name_len]zone_display_name6Zone display name string value, including null termination

Segment Data

The Segment Data block represents one entry in the RGBController::zones::segments vector. This data block is provided by RGBController::GetSegmentDescriptionData(). Portions of this block are omitted if the requested protocol level is below the listed value.

SizeFormatNameProtocol VersionDescription
2unsigned shortsegment_name_len4Length of segment name string, including null termination
segment_name_lenchar[segment_name_len]segment_name4Segment name string value, including null termination
4intsegment_type4Segment type value
4unsigned intsegment_start_idx4Segment start_idx value
4unsigned intsegment_leds_count4Segment leds_count value
2unsigned shortsegment_matrix_len6Segment matrix map length if matrix_map exists, otherwise 0 if matrix_map NULL
segment_matrix_lenMatrix Map Datasegment_matrix_map6See Matrix Map Data block format table, only if matrix_map exists.
4unsigned intsegment_flags6Segment flags value

Matrix Map Data

The Matrix Map Data block represents the matrix_map_type type. This data block is provided by RGBController::GetMatrixMapDescriptionData(). Portions of this block are omitted if the requested protocol level is below the listed value.

SizeFormatNameProtocol VersionDescription
4unsigned intmatrix_map_height0Matrix_map height
4unsigned intmatrix_map_width0Matrix_map width
(zone_matrix_len - 8)*unsigned int[matrix_map_height * matrix_map_width]matrix_map_data0Matrix_map data

LED Data

The LED Data block represents one entry in the RGBController::leds vector. This data block is provided by RGBController::GetLEDDescriptionData(). Portions of this block are omitted if the requested protocol level is below the listed value.

SizeFormatNameProtocol VersionDescription
2unsigned shortled_name_len0Length of LED name string, including null termination
led_name_lenchar[led_name_len]led_name0LED name string value, including null termination
4unsigned intled_value<6*LED value field value

* The led_value field was removed starting with protocol version 6. This is an internal-use-only field that does not need to be exposed to clients.

LED Display Name Data

The LED Display Name Data block represents one entry in the RGBController::led_display_names vector. This data block was introduced in protocol version 5.

SizeFormatNameProtocol VersionDescription
2unsigned shortled_display_name_len5Length of LED display name string, including null termination
led_display_name_lenchar[led_display_name_len]led_display_name5LED display name string value, including null termination

NET_PACKET_ID_REQUEST_PROTOCOL_VERSION

Request [Size: 4]

The client uses this ID to request the server's highest supported protocol version as well as to indicate to the server the client's highest supported protocol version. The request contains a single unsigned int, size 4, containing the client's highest supported protocol version.

Response [Size: 4]

The server responds to this request with a single unsigned int, size 4, containing the server's highest supported protocol version. If the server is using protocol version 0, it will not send a response. If no response is received, assume the server's highest supported protocol version is version 0.

NET_PACKET_ID_ACK

Acknowledgement [Size: 8]

This packet is sent by the server to acknowledge any packet sent by the client. The ACK contains two unsigned 32-bit integer values, the first being the packet ID of the packet being acknowledged and the second being a status code. The pkt_dev_id field of the header is also set to the pkt_dev_id of the packet being acknowledged.

The status codes are shown below.

Status CodeNameDescription
0NET_PACKET_STATUS_OKOK/Success
1NET_PACKET_STATUS_ERROR_GENERICGeneric error
2NET_PACKET_STATUS_ERROR_UNSUPPORTEDUnsupported error
3NET_PACKET_STATUS_ERROR_NOT_ALLOWEDNot allowed error
4NET_PACKET_STATUS_ERROR_INVALID_IDInvalid device ID or index error
5NET_PACKET_STATUS_ERROR_INVALID_DATAInvalid data error

NET_PACKET_ID_SET_CLIENT_NAME

Client Only [Size: Variable]

The client uses this ID to send the client's null-terminated name string to the server. The size of the packet is the size of the string including the null terminator. In C, this is strlen() + 1. There is no response from the server for this packet.

NET_PACKET_ID_SET_SERVER_NAME

Server Only [Size: Variable]

The server uses this ID to send the server's null-terminated name string to the client. The size of the packet is the size of the string including the null terminator. In C, this is strlen() + 1. There is no response from the server for this packet.

NET_PACKET_ID_SET_CLIENT_FLAGS

Client Only [Size: 4]

The client uses this ID to send the client's flags value to the server. The client sets the NET_CLIENT_FLAG_REQUEST_LOCAL_CLIENT flag if it wants to request local client status. The server responds in NET_PACKET_ID_SET_SERVER_FLAGS whether it was granted or not.

BitFlag NameFlag Description
0NET_CLIENT_FLAG_SUPPORTS_RGBCONTROLLERClient supports RGBController API
1NET_CLIENT_FLAG_SUPPORTS_LOGMANAGERClient supports LogManager API
2NET_CLIENT_FLAG_SUPPORTS_PROFILEMANAGERClient supports ProfileManager API
3NET_CLIENT_FLAG_SUPPORTS_PLUGINMANAGERClient supports PluginManager API
4NET_CLIENT_FLAG_SUPPORTS_SETTINGSMANAGERClient supports SettingsManager API
16NET_CLIENT_FLAG_REQUEST_LOCAL_CLIENTRequest local client

NET_PACKET_ID_SET_SERVER_FLAGS

Server Only [Size: 4]

The server uses this ID to send the server's flags value to the client. The server sets the NET_SERVER_FLAG_LOCAL_CLIENT flag to grant the connected client local client status. The server will only set NET_SERVER_FLAG_LOCAL_CLIENT if the client requested local client status with NET_CLIENT_FLAG_REQUEST_LOCAL_CLIENT and the client is connected from the localhost address.

BitFlag NameFlag Description
0NET_SERVER_FLAG_SUPPORTS_RGBCONTROLLERServer supports RGBController API
1NET_SERVER_FLAG_SUPPORTS_LOGMANAGERServer supports LogManager API
2NET_SERVER_FLAG_SUPPORTS_PROFILEMANAGERServer supports ProfileManager API
3NET_SERVER_FLAG_SUPPORTS_PLUGINMANAGERServer supports PluginManager API
4NET_SERVER_FLAG_SUPPORTS_SETTINGSMANAGERServer supports SettingsManager API
5NET_SERVER_FLAG_SUPPORTS_DETECTIONServer supports detection functions
6NET_SERVER_FLAG_SUPPORTS_DEVICE_INFOServer supports device info functions
16NET_SERVER_FLAG_LOCAL_CLIENTConfirm that client is local client

NET_PACKET_ID_DEVICE_LIST_UPDATED

Server Only [Size: 0]

The server uses this ID to notify a client that the server's device list has been updated. Upon receiving this packet, clients should synchronize their local device lists with the server by requesting size and controller data again. This packet contains no data.

NET_PACKET_ID_DETECTION_STARTED

Server Only [Size: 0]

The server uses this ID to notifiy a client that the server's detection process has started.

NET_PACKET_ID_DETECTION_PROGRESS_CHANGED

Server Only [Size: Variable]

The server uses this ID to notify a client that the server's detection progress has changed. The format of the block is shown below.

SizeFormatNameProtocol VersionDescription
4unsigned intdata_size6Size of all data in packet
4unsigned intdetection_percent6Detection percent
2unsigned shortstring_length6Length of detection string, including null termination
Variablechar[string_length]detection_string6Detection string value, including null termination

NET_PACKET_ID_DETECTION_COMPLETE

Server Only [Size: 0]

The server uses this ID to notify a client that the server's detection process has completed.

NET_PACKET_ID_GET_I2C_BUS_INFO

Request [Size: 0]

The client uses this ID to request a list of I2C bus info from the server. The request contains no data. This request should only be used if the server sets the NET_SERVER_FLAG_SUPPORTS_DEVICE_INFO flag.

Response [Size: Variable]

The server responds with a data block containing I2C bus information.

SizeFormatNameProtocol VersionDescription
4unsigned intdata_size6Size of all data in packet
2unsigned shortbus_count6Number of I2C bus entries
Variablei2c_smbus_info[bus_count]bus_info6I2C bus info data, each entry is the fixed-size i2c_smbus_info struct

NET_PACKET_ID_GET_HID_DEVICE_INFO

Request [Size: 0]

The client uses this ID to request a list of HID device info from the server. The request contains no data. This request should only be used if the server sets the NET_SERVER_FLAG_SUPPORTS_DEVICE_INFO flag.

Response [Size: Variable]

The server responds with a data block containing HID device information.

SizeFormatNameProtocol VersionDescription
4unsigned intdata_size6Size of all data in packet
2unsigned shortdevice_count6Number of HID device entries
VariableHID Device Data[device_count]device_data6See HID Device Data block format table. Repeat device_count times

HID Device Data

SizeFormatNameProtocol VersionDescription
2unsigned shortvendor_id6HID vendor ID
2unsigned shortproduct_id6HID product ID
2unsigned shortrelease_number6HID release number
2unsigned shortusage_page6HID usage page
2unsigned shortusage6HID usage
4intinterface_number6HID interface number
2unsigned shortserial_number_size6Length of serial number string, including null termination
serial_number_sizechar[serial_number_size]serial_number6Serial number string value, including null termination
2unsigned shortmanufacturer_size6Length of manufacturer string, including null termination
manufacturer_sizechar[manufacturer_size]manufacturer_string6Manufacturer string value, including null termination
2unsigned shortproduct_string_size6Length of product string, including null termination
product_string_sizechar[product_string_size]product_string6Product string value, including null termination
2unsigned shortpath_size6Length of path string, including null termination
path_sizechar[path_size]path6Path string value, including null termination

NET_PACKET_ID_GET_USB_DEVICE_INFO

Request [Size: 0]

The client uses this ID to request a list of USB device info from the server. The request contains no data. This request should only be used if the server sets the NET_SERVER_FLAG_SUPPORTS_DEVICE_INFO flag.

Response [Size: Variable]

The server responds with a data block containing USB device information.

SizeFormatNameProtocol VersionDescription
4unsigned intdata_size6Size of all data in packet
2unsigned shortdevice_count6Number of USB device entries
VariableUSB Device Data[device_count]device_data6See USB Device Data block format table. Repeat device_count times

USB Device Data

SizeFormatNameProtocol VersionDescription
2unsigned shortvendor_id6USB vendor ID
2unsigned shortproduct_id6USB product ID
2unsigned shortserial_number_size6Length of serial number string, including null termination
serial_number_sizechar[serial_number_size]serial_number6Serial number string value, including null termination
2unsigned shortmanufacturer_size6Length of manufacturer string, including null termination
manufacturer_sizechar[manufacturer_size]manufacturer_string6Manufacturer string value, including null termination
2unsigned shortproduct_string_size6Length of product string, including null termination
product_string_sizechar[product_string_size]product_string6Product string value, including null termination

NET_PACKET_ID_GET_SERIAL_PORTS

Request [Size: 0]

The client uses this ID to request a list of serial ports from the server. The request contains no data. This request should only be used if the server sets the NET_SERVER_FLAG_SUPPORTS_DEVICE_INFO flag.

Response [Size: Variable]

The server responds with a data block containing serial port information.

SizeFormatNameProtocol VersionDescription
4unsigned intdata_size6Size of all data in packet
2unsigned shortport_count6Number of serial port entries
VariableSerial Port Data[port_count]port_data6See Serial Port Data block format table. Repeat port_count times

Serial Port Data

SizeFormatNameProtocol VersionDescription
2unsigned shortport_string_size6Length of port string, including null termination
port_string_sizechar[port_string_size]port_string6Port string value, including null termination

NET_PACKET_ID_GET_USB_SERIAL_PORTS

Request [Size: 0]

The client uses this ID to request a list of USB serial port device info from the server. The request contains no data. This request should only be used if the server sets the NET_SERVER_FLAG_SUPPORTS_DEVICE_INFO flag.

Response [Size: Variable]

The server responds with a data block containing USB serial port information.

SizeFormatNameProtocol VersionDescription
4unsigned intdata_size6Size of all data in packet
2unsigned shortport_count6Number of USB serial port entries
VariableSerial Port Data[port_count]port_data6See Serial Port Data block format table. Repeat port_count times

USB Serial Port Data

SizeFormatNameProtocol VersionDescription
2unsigned shortvendor_id6USB vendor ID
2unsigned shortproduct_id6USB product ID
2unsigned shortport_path_size6Length of port path string, including null termination
port_path_sizechar[port_path_size]port_path6Port path string value, including null termination
2unsigned shortusb_path_size6Length of port path string, including null termination
usb_path_sizechar[usb_path_size]usb_path6USB path string value, including null termination

NET_PACKET_ID_REQUEST_RESCAN_DEVICES

Client Only [Size: 0]

The client uses this ID to request the server rescan its devices.

NET_PACKET_ID_PROFILEMANAGER_GET_PROFILE_LIST

Request [Size: 0]

The client uses this ID to request the server's profile list. The request contains no data.

Response [Size: Variable]

The server responds to this request with a data block. The format of the block is shown below.

SizeFormatNameProtocol VersionDescription
4unsigned intdata_size2Size of all data in packet
2unsigned shortnum_profiles2Number of profiles on server
VariableProfile Data[num_profiles]profiles2See Profile Data block format table. Repeat num_profiles times

Profile Data

The profile data block represents the information of one profile. This data block was introduced in protocol version 2.

SizeFormatNameProtocol VersionDescription
2unsigned shortprofile_name_len2Length of profile name string, including null termination
profile_name_lenchar[profile_name_len]profile_name2Profile name string value, including null termination

NET_PACKET_ID_PROFILEMANAGER_SAVE_PROFILE

Client Only [Size: Variable]

The client uses this ID to command the server to save the current configuration to a profile. It passes the name of the profile to save as a null-terminated string. The size of the packet is the size of the string including the null terminator. In C, this is strlen() + 1.

This packet requires local client status.

There is no response from the server for this packet.

NET_PACKET_ID_PROFILEMANAGER_LOAD_PROFILE

Client Only [Size: Variable]

The client uses this ID to command the server to load the given profile. It passes the name of the profile to load as a null-terminated string. The size of the packet is the size of the string including the null terminator. In C, this is strlen() + 1.

Calling this function will not actually update the controllers. Instead, the controller states will be updated from the profile on the server side. After sending this request, the client should re-request all controller states from the server so that the client controller states match the server states loaded from the profile. After requesting all of the controller data, the client shall call UpdateMode() on all controllers to apply the updated state.

NET_PACKET_ID_PROFILEMANAGER_DELETE_PROFILE

Client Only [Size: Variable]

The client uses this ID to command the server to delete the given profile. It passes the name of the profile to delete as a null-terminated string. The size of the packet is the size of the string including the null terminator. In C, this is strlen() + 1.

This packet requires local client status.

There is no response from the server for this packet.

NET_PACKET_ID_PROFILEMANAGER_UPLOAD_PROFILE

Client Only [Size: Variable]

The client uses this ID to upload a JSON-formatted profile to the server. The JSON data is sent as a null-terminated string. The size of the packet is the size of the string including the null terminator. In C, this is strlen() + 1.

This packet requires local client status.

NET_PACKET_ID_PROFILEMANAGER_DOWNLOAD_PROFILE

Request [Size: Variable]

The client uses this ID to download a JSON-formatted profile from the server. The name of the profile to download is sent as a null-terminated string. The size of the packet is the size of the string including the null terminator. In C, this is strlen() + 1.

Response [Size: Variable]

The server responds to this request with the JSON-formatted profile. The JSON data is sent as a null-terminated string. The size of the packet is the size of the string including the null terminator. In C, this is strlen() + 1.

NET_PACKET_ID_PROFILEMANAGER_GET_ACTIVE_PROFILE

Request [Size: 0]

The client uses this ID to request the name of the active profile from the server. The request contains no data.

Response [Size: Variable]

The server responds to this request with the name of the active profile or an empty string if no profile is active. This string is sent null-terminated. The size of the packet is the size of the string including the null terminator. In C, this is strlen() + 1.

NET_PACKET_ID_PROFILEMANAGER_ACTIVE_PROFILE_CHANGED

Server Only [Size: Variable]

The server uses this ID to notify the client that the active profile has changed. The data contains the name of the active profile as a null-terminated string. The size of the packet is the size of the string including the null terminator. In C, this is strlen() + 1.

This packet is sent only to clients that have the NET_CLIENT_FLAG_SUPPORTS_PROFILEMANAGER flag set.

NET_PACKET_ID_PROFILEMANAGER_PROFILE_LOADED

Server Only [Size: Variable]

The server uses this ID to notify the active (local) client that a profile has been loaded. The data contains the full profile data as a JSON-formatted null-terminated string. The size of the packet is the size of the string including the null terminator. In C, this is strlen() + 1.

This packet is sent only to clients that have the NET_CLIENT_FLAG_SUPPORTS_PROFILEMANAGER flag set and have local client status.

NET_PACKET_ID_PROFILEMANAGER_PROFILE_ABOUT_TO_LOAD

Server Only [Size: 0]

The server uses this ID to notify all clients that a profile is about to be loaded. This packet contains no data. Clients should acknowledge this packet with an ACK before the profile load continues. The server waits for all ProfileManager-capable clients to acknowledge before proceeding.

NET_PACKET_ID_PROFILEMANAGER_PROFILE_LIST_UPDATED

Server Only [Size: Variable]

The server uses this ID to notify a client that the profile list has been updated. The data block format is the same as the response for NET_PACKET_ID_PROFILEMANAGER_GET_PROFILE_LIST.

NET_PACKET_ID_PROFILEMANAGER_CLEAR_ACTIVE_PROFILE

Client Only [Size: 0]

The client uses this ID to command the server to clear the active profile. The packet contains no data.

NET_PACKET_ID_PLUGINMANAGER_GET_PLUGIN_LIST

Request [Size: 0]

The client uses this ID to request the server's plugin list. The request contains no data.

Response [Size: Variable]

The server responds to this request with a data block. The format of the block is shown below.

SizeFormatNameProtocol VersionDescription
4unsigned intdata_size4Size of all data in packet
2unsigned shortnum_plugins4Number of plugins on server
VariablePlugin Data[num_plugins]plugins4See Plugin Data block format table. Repeat num_plugins times

Plugin Data

The plugin data block represents the information of one plugin. This data block was introduced in protocol version 4.

SizeFormatNameProtocol VersionDescription
2unsigned shortplugin_name_len4Length of plugin name string, including null termination
plugin_name_lenchar[plugin_name_len]plugin_name4Plugin name string value, including null termination
2unsigned shortplugin_description_len4Length of plugin description string, including null termination
plugin_description_lenchar[plugin_description_len]plugin_description4Plugin description string value, including null termination
2unsigned shortplugin_version_len4Length of plugin version string, including null termination
plugin_version_lenchar[plugin_version_len]plugin_version4Plugin version string value, including null termination
4unsigned intplugin_index4Plugin index value
4unsigned intplugin_protocol_version4Plugin protocol version value

NET_PACKET_ID_PLUGINMANAGER_PLUGIN_SPECIFIC

Request [Size: Variable]

This packet is used to send data to a plugin. The pkt_dev_id field in the header specifies which plugin to send to and corresponds to the plugin_index field in the plugin list. The first 4 bytes of the data is the plugin packet type, the rest of the packet is plugin-specific.

List of plugins that currently support this:

Response [Size: Variable]

The response is optionally generated by the plugin. The data in the packet is plugin-specific.

NET_PACKET_ID_SETTINGSMANAGER_GET_SETTINGS

Request [Size: Variable]

The client uses this ID to request a settings value for a given key in JSON format from the server. The key is sent as a null-terminated string. The size of the packet is the size of the string including the null terminator. In C, this is strlen() + 1.

Response [Size: Variable]

The server responds to this request with the settings value for the given key in JSON format, as a null-terminated string. The size of the packet is the size of the string including the null terminator. In C, this is strlen() + 1.

NET_PACKET_ID_SETTINGSMANAGER_GET_SETTINGS_SCHEMA

Request [Size: Variable]

The client uses this ID to request a settings schema for a given key in JSON format from the server. The key is sent as a null-terminated string. The size of the packet is the size of the string including the null terminator. In C, this is strlen() + 1.

Response [Size: Variable]

The server responds to this request with the settings schema for the given key in JSON format, as a null-terminated string. The size of the packet is the size of the string including the null terminator. In C, this is strlen() + 1.

NET_PACKET_ID_SETTINGSMANAGER_MODIFY_SETTINGS

Client Only [Size: Variable]

The client uses this ID to modify the settings for a given key in JSON format. The JSON data is sent as a null-terminated string. The size of the packet is the size of the string including the null terminator. In C, this is strlen() + 1.

This packet requires local client status.

There is no response from the server for this packet.

NET_PACKET_ID_SETTINGSMANAGER_SET_SETTINGS

Client Only [Size: Variable]

The client uses this ID to set the settings for a given key in JSON format. The JSON data is sent as a null-terminated string. The size of the packet is the size of the string including the null terminator. In C, this is strlen() + 1.

This packet requires local client status.

There is no response from the server for this packet.

NET_PACKET_ID_SETTINGSMANAGER_SAVE_SETTINGS

Client Only [Size: 0]

The client uses this ID to command the server to save settings. The packet contains no data.

This packet requires local client status.

There is no response from the server for this packet.

NET_PACKET_ID_LOGMANAGER_CLEAR_LOG_BUFFER

Client Only [Size: 0]

The client uses this ID to command the server to clear the log buffer. The packet contains no data.

NET_PACKET_ID_LOGMANAGER_GET_LOG_BUFFER

Client Only [Size: 0]

The client uses this ID to request the server to send the log buffer. The packet contains no data.

NET_PACKET_ID_LOGMANAGER_GET_LOG_LEVEL

Request [Size: 0]

The client uses this ID to request the current log level from the server. The request contains no data.

Response [Size: 4]

The server responds to this request with a single unsigned int, size 4, containing the current log level value.

NET_PACKET_ID_LOGMANAGER_SET_LOG_LEVEL

Client Only [Size: 4]

The client uses this ID to set the log level on the server. The packet contains a single unsigned int, size 4, containing the log level value to set.

NET_PACKET_ID_LOGMANAGER_LOGGED_ENTRY

Server Only [Size: Variable]

The server uses this ID to forward a LogManager log entry to the client. The format of the block is shown below.

SizeFormatNameProtocol VersionDescription
4unsigned intdata_size6Size of all data in packet
4unsigned intlog_level6Log level value
4unsigned intline6Line number of log entry
4unsigned inttimestamp6Timestamp of log entry
2unsigned shortfilename_size6Length of filename string, including null termination
filename_sizechar[filename_size]filename6Filename string value, including null termination
2unsigned shorttext_size6Length of text string, including null termination
text_sizechar[text_size]text6Log text string value, including null termination

NET_PACKET_ID_RGBCONTROLLER_RESIZEZONE

Client Only [Size: 8]

The client uses this ID to call the ResizeZone() function of an RGBController device. The packet data contains a data block. The format of the block is shown below. The pkt_dev_id of this request's header indicates which controller you are calling ResizeZone() on. See the Device IDs section for more information.

SizeFormatNameDescription
4intzone_idxZone index to resize
4intnew_sizeNew size of the zone

NET_PACKET_ID_RGBCONTROLLER_CLEARSEGMENTS

Client Only [Size: 4]

The client uses this ID to call the ClearSegments() function of an RGBController device. The packet contains the index of the zone to clear segments on, type int (size 4). The pkt_dev_id of this request's header indicates which controller you are calling ClearSegments() on. See the Device IDs section for more information.

NET_PACKET_ID_RGBCONTROLLER_ADDSEGMENT

Client Only [Size: Variable]

The client uses this ID to call the AddSegment() function of an RGBController device. The packet contains a data block. The format of the block is shown below. The pkt_dev_id of this request's header indicates which controller you are calling AddSegment() on. See the Device IDs section for more information.

SizeFormatNameDescription
4unsigned intdata_sizeSize of all data in packet
4unsigned intzone_idxZone index to add segment to
VariableSegment DatasegmentSee Segment Data block format table.

NET_PACKET_ID_RGBCONTROLLER_CONFIGUREZONE

Client Only [Size: Variable]

The client uses this ID to call the ConfigureZone() function of an RGBController device. The packet contains a data block. The format of the block is shown below. The pkt_dev_id of this request's header indicates which controller you are calling ConfigureZone() on. See the Device IDs section for more information.

SizeFormatNameDescription
4unsigned intdata_sizeSize of all data in packet
4unsigned intzone_idxZone index to configure
VariableZone DatazoneSee Zone Data block format table.

NET_PACKET_ID_RGBCONTROLLER_CONFIGUREDEVICE

Client Only [Size: Variable]

The client uses this ID to call the ConfigureDevice() function of an RGBController device. The packet contains a data block. The format of the block is shown below. The pkt_dev_id of this request's header indicates which controller you are calling ConfigureDevice() on. See the Device IDs section for more information.

SizeFormatNameDescription
4unsigned intdata_sizeSize of all data in packet
4unsigned intflagsNew controller flags value
2unsigned shortname_lenLength of controller name string, including null termination
name_lenchar[name_len]nameNew controller name string value, including null termination

NET_PACKET_ID_RGBCONTROLLER_SETHIDDEN

Client Only [Size: 1]

The client uses this ID to call the SetHidden() function of an RGBController device. The packet contains a single bool value (size 1). The pkt_dev_id of this request's header indicates which controller you are calling SetHidden() on. See the Device IDs section for more information.

NET_PACKET_ID_RGBCONTROLLER_UPDATELEDS

Client Only [Size: Variable]

The client uses this ID to call the UpdateLEDs() function of an RGBController device. The packet data contains a data block. The format of the block is shown below. The pkt_dev_id of this request's header indicates which controller you are calling UpdateLEDs() on. See the Device IDs section for more information.

SizeFormatNameDescription
4unsigned intdata_sizeSize of all data in packet
2unsigned shortnum_colorsNumber of color values in packet
4 * num_colorsRGBColor[num_colors]led_colorColor values for each LED in device

NET_PACKET_ID_RGBCONTROLLER_UPDATEZONELEDS

Client Only [Size: Variable]

The client uses this ID to call the UpdateZoneLEDs() function of an RGBController device. The packet data contains a data block. The format of the data block is shown below. The pkt_dev_id of this request's header indicates which controller you are calling UpdateZoneLEDs() on. See the Device IDs section for more information.

SizeFormatNameDescription
4unsigned intdata_sizeSize of all data in packet
4unsigned intzone_idxZone index to update
2unsigned shortnum_colorsNumber of color values in packet
4 * num_colorsRGBColor[num_colors]led_colorColor values for each LED in zone

NET_PACKET_ID_RGBCONTROLLER_UPDATESINGLELED

Client Only [Size: 8]

The client uses this ID to call the UpdateSingleLED() function of an RGBController device. The packet data contains a data block. The format of the data block is shown below. The pkt_dev_id of this request's header indicates which controller you are calling UpdateSingleLED() on. See the Device IDs section for more information.

SizeFormatNameDescription
4intled_idxLED index
4RGBColorled_colorLED color

NET_PACKET_ID_RGBCONTROLLER_SETCUSTOMMODE

Client Only [Size: 0]

The client uses this ID to call the SetCustomMode() function of an RGBController device. The packet contains no data. The pkt_dev_id of this request's header indicates which controller you are calling SetCustomMode() on. See the Device IDs section for more information.

NET_PACKET_ID_RGBCONTROLLER_UPDATEMODE

Client Only [Size: Variable]

The client uses this ID to call the UpdateMode() function of an RGBController device. The packet contains a data block. The format of the data block is shown below. The pkt_dev_id of this request's header indicates which controller you are calling UpdateMode() on. See the Device IDs section for more information.

SizeFormatNameProtocol VersionDescription
4unsigned intdata_size0Size of all data in packet
4intmode_idx0Mode index to update
VariableMode Datamode0See Mode Data block format table.

NET_PACKET_ID_RGBCONTROLLER_SAVEMODE

Client Only [Size: Variable]

The client uses this ID to call the SaveMode() function of an RGBController device. The packet contains a data block. The format of the data block is the same as for NET_PACKET_ID_RGBCONTROLLER_UPDATEMODE. The pkt_dev_id of this request's header indicates which controller you are calling SaveMode() on.

NET_PACKET_ID_RGBCONTROLLER_UPDATEZONEMODE

Client Only [Size: Variable]

The client uses this ID to call the UpdateZoneMode() function of an RGBController device. The packet contains a data block. The format of the data block is shown below. The pkt_dev_id of this request's header indicates which controller you are calling UpdateZoneMode() on. See the Device IDs section for more information.

SizeFormatNameProtocol VersionDescription
4unsigned intdata_size0Size of all data in packet
4intzone_idx6Zone index to update mode on
4intmode_idx6Mode index to update
VariableMode Datamode6See Mode Data block format table.

NET_PACKET_ID_RGBCONTROLLER_SETDEVICESPECIFICCONFIGURATION

Client Only [Size: Variable]

The client uses this ID to call the SetDeviceSpecificConfiguration function of an RGBController device. The pkt_dev_id of this request's header indicates which controller you are calling SetDeviceSpecificConfiguration on. See the Device IDs section for more information.

SizeFormatNameDescription
Variablechar[data_size]configurationConfiguration JSON string, including null termination (size = data_size)

NET_PACKET_ID_RGBCONTROLLER_SETDEVICESPECIFICZONECONFIGURATION

Client Only [Size: Variable]

The client uses this ID to call the SetDeviceSpecificZoneConfiguration function of an RGBController device. The pkt_dev_id of this request's header indicates which controller you are calling SetDeviceSpecificZoneConfiguration on. See the Device IDs section for more information.

SizeFormatNameDescription
4intzone_idxZone index to configure
4unsigned intconfiguration_string_sizeSize of configuration string, including null termination
Variablechar[configuration_string_size]configurationConfiguration JSON string, including null termination

NET_PACKET_ID_RGBCONTROLLER_SIGNALUPDATE

Server Only [Size: Variable]

The server uses this ID to signal the client that SignalUpdate() was called on an RGBController device. The packet contains a data block. The format of the data block is shown below. The pkt_dev_id of this request's header indicates which controller signalled SignalUpdate(). See the Device IDs section for more information.

SizeFormatNameDescription
4unsigned intdata_sizeSize of all data in packet
4unsigned intupdate_reasonUpdate reason code. See table below
VariableDescription DatadescriptionController description data or color description data

The update reason code determines the format of the description data:

Reason CodeValueDescription Data Format
RGBCONTROLLER_UPDATE_REASON_UPDATELEDSColor Description format
All other reasonsDevice Data format

Color Description Data

SizeFormatNameDescription
2unsigned shortnum_colorsNumber of color values
4 * num_colorsRGBColor[num_colors]colorsColor values for each LED