0

I am connecting the bladeRF x115 to simulink with Matlab 2016a on a windows 10 PC.

I have followed the getting started guide on github: www.nuand.com/bladeRF-doc/guides/bladeRF_windows_installer

Then I made a simple code as in the picture shown below:

Code picture

I can simulate it only one time because when I tried to simulate it again I got the following error:

MATLAB System block 'testlinking/MATLAB System' error occurred when invoking 'setupImpl' method of 'bladeRF_Simulink'. The error was thrown from '

'C:\Program Files\bladeRF\matlab\bladeRF.m' at line 116
'C:\Program Files\bladeRF\matlab\bladeRF.m' at line 398
'C:\Program Files\bladeRF\matlab\bladeRF_Simulink.m' at line 364'.
Caused by:
libbladeRF error (-7) in bladeRF_open(): No devices available
Component:Simulink | Category:Block error

The reason for this error is because the led 2 is still blinking(device is in use). But it continues blinking even though I have closed matlab and simulink, and I don't know why?

Smittie
  • 1
  • 4

2 Answers2

0

Your device is available with bladeRF cli?

Check:

bladeRF> info

  Board:                    Nuand bladeRF 2.0 (bladerf2)
  Serial #:                 20f99xxxx
  VCTCXO DAC calibration:   0x1de9
  FPGA size:                301 KLE
  FPGA loaded:              yes
  Flash size:               128 Mbit
  USB bus:                  2
  USB address:              3
  USB speed:                SuperSpeed
  Backend:                  libusb
  Instance:                 0

If is available close the bladerf cli and MATLAB. Open only MATLAB and check again.

Sardar Usama
  • 19,536
  • 9
  • 36
  • 58
  • No it said : Description: inaccessible device (already in use?) But simulink has finished the simulation. This also remains when simulink is close and also when Matlab is close with it. It is solved when Matlab is completely closed down simulink included and the device is disconnected. – Smittie Apr 07 '20 at 07:08
  • I aslo get the warning: Warning: The following error was caught while executing 'bladeRF' class destructor: Error using calllib There is no enumerated value named 'BLADERF_CHANNEL_TX1'. Error in bladeRF_XCVR/get.timestamp (line 448) [status, ~, val] = calllib('libbladeRF', 'bladerf_get_timestamp', obj.bladerf.device, obj.module, val); Error in bladeRF_XCVR/stop (line 652) target_time = obj.bladerf.tx.timestamp + ... Error in bladeRF/delete (line 796) obj.tx.stop; Error in bladeRF_Simulink/releaseImpl (line 417) delete(obj.device); > In bladeRF_Simulink/releaseImpl (line 417) – Smittie Apr 07 '20 at 07:10
0

Have a look at: https://www.mathworks.com/matlabcentral/fileexchange/74591-communications-toolbox-support-package-for-bladerf-2-0?s_tid=mwa_osa_a „Communications Toolbox Support Package for BladeRF 2.0“

Download the zip-file and navigate matlab to the directory bladerf.

This worked for me. The simulink block releases the bladerf-board so the Simulinkmodel can be stopped and restarted without problems/errors.