提示! 谨慎使用命令 usrp2_card_burner.py。如若指向错误的设备节点,可能会重写硬盘。请确认 --dev= 指向 SD 卡。 提示! 尽管理论上 USRP2 可以使用第三方 SD 卡。但是有些类型的 SD 卡不能同 CPLD 进行交互:
鉴于上面的这些因数,建议使用随机的 SD 卡。 使用 Unix 烧卡工具sudo <install-path>/share/uhd/utils/usrp2_card_burner_gui.py
-- OR --
cd <install-path>/share/uhd/utils
sudo ./usrp2_card_burner.py --dev=/dev/sd<XXX> --fpga=<path_to_fpga_image> sudo ./usrp2_card_burner.py --dev=/dev/sd<XXX> --fw=<path_to_firmware_image> 使用选项 --list 可获取可能的原始设备清单。list 将会剔除容量太大无法装入 SD 卡的磁盘扇区和设备。Linux, Mac OS X, 和 Windows 都具有该 --list 选项。 使用 windows 烧卡工具<path_to_python.exe> <install-path>/share/uhd/utils/usrp2_card_burner_gui.py 将映像文件装入板上闪存中 (仅对 USRP-N 系列)USRP-N 系列产品可以通过网络进行重新编程来更新或更改固件(firmware)和 FPGA 映像(images)。但每当在更新映像(images)过程中,总是在系统重新启动(power cycling)之前对 FPGA 和固件两者的映像烧结。这便可确保设备一旦被重启,其映像文件与之配套。 使用 Unix 的网络烧卡工具 sudo <install-path>/share/uhd/utils/usrp_n2xx_net_burner_gui.py
-- OR -- cd <install-path>/share/uhd/utils
./usrp_n2xx_net_burner.py --addr=<ip address> --fw=<path for firmware image> ./usrp_n2xx_net_burner.py --addr=<ip address> --fpga=<path to FPGA image> 使用 Windows 的网络烧卡工具<path_to_python.exe> <install-path>/share/uhd/utils/usrp_n2xx_net_burner_gui.py 设备的恢复 - Device recovery and bricking载入有问题的映像文件可能会招致设备处于无法工作的状态。幸运的是,USRP-N 系列可以启用安全(只读)映像模式。如若启用安全映像模式,用户便可试图再次装入映像文件。 壳体内的按钮(S2)便是安全模式按钮。在上电启动过程中按下该按钮便可启动安全映像模式。持续按住该按钮直到前面板的 LED 从闪烁到稳定(blink and remain solid)。 在安全模式中,USRP-N 设备的 IP 地址总是 192.168.10.2 。 配置网络 - Setup networkingUSRP2 仅支持千兆级以太网,所以其无法同 10/100 Mbps 接口直接相互工作。尽管如此,10/100 Mbps 接口还是可以通过一个千兆级的以太网交换机间接同 USRP2 相连接。 配置主机接口 - Setup the host interfaceUSRP2 的通过千兆级以太网的通信是基于 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 per host为最大化数据处理能力,建议一个以太网接口配置一台 USRP2 设备。尽管如此,通过千兆级的交换机也可以同多台设备相互连接。无论哪种情况,每个以太网接口单元都必须有自己的子网,其相关的 USRP2 的地址应当处于其子网范围内。例如: USRP2 设备 0 的配置:
USRP2 设备 1 的配置:
更改 USRP 的 IP 地址 - Change the USRP2's IP address基于下面可能的原因需要对 USRP2 的 IP 地址进行更改:
方法 1: 更改 USRP2 IP 地址的先决条件是必须清楚其正在使用的地址,网络也必须如上所述地被恰当的配置成功。然后运行下面的命令: cd <install-path>/share/uhd/utils ./usrp_burn_mb_eeprom --args=<optional device args> --key=ip-addr --val=192.168.10.3 方法 2 (仅适用于 Linux): 此方法假定在对设备现在使用的 IP 地址不清楚的情况下。它使用以太网的原始数据包短接(bypass) IP/UDP 协议层而直接同 USRP2 通信。如下运行命令: cd <install-path>/share/uhd/utils sudo ./usrp2_recovery.py --ifc=eth0 --new-ip=192.168.10.3 通信问题 - Communication problems首次构建一个开发平台时,碰到各种各样的 USRP 通信问题是不足为奇的。下面便是一些简化的问题和诊断的建议。 防火墙 - Firewall issues 在没有配置设备的 IP 地址的情况下,设备查询机制便会通过各个以太网接口广播 UDP 数据包来试图建立相互间的通信。众多防火墙会阻碍对这些广播信息的反馈。如若(如此,只能)禁止系统的防火墙功能、或明晰需确认的设备的 IP 地址。在此情况下的建议是:要么关闭防火墙、要么建立一个规则为端口号为 49152 的 UDP 的数据源建立通道。 “Ping” 设备 - Ping the deviceUSRP 响应 icmp echo 。 成功的 ping 意味着设备已经被成功地启动,也意味着希望的 IP 地址被成功的配置。 ping 192.168.10.2 监视串口 - Monitor the serial outputRead the serial port to get debug verbose from the embedded microcontroller. The microcontroller prints useful information about IP addresses, MAC addresses, control packets, fast-path settings, and bootloading. Use a standard USB to 3.3v-level serial converter at 230400 baud. Connect GND to the converter ground, and connect TXD to the converter receive. The RXD pin can be left unconnected as this is only a one-way communication.
监视主网流量 - Monitor the host network trafficUse wireshark to monitor packets sent to and received from the device.单一设备的配置 - Single device configurationIn a single-device configuration, the USRP device must have a unique IPv4 address on the host computer. The USRP can be identified through its IPv4 address, resolvable hostname, or by other means. See the application notes on device identification. Use this addressing scheme with the single_usrp interface. Example device address string representation for a USRP2 with IPv4 address 192.168.10.2 addr=192.168.10.2 多台设备的配置 - Multiple device configurationIn a multi-device configuration, each USRP device must have a unique IPv4 address on the host computer. The device address parameter keys must be suffixed with the device index. Each parameter key should be of the format <key><index>. Use this addressing scheme with the multi_usrp interface.
Example device address string representation for 2 USRP2s with IPv4 addresses 192.168.10.2 and 192.168.20.2 addr0=192.168.10.2, addr1=192.168.20.2 使用 MIMO 电缆 - Using the MIMO CableThe MIMO cable allows two USRP devices to share reference clocks, time synchronization, and the ethernet interface. 共享网络模式 - Shared ethernet modeIn shared ethernet mode, only one device in the configuration can be attached to the ethernet. This device will be referred to as the master, and the other device, the slave.
Example device address string representation for 2 USRP2s with IPv4 addresses 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 ethernet modeIn dual ethernet mode, both devices in the configuration must be attached to the ethernet. One of the devices in the configuration will be configured to provide synchronization. This device will be referred to as the master, and the other device, the 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 setup notes前面板指示灯 - Front panel LEDsThe LEDs on the front panel can be useful in debugging hardware and software issues. The LEDs reveal the following about the state of the device:
参考时钟 - 10MHzUsing an external 10MHz reference clock, square wave will offer the best phase noise performance, but sinusoid is acceptable. The reference clock requires the following power level:
PPS - Pulse Per SecondUsing a PPS signal for timestamp synchronization requires a square wave signal with the following amplitude:
Test the PPS input with the following app:
cd <install-path>/share/uhd/examples
./test_pps_input --args=<args> 内部 GPS 伺服时钟 - Internal GPSDOPlease see the GPSDO application note for information on configuring and using the internal GPSDO. Installation instructions:
Then run the following commands: cd <install-path>/share/uhd/utils
./usrp_burn_mb_eeprom --args=<optional device args> --key=gpsdo --val=internal Removal instructions: Restore the jumper setting, disconnect the cables, and unscrew the GPSDO unit. Then run the following commands: cd <install-path>/share/uhd/utils
./usrp_burn_mb_eeprom --args=<optional device args> --key=gpsdo --val=none Antenna Types: The GPSDO is capable of supplying a 3V for active GPS antennas or supporting passive antennas可选传感单元 - Available SensorsThe following sensors are available for the USRP2/N-Series motherboards; they can be queried through the API.
多接收链路 - Multiple RX channelsThere are two complete DDC chains in the FPGA. In the single channel case, only one chain is ever used. To receive from both channels, the user must set the RX subdevice specification. This hardware has only one daughterboard slot, which has been aptly named slot "0". In the following example, a TVRX2 is installed. Channel 0 is sourced from subdevice RX1, channel 1 is sourced from subdevice RX2: usrp->set_rx_subdev_spec("0:RX1 0:RX2"); |