-1

I imported this github c++ project: https://github.com/RedhawkSDR/USRP_UHD into redhawk, hoping to run it with a USRP N210.

Redhawk only allows me to run the project as a component or C++ Application, so I tried running it as a component.

Here is the exact error I get when I try to run as a component: An internal error occurred during: "Launching USRP_UHD". Could not initialize class gov.redhawk.ide.debug.internal.ScaDebugInstance

How can I fix this?

ThatOneGuy
  • 15
  • 6

4 Answers4

2

The USRP_UHD device is a Redhawk Device that interfaces with the N210. In Redhawk, Devices are deployed and managed by an instance of the Device Manager, which is referred to as a Node.

To run the USRP_UHD Redhawk Device in a Domain:

  1. Install the USRP_UHD Device to the Target SDR. This can be accomplished by clicking and dragging the top level folder of the USRP_UHD project from the Project Explorer view to the Target SDR in the SCA Explorer view.

  2. Create a new SCA Node Project using the Redhawk IDE that contains a USRP_UHD Device instance. The first wizard page will prompt you for a Node name (project name) and a Domain name. You can override the domain name later at run time if the name you choose now ends up being different from your running Domain. After clicking Next, the second and final wizard page allows you to choose from a list of Devices that are installed in your Target SDR. Select the USRP_UHD and click Finish. The Overview tab of the SCA Node Editor will appear after clicking Finish.

  3. Configure the Node. Within the SCA Node Editor, you can edit the properties of the USRP_UHD Device using either the Devices tab or the Diagram tab. Generally, you will want to at least configure the IP address of the N210 using the USRP_ip_address property of the USRP_UHD Device so that the USRP_UHD Device will connect to the USRP hardware upon deployment.

  4. Install the Node to the Target SDR. Again, this can be accomplished by clicking and dragging the top level folder of the Node from the Project Explorer view to the Target SDR in the SCA Explorer view.

  5. Launch a Domain and the Node (Device Manager) that you created containing the USRP_UHD Device. This can be done by right-clicking on the Target SDR in the SCA Explorer view and selecting Launch…. In the dialog box that pops up, you can choose a Domain Name (this doesn’t have to be the same as the Domain Name specified in the Node) and a debug level for the Domain Manager. To also launch a Node, choose the Node that you created from the list of Device Managers and set the debug level appropriately for the Device Manager. Select OK to launch both.

  6. Inspect the Domain that you launched by expanding the Domain within the SCA Explorer view. You should see the Node under the Device Managers folder, and after expanding the Node you should see the USRP_UHD Device instance (probably named USRP_UHD_1).

If this doesn't fix the issue, please provide some more information about your environment (specifically, what version of the Redhawk framework and IDE, what version of Java is reported by "java -version", what OS and version, what branch/release of USRP_UHD, what version of UHD software) and the steps you are taking to run the USRP_UHD as a component. In Redhawk version 1.9, I was able to choose Run as…->Local Component Program and it successfully launched the USRP_UHD Device in the Sandbox without the error you have experienced. You may also wish to try with both Redhawk version 1.8 and 1.9 (be sure to use the latest release of each) to see if the issue appears in both versions.

jkb
  • 310
  • 1
  • 9
  • Thank you for the detailed response. I tried all your steps but I am still unable to run it as a component. I'm using Redhawk 1.9, CentOS 6.5, USRP N210, and I used the latest release the of the UHD software. – ThatOneGuy Jul 10 '14 at 19:45
  • The error I get is: "Error while waiting for component to start." I am able to ping the IP of the USRP, so I know it is not the USRP's problem. Uhd_find_devices does not detect the USRP, however, but I manually inputted the IP of the USRP so that shouldn't matter. Do you have any suggestions? – ThatOneGuy Jul 10 '14 at 20:07
  • What version of Java? – jkb Jul 11 '14 at 13:25
  • Java 7 update 55 (version 1.7.0_55) introduced an issue/bug with Eclipse (including the Redhawk IDE, since it’s Eclipse-based). See [this](http://stackoverflow.com/questions/24619633/redhawksdr-usrp-n210-cannot-run-usrp-uhd-component/24806652#24806652) answer. – jkb Jul 17 '14 at 14:48
  • I fixed the problem by using your instructions as well as a clean install of CentOS 64 bit. Thanks for your help! – ThatOneGuy Jul 22 '14 at 16:06
0

Is the version of UHD that you are using version 3.7.1? It should be reported by any of the uhd_* commands, such as uhd_find_devices.

uhd_find_devices should find your N210 device if you can ping it. I have seen the X310 not respond to uhd_find_devices, but it does respond once the IP address is specified. Try specifying the IP address of the N210 as shown below:

uhd_find_devices --args="addr=192.168.10.2"

Replace 192.168.10.2 (the default IP address for the N210) with the IP address of your N210, of course. If your N210 is still not found, try unplugging the power source to the N210 and then plugging it back in to force a reboot. Again, I’ve seen this help with the X310 when it wouldn’t respond to the uhd_find_devices command even with the IP address specified.

Then also try to probe the N210 using the following command:

uhd_usrp_probe --args="addr=192.168.10.2"

I believe that if the N210 has a firmware version that is incompatible with the version of UHD you have, the N210 will still be found and the probe command will inform you that the firmware must be updated.

If neither command can communicate with the N210, I have to think the issue is between the UHD software and the N210 instead of being a Redhawk-related issue. To load the firmware, see the link below. Also, there are instructions for setting up networking and troubleshooting communication problems at the same link. If you haven’t done so already, take a quick look and see if anything there helps. Let me know what you find.

Load the Images onto the On-board Flash (USRP-N Series only)

jkb
  • 310
  • 1
  • 9
  • I think there is a problem with UHD itself because uhd_find_devices does not detect the USRP either. I know I installed UHD right because it runs, but the command does not detect the USRP. I installed UHD from source on CentOS 6.5 32 bit. Should I try 64 bit? – ThatOneGuy Jul 14 '14 at 13:30
  • After restarting the VM, I specified the args and it detected the USRP. – ThatOneGuy Jul 15 '14 at 18:03
  • I didn’t realize you were using a VM. I have heard that if using a VM with the UHD software, the VM must have at least one USB interface for the UHD to work properly even if your device is not connected via USB. I have not experienced this myself, however, since I do not use VMs with the USRP, so I’m not sure exactly what issues are caused. Does your VM have at least one USB interface? Good news that you can detect the USRP now. Is there any update to your progress with the original issue? Does the uhd_usrp_probe command print out the configuration of the USRP without warnings/errors? – jkb Jul 17 '14 at 13:09
  • Yes the uhd_usrp_probe command works when I specify the ip address. I also need to specify the ip address of the usrp when I'm trying to run uhd_find_devices. Not much update with the original issue. I did a clean install of redhawk and uhd on a 64 bit machine, and I will post progress. Thank you for your help! By the way, the uhd version is 3.007.001 – ThatOneGuy Jul 17 '14 at 18:37
0

Did you follow the networking setup steps listed here: USRP N210 Networking Setup?

As described in the link you need to make sure your host PC has an IP address on the same subnet as the USRP. You can use ifconfig to set the static IP address for a specific interface ex. "eth0"

wdjohns
  • 28
  • 5
  • Yes the USRP's network is configured properly, and I am on the same subnet as the USRP because I can ping it. – ThatOneGuy Jul 15 '14 at 18:04
0

Java 7 update 55 (version 1.7.0_55) introduced an issue/bug with Eclipse (including the Redhawk IDE, since it’s Eclipse-based) that is described here. The change made in Java 7 update 55 that seems to have caused various issues with Eclipse/JacORB has been reverted here and will be available in Java 8 update 22. There is a beta release available here, but being a beta release, it may have other issues and as such may not be worth trying. Instead, you can do what I did and patch the Redhawk IDE as a workaround to the bug in Java 7 update 55.

  1. Set environment variable IDE_HOME to refer to the same directory as the eclipse executable (not the executable itself, though).

    export IDE_HOME=/usr/local/redhawk/ide/R.1.9 # replace with your path
    
  2. Append the following line to the $IDE_HOME/eclipse.ini file. If a line already specifies the endorsed dirs, replace it with this line.

    -Djava.endorsed.dirs=$IDE_HOME/jacorb/lib
    
  3. Create the JacORB lib directory at the path specified in the previous step.

    mkdir -p $IDE_HOME/jacorb/lib
    
  4. Find the exact name of the JacORB directory located within $IDE_HOME/plugins, which will begin with “org.jacorb.system”, and assign it to an environment variable named JACORB_DIR:

    export JACORB_DIR=`find $IDE_HOME/plugins/ -maxdepth 1 -name org.jacorb.system*`
    
  5. Copy the contents of the JacORB jars directory into the $IDE_HOME/jacorb/lib directory:

    cp -R $JACORB_DIR/jars/* $IDE_HOME/jacorb/lib/.
    

This should resolve any potential issues resulting from the Eclipse/JacORB bug. Does this also fix the remaining issues you’re having with the USRP?

Community
  • 1
  • 1
jkb
  • 310
  • 1
  • 9