Hi,

I was having the same problem, but I figured it out. Shut everything down,
then turn on the SDR first and the computer second. Next type sudo
/usr/local/bin/niusrprio_pcie *stop*. Do not type start before using the
stop command. If you type start then later type stop, it still won't work.
I'm guessing that the computer attempts to connect to the device over PCIe
upon start up, but doesn't do so correctly, so you have to stop that
process before doing anything else. Don't forget use the stop command when
you are done with the USRP, before turning your computer off. Below are the
commands, and after that is an instruction set for getting everything
working from scratch.

Here are the commands for what works:
radioglaciology@radioglaciology-Precision-7730:~$ *sudo
/usr/local/bin/niusrprio_pcie stop*
[sudo] password for radioglaciology:
Stopping: niusrpriorpc
Unloading: niusrpriok NiRioSrv

radioglaciology@radioglaciology-Precision-7730:~$ *sudo
/usr/local/bin/niusrprio_pcie start*
Making sure drivers are up to date...
Module nikal is up-to-date
Module nibds is up-to-date
Module nistreamk is up-to-date
Module NiRioSrv is up-to-date
Module niusrpriok is up-to-date
Loading: NiRioSrv niusrpriok
Starting: niusrpriorpc

radioglaciology@radioglaciology-Precision-7730:~$ *sudo
/usr/local/bin/niusrprio_pcie status*
Modules Loaded: nikal nibds nistreamk NiRioSrv niusrpriok
Server: niusrpriorpc

radioglaciology@radioglaciology-Precision-7730:~$ *uhd_find_devices*
[INFO] [UHD] linux; GNU C++ version 7.4.0; Boost_106501;
UHD_3.14.1.HEAD-0-g5491b80e
--------------------------------------------------
-- UHD Device 0
--------------------------------------------------
Device Address:
    serial: 318EFCA
    fpga: HG
    name:
    product: X310
    resource: RIO0
    type: x300


radioglaciology@radioglaciology-Precision-7730:~$ *uhd_usrp_probe*
[INFO] [UHD] linux; GNU C++ version 7.4.0; Boost_106501;
UHD_3.14.1.HEAD-0-g5491b80e
[INFO] [X300] X300 initialization sequence...
[INFO] [X300] Connecting to niusrpriorpc at localhost:5444...
[INFO] [X300] Using LVBITX bitfile /usr/local/share/uhd/images/
usrp_x310_fpga_HG.lvbitx...
[INFO] [X300] Radio 1x clock: 200 MHz
[INFO] [GPS] Found an internal GPSDO: LC_XO, Firmware Rev 0.929b
[INFO] [0/DmaFIFO_0] Initializing block control (NOC ID: 0xF1F0D00000000000)
[INFO] [0/DmaFIFO_0] BIST passed (Throughput: 1296 MB/s)
[INFO] [0/DmaFIFO_0] BIST passed (Throughput: 1304 MB/s)
[INFO] [0/Radio_0] Initializing block control (NOC ID: 0x12AD100000000001)
[INFO] [0/Radio_1] Initializing block control (NOC ID: 0x12AD100000000001)
[INFO] [0/DDC_0] Initializing block control (NOC ID: 0xDDC0000000000000)
[INFO] [0/DDC_1] Initializing block control (NOC ID: 0xDDC0000000000000)
[INFO] [0/DUC_0] Initializing block control (NOC ID: 0xD0C0000000000000)
[INFO] [0/DUC_1] Initializing block control (NOC ID: 0xD0C0000000000000)
  _____________________________________________________
 /
|       Device: X-Series Device
|     _____________________________________________________
|    /
|   |       Mboard: X310
****** truncated output*******

Here's what was happening before when things weren't working:
radioglaciology@radioglaciology-Precision-7730:~$ *uhd_find_devices*
[INFO] [UHD] linux; GNU C++ version 7.4.0; Boost_106501;
UHD_3.14.1.HEAD-0-g5491b80e
No UHD Devices Found

radioglaciology@radioglaciology-Precision-7730:~$ *sudo
/usr/local/bin/niusrprio_pcie start*
Making sure drivers are up to date...
Module nikal is up-to-date
Module nibds is up-to-date
Module nistreamk is up-to-date
Module NiRioSrv is up-to-date
Module niusrpriok is up-to-date
Loading: NiRioSrv niusrpriok
Starting: niusrpriorpc

radioglaciology@radioglaciology-Precision-7730:~$* sudo
/usr/local/bin/niusrprio_pcie status*
Modules Loaded: nikal nibds nistreamk NiRioSrv niusrpriok
Server: niusrpriorpc

radioglaciology@radioglaciology-Precision-7730:~$ *uhd_find_devices*
[INFO] [UHD] linux; GNU C++ version 7.4.0; Boost_106501;
UHD_3.14.1.HEAD-0-g5491b80e
--------------------------------------------------
-- UHD Device 0
--------------------------------------------------
Device Address:
    serial:
    fpga: HG
    name:
    product: X310
    resource: RIO0
    type: x300

radioglaciology@radioglaciology-Precision-7730:~$ *uhd_usrp_probe
--args="resource=RIO0"*
[INFO] [UHD] linux; GNU C++ version 7.4.0; Boost_106501;
UHD_3.14.1.HEAD-0-g5491b80e
[INFO] [X300] X300 initialization sequence...
[INFO] [X300] Connecting to niusrpriorpc at localhost:5444...
[INFO] [X300] Using LVBITX bitfile /usr/local/share/uhd/images/
usrp_x310_fpga_HG.lvbitx...
Error: RuntimeError: x300_impl: Could not initialize RIO session. Unknown
error. (Error code -63150)


For anyone who navigates to this thread, here are full instructions for
setting up your computer and connecting to the USRP X310 from scratch on
Ubuntu:


   1.

   Follow the instructions here to download uhd, fpga images, and gnuradio.
   Follow all the instructions, and install everything.
   
<https://kb.ettus.com/Building_and_Installing_the_USRP_Open-Source_Toolchain_(UHD_and_GNU_Radio)_on_Linux>
   1.


      
https://kb.ettus.com/Building_and_Installing_the_USRP_Open-Source_Toolchain_(UHD_and_GNU_Radio)_on_Linux
      2.

   Install the daughterboards in the x310 following the instructions on the
   link below. Stop after step 11.
   1.


      
https://kb.ettus.com/USRP_X_Series_Quick_Start_(Daughterboard_Installation)
      3.

   If you version of linux doesn’t have the ifconfig command, get it.
   1.

      sudo apt install net-tools
      4.

   Use ifconfig to check the name of your ethernet port. Mine is called
   eno1, but my other computers are enp0s31f6 and enx00051bb16fc3.

radioglaciology@radioglaciology-Precision-7730:~$ ifconfig

eno1: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500

       ether c8:f7:50:71:9d:e9  txqueuelen 1000 (Ethernet)

       RX packets 0  bytes 0 (0.0 B)

       RX errors 0  dropped 0 overruns 0  frame 0

       TX packets 0  bytes 0 (0.0 B)

       TX errors 0  dropped 0 overruns 0  carrier 0 collisions 0

       device interrupt 16  memory 0xa0400000-a0420000

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536

       inet 127.0.0.1  netmask 255.0.0.0

       inet6 ::1  prefixlen 128  scopeid 0x10<host>

       loop  txqueuelen 1000  (Local Loopback)

       RX packets 3599  bytes 528176 (528.1 KB)

       RX errors 0  dropped 0 overruns 0  frame 0

       TX packets 3599  bytes 528176 (528.1 KB)

       TX errors 0  dropped 0 overruns 0  carrier 0 collisions 0

wlp110s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500

       inet 10.34.203.93  netmask 255.255.240.0  broadcast 10.34.207.255

       inet6 fe80::b9f3:8979:f1b1:413  prefixlen 64 scopeid 0x20<link>

       ether a4:fc:77:4e:2b:29  txqueuelen 1000 (Ethernet)

       RX packets 121435  bytes 53465555 (53.4 MB)

       RX errors 0  dropped 0 overruns 0  frame 0

       TX packets 16591  bytes 12636191 (12.6 MB)

       TX errors 0  dropped 0 overruns 0  carrier 0 collisions 0

   1.

   Change your computer’s ethernet ip address so that it is compatible with
   the default IP address of the x310. The x310’s ip address is 192.168.10.2,
   and your computer must use the same first 3 numbers (192.168.10.X). Insert
   your ethernet name as determined from the previous step.
   1.

      sudo ifconfig eno1 192.168.10.1 netmask 255.255.255.0 up
      2.

   Check that the device is connected over ethernet.
   1.

      ping 192.168.10.2
      3.

   The FPGA images on the USRP are almost certainly out of date, so you
   need to update them.
   1.

      You should have downloaded the FPGA images in step 1, but if not,
      type: uhd_images_downloader . This will put the FPGA images in the
      folder /usr/local/share/uhd/images.
      2.

      Now update the images on the x310 with the command: uhd_image_loader
      --args="type=x300,addr=192.168.10.2,fpga=HG"
      4.

   Restart the USRP, and everything should be working now. Use the
   following commands to check that it is working:
   1.

      Check that the device can be detected. uhd_find_devices
      2.

      The details of your device should appear with this command. It is a
      good test that everything is working properly if this doesn’t throw an
      error. uhd_usrp_probe
      3.

      Connect an antenna to RX2 on RFA and check that the USRP can function
      as a spectrum analyzer: uhd_fft --ant RX2
      5.

   Once you have verified that the hardware and software are both working,
   we can proceed to using the PCIe interface. First, download the NI PCIe
   drivers from here:
   1.

      http://files.ettus.com/manual/page_ni_rio_kernel.html
      2.

      Extract the files tar zxf niusrprio-installer-18.0.0.tar.gz
      3.

      Change to the extracted file’s directory cd niusrprio_installer
      4.

      Install ./INSTALL


*********Here is where I got it to work from trying things rather than
following other instructions. I tried a lot of different things, so I’m not
entirely sure, but I think this is what fixed it. See next section for
other things I tried. ***********


   1.

   The PCIe interface/cable cannot be plugged in while either the USRP or
   host computer are on, so turn both devices off. The order below is
   important!
   1.

      Plug in PCIe cable
      2.

      Turn on SDR
      3.

      Turn on Computer
      2.

   Connect over PCIe. You must use the stop command before the start
   command. It seems that the computer attempts to connect the USRP over PCIe
   when it boots, but does so incorrectly. You have to stop this process
   before you can start the correct PCIe connection. Use the following
   commands in this order:
   1.

      sudo /usr/local/bin/niusrprio_pcie stop
      2.

      sudo /usr/local/bin/niusrprio_pcie start
      3.

      sudo /usr/local/bin/niusrprio_pcie status
      3.

   Check that the usrp can be detected over PCIe. It should say that the
   resource is RIO0, but if it is something different, adjust that field in
   step 13.
   1.

      uhd_find_devices
      4.

   Load the .lvbitx images onto the USRP FPGA. The .lvbitx images are for
   PCIe connection and the .bit are for other interfaces.
   1.

      uhd_image_loader --args="type=x300,RESOURCE=RIO0,fpga=HG"
      --fpga-path="/usr/local/share/uhd/images/usrp_x310_fpga_HG.lvbitx
      5.

   You need to restart the SDR for the FPGA image to take effect, but you
   must always turn off the computer before the SDR and stop the NI PCIe
   connection, so follow these steps to shut everything down:
   1.

      Before turning off or disconnecting the USRP, you must always stop
      the PCIe connection or else the system could become unstable: sudo
      /usr/local/bin/niusrprio_pcie stop
      2.

      Turn off the SDR
      3.

      Turn off your computer
      6.

   Repeat step 10 and 11 to turn everything on again.
   7.

   It should work now. This can be tested by repeating step 8.


I believe those are the things that made my x310 PCIe connection work, but
here are other things I recall trying which may have helped solve the
problem:

   1.

   I don’t think this should be done, but I ran these lines:
   1.

      http://files.ettus.com/manual/page_install.html
      1.

         sudo add-apt-repository ppa:ettusresearch/uhd
         2.

         sudo apt-get update
         3.

         sudo apt-get install libuhd-dev libuhd003 uhd-host
         2.

   Fix gcc?
   1.


      
https://stackoverflow.com/questions/48398475/fail-to-install-gcc-4-9-in-ubuntu17-04


mkdir ~/Downloads/gcc-4.9-deb && cd ~/Downloads/gcc-4.9-deb

wget http://launchpadlibrarian.net/247707088/libmpfr4_3.1.4-1_amd64.deb

wget
http://launchpadlibrarian.net/253728424/libasan1_4.9.3-13ubuntu2_amd64.deb

wget
http://launchpadlibrarian.net/253728426/libgcc-4.9-dev_4.9.3-13ubuntu2_amd64.deb

wget
http://launchpadlibrarian.net/253728314/gcc-4.9-base_4.9.3-13ubuntu2_amd64.deb

wget
http://launchpadlibrarian.net/253728399/cpp-4.9_4.9.3-13ubuntu2_amd64.deb

wget
http://launchpadlibrarian.net/253728404/gcc-4.9_4.9.3-13ubuntu2_amd64.deb

wget
http://launchpadlibrarian.net/253728432/libstdc++-4.9-dev_4.9.3-13ubuntu2_amd64.deb

wget
http://launchpadlibrarian.net/253728401/g++-4.9_4.9.3-13ubuntu2_amd64.deb

sudo dpkg -i gcc-4.9-base_4.9.3-13ubuntu2_amd64.deb

sudo dpkg -i libmpfr4_3.1.4-1_amd64.deb

sudo dpkg -i libasan1_4.9.3-13ubuntu2_amd64.deb

sudo dpkg -i libgcc-4.9-dev_4.9.3-13ubuntu2_amd64.deb

sudo dpkg -i cpp-4.9_4.9.3-13ubuntu2_amd64.deb

sudo dpkg -i gcc-4.9_4.9.3-13ubuntu2_amd64.deb

sudo dpkg -i libstdc++-4.9-dev_4.9.3-13ubuntu2_amd64.deb

sudo dpkg -i g++-4.9_4.9.3-13ubuntu2_amd64.deb


My hardware setup uses a laptop:
Computer: Dell Precision 7730 (Laptop)
XEON
32GB RAM
1TB SSD (EVO 970)
Internal Intel GPU
Note that the Dell Precision thunderbolt 3 ports each use 4 PCIe lanes
(some laptops only use 2 which won't work)
Connection:
Thunderbolt 3<->PCIe
https://www.amazon.com/Akitio-Node-Thunderbolt3-Windows-Compatible/dp/B06XKKSNTS
https://www.akitio.com/expansion/node-lite
Note that only <0.5m thunderbolt 3 cables provide the full BW. I had to
update the BIOS.
Ettus PCIe card: https://www.ettus.com/all-products/pcie-kit/














On Tue, Mar 5, 2019 at 3:43 AM akin soysal via USRP-users <
usrp-users@lists.ettus.com> wrote:

> OK, so I did manage to debug it further by setting the
> ENABLE_EXTENDED_ERROR_INFO flag to true. It seems like the
> nirio_driver_iface::rio_ioctl function is returning 52003 error.
>
> uhd_usrp_probe --args "type=x300,resource=RIO0,fpga=HG"
> [INFO] [UHD] linux; GNU C++ version 5.4.0 20160609; Boost_105800;
> UHD_3.13.1.HEAD-0-gbbce3e45
> [INFO] [NIRIO] rpc_client stopping...
> [INFO] [NIRIO] rpc_client stopped.
> ERROR: The following function call returned status code -52003
> nirio_driver_iface::rio_ioctl(_device_handle, NIRIO_IOCTL_POST_OPEN,
> NULL, 0, NULL, 0)
> /home/ulak/uhd/uhd/host/lib/transport/nirio/niriok_proxy_impl_v1.cpp:438
> [INFO] [NIRIO] rpc_client stopping...
> [INFO] [NIRIO] rpc_client stopped.
> ERROR: The following function call returned status code -52003
> nirio_driver_iface::rio_ioctl(_device_handle, NIRIO_IOCTL_POST_OPEN,
> NULL, 0, NULL, 0)
> /home/ulak/uhd/uhd/host/lib/transport/nirio/niriok_proxy_impl_v1.cpp:438
> [INFO] [X300] X300 initialization sequence...
> [INFO] [X300] Connecting to niusrpriorpc at localhost:5444...
> ERROR: The following function call returned status code -52003
> nirio_driver_iface::rio_ioctl(_device_handle, NIRIO_IOCTL_POST_OPEN,
> NULL, 0, NULL, 0)
> /home/ulak/uhd/uhd/host/lib/transport/nirio/niriok_proxy_impl_v1.cpp:438
> [INFO] [NIRIO] rpc_client stopping...
> [INFO] [NIRIO] rpc_client stopped.
> [INFO] [X300] Using LVBITX bitfile /home/ulak/usrp_x310_fpga_HG.lvbitx...
> ERROR: The following function call returned status code -52003
> nirio_driver_iface::rio_ioctl(_device_handle, NIRIO_IOCTL_POST_OPEN,
> NULL, 0, NULL, 0)
> /home/ulak/uhd/uhd/host/lib/transport/nirio/niriok_proxy_impl_v1.cpp:438
> [INFO] [NIRIO] rpc_client stopping...
> [INFO] [NIRIO] rpc_client stopped.
> ERROR: The following function call returned status code -63150
> _rpc_client.niusrprio_open_session( _resource_name, bitfile_path,
> signature, download_fpga)
> /home/ulak/uhd/uhd/host/lib/transport/nirio/niusrprio_session.cpp:80
> ERROR: The following function call returned status code -63150
> mb.rio_fpga_interface->open(lvbitx, dev_addr.has_key("download-fpga"))
> /home/ulak/uhd/uhd/host/lib/usrp/x300/x300_impl.cpp:609
> [INFO] [NIRIO] rpc_client stopping...
> [INFO] [NIRIO] rpc_client stopped.
> Error: RuntimeError: x300_impl: Could not initialize RIO session. Unknown
> error. (Error code -63150)
>
>
>
>
>
> On Tue, Mar 5, 2019 at 1:32 PM akin soysal <akinsoy...@gmail.com> wrote:
>
>> Dear all,
>>
>> I am trying to connect over PCIe to my USRP X310. I have installed the
>> latest drivers niusrprio-installer-18.0.0.tar.gz and I am starting the
>> PCIe connection with the following command:
>>
>> sudo /usr/local/bin/niusrprio_pcie start
>> Making sure drivers are up to date...
>> Module nikal is up-to-date
>> Module nibds is up-to-date
>> Module nistreamk is up-to-date
>> Module NiRioSrv is up-to-date
>> Module niusrpriok is up-to-date
>> Loading: NiRioSrv niusrpriok
>> Starting: niusrpriorpc
>>
>> Then I try the uhd_usrp_probe:
>>
>> uhd_usrp_probe --args "type=x300,resource=RIO0"
>> [INFO] [UHD] linux; GNU C++ version 5.4.0 20160609; Boost_105800;
>> UHD_3.13.1.HEAD-0-gbbce3e45
>> [INFO] [NIRIO] rpc_client stopping...
>> [INFO] [NIRIO] rpc_client stopped.
>> [INFO] [NIRIO] rpc_client stopping...
>> [INFO] [NIRIO] rpc_client stopped.
>> [INFO] [X300] X300 initialization sequence...
>> [INFO] [X300] Connecting to niusrpriorpc at localhost:5444...
>> [INFO] [NIRIO] rpc_client stopping...
>> [INFO] [NIRIO] rpc_client stopped.
>> [INFO] [X300] Using LVBITX bitfile /usr/local/share/uhd/images/
>> usrp_x310_fpga_HG.lvbitx...
>> [INFO] [NIRIO] rpc_client stopping...
>> [INFO] [NIRIO] rpc_client stopped.
>> [INFO] [NIRIO] rpc_client stopping...
>> [INFO] [NIRIO] rpc_client stopped.
>> Error: RuntimeError: x300_impl: Could not initialize RIO session. Unknown
>> error. (Error code -63150)
>>
>> I have another PC and USRP x310 and this is working fine. I have followed
>> the exact same steps and there isn't any issue. What could be the problem
>> and how can I debug this further?
>>
>> Regards,
>> Akın
>>
>> _______________________________________________
> USRP-users mailing list
> USRP-users@lists.ettus.com
> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
>
_______________________________________________
USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com

Reply via email to