lancaster-university / microbit

http://lancaster-university.github.io/microbit-docs
Other
78 stars 64 forks source link

Error/inconsistency in ManagedString MicroBit::getSerial() #17

Open bsiever opened 4 years ago

bsiever commented 4 years ago

This may not be worth fixing at this point, but getSerial() breaks the serial number from microbit_serial_number() into two parts, the lower and then the upper. It returns a string that is the "lower + upper" rather than "upper + lower".

MakeCode will provide the serial number using the full int directly from microbit_serial_number(), so it shows the correct value from the NRF_FICR register.

The "reversed" value from getSerial() is used in the BLE Device Information Service and will be inconsistent with the serial number shown from MakeCode.