get unit serial number

Home Forums MultiConnect OCG get unit serial number

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2617
    Brandon Pedersen
    Participant

    Hi, I am looking for a way to get the serial number of the unit either from the command line or programmatically or whatever.

    I found the serial number (and imei…I would be happy with either) stored in a file /sys/devices/platform/i2c-gpio/i2c-0/0-0056/eeprom but I am not quite sure how to read the data in and grab just the serial number.

    I noticed there is a program mts-id-eeprom but when I run it it doesn’t print any of the information, all 0s or empty strings

    Any ideas? Thanks

    #3325
    Jesse Gilles
    Blocked

    Brandon,

    mts-id-eeprom is the application you want, but you have to give it the path to the eeprom (which you already also found).

    mts-id-eeprom --help will give command-line options.

    Running:

    mts-id-eeprom /sys/devices/platform/i2c-gpio/i2c-0/0-0056/eeprom

    will produce yaml output that you can parse.

    Jesse

    #3326
    Brandon Pedersen
    Participant

    Thanks for that…although it doesn’t quite work. I had another look at the command line options and it should actually be this:

    mts-id-eeprom –in-file /sys/devices/platform/i2c-gpio/i2c-0/0-0056/eeprom

    Although, I think I will probably just use python and use struct to read out the bits I need like the c code for mts-id-eeprom does.

    #3327
    Jesse Gilles
    Blocked

    Whoops, yeah, I meant to have the –in-file option in there, sorry.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.