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
  • we plugs sata drives directly into mother board
  • use 2 ctrl cables from mother board
  • switchable power extension -> power source -> sata cable with two connectors.
  • Note: found that when cpu is first booted, these 2 discs need to be powered on. After that you can turn the disc power off, on to replace disc.
  • Use gnome-disks & to see the disc names eg sdb,sdc, sdd ...
    • Or sudo tail -f /var/syslog when the discs are recognized after powering up.
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
9a
gregorian cabling setup
  • These notes don't yet have the atten,levels that are needed at each step.
  • 30 mhz Code from beat ->
    • may need some attenuation here (test when gr setup)
    • upconvert to 260 Mhz with mixer .
      • synloc 7 290 e6  .. then plug cable into stand alone mixer
      • put 30Mhz -> IF, 260 out on rf ->
      • power combiner (after dana's switch) see below
  • sky signal. front band output band 1A ->
    • 40 Mhz 260 filter->
    • dana's blanker rf in out ->
    • amps on dana's blanker .. check levels ->
    • power combiner  ->
    • input to usrp rf1 input.
      • max level.. need to check sky and tx separately
      • power_level.py -c gregorian  (or wherever you sent the data)
      • like to run tx > 1500  peak, sky rms 300-400 peak.
9b
ch cabling for usrp (levels measured while doing dual beam).
  • 30 Mhz code from beat -> 30 mhz if amp ->
    • 10 step attenuator, step = 0 (in case) ->
    • 1 db step attenuator, step = 4db atten ->
    • power combiner (for sky and beat)
  • crr2 output (sky) -> power combiner
  • power combiner (beat and sky) ->
  • upconvert to 260
    • synloc 7 290e6 .. take syn 7 output to lo input of stand alone mixer
    • power combiner output (sky+tx) -> mixer IF input
    • mixer rf output (at 260) ->
  • cable going to usrp front panel input -> 3db pad -> usrp rf2 input
  • Power levels:
    • at input to usrp rf2 input (after 3db pad).
    • sky  -34.7 dbm (just unplug tx and plug cable into power meter)
    • tx  (unplug sky).  -28 dbm with pk hold on spectrum analyzer (300khzrbw)
      • on scope saw +/- 80 milliVolts.
    • These setting gave
      •  +/- 1700 counts on tx,
      • +/- 500 counts on sky (rms 230 counts).
10
start datataking
  • gousrp
  • sudo ./thor_arecibo_wbx.py -c 260e6 -f 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