diff --git a/srslte/lib/rf/rf_uhd_imp.c b/srslte/lib/rf/rf_uhd_imp.c index e03d7d346..57b61cc98 100644 --- a/srslte/lib/rf/rf_uhd_imp.c +++ b/srslte/lib/rf/rf_uhd_imp.c @@ -258,7 +258,7 @@ int rf_uhd_open(char *args, void **h) if (args == NULL) { args = ""; } - handler->devname = "uhd_unknown"; + handler->devname = NULL; /* If device type or name not given in args, choose a B200 */ if (args[0]=='\0') { @@ -291,7 +291,19 @@ int rf_uhd_open(char *args, void **h) fprintf(stderr, "Error opening UHD: code %d\n", error); return -1; } - + + if (!handler->devname) { + char dev_str[1024]; + uhd_usrp_get_mboard_name(handler->usrp, 0, dev_str, 1024); + if (strstr(dev_str, "B2") || strstr(dev_str, "B2")) { + handler->devname = DEVNAME_B200; + } else if (strstr(dev_str, "X3") || strstr(dev_str, "X3")) { + handler->devname = DEVNAME_X300; + } + } + if (!handler->devname) { + handler->devname = "uhd_unknown"; + } size_t channel = 0; uhd_stream_args_t stream_args = { .cpu_format = "fc32", diff --git a/srslte/lib/ue/ue_dl.c b/srslte/lib/ue/ue_dl.c index 11014b963..8f4ad9afa 100644 --- a/srslte/lib/ue/ue_dl.c +++ b/srslte/lib/ue/ue_dl.c @@ -302,12 +302,13 @@ int srslte_ue_dl_decode_rnti(srslte_ue_dl_t *q, cf_t *input, uint8_t *data, uint fprintf(stderr, "Error calling srslte_pdsch_decode()\n"); } } - + + /* printf("Saving signal...\n"); srslte_vec_save_file("input", input, sizeof(cf_t)*SRSLTE_SF_LEN_PRB(q->cell.nof_prb)); srslte_ue_dl_save_signal(q, &q->softbuffer, sf_idx, rvidx, rnti, cfi); //exit(-1); - + */ }