2

I want to know how the file sink in GNU Radio works. Does it receive a signal and then write it to the file, and while it's being written signal receiving is not done?

I just want to make sure if some portion of the signal is lost without being written to the file because of the time taken for writing.

Any help or reading material regarding this would be very much appreciated.

user1190937
  • 69
  • 2
  • 8

2 Answers2

2

Depending the sampling rate of the device, writing samples to file without discontinuities may be impossible.

Instead writing to disk, you can write the samples in a ramdisk. Ramdisk is an abstraction of file storage, using the RAM memory as storage medium. The great advantage of the ramdisk is the very fast read/write data transfers. However, the file size is limited somehow by the amount of RAM memory that the host has.

Here is a good article that will help you to create a ramdisk under Linux. I am sure that you will easily find a guide for Windows too.

Manos
  • 2,136
  • 17
  • 28
  • Thank you very much for your reply Manos. I have another probably a silly question, would File Sink still be able to write the samples in a ramdisk? Or is there any other built in gnu radio block for that? – user1190937 Aug 28 '16 at 23:26
  • Hi Manos, Please excuse my above comment. I created a ramdisk and the File Sink can directly write data into it. I will compare the performance to see if there is a considerable increase. Thanks a lot again! – user1190937 Aug 29 '16 at 00:31
  • As @Chris Kuethe mentioned, some overflow messages at the start of the flowgraph may be ok. I expect that the write speed with the ramdisk should significantly increase. If overflow messages persist, that means that your connection between the host computer and the SDR hardware is the bottleneck and cannot meet the real-time requirements. – Manos Aug 29 '16 at 18:44
1

A file sink won't normally block your radio source as long as the average write speed exceeds the radio blocks output speed. There are internal buffers that can smooth things out a little bit, but if your disk fills up then the rest of your flowgraph will stall.

If you're not seeing "O" messages in the output console, you're not dropping samples.

  • Thanks for the answer. I do get a few 'O' s. Is there a way to speed up the writing process? – user1190937 Aug 26 '16 at 03:38
  • 1
    A few "O" messages at startup are not uncommon. If they persist, you may simply have to use a faster disk or a simple flowgraph to record the spectrum you're interested in then run your analysis offline. You might also have some luck with reducing your system load. – Chris Kuethe Aug 26 '16 at 22:58