Function sdrinfo
returns an empty cell
array
The radio may not be connected or configured correctly. Follow these steps to reconfigure the port and radio:
Connect the radio
Install the USB driver.
On the MATLAB® Home tab, in the Environment section, click Add-Ons > Manage Add-Ons.
The Hardware Setup dialog will open at the Connect Hardware step. Follow the on screen setup steps to install drivers and test the radio connection. After successful test of the radio connection, close the setup dialog.
At the MATLAB command prompt, run sdrsetup
.
Function sdrinfo
does not return all radio
settings for the specified device.
sdrinfo
returns all valid radio fields
that are applicable, as long as the System object™ or block is not open (unlocked). If the block or System object is currently running, sdrinfo
returns only the top three fields: RadioName
,
RadioAddress
, and RadioIsOpen
.
If this is the case, you can do one of the following actions:
Release the System object
Stop the model simulation
Close the block mask
In the Zadig software window, the USB driver is reported as RTL2838UHIDIR. When you hover your mouse over vendor ID field (“USB ID” row first text field), it reports the vendor as “VM”.
This issue can happen sometimes when the VMPlayer is running on Windows®. Turn off the VMplayer and try again. You can start the VMPlayer after your computer recognizes the RTL-SDR radio correctly.
The RTL-SDR radio is attached to your computer but when you run sdrinfo
, it returns empty or the info method of an RTL-SDR System object returns "Cannot find radio".
Unplug the radio and then plug the radio back in again. Be sure to use the same USB slot.
Simulink hangs if the RTL radio is removed while running a simulation.
You must terminate the MATLAB session and restart.
In the future, do not remove an RTL radio while it is in use.
Sometimes the digital TV (DVB) driver takes over. If this is the case, you may see this message in the command shell:
Kernel driver is active, or device is claimed by second instance of librtlsdr. In the first case, please either detach or blacklist the kernel module (dvb_usb_rtl28xxu), or enable automatic detaching at compile time. usb_claim_interface error -6
Unload or blacklist the kernel module. The listed steps are for manual unloading and blacklisting the kernel module.
To unload the kernel module:
sudo rmmod dvb_usb_rtl28xxu rtl2832
This is a temporary solution, as the system will load the driver again the next time you remove and then replace the USB device.
To blacklist the kernel module, create a file in
/etc/modprobe.d
, with a .conf
extension (for
example, "no-rtl.conf
") and include this content:
blacklist dvb_usb_rtl28xxu blacklist rtl2832 blacklist rtl2830
The exact method depends on your Linux® distribution. The example shown is for Arch Linux.
This solution is more convenient if you never plan to use the device for TV reception (though you can always choose to remove the blacklist in the future). If you choose this method, you may have to unload the driver first if it is already in use.
To remove the blacklist file:
Delete the blacklisting file: sudo rm -f
/etc/modprobe.d/no-rtl.conf
.
Unplug and plug in the radio.
Note
You can also unload and blacklist the kernel module by using RTL-SDR support package installer.
On the MATLAB
Home tab, in the Environment section, click Add-Ons > Manage Add-Ons. Select the support package then click the Setup button,
().
This error occurs when another package manager, such as Synaptic, is in use. The message you see might be similar to the following:
Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
To install the support package, close all other package manager software running on your system.
Xcode software and Command Line Tools are required for setup and installation on Mac OS X systems. If the installer cannot find the Xcode Command Line Tools, you will see the "Xcode Command Line Tools not Found" warning.
Follow these steps to install the Xcode software and Command Line Tools.
Click Cancel to exit the installation process.
Install the Xcode software.
Install the Xcode Command Line Tools.
Restart the hardware setup.
On the MATLAB
Home tab, in the Environment section, click Add-Ons > Manage Add-Ons. Select the support package then click the Setup button,
().
Note
If you install the Command Line Tools and you still get the "Xcode Command Line Tools not Found" warning, and you have more than one version of Xcode installed, you need to make sure that you select the path to the Xcode version you intend to use with the support package when you install the Command Line Tools.
In a terminal window, enter the following:
xcode-select --print-path
This command displays the path to the Xcode version in use.
To change the path to the Xcode version you want to use, enter the following:
xcode-select --switch xcode_path
where xcode_path
is the path to the Xcode version you
want to use.
When you install the Command Line Tools, make sure that you start the version of Xcode that you specified in this step.
Install Command Line Tools (OS X version 10.8 and earlier)
When you install the Command Line Tools, first make sure that you start the version of Xcode that you specified in the previous step.
Start Xcode.
Select Xcode > Preferences.
Select Downloads tab.
Click install next to Command Line Tools.
Restart the installer.
On the MATLAB
Home tab, in the Environment section,
click Add-Ons > Manage Add-Ons. Select the support package then click the Setup button,
().
After installation or when calling the sdrinfo
function, no radios can be found. This may be because some USB 3
controllers are not compatible with RTL-SDR radio.
Try a different port. You hardware configuration may require you to plug the RTL-SDR device into a USB 2 port.
When attempting to use a MEX-file you created, an error message indicates you are
missing the libmwsdrrdriver.dll
library. For example, you get a message
similar to this one when attempting to run
foo
:
>> foo
Invalid MEX-file 'foo.mex': Missing dependent shared libraries: 'libmwsdrrdriver.dll' required by 'foo.mex'.
At the MATLAB command prompt run:
sdrsetup
Found and setup Communications Toolbox™ Support Package for RTL-SDR Radio.
For more information, see sdrsetup
.