Author Topic: Device.mcUID values  (Read 636 times)

michal

  • Newbie
  • *
  • Posts: 43
    • View Profile
Device.mcUID values
« on: August 06, 2016, 02:08:01 am »
Does the Device.mcUID have any relationship to the UID on the modules and in mcStudio?

For example I get the following:
UID 00.01.08.5F is mcUID 67679.
UID 00.01.08.67 is mcUID 67687.

And so forth.

Regards,
Michal

Share on Facebook Share on Twitter


kristofferis

  • Sr. Member
  • ****
  • Posts: 287
  • Location: Sweden
    • View Profile
Re: Device.mcUID values
« Reply #1 on: August 06, 2016, 02:46:09 am »
Hello.
This is hex to decimal conversion.
Hex 00.01.08.5F = decimal 67679

http://www.binaryhexconverter.com/decimal-to-hex-converter

michal

  • Newbie
  • *
  • Posts: 43
    • View Profile
Re: Device.mcUID values
« Reply #2 on: August 06, 2016, 02:49:27 am »
Ahh! of course. I had an inkling it might be something like that.

I haven't dealt with hex for a very long time so it didn't quite click.

Thanks!

michal

  • Newbie
  • *
  • Posts: 43
    • View Profile
Re: Device.mcUID values
« Reply #3 on: August 06, 2016, 03:04:24 am »
Just wondering. Are there any undocumented functions or options for ToString that allow for integer to hexadecimal conversion?

mc-John

  • Global Moderator
  • Full Member
  • *****
  • Posts: 212
    • View Profile
Re: Device.mcUID values
« Reply #4 on: August 08, 2016, 09:31:25 pm »
The ToString("X8") would work. There are also ToString() functions for DateTime with undocumented features. This will be documented in the next release.

-John-

michal

  • Newbie
  • *
  • Posts: 43
    • View Profile
Re: Device.mcUID values
« Reply #5 on: August 10, 2016, 04:04:43 am »
There appears to be no difference between these two:

Code: [Select]
Public UID As String = Device.mcUID().ToString("X8")
Public UID As String = Device.mcUID().ToString()

Perhaps sit's unimplemented? No error generated.

mc-John

  • Global Moderator
  • Full Member
  • *****
  • Posts: 212
    • View Profile
Re: Device.mcUID values
« Reply #6 on: August 10, 2016, 11:10:42 am »
We will look into this. Which version of the firmware are you running?

michal

  • Newbie
  • *
  • Posts: 43
    • View Profile
Re: Device.mcUID values
« Reply #7 on: August 10, 2016, 04:22:36 pm »
On the modules I have firmware V0.7-361.
On the gateway I have host processor firmware V0.7-406 and application processor firmware V0.6-360.
My mcStudio is version V0.7-895.

mc-Abe

  • Full Member
  • ***
  • Posts: 167
    • View Profile
    • mc-Things
Re: Device.mcUID values
« Reply #8 on: August 12, 2016, 10:15:23 am »
You are correct. This is a bug and we have fixed it. There will be a release soon to resolve this issue.

mc-T2

  • Administrator
  • Sr. Member
  • *****
  • Posts: 252
  • mc-Things! The opportunities are endless!
  • Location: Canada
    • View Profile
Re: Device.mcUID values
« Reply #9 on: August 12, 2016, 05:30:08 pm »
@michal - we uploaded new module firmware and a new gateway hot processor file onto the website today! Please be sure to update your modules and gateway with the new versions.
Thanks!
Need more mc-Modules, mc-Gateways or other mc-Things? Check out our product page: www.mcthings.com/products. mc-Development kits are available too!
Check out a live Dashboard using mcThings and Losant! Click here: https://goo.gl/ST43hB