How to Read PCI Serial Number?

Discussion in 'C-Bus Wired Hardware' started by PGOLD, Nov 23, 2009.

  1. PGOLD

    PGOLD

    Joined:
    Nov 10, 2009
    Messages:
    22
    Likes Received:
    0
    Location:
    QLD Australia
    How can I read the PCI serial number ?
    What is the Command String format to read the read-only parameters of the PCI?

    The Serial Protocol doc says to send Mgmt commands using @A3pp00vv<cr>
    This works ok when setting the interface options and application addresses but it doesn't seem to work when reading the (read-only) pci serial number parameters and Custom Type numbers? (e.g. parameters F3 - F6 )
     
    PGOLD, Nov 23, 2009
    #1
  2. PGOLD

    Newman

    Joined:
    Aug 3, 2004
    Messages:
    2,203
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    The string '@A3pp00vv' is for setting parameters, not reading them. Since the Serial Number parameters are read-only, this command will fail.

    There are 2 methods you can use to get the serial number bytes:

    • You can send an Identify command, the Extended Diagnostic Summary, which is Identify $04. The protocol doco explains which bytes correspond with the 4 serial number bytes
    • You can use the Recall command to retrieve those 4 bytes. For the serial number, that would correspond to command '@1AF304'
     
    Newman, Nov 23, 2009
    #2
  3. PGOLD

    PGOLD

    Joined:
    Nov 10, 2009
    Messages:
    22
    Likes Received:
    0
    Location:
    QLD Australia
    Thanks Newman

    I will try this command next opportunity, this is not listed in the documentation, are there any other available commands etc that are not listed in the docs?
     
    PGOLD, Nov 24, 2009
    #3
  4. PGOLD

    Newman

    Joined:
    Aug 3, 2004
    Messages:
    2,203
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    The command is there in the documentation. You just need to re-read the document. It's not listed as an example though, which is probably why you overlooked it.
     
    Newman, Nov 24, 2009
    #4
  5. PGOLD

    PGOLD

    Joined:
    Nov 10, 2009
    Messages:
    22
    Likes Received:
    0
    Location:
    QLD Australia
    Hi Newman

    I eventually got back to trying the @1AF304 command as you say and it does return 4 bytes of data back in response.

    How do these 4 bytes translate back the the Serial number printed on the PCI and the one that is found in tool kit?

    I tried converting the 4 bytes to decimal assuming its a 32bit binary number looking at either MSB first or LSB first - but the decimal number doesn't correspond to printed serial ?

    Are these a different S/N ?
     
    PGOLD, Dec 8, 2009
    #5
  6. PGOLD

    ashleigh Moderator

    Joined:
    Aug 4, 2004
    Messages:
    2,397
    Likes Received:
    26
    Location:
    Adelaide, South Australia
    Assume you get a 4 byte serial number... the conversion works like this:

    The serial number bytes are:

    gh ij kl mn

    take the 3 least significant nibbles (lmn) and convert to decimal. Write this as a 4 digit number padding to the left with 0's if needed.

    take the remaining 5 nibbles (ghijk) and convert to decimal. Write this to the left of the number you converted above.

    Practical example:

    Serial number return is 34 1C 07 4A

    then... 74A -> 1866
    and 341C0 -> 213440

    So the decimal serial number is 2134401866

    I cant remember... on the recall... you might need to reverse the byte order before conversion.
     
    ashleigh, Dec 9, 2009
    #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.