|
|
@ -56,11 +56,13 @@ struct cells results[1024];
|
|
|
|
|
|
|
|
|
|
|
|
float rf_gain = 70.0;
|
|
|
|
float rf_gain = 70.0;
|
|
|
|
char* rf_args = "";
|
|
|
|
char* rf_args = "";
|
|
|
|
|
|
|
|
char* rf_dev = "";
|
|
|
|
|
|
|
|
|
|
|
|
void usage(char* prog)
|
|
|
|
void usage(char* prog)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
printf("Usage: %s [agsendtvb] -b band\n", prog);
|
|
|
|
printf("Usage: %s [agsendtvb] -b band\n", prog);
|
|
|
|
printf("\t-a RF args [Default %s]\n", rf_args);
|
|
|
|
printf("\t-a RF args [Default %s]\n", rf_args);
|
|
|
|
|
|
|
|
printf("\t-d RF devicename [Default %s]\n", rf_dev);
|
|
|
|
printf("\t-g RF gain [Default %.2f dB]\n", rf_gain);
|
|
|
|
printf("\t-g RF gain [Default %.2f dB]\n", rf_gain);
|
|
|
|
printf("\t-s earfcn_start [Default All]\n");
|
|
|
|
printf("\t-s earfcn_start [Default All]\n");
|
|
|
|
printf("\t-e earfcn_end [Default All]\n");
|
|
|
|
printf("\t-e earfcn_end [Default All]\n");
|
|
|
@ -79,6 +81,9 @@ void parse_args(int argc, char** argv)
|
|
|
|
case 'b':
|
|
|
|
case 'b':
|
|
|
|
band = (int)strtol(argv[optind], NULL, 10);
|
|
|
|
band = (int)strtol(argv[optind], NULL, 10);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 'd':
|
|
|
|
|
|
|
|
rf_dev = argv[optind];
|
|
|
|
|
|
|
|
break;
|
|
|
|
case 's':
|
|
|
|
case 's':
|
|
|
|
earfcn_start = (int)strtol(argv[optind], NULL, 10);
|
|
|
|
earfcn_start = (int)strtol(argv[optind], NULL, 10);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
@ -142,7 +147,8 @@ int main(int argc, char** argv)
|
|
|
|
parse_args(argc, argv);
|
|
|
|
parse_args(argc, argv);
|
|
|
|
|
|
|
|
|
|
|
|
printf("Opening RF device...\n");
|
|
|
|
printf("Opening RF device...\n");
|
|
|
|
if (srsran_rf_open(&rf, rf_args)) {
|
|
|
|
|
|
|
|
|
|
|
|
if (srsran_rf_open_devname(&rf, rf_dev, rf_args, 1)) {
|
|
|
|
ERROR("Error opening rf");
|
|
|
|
ERROR("Error opening rf");
|
|
|
|
exit(-1);
|
|
|
|
exit(-1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|