|
Setserialnum Method |
Top Previous Next |
Function: |
Sets the programmable portion (64 bytes) of the device's 128-byte serial number. |
Syntax: |
sys.setserialnum(byref str as string) as ok_ng |
Returns: |
0- OK: The serial number was set successfully. 1- NG: Serial number programming failed. |
See Also: |
Details
The serial number is stored in the security register of the flash IC. Older generation of flash ICs used in Tibbo devices did not have the security register. This method will return 1- NG if you attempt to set the serial number of the device that does not have the security register.
For the method to work, the input string must be exactly 64 bytes in length, otherwise 1- NG will be returned. The security register can only be programmed once. Attempting to program it again will fail (again, with 1- NG code).
Note that using this method disrupts the operation of the flash memory. The operation uses buffer 1 of the flash IC for temporary data storage, so invoking this method will alter the buffer contents. To prevent potential data errors, invoking the method sets fd.ready= 0- NO automatically.
The Entire 128-byte serial number can be obtained through the sys.serialnum R/O property.