Page 1 of 1

MATLAB & Windows Problems After Upgrading to Latest release (Aug 2018)

Posted: Sun Sep 02, 2018 1:03 pm
by mando238
- Still using bladeRFx115
Grabbed and installed bladeRF-win-installer-2018.08-rc1 as an upgrade to the modified 2017 installer I'd been using from this thread: http://nuand.com/forums/viewtopic.php?p=7856#p7856, started up MATLAB just to do the simple tests and I now receive the following errors:

If try to run the demo script (bladeRF rx gui) from the documentation I now receive:
Error using bladeRF.check_status (line 116)
libbladeRF error (-3) in bladeRF_open(): Invalid operation or parameter

Error in bladeRF (line 398)
bladeRF.check_status('bladeRF_open', status);

Alternatively, If I do something very simple such as:
device = bladeRF();
device.rx.frequency = 2.4e9;
device.tx.frequency = 2.4e9;

Then the output is:
Cannot enable AGC. AGC DC LUT file is missing, run `cal table agc rx' in bladeRF-cli.
Error using bladeRF.check_status (line 116)
libbladeRF error (-1) in bladerf_set_frequency(): An unexpected error occurred

Error in bladeRF_XCVR/set.frequency (line 114)
bladeRF.check_status('bladerf_set_frequency', status);

Error in bladerfsimpletest (line 2)
device.rx.frequency = 2.4e9;


On the subject of "AGC DC LUT" missing - I'm guessing this is part of the new release to support the bladeRF 2.0? Nonetheless if I try to run the command it will error out some point each time with:
Error: An unexpected error occurred

None of these occurred on the old installer (except for the occasional set_frequency error that would normally work itself out if one tried the command again). Any assistance is appreciated...
-------------------------
BladeRF Versions:
bladeRF-cli version: 1.6.0
libbladeRF version: 2.0.0

Firmware version: 2.2.0-git-3d38fac2
FPGA version: 0.7.3

MATLAB R 2018a
Win 10 64bit

Re: MATLAB & Windows Problems After Upgrading to Latest release (Aug 2018)

Posted: Thu Sep 06, 2018 9:16 am
by rtucker
G'day,

This was a bug in 2018.08-rc1, and is fixed in the final release. The installer for 2018.08 is up at: https://www.nuand.com/windows_installer ... 018.08.exe

Give that a try and it should work out better!

Re: MATLAB & Windows Problems After Upgrading to Latest release (Aug 2018)

Posted: Sun Sep 16, 2018 3:05 pm
by mando238
Thanks for your reply.
After upgrading to the mentioned 08 installer I can now get through the basic set frequency test without errors though
Cannot enable AGC. AGC DC LUT file is missing, run `cal table agc rx' in bladeRF-cli.
still appears and running that command in baderf-cli still errors out as indicated in the first post.

However, if I roll over to simulink with the new block I receive:
MATLAB System block 'simpleCWradar_Averaging_FreqHopping1/MATLAB System' error occurred when invoking 'processTunedPropertiesImpl' method of 'bladeRF_Simulink'. The error was thrown from '
'C:\Program Files\bladeRF\matlab\bladeRF_Simulink.m' at line 491'.
Argument to isChangedProperty (tx_vga1) must be a public, tunable property.


So it looks like were at least no longer having issues with libbladeRF proper, just the MATLAB interface. I'll try to poke around if I get a chance.

Re: MATLAB & Windows Problems After Upgrading to Latest release (Aug 2018)

Posted: Mon Sep 17, 2018 11:00 am
by bglod
If you figure it out, please feel free to send us a pull request!

Re: MATLAB & Windows Problems After Upgrading to Latest release (Aug 2018)

Posted: Mon Sep 17, 2018 11:09 am
by rtucker
So, I can reproduce the 'cal table agc rx' issue here, with a x115 and the official 0.7.3 FPGA image. I'm suspecting the failure of 'cal table agc rx' is a very reproducible symptom of the actual underlying problem.

Could you download the 0.8.0 FPGA image (https://www.nuand.com/fpga/v0.8.0/hostedx115.rbf, see also https://www.nuand.com/fpga_images/) and try 'load fpga hostedx115.rbf' before doing the 'cal table agc rx'?

At initialization, you will get a message like the following:

Code: Select all

[INFO @ host/libraries/libbladeRF/src/helpers/version.c:106] FPGA version (v0.8.0) is newer than entries in libbladeRF's compatibility table. Please update libbladeRF if problems arise.
... but that's okay.

I've opened an issue on this, and will investigate further... https://github.com/Nuand/bladeRF/issues/640

(Solved) Re: MATLAB & Windows Problems After Upgrading to Latest release (Aug 2018)

Posted: Sun Sep 23, 2018 4:49 pm
by mando238
rtucker coming to the rescue as always.

With the 0.8.0 image I can indeed run the cal table agc rx command successfully and get rid of the corresponding error. However the main error from before is still received.

---UPDATE: SOLUTION----
So if one comments out the the tx_vga blocks below and add this instead it fixes the error below that was still being encountered:
%This Modified
if isChangedProperty(obj, 'tx_gain') && obj.tx_gain ~= obj.curr_tx_gain
obj.device.tx.gain = obj.tx_gain;
obj.curr_tx_gain = obj.device.tx.gain;
%disp('Updated TX VGA1 gain');
end

So it looks like the legacy properties were still being referenced in balderf_Simulink.m on the tx side. I can make a pull request, but wasn't sure if that's desired for such a small fix. Le me know if it is.
---End Update----



MATLAB System block 'simpleCWradar_Averaging_FreqHopping1/MATLAB System' error occurred when invoking 'processTunedPropertiesImpl' method of 'bladeRF_Simulink'. The error was thrown from '
'C:\Program Files\bladeRF\matlab\bladeRF_Simulink.m' at line 491'.
Argument to isChangedProperty (tx_vga1) must be a public, tunable property.

On that issue - a quick look through the balderf_Simulink.m shows "tx_gain" is set as a public tunable property but "tx_vga1" is not defined (I think).
Are these 2 sections still correct - or should one be "tx_gain" with the new release that does away with adjusting vga1 and vga2 separately in the MATLAB system block?

if isChangedProperty(obj, 'tx_vga1') && obj.tx_vga1 ~= obj.curr_tx_vga1
obj.device.tx.vga1 = obj.tx_vga1;
obj.curr_tx_vga1 = obj.device.tx.vga1;
%disp('Updated TX VGA1 gain');
end

if isChangedProperty(obj, 'tx_vga2') && obj.tx_vga2 ~= obj.curr_tx_vga2
obj.device.tx.vga2 = obj.tx_vga2;
obj.curr_tx_vga2 = obj.device.tx.vga2;
%disp('Updated TX VGA2 gain');
end

Furthermore in the rx section only exists rather than the separate ones.
if isChangedProperty(obj, 'rx_gain') && obj.rx_gain ~= obj.curr_rx_gain
obj.device.rx.gain = obj.rx_gain;
%obj.rx_gain = obj.device.rx.gain;

obj.curr_rx_gain = obj.device.rx.gain;
%disp('Updated RX gain');
end

I'll modify these today or tomorrow and see what happens. -- And I did, see above solution...--

Re: MATLAB & Windows Problems After Upgrading to Latest release (Aug 2018)

Posted: Mon Sep 24, 2018 12:49 pm
by rtucker
Yup, this would probably indeed be a bug :)

I've opened an issue in the tracker: https://github.com/Nuand/bladeRF/issues/654 ... further updates will be posted there.

Thanks!! -rt