airspy / si5351c / 2.5mps to 2.048mps #airspy_rx


Olivier SCHMITT
 

Hello Dear all,

First, thanks for accept my subscription.

I use several software for create some ham radio beacon.
I just buy few month later a airspy v1.

I need to convert the 2.5mps to 2.048 mps to pipe it by nc or num to a rtl_tcp compatible client.

I have try several thinks but not good solution yet found.

1.First approche is to downsampling form 2.5 to 2.048MPS by piping in third party software like:

 airspy_rx -a 1 -t 2 -s 0x440464C83928384F -r /dev/stdout -f 145 -g 10 -a 2500000 -b 0 | csdr convert_s16_f |  sox -r 2500000 -c2 -b 16 -e signed -q -t raw - -t raw -r 2048000 - | csdr convert_f_u8 | nc -l 45001

But this make sevral unwhanted non desired spourious and image signals, seeb below.

2.Second approche is to modify the pll clock on the adc.
I think this is the best solution

I have see that airspy use si5351c pll and get airspy_si5351c tools for read and write the register.
But i realy dont no what are the registers and values to modify.
I also don't know if it stays in memory when running airspy_rx.


Can someone help?

Many thanks in advance!










Simeon Cran
 

For 1) are you sure your computer is able to run that pipeline without dropping buffers? Is sox applying an antialiasing filter?

I could maybe be more helpful if you will explain the pipeline a bit more.


On Fri, Mar 18, 2022 at 2:14 PM Olivier SCHMITT <sc.olivier@...> wrote:
Hello Dear all,

First, thanks for accept my subscription.

I use several software for create some ham radio beacon.
I just buy few month later a airspy v1.

I need to convert the 2.5mps to 2.048 mps to pipe it by nc or num to a rtl_tcp compatible client.

I have try several thinks but not good solution yet found.

1.First approche is to downsampling form 2.5 to 2.048MPS by piping in third party software like:

 airspy_rx -a 1 -t 2 -s 0x440464C83928384F -r /dev/stdout -f 145 -g 10 -a 2500000 -b 0 | csdr convert_s16_f |  sox -r 2500000 -c2 -b 16 -e signed -q -t raw - -t raw -r 2048000 - | csdr convert_f_u8 | nc -l 45001

But this make sevral unwhanted non desired spourious and image signals, seeb below.

2.Second approche is to modify the pll clock on the adc.
I think this is the best solution

I have see that airspy use si5351c pll and get airspy_si5351c tools for read and write the register.
But i realy dont no what are the registers and values to modify.
I also don't know if it stays in memory when running airspy_rx.


Can someone help?

Many thanks in advance!










Jakob DD5JFK Ketterl
 

On Fri, Mar 18, 2022 at 10:14 PM, Olivier SCHMITT wrote:
 airspy_rx -a 1 -t 2 -s 0x440464C83928384F -r /dev/stdout -f 145 -g 10 -a 2500000 -b 0 | csdr convert_s16_f |  sox -r 2500000 -c2 -b 16 -e signed -q -t raw - -t raw -r 2048000 - | csdr convert_f_u8 | nc -l 45001
That pipeline is unfortunately flawed. First you convert 16bit signed ints to float (32bit), and then you tell sox to handle it as signed 16bit int again.

Also, I would be a bit concerned that sox is intended for audio processing, but not IQ data. You may want to checkout "csdr fractional_decimator_ff" with a decimation factor of 1.2159533074 and the "--prefilter" argument. The suffix "_ff" indicates that both input and output are float, so it would suit your current pipeline.


jdow
 

The firmware for the AirSpy models is available on GitHub. Forking the appropriate project and creating your own custom modifications is the only path I can think of for you that has a chance of working properly if you cannot do the right thing and adapt the consumer to use other data rates than 2.048 Msps. I am not sure that the AirSpy hardware could be switched over to use 2.048 Msps, either; but, it is worth the look to see if it's within your abilities.

{o.o}

On 20220318 18:53:38, Simeon Cran wrote:
For 1) are you sure your computer is able to run that pipeline without dropping buffers? Is sox applying an antialiasing filter?

I could maybe be more helpful if you will explain the pipeline a bit more.


On Fri, Mar 18, 2022 at 2:14 PM Olivier SCHMITT <sc.olivier@...> wrote:
Hello Dear all,

First, thanks for accept my subscription.

I use several software for create some ham radio beacon.
I just buy few month later a airspy v1.

I need to convert the 2.5mps to 2.048 mps to pipe it by nc or num to a rtl_tcp compatible client.

I have try several thinks but not good solution yet found.

1.First approche is to downsampling form 2.5 to 2.048MPS by piping in third party software like:

 airspy_rx -a 1 -t 2 -s 0x440464C83928384F -r /dev/stdout -f 145 -g 10 -a 2500000 -b 0 | csdr convert_s16_f |  sox -r 2500000 -c2 -b 16 -e signed -q -t raw - -t raw -r 2048000 - | csdr convert_f_u8 | nc -l 45001

But this make sevral unwhanted non desired spourious and image signals, seeb below.

2.Second approche is to modify the pll clock on the adc.
I think this is the best solution

I have see that airspy use si5351c pll and get airspy_si5351c tools for read and write the register.
But i realy dont no what are the registers and values to modify.
I also don't know if it stays in memory when running airspy_rx.


Can someone help?

Many thanks in advance!











Olivier SCHMITT
 

Hello all,

First, thanks for your reply.

1.sox
Just after send my question, I found a simple solution with sox is to use as:

airspy_rx -a 1 -t 2 -s 0x440464C83928384F -r /dev/stdout -f 145 -g 10 -a 2500000 -b 0 | sox -r 2500000 -c2 -b 16 -e usigned -q -t raw - -t raw -r 2048000 -c2 -b 16 -e usigned - | nc -l 45001

It seems that it works but I'm not sure that this decimation does not lead to an increase in the noise floor...
Here, frequency and signals bandwitdh look good.

The bad news is that sox use 70% cpu on a single core.
But I think i will use this solution at the moment.

I try to use it with the --multithread option but as you can see below that it's not possible to use my 24 core 3.4ghz just for that :D


2.csdr
I dont no wy but when i try to use csdr for this application, it seems that the sound is jerky.
So i look at the cpu usage and i see 99% on a single core, i think that the answer...

3.AirSpy custom firmware
I think this can be the bether solution if that work.
I have already use a si5351 but a version in some project.
I must take my time to view, i think it can be possible to rewrite the entier register generated by the clockbuilder software.
But i prefer the Airspy Si5351 approach if it's possible.

I will try to send an email to Airspy technical support for ask.

If someone have already try this experiment, i am interested.

4.What is the purpose

I will use it for some beacon, it's mind that we use it for websdr, FT8 and wspr automatic decoding.
I plan to use some airspy for ham bands upper the 6m because i see that it's a bit better than a rtlsdr key.
You can visit our first team project on http://f4kji.fr/
PS: QO-100 actualy unavalaible.

Many Thanks to all.

F4HTB.

Multithread sox:


Single thread:






j.vankatwjk
 

In my DAB software I need a damplerate of 2048000, and the (old) model
of airspy I have supports 2.5M, so I apply a filter (DAB channels have a
frequency distance of app 1.7 MHz), that can be controlled by the user
followed by linear interpolation, a simple  mapping where 2500 samples
are mapped upon 2048 outgoing samples


--
Jan van Katwijk




Andy - Arlington TX
 

Actually, you only need to convert incoming sets of 625 samples into outgoing sets of 512 samples, every 250 milliseconds.

-- Andy - Arlington TX


jdow
 

And all I need to do is snap my fingers and it's done....
{+_+}

On 20220320 17:33:57, Andy - Arlington TX wrote:
Actually, you only need to convert incoming sets of 625 samples into outgoing sets of 512 samples, every 250 milliseconds.

-- Andy - Arlington TX


Olivier SCHMITT
 

Hello,

Thanks for they purpose.
As i say i will use sox to start.

The bether way is to change adc clock because this saves cpu time on the client side.

I hope customer support will respond.
I think it's easy for them to suggest the firmware modification or say if it's not possible.

What encourages me is to see that I am not the only one interested.

I give you news as soon as possible.




Le 21/03/2022 à 08:44, jdow a écrit :
And all I need to do is snap my fingers and it's done....
{+_+}

On 20220320 17:33:57, Andy - Arlington TX wrote:
Actually, you only need to convert incoming sets of 625 samples into outgoing sets of 512 samples, every 250 milliseconds.

-- Andy - Arlington TX



Olivier SCHMITT
 

Hello all,

Good response from Airspy team:

You can set the sample rate to 4096000 then decimate by 2 using a half band filter.

I had not seen somewhere that you could use this samplerate but it work great.

So i test:

airspy_rx -s 0x440464C83928384F -t 2 -r /dev/stdout -f 145 -g 10 -a 4096000 -b 0 | sox -t raw -r 4096000 -c 2 -e unsigned-integer -b 16 - -t raw -r 2048000 -c 2 -b 8 -e unsigned-integer - | nc -l 45001

It work grep with 60% of one core cpu usage.
I have test others things with csdr, maybe I'm doing it wrong but in the best case I lose 3db snr compared to sox.

Best all! 73!

Le 21/03/2022 à 16:21, Olivier SCHMITT via groups.io a écrit :
Hello,

Thanks for they purpose.
As i say i will use sox to start.

The bether way is to change adc clock because this saves cpu time on the client side.

I hope customer support will respond.
I think it's easy for them to suggest the firmware modification or say if it's not possible.

What encourages me is to see that I am not the only one interested.

I give you news as soon as possible.




Le 21/03/2022 à 08:44, jdow a écrit :
And all I need to do is snap my fingers and it's done....
{+_+}

On 20220320 17:33:57, Andy - Arlington TX wrote:
Actually, you only need to convert incoming sets of 625 samples into outgoing sets of 512 samples, every 250 milliseconds.

-- Andy - Arlington TX




Martin Smith
 

On Mon, Mar 21, 2022 at 08:45 PM, Olivier SCHMITT wrote:


You can set the sample rate to 4096000 then decimate by 2 using a half band filter.
FYI: You need firmware is v1.0.0-rc7 (2016-04-23) or later installed on the Airspy R0/R2/Mini for that sample rate to work.