What is the prescribed way to determine whether we are running on mLinux or AEP?

Home Forums Conduit: AEP Model What is the prescribed way to determine whether we are running on mLinux or AEP?

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

    Our application supports running on the “basic” mLinux firmware, as well as the MultiTech AEP “custom” firmware. We provide different functionality for each while utilizing a common codebase.

    I’d like to be able to detect on which platform we are running at run-time. What is the recommended way of doing so?

    #19537
    Jeff Hatch
    Keymaster

    Brandon,
    There is a script called get-eeprom-device-info in /sbin that gets the device information. In that information is the product-id field highlighted below. If the device was shipped as an AEP model, the product-id field ends with an ‘A’. If it shipped as an mLinux model, it ends with an ‘L’.

    admin@mtcdt:/sbin# get-eeprom-device-info
    [INFO] eeprom_main.c:main:577: loaded id eeprom from /sys/bus/i2c/devices/i2c-0/0-0056/eeprom successfully
    [INFO] eeprom_main.c:mts_id_eeprom_inspect:291: sizeof: 512
    [INFO] eeprom_main.c:mts_id_eeprom_inspect:292: vendor-id: Multi-Tech Systems
    [INFO] eeprom_main.c:mts_id_eeprom_inspect:293: product-id: MTCDT-LAT1-247A
    [INFO] eeprom_main.c:mts_id_eeprom_inspect:294: device-id: 19214963
    [INFO] eeprom_main.c:mts_id_eeprom_inspect:295: hw-version: MTCDT-0.1
    [INFO] eeprom_main.c:mts_id_eeprom_inspect:302: mac-addr: 00:08:00:4A:20:AB
    [INFO] eeprom_main.c:mts_id_eeprom_inspect:303: imei: 358942053427614
    [INFO] eeprom_main.c:mts_id_eeprom_inspect:304: capa-gps: yes
    [INFO] eeprom_main.c:mts_id_eeprom_inspect:305: capa-din: no
    [INFO] eeprom_main.c:mts_id_eeprom_inspect:306: capa-dout: no
    [INFO] eeprom_main.c:mts_id_eeprom_inspect:307: capa-adc: no
    [INFO] eeprom_main.c:mts_id_eeprom_inspect:308: capa-wifi: yes
    [INFO] eeprom_main.c:mts_id_eeprom_inspect:309: capa-bluetooth: yes
    [INFO] eeprom_main.c:mts_id_eeprom_inspect:310: capa-lora: no
    [INFO] eeprom_main.c:mts_id_eeprom_inspect:318: mac-bluetooth: 00:23:A7:49:5D:FA
    [INFO] eeprom_main.c:mts_id_eeprom_inspect:325: mac-wifi: 00:23:A7:43:A3:6C
    [INFO] eeprom_main.c:mts_id_eeprom_inspect:331: uuid: 9E71DC6A7E185B1B5C704CEC123062FD
    [INFO] eeprom_main.c:mts_id_eeprom_inspect:341: lora-eui: “00:00:00:00:00:00:00:00”
    [INFO] eeprom_main.c:mts_id_eeprom_inspect:343: lora-product-id:
    [INFO] eeprom_main.c:mts_id_eeprom_inspect:344: lora-hw-version:
    Finding cellular module…
    Try #0
    Reading accessory cards data
    Adding accessory cards data

    That is one way to tell what model the Conduit is.

    Jeff

    #19538
    Mike Fiore
    Blocked

    Brandon,

    The mts-io-sysfs script should be available on AEP and mLinux devices. It allows you to see EEPROM contents Jeff mentioned.

    mts-io-sysfs show product-id

    Cheers,
    Mike

    #19539
    Brandon Gooch
    Participant

    Thank you both for responding so quickly. Currently, I am reading the information by fopen()-ing the /sys/devices/platform/mts-io/product-id file. Now I know what to look for.

    I may move to calling the mts-io-sysfs script, if only as an abstraction.

    Thanks again to the both of you,

    -Brandon

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