Quantcast
Channel: EngineerZone: Message List
Viewing all articles
Browse latest Browse all 28044

Re: How to set the filter, gain and read the RSSI

$
0
0

Hi,

 

The rssi and hardware gain are attributes of the phy driver. E.g. see the following example code how to read the rssi.

#include #include
int main(void)
{        struct iio_context *ctx = iio_create_local_context();        struct iio_device *dev = iio_context_find_device(ctx, "ad9361-phy");        struct iio_channel *v0;        char buf[256];        int ret;        v0 = iio_device_find_channel(dev, "voltage0", false);        ret = iio_channel_attr_read(v0, "rssi", buf, sizeof(buf));        if (ret < 0) {                fprintf(stderr, "Failed to read rssi: %d\n", ret);                exit(1);        }        printf("rssi: %s\n", buf);        return 0;
}

 

The AD9361 has a built-in FIR filter that can be loaded with custom coefficients. Which means you can implement your own low-pass filter. The Filter Design Wizard allows you to create your custom filters.

 

- Lars


Viewing all articles
Browse latest Browse all 28044

Trending Articles