Search by Tags

Get Serial Number

 

Article updated at 05 Feb 2018
Compare with Revision




You can use the free SysInfoLib to get the Serialnumber and the MAC.

BOOL  GetMACAddress(BYTE* pMAC);
BOOL  GetBoardSerial(DWORD* pSerial);

For more information see the SysInfoLibDemo in our Toradex CE Libraries and Code Samples article.

Colibri Vybrid

On Coibri Vybrid SysInfoLib is not supported. Here is a workaround for Vybrid modules.

#define ID_MAC            0
#define IOCTL_HAL_GETCFGBLOCK    CTL_CODE(FILE_DEVICE_HAL, 2049, METHOD_BUFFERED, FILE_ANY_ACCESS)
/////////////////////////////////////////
typedef struct {
    DWORD tid : 24; // toradex id part
    DWORD cid : 24; // colibri id part
} MACCFG;
 
MACCFG maccfg;
DWORD id=ID_MAC;
 
if (!KernelIoControl(IOCTL_HAL_GETCFGBLOCK,&id,sizeof(DWORD),&maccfg,sizeof(MACCFG),NULL))
    return FALSE;