Hi
I tried to build the program for bladerf 2.0 micro xA4 - it builds fine but gives an error while running:
# CellSearch -s 1800000000
LTE CellSearch (release) beginning. 1.0 to 1.1.0: An enhanced LTE Cell Scanner/tracker. Xianjun Jiao ([email protected])
PPM: 0
correction: 1
init_board: 1 bladeRF devices found! The 1st one will be used:
Backend: libusb
Serial: 358164f60b114982a3fbf1864bbf59cd
USB Bus: 2
USB Address: 6 config_bladerf bladerf_get_lna_gain: Failed to get lna gain: Operation not supported
BLADERF device not FOUND!
bladerf_get_lna_gain() is a direct low level call to the bladeRF 1.0 . It is not needed for the bladeRF 2.0. You may just want to try commenting out that code, or using the unified gain API call bladerf_set_gain()
aserkin wrote: ↑Thu May 25, 2023 3:51 am
Hi
I tried to build the program for bladerf 2.0 micro xA4 - it builds fine but gives an error while running:
# CellSearch -s 1800000000
LTE CellSearch (release) beginning. 1.0 to 1.1.0: An enhanced LTE Cell Scanner/tracker. Xianjun Jiao ([email protected])
PPM: 0
correction: 1
init_board: 1 bladeRF devices found! The 1st one will be used:
Backend: libusb
Serial: 358164f60b114982a3fbf1864bbf59cd
USB Bus: 2
USB Address: 6 config_bladerf bladerf_get_lna_gain: Failed to get lna gain: Operation not supported
BLADERF device not FOUND!
What does it mean? How we can sort this out?
Thank you
Hi, same issue here.
Did you come out with a solution?
Was able to fix it on Bladerf 2.0 micro xA9 by commenting/removing the below,
/**bladerf_lna_gain actual_lna_gain;
status = bladerf_get_lna_gain(dev, &actual_lna_gain);
if (status != 0) {
printf("config_bladerf bladerf_get_lna_gain: Failed to get lna gain: %s\n",
bladerf_strerror(status));
if (dev!=NULL) {bladerf_close(dev); dev = NULL; return(-1);}
}
char *lna_gain_str = NULL;
if (actual_lna_gain == BLADERF_LNA_GAIN_BYPASS) {
lna_gain_str = (char *)"BLADERF_LNA_GAIN_BYPASS";
} else if (actual_lna_gain == BLADERF_LNA_GAIN_MAX) {
lna_gain_str = (char *)"BLADERF_LNA_GAIN_MAX";
} else if (actual_lna_gain == BLADERF_LNA_GAIN_MID) {
lna_gain_str = (char *)"BLADERF_LNA_GAIN_MID";
} else if (actual_lna_gain == BLADERF_LNA_GAIN_UNKNOWN) {
lna_gain_str = (char *)"BLADERF_LNA_GAIN_UNKNOWN";
} else {
lna_gain_str = (char *)"INVALID_BLADERF_LNA_GAIN";
}**/
bladerf_gain_mode mode;
mode = BLADERF_GAIN_AUTOMATIC;
bladerf_channel channel = BLADERF_CHANNEL_RX(0);
status = bladerf_set_gain_mode(dev, channel, mode);
if (status < 0) {
printf("config_bladerf bladerf_set_gain: Failed to set bladerf gain automatic: %s\n",
bladerf_strerror(status));
}
/** int actual_vga1_gain;
status = bladerf_get_rxvga1(dev, &actual_vga1_gain);
if (status != 0) {
printf("config_bladerf bladerf_get_rxvga1: Failed to get rxvga1 gain: %s\n",
bladerf_strerror(status));
if (dev!=NULL) {bladerf_close(dev); dev = NULL; return(-1);}
}**/
/**
int actual_vga2_gain;
status = bladerf_get_rxvga2(dev, &actual_vga2_gain);
if (status != 0) {
printf("config_bladerf bladerf_get_rxvga2: Failed to get rxvga2 gain: %s\n",
bladerf_strerror(status));
if (dev!=NULL) {bladerf_close(dev); dev = NULL; return(-1);}
}**/
// int actual_total_vga_gain = actual_vga1_gain + actual_vga2_gain;