Page 8 of 9

Re: SDRPLAY linux commandline tools?

Posted: Sat Jul 16, 2016 6:28 am
by sdrplay
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

Re: SDRPLAY linux commandline tools?

Posted: Sat Jul 16, 2016 7:06 am
by sdrplay
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

Re: SDRPLAY linux commandline tools?

Posted: Sat Jul 16, 2016 9:32 am
by 0815
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

Re: SDRPLAY linux commandline tools?

Posted: Mon Jul 18, 2016 1:47 pm
by sdrplay
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

Re: SDRPLAY linux commandline tools?

Posted: Tue Jul 19, 2016 6:01 pm
by 0815
hi,

works now thanks a lot!!!

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


thanks

regards

Re: SDRPLAY linux commandline tools?

Posted: Tue Jul 19, 2016 7:52 pm
by sdrplay
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

Re: SDRPLAY linux commandline tools?

Posted: Wed Jul 20, 2016 6:31 pm
by 0815
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(.............................................)

Re: SDRPLAY linux commandline tools?

Posted: Wed Jul 20, 2016 7:22 pm
by sdrplay
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

Re: SDRPLAY linux commandline tools?

Posted: Sat Jul 23, 2016 8:26 pm
by 0815
well yep i did look at page 16 and no i cant because of the callback function which i do not get,,,,,

Re: SDRPLAY linux commandline tools?

Posted: Mon Jul 25, 2016 5:40 pm
by 0815
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