set_smb_mode() throws UNSUPPORTED error

Discussions related to schematic capture, PCB layout, signal integrity, and RF development
Post Reply
sandeep
Posts: 4
Joined: Mon Jul 08, 2024 4:41 am

set_smb_mode() throws UNSUPPORTED error

Post by sandeep »

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
    
claudedaniel
Posts: 2
Joined: Thu Sep 12, 2024 12:39 am

Re: set_smb_mode() throws UNSUPPORTED error

Post by claudedaniel »

I think you should verify that the bladerf_set_smb_mode() function is supported by the BladeRF devices you are using. Refer to the BladeRF API documentation or specifications to confirm the compatibility of this function with your device models.
Post Reply