summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrii Pientsov <andrii.pientsov@globallogic.com>2022-01-21 10:11:50 +0200
committerJohn Klug <john.klug@multitech.com>2022-03-23 13:56:11 -0500
commitbafffd9fc4ffd9a4624c2133483aa5842dd80ff6 (patch)
tree99f288684eaf52018b2045cda5ff51856888b69d
parent664cabb5ef828734b730c83e2f779532cc55cc27 (diff)
downloadmts-id-eeprom-bafffd9fc4ffd9a4624c2133483aa5842dd80ff6.tar.gz
mts-id-eeprom-bafffd9fc4ffd9a4624c2133483aa5842dd80ff6.tar.bz2
mts-id-eeprom-bafffd9fc4ffd9a4624c2133483aa5842dd80ff6.zip
MTX-4356 mPower R.6.0.x: MTCAP3 - GP-1352, PP-477 : need --capa-lora-lbt for MTCAP3 in mts-id-eeprom0.6.4
-rw-r--r--src/eeprom_main.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/eeprom_main.c b/src/eeprom_main.c
index 26cfe70..66c948b 100644
--- a/src/eeprom_main.c
+++ b/src/eeprom_main.c
@@ -169,6 +169,7 @@ static int id_yaml_out(const char *name, struct mts_id_eeprom_layout *id_eeprom)
fprintf(file, "capa-wifi: %s\n", DEVICE_CAPA(id_eeprom->capa, CAPA_WIFI) ? "true" : "false");
fprintf(file, "capa-bluetooth: %s\n", DEVICE_CAPA(id_eeprom->capa, CAPA_BLUETOOTH) ? "true" : "false");
fprintf(file, "capa-lora: %s\n", DEVICE_CAPA(id_eeprom->capa, CAPA_LORA) ? "true" : "false");
+ fprintf(file, "capa-lora-lbt: %s\n", DEVICE_CAPA(id_eeprom->capa, CAPA_LORA_LBT) ? "true" : "false");
fprintf(file, "capa-battery: %s\n", DEVICE_CAPA(id_eeprom->capa, CAPA_BATTERY) ? "true" : "false");
fprintf(file, "capa-supercap: %s\n", DEVICE_CAPA(id_eeprom->capa, CAPA_SUPERCAP) ? "true" : "false");
fprintf(file, "capa-cellular: %s\n", DEVICE_CAPA(id_eeprom->capa, CAPA_CELLULAR) ? "true" : "false");
@@ -393,6 +394,7 @@ static void mts_id_eeprom_inspect(struct mts_id_eeprom_layout *id_eeprom)
log_info("capa-wifi: %s", DEVICE_CAPA(id_eeprom->capa, CAPA_WIFI) ? "yes" : "no");
log_info("capa-bluetooth: %s", DEVICE_CAPA(id_eeprom->capa, CAPA_BLUETOOTH) ? "yes" : "no");
log_info("capa-lora: %s", DEVICE_CAPA(id_eeprom->capa, CAPA_LORA) ? "yes" : "no");
+ log_info("capa-lora-lbt: %s", DEVICE_CAPA(id_eeprom->capa, CAPA_LORA_LBT) ? "yes" : "no");
log_info("capa-supercap: %s", DEVICE_CAPA(id_eeprom->capa, CAPA_SUPERCAP) ? "yes" : "no");
log_info("capa-cellular: %s", DEVICE_CAPA(id_eeprom->capa, CAPA_CELLULAR) ? "yes" : "no");
@@ -552,6 +554,7 @@ static void usage(FILE *out) {
fprintf(out, " --capa-wifi |\n");
fprintf(out, " --capa-bluetooth |\n");
fprintf(out, " --capa-lora |\n");
+ fprintf(out, " --capa-lora-lbt |\n");
fprintf(out, " --capa-battery |\n");
fprintf(out, " --capa-supercap |\n");
fprintf(out, " --capa-cellular |\n");
@@ -593,6 +596,7 @@ enum {
CMD_OPT_CAPA_WIFI,
CMD_OPT_CAPA_BLUETOOTH,
CMD_OPT_CAPA_LORA,
+ CMD_OPT_CAPA_LORA_LBT,
CMD_OPT_CAPA_BATTERY,
CMD_OPT_CAPA_SUPERCAP,
CMD_OPT_CAPA_CELLULAR,
@@ -643,6 +647,7 @@ static struct option long_options[] = {
{"capa-wifi", 0, NULL, CMD_OPT_CAPA_WIFI},
{"capa-bluetooth", 0, NULL, CMD_OPT_CAPA_BLUETOOTH},
{"capa-lora", 0, NULL, CMD_OPT_CAPA_LORA},
+ {"capa-lora-lbt", 0, NULL, CMD_OPT_CAPA_LORA_LBT},
{"capa-battery", 0, NULL, CMD_OPT_CAPA_BATTERY},
{"capa-supercap", 0, NULL, CMD_OPT_CAPA_SUPERCAP},
{"capa-cellular", 0, NULL, CMD_OPT_CAPA_CELLULAR},
@@ -967,6 +972,9 @@ int main(int argc, char *argv[]) {
#endif
DEVICE_CAPA_SET(id_eeprom.capa, CAPA_LORA);
break;
+ case CMD_OPT_CAPA_LORA_LBT:
+ DEVICE_CAPA_SET(id_eeprom.capa, CAPA_LORA_LBT);
+ break;
case CMD_OPT_CAPA_BATTERY:
DEVICE_CAPA_SET(id_eeprom.capa, CAPA_BATTERY);
break;