This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Common Problems and Fixes

sdrinfo returns empty message after calling step

Problem

Function sdrinfo returns an empty cell array

Possible Solution

The radio may not be connected or configured correctly. Follow these steps to reconfigure the port and radio:

  1. Connect the radio

  2. Install the USB driver.

    On the MATLAB® Home tab, in the Environment section, click Add-Ons > Manage Add-Ons.

  3. 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.

  4. At the MATLAB command prompt, run sdrsetup.

sdrinfo returns only three radio settings

Problem

Function sdrinfo does not return all radio settings for the specified device.

Possible Solution

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

sdrinfo returns radio ID as “vm”

Problem

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”.

Possible Solution

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.

Cannot find radio

Problem

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".

Possible Solution

Unplug the radio and then plug the radio back in again. Be sure to use the same USB slot.

Simulink hangs when radio is removed during simulation

Problem

Simulink hangs if the RTL radio is removed while running a simulation.

Possible Solution

You must terminate the MATLAB session and restart.

In the future, do not remove an RTL radio while it is in use.

Kernel driver is active, or device is claimed by second instance of librtlsdr

Problem

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

Possible Solution

Unload or blacklist 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.

Package Manager in Use

Problem

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? 

Possible Solution

To install the support package, close all other package manager software running on your system.

Setup Warns "Xcode not Found" or "Xcode Command Line Tools not Found"

Problem

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.

Possible Solution

Follow these steps to install the Xcode software and Command Line Tools.

  1. Click Cancel to exit the installation process.

  2. Install the Xcode software.

     Install Xcode Software

  3. Install the Xcode Command Line Tools.

     Install Command Line Tools (OS X version 10.8 and earlier)

  4. 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.

  1. In a terminal window, enter the following:

    xcode-select --print-path

    This command displays the path to the Xcode version in use.

  2. 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.

  3. 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.

    1. Start Xcode.

    2. Select Xcode > Preferences.

    3. Select Downloads tab.

    4. Click install next to Command Line Tools.

  4. 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, ().

No Radios Found

Problem

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.

Possible Solution

Try a different port. You hardware configuration may require you to plug the RTL-SDR device into a USB 2 port.

Invalid MEX-file error

Problem

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'.

Possible Solution

At the MATLAB command prompt run:

sdrsetup
Found and setup Communications Toolbox™ Support Package for RTL-SDR Radio.

For more information, see sdrsetup.