How to retrieve the firmware version from LinkIt HDK

To take the advantage of the LinkIt ONE, the most important thing is to keep the firmware on the LinkIt HDK up-to-date. The LinkIt Developer Guide has step-by-step instruction of how to update the firmware.

Before updating the firmware, we may also want to know what the firmware version it is right now on the LinkIt HDK. The following sample code helps to retrieve the version information from the LinkIt HDK.
view source

[code]// Version Info
// This sketch prints out the firmware info of LinkIt ONE.

#include “LTask.h”
#include “vmpromng.h”

VMCHAR hostVersion[100] = {0};
VMCHAR buildDateTime[100] = {0};

boolean getVersion(void* userdata)
// Retrieve version info string
vm_get_sys_property(MRE_SYS_HOST_VERSION, hostVersion, sizeof(hostVersion));
vm_get_sys_property(MRE_SYS_BUILD_DATE_TIME, buildDateTime, sizeof(buildDateTime));

// Allow remoteCall to return
return true;

// The setup() runs once when after each reset:
void setup() {
while(!Serial.available()); // Wait for the Serial Monitor to pop up
// Invoke vm_xxx APIs via remoteCall().
// Any vm_xxx API call has to be done with remoteCall().
LTask.remoteCall(getVersion, NULL);
Serial.println(“Version Info:”);

// The loop() runs over and over again forever:
void loop() {

The sample code above produces the following example output.

1 Version Info:
2 MRE_VER_3100;96X64;MT2502;MAUI.11CW1418MP.W14.38
3 2014/09/18 10:42

Note: Origin page here: