Skip to content

Commit

Permalink
feat: output chip model during start
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinmarnold committed Oct 22, 2021
1 parent 674e978 commit 6981105
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packet_forwarder/src/lora_pkt_fwd.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ License: Revised BSD License, see LICENSE.TXT file include in the project
#include "loragw_aux.h"
#include "loragw_reg.h"
#include "loragw_gps.h"
#include "loragw_sx1302.h"

/* -------------------------------------------------------------------------- */
/* --- PRIVATE MACROS ------------------------------------------------------- */
Expand Down Expand Up @@ -1485,6 +1486,7 @@ int main(int argc, char ** argv)
uint32_t inst_tstamp;
uint64_t eui;
float temperature;
sx1302_model_id_t model_id;

/* statistics variable */
time_t t;
Expand Down Expand Up @@ -1684,6 +1686,14 @@ int main(int argc, char ** argv)
printf("INFO: concentrator EUI: 0x%016" PRIx64 "\n", eui);
}

/* get the concentrator chip model */
i = sx1302_get_model_id(&model_id);
if (i != LGW_HAL_SUCCESS) {
printf("ERROR: failed to get concentrator chip model\n");
} else {
printf("INFO: concentrator chip model ID: 0x%02X\n", model_id);
}

/* spawn threads to manage upstream and downstream */
i = pthread_create(&thrid_up, NULL, (void * (*)(void *))thread_up, NULL);
if (i != 0) {
Expand Down

0 comments on commit 6981105

Please sign in to comment.