rf_uhd: device familiy detection when device_args are supplied

master
Ismael Gomez 8 years ago
parent 1f6e63ae4f
commit cbade7d29c

@ -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') {
@ -292,6 +292,18 @@ int rf_uhd_open(char *args, void **h)
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",

@ -303,11 +303,12 @@ int srslte_ue_dl_decode_rnti(srslte_ue_dl_t *q, cf_t *input, uint8_t *data, uint
}
}
/*
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);
*/
}

Loading…
Cancel
Save