SDRPLAY linux commandline tools?

Add useful snippets of code or links to entire SDR projects.
sdrplay
Posts: 978
Joined: Wed Jan 07, 2015 7:58 am

Re: SDRPLAY linux commandline tools?

Post by sdrplay » Sat Jul 16, 2016 6:28 am

Hi,

That's very interesting - I'm wondering if it's related to the ubuntu 16.04 issues. I'm not at my desk today but will look at this when I get there tomorrow.

Best regards,

SDRplay Support
Last edited by sdrplay on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

sdrplay
Posts: 978
Joined: Wed Jan 07, 2015 7:58 am

Re: SDRPLAY linux commandline tools?

Post by sdrplay » Sat Jul 16, 2016 7:06 am

I managed to do a quick rebuild (are you using 32bit as I saw a mistake in the 32bit build)

1.95.2 released - http://www.sdrplay.com/linux.html

Let us know how you get on.

Best regards,

SDRplay Support
Last edited by sdrplay on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

0815
Posts: 45
Joined: Sat Jan 30, 2016 3:07 pm

Re: SDRPLAY linux commandline tools?

Post by 0815 » Sat Jul 16, 2016 9:32 am

hi,

thx,but no change ....

still getting:

./rawIQ: symbol lookup error: /usr/local/lib/libmirsdrapi-rsp.so: undefined symbol: pow

try to buildfromsource getting this:

cc -g -o rawIQ rawIQ.o -lpthread -lm -lmirsdrapi-rsp
//usr/local/lib/libmirsdrapi-rsp.so: Nicht definierter Verweis auf `libusb_open'
//usr/local/lib/libmirsdrapi-rsp.so: Nicht definierter Verweis auf `libusb_set_interface_alt_setting'
//usr/local/lib/libmirsdrapi-rsp.so: Nicht definierter Verweis auf `libusb_release_interface'
//usr/local/lib/libmirsdrapi-rsp.so: Nicht definierter Verweis auf `libusb_set_debug'
//usr/local/lib/libmirsdrapi-rsp.so: Nicht definierter Verweis auf `libusb_detach_kernel_driver'
//usr/local/lib/libmirsdrapi-rsp.so: Nicht definierter Verweis auf `libusb_close'
//usr/local/lib/libmirsdrapi-rsp.so: Nicht definierter Verweis auf `libusb_get_configuration'
//usr/local/lib/libmirsdrapi-rsp.so: Nicht definierter Verweis auf `libusb_attach_kernel_driver'
//usr/local/lib/libmirsdrapi-rsp.so: Nicht definierter Verweis auf `libusb_get_device_list'
//usr/local/lib/libmirsdrapi-rsp.so: Nicht definierter Verweis auf `libusb_kernel_driver_active'
//usr/local/lib/libmirsdrapi-rsp.so: Nicht definierter Verweis auf `libusb_alloc_transfer'
//usr/local/lib/libmirsdrapi-rsp.so: Nicht definierter Verweis auf `libusb_bulk_transfer'
//usr/local/lib/libmirsdrapi-rsp.so: Nicht definierter Verweis auf `libusb_set_configuration'
//usr/local/lib/libmirsdrapi-rsp.so: Nicht definierter Verweis auf `libusb_handle_events_timeout'
//usr/local/lib/libmirsdrapi-rsp.so: Nicht definierter Verweis auf `libusb_exit'
//usr/local/lib/libmirsdrapi-rsp.so: Nicht definierter Verweis auf `libusb_free_transfer'
//usr/local/lib/libmirsdrapi-rsp.so: Nicht definierter Verweis auf `libusb_init'
//usr/local/lib/libmirsdrapi-rsp.so: Nicht definierter Verweis auf `libusb_get_device_descriptor'
//usr/local/lib/libmirsdrapi-rsp.so: Nicht definierter Verweis auf `libusb_free_device_list'
//usr/local/lib/libmirsdrapi-rsp.so: Nicht definierter Verweis auf `libusb_claim_interface'
//usr/local/lib/libmirsdrapi-rsp.so: Nicht definierter Verweis auf `pow'
//usr/local/lib/libmirsdrapi-rsp.so: Nicht definierter Verweis auf `log10'
//usr/local/lib/libmirsdrapi-rsp.so: Nicht definierter Verweis auf `libusb_control_transfer'
//usr/local/lib/libmirsdrapi-rsp.so: Nicht definierter Verweis auf `libusb_submit_transfer'
collect2: error: ld returned 1 exit status
Last edited by 0815 on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

sdrplay
Posts: 978
Joined: Wed Jan 07, 2015 7:58 am

Re: SDRPLAY linux commandline tools?

Post by sdrplay » Mon Jul 18, 2016 1:47 pm

ok, been looking at this today..

Please try 1.95.3 that has just been released (http://www.sdrplay.com/linux.html)

Best regards,

SDRplay Support
Last edited by sdrplay on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

0815
Posts: 45
Joined: Sat Jan 30, 2016 3:07 pm

Re: SDRPLAY linux commandline tools?

Post by 0815 » Tue Jul 19, 2016 6:01 pm

hi,

works now thanks a lot!!!

maybe you can drop a few lines of code how to use the mir_sdr_AgcControl.....


thanks

regards
Last edited by 0815 on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

sdrplay
Posts: 978
Joined: Wed Jan 07, 2015 7:58 am

Re: SDRPLAY linux commandline tools?

Post by sdrplay » Tue Jul 19, 2016 7:52 pm

Sure,

Once you have the stream started using mir_sdr_StreamInit you can then make a call to mir_sdr_AgcControl to either enable or disable AGC...

mir_sdr_AgcControl(unsigned int enable, int setPoint_dBfs, int knee_dBfs, unsigned int decay_ms, unsigned int hang_ms, int syncUpdate, int lnaEnable)

currently only the enable, setPoint_dBfs, syncUpdate and lnaEnable parameters are supported, the rest should be 0

an example to enable the AGC, with a -30 setpoint and the LNA enabled would be...

mir_sdr_AgcControl(1, -30, 0, 0, 0, 0, 1);

If the AGC makes any gain updates it will trigger a callback to the gain callback specified in the mir_sdr_StreamInit function call. You can then use that to display the updated gain, etc.

More information can be found about this and other functions in the API specification: http://www.sdrplay.com/docs/Mirics_SDR_ ... cation.pdf

Best regards,

SDRplay Support
Last edited by sdrplay on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

0815
Posts: 45
Joined: Sat Jan 30, 2016 3:07 pm

Re: SDRPLAY linux commandline tools?

Post by 0815 » Wed Jul 20, 2016 6:31 pm

ok thanks,

for you maybe easy cheesy - for me days to go

please give me a short conversion on that i just dont get it...

r = mir_sdr_Init((78-gain), (samp_rate/1e6), ((frequency+ppm_error)/1e6),mir_sdr_BW_1_536, mir_sdr_IF_Zero, &samplesPerPacket );

and convert it to:
mir_sdr_AgcControl(1, -30, 0, 0, 0, 0, 1);
r= mir_sdr_ErrT mir_sdr_StreamInit(.............................................)
Last edited by 0815 on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

sdrplay
Posts: 978
Joined: Wed Jan 07, 2015 7:58 am

Re: SDRPLAY linux commandline tools?

Post by sdrplay » Wed Jul 20, 2016 7:22 pm

Have a look at page 16 of the API specification that I linked above. It gives you an pseudo code example to look through and you can see how all of these functions are called. You should be able to map your mir_sdr_Init call to the new mir_sdr_StreamInit function by looking at that.

Best regards,

SDRplay Support
Last edited by sdrplay on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

0815
Posts: 45
Joined: Sat Jan 30, 2016 3:07 pm

Re: SDRPLAY linux commandline tools?

Post by 0815 » Sat Jul 23, 2016 8:26 pm

well yep i did look at page 16 and no i cant because of the callback function which i do not get,,,,,
Last edited by 0815 on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

0815
Posts: 45
Joined: Sat Jan 30, 2016 3:07 pm

Re: SDRPLAY linux commandline tools?

Post by 0815 » Mon Jul 25, 2016 5:40 pm

well using https://github.com/rxseger/rx_tools at the moment which is a good workaround at the moment, maybe the devs port their code samples to the new API as the other functions will be deprechiated and include some samples for AGC which i am requesting since a long time....

thanks in advance
Last edited by 0815 on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

Post Reply