|
|
@ -101,6 +101,7 @@ const char* srslte_rf_get_devname(srslte_rf_t *rf) {
|
|
|
|
int srslte_rf_open_devname(srslte_rf_t *rf, char *devname, char *args) {
|
|
|
|
int srslte_rf_open_devname(srslte_rf_t *rf, char *devname, char *args) {
|
|
|
|
/* Try to open the device if name is provided */
|
|
|
|
/* Try to open the device if name is provided */
|
|
|
|
if (devname) {
|
|
|
|
if (devname) {
|
|
|
|
|
|
|
|
if (devname[0] != '\0') {
|
|
|
|
int i=0;
|
|
|
|
int i=0;
|
|
|
|
while(available_devices[i] != NULL) {
|
|
|
|
while(available_devices[i] != NULL) {
|
|
|
|
if (!strcmp(available_devices[i]->name, devname)) {
|
|
|
|
if (!strcmp(available_devices[i]->name, devname)) {
|
|
|
@ -111,6 +112,7 @@ int srslte_rf_open_devname(srslte_rf_t *rf, char *devname, char *args) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
printf("Device %s not found. Switching to auto mode\n", devname);
|
|
|
|
printf("Device %s not found. Switching to auto mode\n", devname);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* If in auto mode or provided device not found, try to open in order of apperance in available_devices[] array */
|
|
|
|
/* If in auto mode or provided device not found, try to open in order of apperance in available_devices[] array */
|
|
|
|
int i=0;
|
|
|
|
int i=0;
|
|
|
|