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?
Tagged: platform conduit mlinux aep
- This topic has 3 replies, 3 voices, and was last updated 7 years, 5 months ago by Brandon Gooch.
-
AuthorPosts
-
June 14, 2017 at 9:39 am #19536Brandon GoochParticipant
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?
June 14, 2017 at 10:10 am #19537Jeff HatchKeymasterBrandon,
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 dataThat is one way to tell what model the Conduit is.
Jeff
June 14, 2017 at 10:12 am #19538Mike FioreBlockedBrandon,
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,
MikeJune 14, 2017 at 12:28 pm #19539Brandon GoochParticipantThank 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
-
AuthorPosts
- You must be logged in to reply to this topic.