Search by Tags

Get Serial Number

 

Compare with Revision




Subscribe for this article updates

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 SourceCode examples.

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;