Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.naic.edu/~phil/hardware/usrp/usrpsoftware.html
Дата изменения: Wed Jan 6 02:19:59 2016
Дата индексирования: Mon Apr 11 09:35:24 2016
Кодировка:
usrp software

usrp online software

  last mod: 10dec15

Intro
The software environment
Taking data
Switching discs
Misc for debugging


Intro:

    Juha installed his usrp software on a computer at ao. We've use it to take aeronomy data.


The software:

The environment:

Taking data:

   

datataking steps
1
login to usrp166 as user usrp (standard passwd..)
  • more flexible if you use vnc
2
plug in two toasters into blue usb connectors
  • Make sure you see superSpeed in usb line in /var/log/kernel.log
3
insert 1 drive in each toaster
  • get the device names for each in /var/log/kernal.log
4
  • make the raid array
  • if device names:   /dev/sdb /dev/sdc   thjen:
  • sudo mdadm --create /dev/md0 --level=0 --raid-devices=2 /dev/sdb /dev/sdc
5
  • make the file system
  • sudo mkfs.xfs /dev/md0
6
  • mount the file system
  • sudo mount /dev/md0 /data0
7
  • create the gregorian or ch directories
  • sudo mkdir /data0/gregorian

8
  • make ram buffer and mount it (if it does not currently exist..eg after reboot)
  • sudo mkdir /ram   (ok if you get error  already exists)
  • sudo mount -t tmpfs -o size=4000m tmpfs /ram
  • df -kh /ram should then show:
    • Filesystem      Size  Used Avail Use% Mounted on
      tmpfs           4.0G     0  4.0G   0% /ram
9
setup all the cables, including dana's blanker
  • 1 sec tick (3.3 to 5 volts pk to pk)
  • 10 Mhz reference (0 to 15 dbm) i think around 6 or 7dbm is best.. so use a 6db pad.
adjust signal power levels (data and code .. from beat)
  • -30dbm out of 260 Mhz amps (after 40 Mhz filter) gives rms of 340 cnts for data
  • 30 mhz code:
    • 30 Mhz amp(from beat) ->
    • 20db pad ->
    • 30Mhz amp(all attn in) if  you want adjustments ->
    • mixer (290 - 30 = 260 mhz -> 
    • 260 Mhz filter to get rid of other sideband -->
      • probably not needed since 260 Mhz filter in usrp chassis.
    • combine with signal output from dana's blanker (using splitter) ->
    •  then to usrp input (chan 1?)
  • adjustments: data: 300 to  500 rms is ok for data
  • code say 1500 cnts .. want it higher than data.
  • i think level is
10
start datataking
  • gousrp
  • sudo ./thor_arecibo_wbx.py -c 260e6 -r 25000000 -1 /ram/gregorian
    • -c  center freq
    • -r  sample rate (default is 25000000  or 25Mhz bw)
    • -1 location to write the data (this is in the ram buffer)
  • A shell script (in ~/bin) will do the above options:
    • startdata
11
start ram buffer copy to disc. This should be done before the ram buffer (4gbytes) fills.
  • gousrp
  • sudo ./drf_ram_move.py
  • This will copy all new files (except last 2 most recent files) from /ram to /data0
  • A shell script ( in ~/bin) will do this:
    • ramcopy
12
Check that the power levels are correct. I think we get a 14 or 16 bit number out of the usrp.
  • gousrp
  • plot voltages, compute rms over entire ipp
    • power_level.py -c gregorian
      • -c is the directory in /data0 to look for the most recent data to plot
      • Will   plot the voltages for a few ipps, and print the rms.. Note that the rms includes the transmitter samples.
  • Plot an average spectra and the voltages
    • plot_signal.py -c gregorian 
      • -c is the directory in /data0 to look for the most recent data to plot
      • will plot the decimated (by 25) voltages and spectra
        • The tx samples will look the same (since the min length is 2usec or 50 samples), but the sky samples will be greatly reduced.. don't use this to set the power levels (use power_level.py).
  • Scripts in ~/bin to do the above (from any directory)
    • plotdata
      • does: plot_signal.py -c gregorian
    • rmsdata:
      • does: power_level.py -c gregorian
13
monitor that we don't lose data packets over the ethernet
  • ..... is printed as data goes along
  • If there are under or overflows , characters will be output in the string.
    • D
      • socket buffer on host filled
      • no back pressuring of device. just drop packets, and insert missing packets packet in stream to program.
    • U - underflow .. only when we use transmitter
14
Stopping datataking
  • ctrl-c   datataking window
  • ctrl-c   ram copy window
  • The ram copy always leaves the last 2 files  in the /ram file system uncopied
    •  ( 1 sec /file)
    • so let datataking run a few seconds beyond when you want to stop.

switching discs, other disc array options

switching discs
1
stop datataking.. step 14 above
2
delete the uncopied files in /ram
3 sudo umount /dev/md0
4
sudo mdadm  --stop /dev/md0
5
replace the discs
  • see steps 7-11 in datatking table
other disc operations
1
reassemble a disc array (that was already written)..
  • sudo mdadm --assemble /dev/md0 /dev/sdc /dev/sde
    • may only need one device.. it will have info on the second..
    • if mdadm is running as a daemon with the monitor option, i think this happens automatically.
2
check array status:
  • sudo mdadm --query /dev/md0
  • sudo mdadm --detail /dev/md0
  • sudo mdadm --examine /dev/sdc 
    • look at a single disc of a pair.


Miscellaneous things for debugging:

   /
|   |   |       RX Dboard: A
|   |   |   ID: WBX v3, WBX v3 + Simple GDB (0x0057)
|   |   |   Serial: ECR21V0XW
|   |   |     _____________________________________________________
|   |   |    /
|   |   |   |       RX Frontend: 0
|   |   |   |   Name: WBXv3 RX+GDB
|   |   |   |   Antennas: TX/RX, RX2, CAL
|   |   |   |   Sensors: lo_locked
|   |   |   |   Freq range: 68.750 to 2200.000 MHz
|   |   |   |   Gain range PGA0: 0.0 to 31.5 step 0.5 dB
|   |   |   |   Connection Type: IQ
|   |   |   |   Uses LO offset: No

<- page up

home_~phil