From 92bd4453f1db67a5250afb6316afe8c3fc2f36b3 Mon Sep 17 00:00:00 2001 From: Harsh Sharma Date: Thu, 26 Dec 2019 17:06:09 -0600 Subject: Bug fix: Added cellWwan capability --- src/Device/Device.cpp | 12 ++++++------ 1 file 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; } } -- cgit v1.2.3