Home AMX User Forum NetLinx Studio

Attention all Brainiacs ? Need MAC

2»

Comments

  • Joe HebertJoe Hebert Posts: 2,159
    I ran into the same issue a year or two ago on a couple of NI-3000s but I don’t know why it happens. I was asking for the Unique_ID at startup but was getting all nulls. I then tried delaying the query until about a minute after startup and that helped *most* of the time but some of the time I still needed to reboot. I think I ended changing the code to retry once a minute until it got a correct response. I never did figure out what the deal was. I guess all masters aren’t created equal.
    Colzie wrote: »
    I use get_unique_id quite often to identify processors. Works great. Yesterday I installed some code and get_unique_id is returning all zeros. I rebooted several times while working on the system, and eventually I did get a proper "unique id", but after a subsequent reboot I'm back to getting zeros.

    Unfortunately I didn't get the firmware version, it is possible that the master is running a slightly out of date version.

    Any ideas why this would be happening?
  • ericmedleyericmedley Posts: 4,177
    Joe Hebert wrote: »
    I ran into the same issue a year or two ago on a couple of NI-3000s but I don’t know why it happens. I was asking for the Unique_ID at startup but was getting all nulls. I then tried delaying the query until about a minute after startup and that helped *most* of the time but some of the time I still needed to reboot. I think I ended changing the code to retry once a minute until it got a correct response. I never did figure out what the deal was. I guess all masters aren’t created equal.

    Try putting in a data_Event[0:1:0]

    I get this same info from the dev_info_struct. It has all the stuff in it. I don't think I've ever gotten a null from it.
  • mushmush Posts: 287
    Colzie wrote: »
    I use get_unique_id quite often to identify processors. Works great. Yesterday I installed some code and get_unique_id is returning all zeros. I rebooted several times while working on the system, and eventually I did get a proper "unique id", but after a subsequent reboot I'm back to getting zeros.

    Unfortunately I didn't get the firmware version, it is possible that the master is running a slightly out of date version.

    Any ideas why this would be happening?

    My information is that the serial number is changeable by AMX, which would indicate being stored somewhere on the EEPROM? AMX can change it for you if you need to.
  • Joe HebertJoe Hebert Posts: 2,159
    mush wrote: »
    My information is that the serial number is changeable by AMX, which would indicate being stored somewhere on the EEPROM? AMX can change it for you if you need to.
    The unique_id and serial number are two different animals. The unique_id is *normally* the mac address. The serial number can be wiped out so it's not reliable to hook into.
  • mushmush Posts: 287
    Joe Hebert wrote: »
    The unique_id and serial number are two different animals. The unique_id is *normally* the mac address. The serial number can be wiped out so it's not reliable to hook into.

    Good point.
    Thanks Joe.
  • rynandorynando Posts: 68
    You could just hardcode a GUID into your program and use that as your unique ID.
  • ColzieColzie Posts: 470
    rynando wrote: »
    You could just hardcode a GUID into your program and use that as your unique ID.

    I like the "hands off" approach that get_unique_id allows (when it works!). I'll probably use Joe's suggestion and keep checking until I get a valid id.
  • ColzieColzie Posts: 470
    Side effect?

    This has only happened once, so I can't say this is 100% a positive relationship yet, but I just had the Card slots not coming online issue with a 4100 ... and my get_unique_id returned all nulls. Hmmmm.
Sign In or Register to comment.