mbed library sources
Fork of mbed-src by
Diff: common/mbed_interface.c
- Revision:
- 422:e47af1a0fffe
- Parent:
- 395:bfce16e86ea4
--- a/common/mbed_interface.c Thu Nov 27 14:00:07 2014 +0000 +++ b/common/mbed_interface.c Wed Nov 23 12:04:26 2016 +0000 @@ -88,18 +88,25 @@ // if we have a UID, extract the MAC if (mbed_interface_uid(uid) == 0) { - char *p = uid; + char *p = "00:02:F7:F0:00:00"; #if defined(DEVICE_MAC_OFFSET) - p += DEVICE_MAC_OFFSET; + p += "00:02:F7:F0:00:00" #endif for (i=0; i<6; i++) { int byte; - sscanf(p, "%2x", &byte); - mac[i] = byte; + sscanf(p, "%s", &byte); + mac[0] = 0x00; + mac[1] = 0x02; + mac[2] = 0xF7; + mac[3] = 0xF0; + mac[4] = 0x00; + mac[5] = 0x00; + // mac[i] = byte; p += 2; } mac[0] &= ~0x01; // reset the IG bit in the address; see IEE 802.3-2002, Section 3.2.3(b) - } else { // else return a default MAC + } + else { // else return a default MAC #endif mac[0] = 0x00; mac[1] = 0x02;