What happens when UnidqueID[i] == 0x10? This code does not handle that case. Better to just let sprintf() handle it correctly
sprintf(buf,"%02X",UniqueID[i]);
num[i*2] = buf[0];
num[i*2+1] = buf[1];
What happens when UnidqueID[i] == 0x10? This code does not handle that case. Better to just let sprintf() handle it correctly
sprintf(buf,"%02X",UniqueID[i]);
num[i*2] = buf[0];
num[i*2+1] = buf[1];