C-Gate Unique Identifier?

Discussion in 'C-Gate Developers' started by jackaroos, Apr 27, 2015.

  1. jackaroos

    jackaroos

    Joined:
    Apr 8, 2014
    Messages:
    17
    Likes Received:
    0
    Location:
    New Zealand
    Hi
    I have written som automation control software and I want to be able tie the licenses for this software down to invidivual C-Gate sites. To do this 'site' licensing I need to be able to get programmatically a unique identifier of either a CNI or PCI, or something else unique to the installation.

    I have pored through the CGate programming manual but it does not appear to give me any such options that I can see.

    Any suggestions?

    Thanks:)
     
    jackaroos, Apr 27, 2015
    #1
  2. jackaroos

    daniel C-Busser Moderator

    Joined:
    Jul 26, 2004
    Messages:
    766
    Likes Received:
    20
    Location:
    Adelaide
    Interesting question. You can identify the computer:

    Code:
    get cgate *
    300-cgate: ComputerName=W7AUR9025HRNL
    300-cgate: IPAddress=10.176.139.112
    
    get vm *
    300-vm: user.name=W7AUR9025HRNL$
    You can also retrieve the serial number from a unit once C-Gate has synced a network:

    Code:
    get 254/p/<unit address> SerialNumber
    Hope this helps.
     
    daniel, Apr 27, 2015
    #2
  3. jackaroos

    jackaroos

    Joined:
    Apr 8, 2014
    Messages:
    17
    Likes Received:
    0
    Location:
    New Zealand
    Exactly what I needed, thanks! :)
     
    jackaroos, Apr 28, 2015
    #3
  4. jackaroos

    jackaroos

    Joined:
    Apr 8, 2014
    Messages:
    17
    Likes Received:
    0
    Location:
    New Zealand
    Formatting of Serial Number

    Do you have the algorithm/rules for the format of the returned serial number?

    I can make a guess based on the formats below

    In tookkit: returned value:
    001008320917 100832.917
    000749410059 74941.59
    000754770002 75477.2
    001007712112 100771.2112

    I found this one in CGate Manual as a returned value 1048575.4095; and I assume based on the pattern above this is 010485754095, but it could be 104857504095.

    thanks in advance :)
     
    Last edited by a moderator: May 12, 2015
    jackaroos, May 12, 2015
    #4
  5. jackaroos

    daniel C-Busser Moderator

    Joined:
    Jul 26, 2004
    Messages:
    766
    Likes Received:
    20
    Location:
    Adelaide
    Hi jackaroos,

    The first 8 digits and the last 4 digits are two separate segments separated by the period. Then each segment simply has the leading zeros stripped to produce the final number.

    001008320917 => 00100832 . 0917 => 100832.917
    000749410059 => 00074941 . 0059 => 74941.59
    000754770002 => 00075477 . 0002 => 75477.2
    001007712112 => 00100771 . 2112 => 100771.2112

    It's a little weird but easy once you know how :)

    Incidentally, that exact serial you mention "1048575.4095" is like a NULL constant and not a real serial number. It is typically found in the very first "Mark 1" C-Bus units. Or it can be an indicator of corruption in the unit firmware.
     
    Last edited by a moderator: May 21, 2015
    daniel, May 21, 2015
    #5
  6. jackaroos

    jackaroos

    Joined:
    Apr 8, 2014
    Messages:
    17
    Likes Received:
    0
    Location:
    New Zealand
    Thanks Daniel. I needed to be absolutely sure. Much appreciated :)
     
    jackaroos, May 21, 2015
    #6
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.