0

I install last version of Redhawk (v1.9.0) and USRP_UHD from github repository (https://github.com/RedhawkSDR/USRP_UHD) but I have no idea how to build a USRP source/sink. Are already available these component in some repository? If not,someone can help me to build these source/sink??

Thanks in advance,

Carmine

Biga
  • 37
  • 6

2 Answers2

2

As John C said, in order to control the USRP_UHD Device, you must perform an allocation onto one of the tuners. In RedHawk 1.9, the steps to do this are as follows:

  1. Open the waveform in which you would like to perform the allocation and view the *.sad.xml file
  2. Below the connections section (after the </connections> tag) add the following:

    <usesdevicedependencies> <usesdevice id="DCE:@UUID@" type="usesUSRP"> <propertyref refid="DCE:cdc5ee18-7ceb-4ae6-bf4c-31f983179b4d" value="FRONTEND"/> <propertyref refid="DCE:0f99b2e4-9903-4631-9846-ff349d18ecfb" value="USRP"/> <structref refid="FRONTEND::tuner_allocation"> <simpleref refid="FRONTEND::tuner_allocation::tuner_type" value="@TUNER_TYPE@"/> <simpleref refid="FRONTEND::tuner_allocation::allocation_id" value="usrpAllocation"/> <simpleref refid="FRONTEND::tuner_allocation::center_frequency" value="99100000"/> <simpleref refid="FRONTEND::tuner_allocation::bandwidth" value="1000000"/> <simpleref refid="FRONTEND::tuner_allocation::sample_rate" value="1000000"/> <simpleref refid="FRONTEND::tuner_allocation::group_id" value=""/> <simpleref refid="FRONTEND::tuner_allocation::rf_flow_id" value=""/> </structref> </usesdevice> </usesdevicedependencies>

  3. In the connections section, (after the <connections> tag) add the following:

    <connectinterface id="usrpAllocation"> <usesport> <usesidentifier>dataShort_out</usesidentifier> <deviceusedbyapplication usesrefid="DCE:@SAME_UUID_AS_ABOVE@"/> </usesport> <providesport> <providesidentifier>@INPUT_PORT_NAME@</providesidentifier> <componentinstantiationref refid="@NAME_OF_COMPONENT_IN_WAVEFORM@"/> </providesport> </connectinterface>

  4. Save the waveform and install it in SDRROOT

In the second step, what you are actually doing is specifying that the waveform depends on a certain device. The dependency is uniquely identified by the usesdevice id. Here you should replace @UUID@ with the output of running the uuidgen command in a terminal. Next, you must identify which device the waveform depends on, which is accomplished with the FRONTEND and USRP property references. Finally, you have to specify the parameters of the allocation to the device so that it will set the tuner up for you. Replace @TUNER_TYPE@ with RX_DIGITIZER if you would like to receive data, or TX if you would like to transmit data. The allocation id can remain as it is, unless you intend to have multiple allocations onto the device. In this case, you must have a unique allocation id for each allocation. The rest of the parameters are fairly self explanatory, although it should be noted that the center_frequency parameter should be specified in Hz, and sample_rate paramter is the complex sample rate.

In the third step, what you are doing is connecting the device to a component in your waveform. The connectinterface id should match the allocation id from the second step, and the deviceusedbyapplication usesrefid should match the usesdevice id from the second step. The @INPUT_PORT_NAME@ should match the name of an input port on your component and the @NAME_OF_COMPONENT_IN_WAVEFORM@ should match the usagename of the component you want to connect to.

pwolfram
  • 271
  • 1
  • 5
  • Hi pwolfram, thanks a lot for the answer. I followed your suggestions but I found this error: `Failed to create application: uhd_frontend_test_106_132444641 Failed satisfy 'usesdevice' dependencies for Application: 'uhd_frontend_test_106_132444641' with usesdevice id: 'DCE:5ab41c4f-6c0b-4e5f-8269-788d005d4ca6' IDL:CF/ApplicationFactory/CreateApplicationError:1.0` Can you provide me a demo waveform/device/component to understand my errors??I think this could be the best solution. Thanks in advance – Biga Apr 16 '14 at 13:38
  • Before we do that, let's try launching your device manager with a higher debug level. In order to do this, you should launch your device manager like this: 'nodeBooter -d /path/to/your/DeviceManager.dcd.xml -debug 5'. This will change the threshold for logging so that you get more information from the USRP_UHD device while it is running. Then attempt the allocation again and you should be able to see the specific location of the failure. Let me know if you need help with that more specific error. – pwolfram Apr 16 '14 at 15:54
  • Hi pwolfram, I launched my device manager with threshold for logging equal to TRACE,using a waveform in which runs an empty components that it uses a port, called in_short_port to receive data from USRP and I got this result: `ERROR:PortEndpoint - Port supplier reports no port with name in_short_port ... ERROR:ApplicationFactory_impl - Unable to make connection usrpAllocation ERROR:ApplicationFactory_impl - Error in application creation; Unable to make connection usrpAllocation in waveform 'uhd_dummy_waveform_120_154848649_1'; error occurred near line:3398 in file:ApplicationFactory_impl.cpp;` – Biga Apr 30 '14 at 14:15
  • So you replaced the @NAME_OF_COMPONENT_IN_WAVEFORM@ with the component instantiation id of the component? Not the name of the actual component (e.g. DataConverter is the name of the component), but the instance name of the component as it appears in the waveform (e.g. DataConverter_1) – pwolfram Apr 30 '14 at 20:02
  • We connected USRP `dataShort_out` port directly to existing component port and it didn't fail. Probably my empty component was the mistake. Now I'm trying to transmit or receive something but I found a new error in audio-components downloaded from Axios-engineering repository and I'm going to open another post. Many thanks again – Biga May 14 '14 at 13:34
  • Can I ask you somthing about port connection? We inserted your code in a waveform xml file and connect `dataShort_out` of USRP to DataConverter input port, such as `DataShort` but monitoring this port we can find nothing althought the allocation seems work fine. from monitor port panel appears: Call/s = about 30; MB/s = 0; Element/s = 0; Average queue dept = 2% Time=0 ; – Biga May 21 '14 at 14:08
  • That's odd, you would think the average queue depth would be 0% if the the number of Elements/s is 0. If the Device launches successfully and the allocation works then I can't think of a reason why it wouldn't be pushing data. Sounds like another standalone question – pwolfram May 21 '14 at 20:25
0

The USRP device is a Front End Interfaces compliant device so in order to get data to flow out of the dataShort_out port a tuner must be allocated. When you perform this allocation you will provide an allocation ID that is unique. If the allocation request returns successful, you can then use this allocation ID as the connection ID to the dataShort_out port. For more information on Front End Interfaces checkout the documentation here

John C
  • 1
  • I read the documentation that you are suggested but I'm not manage to build a front end. Can you describe me step-by-step how to build this kind of device?? First of all,is it a device or a component?? Until now I worked on OSSIE where there was the USRP Commander and I would like to build something like that. Thanks in advance – Biga Mar 28 '14 at 10:13