Each single GPIO-24 adapter has its unique serial number (SN). It is assigned during manufacturing and identifies the adapter. The SN of the GPIO-24 adapter is a 4-byte number. The GPIO_GET_SN command retrieves the serial number of the GPIO-24 adapter.
| Byte 0 | GPIO_GET_SN | Command ID (0x0C). |
| Byte 1 | ECHO | Echo to associate a command with the response. |
| Bytes 2..7 | Reserved | Reserved (must be 0). |
Command is an 8-byte array of the following format:
This byte contains command ID (command type). It should be set to 0x0C.
This byte is used to associate a response received from GPIO-24 adapter with a specific command. Response will contain exactly the same value in its echo byte.
These bytes are reserved for future usage and must be set to 0.
For convenience GPIO_GET_SN_CMD structure is declared in reports.h file.
GPIO-24 adapter sends GPIO_GET_SN response after command execution. Device serial number is specified inside the response.
| Byte 0 | GPIO_GET_CFG | Response ID (0x0C). |
| Byte 1 | ECHO | Echo to associate a command with the response. |
| Byte 2 | ST | Command execution status. |
| Byte 3 | UPPER_SN | UPPER_SN byte. |
| Byte 4 | HI_SN | HI_SN byte. |
| Byte 5 | LOW_SN | LOW_SN byte. |
| Byte 6 | LOWEST SN | LOWEST_SN byte. |
| Byte 7 | Reserved | Reserved |
Response is an 8-byte array of the following format:
Response ID (response type). This byte will contain 0x0C.
Echo byte copied from the corresponding command. It is used to associate the response with the specific command.
Status of the command execution:
GPIO_ST_SUCCESS (0x00) – The I/O pins output values were successfully
configured.
GPIO_ST_INVALID_PORT (0x03) – Invalid port number has been specified.
SN of the GPIO-24 adapter is a 4-byte number. GPIO_GET_SN response serial number consists of following bytes:
UPPER_SN
HI_SN
LOW_SN
LOWEST_SN
This byte is reserved for future usage.
For convenience GPIO_GET_SN_RSP structure is declared in reports.h file.