set_smb_mode() throws UNSUPPORTED error
Posted: Mon Jul 08, 2024 5:13 am
Hi All, I am trying to use the trigger functionality to achieve sample level synchronization between two bladeRF devices (one xA4 and an xA9) by following the documentation given in (https://www.nuand.com/libbladeRF-doc/v2 ... r_i_g.html). The documentation recommends the use of synchronized clock for the two boards, which can be achieved by configuring one of the boards to output the CLK using set_smb_mode() command, and the other board to accept the CLK via SMB ports of the respective devices. The following is the code snippet that I use to configure CLKOUT and CLKIN using set_smb_mode(). While running this code, I get an error in the execution of set_smb_mode() command. The error code (-8) reads UNSUPPORTED. I tried connecting just one board to the USB and ran bladeRF-cli to see if I can configure it to output CLK, again using set_smb_mode command in bladeRF-cli. There also, it reports the error UNSUPPORTED. Can anyone help me on this?
Code: Select all
int main() {
bladerf *dev_master;
bladerf *dev_slave;
//struct bladerf *dev = NULL
int status;
status = bladerf_open(&dev_master, "*:instance=0");
if (status != 0) {
std::cout << "Failed to open bladeRF device MASTER: " << std::endl;
return 1;
}
status = bladerf_open(&dev_slave, "*:instance=1");
if (status != 0) {
std::cout << "Failed to open bladeRF device SLAVE: " << std::endl;
return 1;
}
status = bladerf_set_smb_mode(dev_master,BLADERF_SMB_MODE_OUTPUT);
if (status != 0) {
std::cout << "Failed to set SMB CLKOUT in MASTER: " << std::endl;
std::cout<<status<<std::endl;
return 1;
}
status = bladerf_set_smb_mode(dev_slave,BLADERF_SMB_MODE_INPUT);
if (status != 0) {
std::cout << "Failed to set SMB CLKIN in SLAVE: " << std::endl;
std::cout<<status<<std::endl;
return 1;
}
std::cout<<"cofiguring master"<<std::endl;
configure_bladerf_master(dev_master); //MASTER will transmit and receive
std::cout<<"cofiguring slave"<<std::endl;
configure_bladerf_slave(dev_slave); // SLAVE is receive only