summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHarsh Sharma <harsh.sharma@multitech.com>2019-12-26 17:06:09 -0600
committerHarsh Sharma <harsh.sharma@multitech.com>2019-12-26 17:06:09 -0600
commit92bd4453f1db67a5250afb6316afe8c3fc2f36b3 (patch)
treebfb9331e105ac506631a00feedc2c49cca89e3b8 /src
parent2d12a0723b510fe7ce475ca1d7d951897250bca6 (diff)
downloadmts-io-sysfs-92bd4453f1db67a5250afb6316afe8c3fc2f36b3.tar.gz
mts-io-sysfs-92bd4453f1db67a5250afb6316afe8c3fc2f36b3.tar.bz2
mts-io-sysfs-92bd4453f1db67a5250afb6316afe8c3fc2f36b3.zip
Bug fix: Added cellWwan capability
Diffstat (limited to 'src')
-rw-r--r--src/Device/Device.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Device/Device.cpp b/src/Device/Device.cpp
index bbfb189..7cfd285 100644
--- a/src/Device/Device.cpp
+++ b/src/Device/Device.cpp
@@ -199,19 +199,19 @@ void Device::logInfo(std::string info) {
}
void Device::mapFileToCapability() {
- if (fileType("/dev/modem_at0") == S_IFLNK && fileType("/dev/modem_at1") == S_IFLNK) {
+ if (fileType("/dev/modem_at0") == S_IFLNK && fileType("/dev/modem_at1") == S_IFLNK) { /* Cellular module symlink */
capabilityList["cell"] = true;
}
- if (fileType("/dev/modem_at0") == S_IFLNK) {
- capabilityList["cell"] = true;
+ if (fileType("/dev/cdc-wdm0") == S_IFCHR) { /* Cellular modem is wwan/qmi character device */
+ capabilityList["cellWwan"] = true;
}
- if (fileType("/dev/ext_serial") == S_IFCHR) {
+ if (fileType("/dev/ext_serial") == S_IFCHR) { /* ext_serial is a character device */
capabilityList["externalSerialPort"] = true;
}
- if (fileType("/opt/node-red") == S_IFDIR) {
+ if (fileType("/opt/node-red") == S_IFDIR) { /* node-red is a directory */
capabilityList["nodeRed"] = true;
}
- if (fileType("/opt/lora/lora-network-server") == S_IFREG) {
+ if (fileType("/opt/lora/lora-network-server") == S_IFREG) { /* lora-network-server is a regular file */
capabilityList["loraNetworkServer"] = true;
}
}