在 UHD 下使用USRP2和N系列


將映像文件裝入 SD卡中(僅對 USRP2)


提示!謹慎使用命令 usrp2_card_burner.py。如若指向錯誤的設備節點,可能會重寫硬盤。請確認 --dev= 指向 SD 卡。

提示! 儘管理論上 USRP2 可以使用第三方 SD卡。但是有些類型的 SD 卡不能同 CPLD 進行交互:

  • 該卡可能是 SDHC,它不支持同 CPLD 的交互。
  • 該卡有意外的時間特性。

鑑於上面的這些因數,建議使用隨機的 SD卡。

使用 Unix燒卡工具

sudo/share/uhd/utils/usrp2_card_burner_gui.py

-- OR --

cd /share/uhd/utils
sudo./usrp2_card_burner.py --dev=/dev/sd --fpga=
sudo./usrp2_card_burner.py --dev=/dev/sd --fw=

使用選項 --list 可獲取可能的原始設備清單。list 將會剔除容量太大無法裝入 SD卡的磁盤扇區和設備。Linux, Mac OS X, 和 Windows 都具有該 --list 選項。

使用windows 燒卡工具

/share/uhd/utils/usrp2_card_burner_gui.py

將映像文件裝入板上閃存中 (僅對 USRP-N 系列)


USRP-N系列產品可以通過網絡進行重新編程來更新或更改固件(firmware)和 FPGA映像(images)。但每當在更新映像(images)過程中,總是在系統重新啓動(powercycling)之前對 FPGA和固件兩者的映像燒結。這便可確保設備一旦被重啓,其映像文件與之配套。

使用 Unix的網絡燒卡工具

sudo/share/uhd/utils/usrp_n2xx_net_burner_gui.py

-- OR --

cd /share/uhd/utils
./usrp_n2xx_net_burner.py --addr=--fw=
./usrp_n2xx_net_burner.py --addr=--fpga=

使用Windows 的網絡燒卡工具

/share/uhd/utils/usrp_n2xx_net_burner_gui.py

設備的恢復 - Device recoveryand bricking

載入有問題的映像文件可能會招致設備處於無法工作的狀態。幸運的是,USRP-N系列可以啓用安全(只讀)映像模式。如若啓用安全映像模式,用戶便可試圖再次裝入映像文件。

殼體內的按鈕(S2)便是安全模式按鈕。在上電啓動過程中按下該按鈕便可啓動安全映像模式。持續按住該按鈕直到前面板的LED 從閃爍到穩定(blink and remainsolid)。

在安全模式中,USRP-N 設備的 IP地址總是 192.168.10.2 。

配置網絡 - Setupnetworking


USRP2僅支持千兆級以太網,所以其無法同 10/100 Mbps接口直接相互工作。儘管如此,10/100 Mbps 接口還是可以通過一個千兆級的以太網交換機間接同USRP2 相連接。

配置主機接口- Setup the host interface

USRP2的通過千兆級以太網的通信是基於 IP/UDP 層。其缺省 IP 地址爲192.168.10.2。這樣只需配置計算機側一個靜態 IP地址便可使其相互通信。推薦使用 IP 地址 192.168.10.1 和子網掩碼255.255.255.0.

備註:在使用 UHD 情況下,如若 USRP2的 IP 地址沒有被指定,應用軟件便會使用 UDP 廣播的數據包來定位 USRP2。存在這樣一些情況,防火牆軟件會阻礙 UDP 廣播的數據包。在此建議更改或取消防火牆相關功用。

單口多機化 - Multiple devices perhost

爲最大化數據處理能力,建議一個以太網接口配置一臺USRP2 設備。儘管如此,通過千兆級的交換機也可以同多臺設備相互連接。無論哪種情況,每個以太網接口單元都必須有自己的子網,其相關的USRP2 的地址應當處於其子網範圍內。例如:

USRP2 設備 0 的配置:

  • 以太網接口 IPv4 地址:192.168.10.1
  • 以太網接口子網掩碼: 255.255.255.0
  • USRP2 設備的 IPv4 地址:192.168.10.2

USRP2 設備 1 的配置:

  • 以太網接口 IPv4地址:192.168.20.1
  • 以太網接口子網掩碼: 255.255.255.0
  • USRP2 設備的 IPv4地址:192.168.20.2

更改 USRP 的 IP 地址 - Changethe USRP2's IP address

基於下面可能的原因需要對 USRP2 的 IP地址進行更改:
  • 滿足特定的網絡配置要求
  • 在同一宿主計算下使用多臺 USRP2
  • 使用(用戶)熟知的 IP 地址(以防遺忘)

方法 1: 更改 USRP2 IP地址的先決條件是必須清楚其正在使用的地址,網絡也必須如上所述地被恰當的配置成功。然後運行下面的命令:

cd /share/uhd/utils
./usrp_burn_mb_eeprom--args= --key=ip-addr --val=192.168.10.3

方法 2(僅適用於 Linux): 此方法假定在對設備現在使用的 IP 地址不清楚的情況下。它使用以太網的原始數據包短接(bypass)IP/UDP 協議層而直接同 USRP2通信。如下運行命令:

cd /share/uhd/utils sudo
./usrp2_recovery.py--ifc=eth0 --new-ip=192.168.10.3

通信問題 - Communicationproblems


首次構建一個開發平臺時,碰到各種各樣的 USRP通信問題是不足爲奇的。下面便是一些簡化的問題和診斷的建議。

防火牆 - Firewall issues

在 沒有配置設備的IP 地址的情況下,設備查詢機制便會通過各個以太網接口廣播 UDP數據包來試圖建立相互間的通信。衆多防火牆會阻礙對這些廣播信息的反饋。如若(如此,只能)禁止系統的防火牆功能、或明晰需確認的設備的 IP地址。在此情況下的建議是:要麼關閉防火牆、要麼建立一個規則爲端口號爲 49152 的 UDP的數據源建立通道。

“Ping” 設備 - Ping thedevice

USRP響應 icmp echo 。 成功的 ping意味着設備已經被成功地啓動,也意味着希望的 IP 地址被成功的配置。

ping 192.168.10.2

監視串口 - Monitor the serialoutput


Read theserial port to get debug verbose from the embedded microcontroller.The microcontroller prints useful information about IP addresses,MAC addresses, control packets, fast-path settings, andbootloading. Use a standard USB to 3.3v-level serial converter at230400 baud. Connect GND to the converter ground, and connect TXDto the converter receive. The RXD pin can be left unconnected asthis is only a one-way communication.

  • USRP2:Serial port located on the rear edge
  • N210:Serial port located on the left side

監視主網流量 - Monitor thehost network traffic

Use wiresharkto monitor packets sent to and received from thedevice.

賦予設備地址 - Addressing thedevice


單一設備的配置 - Single deviceconfiguration

In asingle-device configuration, the USRP device must have a uniqueIPv4 address on the host computer. The USRP can be identifiedthrough its IPv4 address, resolvable hostname, or by other means.See the application notes on deviceidentification. Use thisaddressing scheme with the single_usrp interface.

Exampledevice address string representation for a USRP2 with IPv4 address192.168.10.2 addr=192.168.10.2

多臺設備的配置 - Multipledevice configuration

In amulti-device configuration, each USRP device must have a uniqueIPv4 address on the host computer. The device address parameterkeys must be suffixed with the device index. Each parameter keyshould be of the format . Use this addressing scheme with themulti_usrp interface.

  • The order in whichdevices are indexed corresponds to the indexing of the transmit andreceive channels.
  • The key indexingprovides the same granularity of device identification as in thesingle device case.

Exampledevice address string representation for 2 USRP2s with IPv4addresses 192.168.10.2 and 192.168.20.2

addr0=192.168.10.2,addr1=192.168.20.2

使用 MIMO 電纜 - Using the MIMOCable


The MIMOcable allows two USRP devices to share reference clocks, timesynchronization, and the ethernet interface.

共享網絡模式 - Sharedethernet mode

Inshared ethernet mode, only one device in the configuration can beattached to the ethernet. This device will be referred to as themaster, and the other device, the slave.
  • Themaster provides reference clock and time synchronization to theslave.
  • All datapassing between the host and the slave is routed over the MIMOcable.
  • Bothmaster and slave must have different IPv4 addresses in the samesubnet.
  • Themaster and slave may be used individually or in a multi-deviceconfiguration.
  • Externalclocking is optional, and should only be supplied to the masterdevice.
  • The roleof slave and master may be switched with the "mimo_mode" deviceaddress (see dual ethernet mode).
Exampledevice address string representation for 2 USRP2s with IPv4addresses 192.168.10.2 (master) and 192.168.10.3(slave)

-- Multi-device example--

addr0=192.168.10.2,addr1=192.168.10.3

-- Two single devices example--

addr=192.168.10.2
addr=192.168.10.3

雙網模式 - Dual ethernetmode

In dualethernet mode, both devices in the configuration must be attachedto the ethernet. One of the devices in the configuration will beconfigured to provide synchronization. This device will be referredto as the master, and the other device, the slave.
  • Themaster provides reference clock and time synchronization to theslave.
  • Thedevices require the special device address argument "mimo_mode"set.
  • Bothmaster and slave must have different IPv4 addresses in differentsubnets.
  • Themaster and slave may be used individually or in a multi-deviceconfiguration.
  • Externalclocking is optional, and should only be supplied to the masterdevice.
Exampledevice address string representation for 2 USRP2s with IPv4addresses 192.168.10.2 (master) and 192.168.20.2(slave)

-- Multi-device example--

addr0=192.168.10.2, mimo_mode0=master,addr1=192.168.20.2, mimo_mode1=slave

-- Two single devices example--

addr=192.168.10.2,mimo_mode=master
addr=192.168.20.2,mimo_mode=slave

硬件配置註解 - Hardware setupnotes


前面板指示燈 - Front panelLEDs

The LEDson the front panel can be useful in debugging hardware and softwareissues. The LEDs reveal the following about the state of thedevice:

  • LED A:transmitting
  • LED B:mimo cable link
  • LED C:receiving
  • LED D:firmware loaded
  • LED E:reference lock
  • LED F:CPLD loaded

參考時鐘 -10MHz

Using anexternal 10MHz reference clock, square wave will offer the bestphase noise performance, but sinusoid is acceptable. The referenceclock requires the following power level:

  • USRP2 5to 15dBm
  • N2XX 0 to15dBm

PPS - Pulse PerSecond

Using aPPS signal for timestamp synchronization requires a square wavesignal with the following amplitude:

  • USRP25Vpp
  • N2XX 3.3to 5Vpp

Test thePPS input with the following app:

  • aredevice address arguments (optional if only one USRP is on yourmachine)
cd/share/uhd/examples
./test_pps_input--args=

內部 GPS 伺服時鐘 - InternalGPSDO

Please seethe GPSDO application note for information on configuring and usingthe internal GPSDO.

Installationinstructions:
  1. Removethe daughterboard.
  2. Move J510jumper on the motherboard from 1-2 to 2-3 in order to switch fromexternal 10 MHz Ref Clock to GPSDO’s 10 MHz RefClock
  3. Screw theGPSDO module in place with the screws provided. The screws aretreated to avoid loosening with vibration.
  4. Connectthe GPSDO power cable to J509 on the motherboard, and then toconnector D on the GPSDO module
  5. Connectan SMB to SMA cable between connectors B and J506(PPS2)
  6. Connectan SMB to SMA cable between connectors C and J507 (CLKREF2)
  7. Connectthe serial cable between connectors A and J312 (RS232-3) on themotherboard. If J312 on your USRP isn’t a keyed connector, pleaseensure to connect pin1 (TX) of connector A to pin3 (RX) onJ312.
  8. Removethe washer and nut from the MMCX to SMA-Bulkhead cable. Connect itto connector E and then insert SMA-Bulkhead connector through thehole in the rear panel. Tighten nut to fasten inplace.
  9. Replacethe daughterboard pushing all the cablesunderneath.

Then runthe following commands:

cd /share/uhd/utils
./usrp_burn_mb_eeprom --args=--key=gpsdo --val=internal

Removalinstructions:

Restorethe jumper setting, disconnect the cables, and unscrew the GPSDOunit. Then run the following commands:

cd /share/uhd/utils
./usrp_burn_mb_eeprom --args=--key=gpsdo --val=none

AntennaTypes:

The GPSDO iscapable of supplying a 3V for active GPS antennas or supportingpassive antennas

雜類 - Miscellaneous


可選傳感單元 - AvailableSensors

Thefollowing sensors are available for the USRP2/N-Seriesmotherboards; they can be queried through theAPI.

  • mimo_locked - clock reference lockedover the MIMO cable
  • ref_locked - clock reference locked(internal/external)
  • gps_time- GPS epoch seconds (available when GPSDOinstalled)
  • gps_locked - GPS lockstatus

多接收鏈路 - Multiple RXchannels

There aretwo complete DDC chains in the FPGA. In the single channel case,only one chain is ever used. To receive from both channels, theuser must set the RX subdevice specification. This hardware hasonly one daughterboard slot, which has been aptly named slot"0".

In thefollowing example, a TVRX2 is installed. Channel 0 is sourced fromsubdevice RX1, channel 1 is sourced from subdeviceRX2:

usrp->set_rx_subdev_spec("0:RX10:RX2");


from:http://kb.microembedded.com/usrp2uhdmanual

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章