garverp / gr-analysis

Tools for High Sample Rate Recording and Post-Processing in GNURadio
GNU General Public License v3.0
21 stars 11 forks source link

setting --detachhddr=false causes program to hang #4

Open perks opened 8 years ago

perks commented 8 years ago

Tried with variations including --detachhdr 0, etc. Program becomes unresponsive once it beings to start sampling.

Reducing the sampling rate something really small (25k) doesn't seem to have any effect. Running without detachhdr works fine.

 specrec --detachhdr=false --type float --rate 2000000 --time 5 --freq 450000000  --ant RX2
linux; GNU C++ version 5.4.0 20160609; Boost_105800; UHD_003.009.004-37-gb01bdc55

Creating the usrp device with: ...
-- X300 initialization sequence...
-- Connecting to niusrpriorpc at localhost:5444...
-- Using LVBITX bitfile /usr/local/share/uhd/images/usrp_x310_fpga_HGS.lvbitx...
-- Setup basic communication...
-- Loading values from EEPROM...
-- Setup RF frontend clocking...
-- Radio 1x clock:200
-- Detecting internal GPSDO.... Found an internal GPSDO
-- Initialize Radio0 control...
-- Performing register loopback test... pass
-- Initialize Radio1 control...
-- Performing register loopback test... pass
Using Device: Single USRP:
  Device: X-Series Device
  Mboard 0: X310
  RX Channel: 0
    RX DSP: 0
    RX Dboard: A
    RX Subdev: UBX RX
  RX Channel: 1
    RX DSP: 1
    RX Dboard: B
    RX Subdev: LFRX (AB)
  TX Channel: 0
    TX DSP: 0
    TX Dboard: A
    TX Subdev: UBX TX
  TX Channel: 1
    TX DSP: 1
    TX Dboard: B
    TX Subdev: Unknown (0xffff) - 0

Setting RX Rate: 2.000000 Msps...
Actual RX Rate: 2.000000 Msps...

Setting RX Freq: 450.000000 MHz...
Actual RX Freq: 450.000000 MHz...

Waiting for "lo_locked": ++++++++++ locked.

Found GPSDO but no GPS lock, setting usrp time to system time
Set USRP time with PC system time: Tue Sep  6 17:13:30 2016

Press Ctrl + C to stop streaming...
Elements are 4096 bytes, 512 samples/element, 4096 elements in circular buffer
Start streaming at USRP Time: Tue Sep  6 17:13:30 2016

^C^C^C^Z[1]   Terminated              specrec --detachhdr=false --type float --rate 2000000 --time 5 --freq 450000000 --file police_chatter_450000000_2000000_2016-09-06_16-57-52.cf32 --ant RX2

[2]+  Stopped                 specrec --detachhdr=false --type float --rate 2000000 --time 5 --freq 450000000 --ant RX2
garverp commented 8 years ago

There are probably some poorly tested combinations of args. I think you have found one. Do you want an inline header or no metadata at all? Inline headers are not supported because it slows down the recording, so we just never use them. If you want no metadata at all, you need detachhdr=false and metadata=false. Code should be updated to reflect that we don't support inline headers.

perks commented 8 years ago

Ah yeah, adding the other argument seemed to let it go through, thanks!

garverp commented 8 years ago

Also, I see you have a GPSDO. If you are wanting high accuracy timing data, be very careful on the --segsize option. As the help notes, segsize MUST be a factor of element size, which defaults to 1024. No timestamp interpolation is done so you will get a large timing variance if you don't do this.

segsize=K*element_size, K = 1,2,....