BUG with biastee enable commands grosmoSDR

Having issues with the site, hardware, source code, or any other issues?
Post Reply
o8ko8k
Posts: 2
Joined: Tue May 10, 2022 7:57 pm

BUG with biastee enable commands grosmoSDR

Post by o8ko8k »

Hello,

The BT-100 power amplifier enable commands found in these instructions do not work with the latest (05/11/2022) grosmoSDR source build:
https://www.nuand.com/product/bt-100/

Furthermore, Even if the instructions referenced above were correct the source code for gr-osmoSDR has a bug in it that prevents one of the three possible parameters not to work also (user beware):

for reference, the proper syntax with master branch of gr-osmoSDR as of 5/11/2022: "bladerf=0,biastee=1" or "bladerf=0,biastee=on"
The bug is in this command: "bladerf=0,biastee=tx" <<<--- this does not work!
Alternatively "bladerf=0,biastee=rx" will also work, which is the bug part, likely a small copy and paste error by the author. bum bum bup bumm, wah!

see code snips below:

FILE AFFECTED:
lib/bladerf/bladerf_sink_c.cc

CODE SNIP:
void bladerf_sink_c::set_biastee_mode(const std::string &mode)
595 {
596 int status;
597 bool enable;
598
599 if (mode == "on" || mode == "1" || mode == "rx") {
600 enable = true;
601 } else {
602 enable = false;
603 }
604
605 status = bladerf_set_bias_tee(_dev.get(), BLADERF_CHANNEL_TX(0), enable);
606 if (BLADERF_ERR_UNSUPPORTED == status) {
607 // unsupported, but not worth crashing out
608 BLADERF_WARNING("Bias-tee not supported by device");
609 } else if (status != 0) {
610 BLADERF_THROW_STATUS(status, "Failed to set bias-tee");
611 }
612 }
613
Post Reply