3.6.4 CNFG_SetSerialNumber Command and its Response

The CNFG_SetSerialNumber command (0x87) saves the serial number and its length to NVM:

  • bSrlLen → Length of the serial number, maximum 60 bytes.
  • vSrlNum → Serial number in Unicode format. Serial number may contain printable ASCII characters. Because the string is stored in UTF-16LE format, each character requires two bytes. Therefore, up to 30 printable ASCII characters, including spaces, are supported.

This command is sent through Endpoint 0x05 (OUT). The response is read through Endpoint 0x85 (IN).

Table 3-13. CNFG_SetSerialNumber - Command
Byte IndexCommandDescription

0

0x87

Command code

Saves the serial number to NVM
1bSrlLen

Number of ASCII characters x 2

(UTF-16LE format)

Length of the serial number in bytes
2vSrlNumSerial number (up to 30 ASCII characters)Serial number, in UTF-16LE format
Table 3-14. CNFG_SetSerialNumber - Response
Byte IndexResponseDescription
00x87Echo command codeReturns whether the CNFG_SetSerialNumber command was accepted
10x20Accepted - successThe command is accepted, and the serial number is saved to NVM
0x60Rejected - too longCommand is rejected because the name is too long
0x64Rejected - lockedThe command is rejected because the device configuration is locked
0x90Failure - unsuccessful NVM writeSaving to NVM failed; retry