¿ªÔÆÌåÓý

sBITX with FreeDV


 

Now I think it would be pretty slick to have a FreeDV codec2 integration.?
I'm not a very good coder but I can see that hooking to the library would be similar to the way FLDigi is tied in.
We'd need to route the audio chain to/from the W<8731 and then port the FreeDV to/from the USB headset. the rest is just triggering TX and I asserting the codec2 to encode/decode.
I think this would be a super cool additional mode to bake in
what say you?



 

This is on my todo list. There are sufficient hooks to make this work in modems.c.
- f

On Sun, Mar 31, 2024, 9:05 PM Jon / W2JON <sigmazgfx@...> wrote:
Now I think it would be pretty slick to have a FreeDV codec2 integration.?
I'm not a very good coder but I can see that hooking to the library would be similar to the way FLDigi is tied in.
We'd need to route the audio chain to/from the W<8731 and then port the FreeDV to/from the USB headset. the rest is just triggering TX and I asserting the codec2 to encode/decode.
I think this would be a super cool additional mode to bake in
what say you?



 

Excellent! That is very good to hear.?


Paul
 

¿ªÔÆÌåÓý

When I initially started looking at trying Freedv I was looking at the receive path, I didn¡¯t get any rx audio into Freedv, now I think I realise why.

I had the radio in SSB mode for the band being tried as Freedv uses SSB mode as its base, audio doesn¡¯t go to the Loopback device unless radio is in Digital Mode, that is one switch that that will need to be dealt with in code possibly so that SSB audio can be fed either directly to a specific loopback(s) or directly to the Freedv app in parallel with the existing speaker/mic I/O.

Initial thoughts to keep things simple would be to use a pair of loopbacks to take normal audio to/from the radio for use cases such as Freedv and the USB/Bluetooth options.?
By doing it that way it doesn¡¯t interfere with the core radio functionaility and allows development of external use cases such as Freedv/USB/Bluetooth or the addition of additional audio based DSP to clean up signal to noise related issues and perhaps provide a notch capability too for removing unwanted carriers from signals being listened to and then take filtered, or non-filtered audio to the additional functions.

I noticed using sox in the USB rx audio command line approach there was an improvement in the audio quality (-f cd switch) compared to the speaker output and this would certainly improve the input to Freedv by trying this approach to improve the signal to noise ratio to make it easier for Freedv to decode the digital audio.

If i had the ability, in a step by step type approach I would:
take the audio feed that goes to speaker, use some audio dsp capabilities to clean up/tailor audio, then feed that audio to speaker and in parallel to a loopback interface to allow alternative audio output device use such as USB/Bluetooth/Freedv etc.
Then do the reverse for mic audio - take mic input from audio source (either physical mic or digital mic source), tailor audio or not as appropriate, feed digital mic audio into loopback interface (allows different digital audio sources to be switched using same loopback) then in parallel with physical mic to the mic path of radio, may want to do this bit via a software switch to choose input source to prevent multiple input source audio mixing problems

The standard 2gb pi might struggle with running the radio and the Freedv app but would be a great addition to the radio as an integrated mode if it could be made to work.

Watching with interest, got a few things going on at the moment so not much time for testing but happy to help wherever I can.

Regards
Paul G0KAO



On 1 Apr 2024, at 05:02, Jon / W2JON <sigmazgfx@...> wrote:

?Interesting.. so the loopbacks don't feed into the system unless the TX is asserted via API? I ran a test with the USB headset tool and had my modulated codec audio piping into loopback 2,0 and manually pu the radio into TX but it didn't pass the modulated codec audio until the PTT in the USB headset tool was enabled. I get it now.?
LMK if I'm on to something here or if this is just a lucky mistake.


 

Thanks for the reply Paul.
So I¡¯m giving it a go with the codec2 library without the FreeDV gui so I think even the 2gb Pi would be slightly more performant which is helpful.
I¡¯ve also noticed that while the FreeDV gui control surface does rescale somewhat, it¡¯s still just about unusable on the 7¡± screen.

I had a few observations yesterday, with other digi tools like wsjtx, js8call, even fldigi. The radio to digi loopback seems to be active. Meaning that the waterfalls show signals when in USB RX .

It seems that only the TX audio path is hindered.
At least that¡¯s what I have noticed.

This is a good safety measure just as the mic PTT is unavailable in digital mode. But a slight annoyance with this specific situation..

The entire deployment is an amazingly robust effort and I honestly wouldn¡¯t be able to applaud Ashhar enough without causing injury to my hands.


 

Cool. What frequencies usually have activity? I will download and test it. Thanks for making this.



-JJ


 

I answered my own question...




 

There is activity all over but the main calling freqs are found around the listed watering holes.
You can also check the site for more info about the project. I was thinking for a portable radio it would be nice to have it incorporated.
I do hear some activity on 14.236 I need to change antennas

80 meters:?3.625, 3.643, 3.693, or 3.697 MHz
60 meters:?5.4035 MHz or 5.3665 MHz (in countries where allowed)
40 meters:?7.177 MHz and 7.190 MHz
20 meters:?14.236 MHz and 14.240 MHz
17 meters:?18.118 MHz?


 

Well Jon and I just had our first QSO using FreeDV on HF. I was using the sBitx with about 10 watts p2p.


Pretty cool.



-JJ


 

That worked out really well!
Thanks for the QSO JJ and more importantly for trying it out.



 

Congrats!

I can't wait to try it.

Was it hard to install?

How did it sound?

It looks like this radio is getting better everyday!


 

It's not too difficult to install. You just clone the codec2 repo and make the release in very much the same as building the sBitx the radio software.?
the only extra step is to drop the freedv_ptt file into the correct folder, but it should probably be reconfigured to point to the codec files no matter where you plop the executable.?
I'm still just happy it works, maybe it will be refined soon.. But yeah, Things are getting better every day.

-Jon
W2JON


 

"You just clone the codec2 repo and make the release in very much the same as building the sBitx the radio software."

Some of us might need some more help than that.

Any chance you would have time to write a line by line HOWTO???? ?Please...

Or maybe I could help write that up with some pics if you had time to walk me through it.

-Jeff
AE9J


 

No problem Jeff...
From a terminal window or ssh session:
git clone https://github.com/drowe67/codec2.git
cd codec2
mkdir build_linux
cd build_linux
cmake ..
make

extract and drop the freedv_ptt file from my previous message into the? /home/pi/codec2/build_linux?folder
in the /home/pi/codec2/build_linux folder type chmod +x freedv_ptt
and finally to launch it with ./freedv_ptt
I would add it to the sBITX toolbox to make launch easier next time.




 

It is best to add freedv as a mode. I don't have a peer to test it with in my city/India. Let me see if someone can volunteer...
- f

On Thu, Apr 4, 2024, 4:37 AM Jon / W2JON <sigmazgfx@...> wrote:
No problem Jeff...
From a terminal window or ssh session:
git clone
cd codec2
mkdir build_linux
cd build_linux
cmake ..
make

extract and drop the freedv_ptt file from my previous message into the? /home/pi/codec2/build_linux?folder
in the /home/pi/codec2/build_linux folder type chmod +x freedv_ptt
and finally to launch it with ./freedv_ptt
I would add it to the sBITX toolbox to make launch easier next time.




 

I agree 100% Ashhar. Unfortunately, I have not spent much time exploring the inner workings of the code base yet. but I would truly love to integrate this as a mode without the need for an external tickler.?
as you can see by the code I placed there is not much going on. basically toggling tx and rx and sending audio to/from the loopback and USB headset.?
The codecs for RX and TX run concurrently and are one-liners to start.

I just haven't had the time to figure out how to graft it in yet.


 

adding it as a mode would be a good thing!
The last?I looked at it, the audio still wasn't that compelling.
They got a big grant, I hope it has helped.? It has great promise I think, but need better audio
Gordon Kx4Z


On Wed, Apr 3, 2024 at 7:26?PM Ashhar Farhan <farhanbox@...> wrote:
It is best to add freedv as a mode. I don't have a peer to test it with in my city/India. Let me see if someone can volunteer...
- f

On Thu, Apr 4, 2024, 4:37 AM Jon / W2JON <sigmazgfx@...> wrote:
No problem Jeff...
From a terminal window or ssh session:
git clone
cd codec2
mkdir build_linux
cd build_linux
cmake ..
make

extract and drop the freedv_ptt file from my previous message into the? /home/pi/codec2/build_linux?folder
in the /home/pi/codec2/build_linux folder type chmod +x freedv_ptt
and finally to launch it with ./freedv_ptt
I would add it to the sBITX toolbox to make launch easier next time.




 

I'm a big fan of the OFDM data capabilities that are spinning off of it..
You are right and the audio quality is certainly not ESSB but I think it may be better than most DMR transmissions I've heard. but its incredible considering its minuscule bandwidth requirements.
Some FreeDV modes are a bit more susceptible to multipath issues and can at times fall short on performance when conditions are poo and others have better quality of service.
But it works well enough for experimenting and this platform is a perfect fit for that kind of stuff.?
jon
W2JON


 

On Wed, Apr 3, 2024 at 07:07 PM, Jon / W2JON wrote:
cmake ..
I got to the cmake .. command and then I got an error.

pi@sbitx:~ $ git clone https://github.com/drowe67/codec2.git
Cloning into 'codec2'...
remote: Enumerating objects: 1701, done.
remote: Counting objects: 100% (1409/1409), done.
remote: Compressing objects: 100% (931/931), done.
remote: Total 1701 (delta 669), reused 792 (delta 462), pack-reused 292
Receiving objects: 100% (1701/1701), 17.19 MiB | 204.00 KiB/s, done.
Resolving deltas: 100% (690/690), done.
pi@sbitx:~ $ cd codec2
pi@sbitx:~/codec2 $ mkdir build_linux
pi@sbitx:~/codec2 $ cd build_linux
pi@sbitx:~/codec2/build_linux $ cmake ..
bash: cmake: command not found
pi@sbitx:~/codec2/build_linux $ cmake
bash: cmake: command not found
pi@sbitx:~/codec2/build_linux $ ls -ltr
total 0
pi@sbitx:~/codec2/build_linux $ ls
pi@sbitx:~/codec2/build_linux $ make
make: *** No targets specified and no makefile found.? Stop.
pi@sbitx:~/codec2/build_linux $ cmake ..
?
Then I went to Add / Remove sofftware tool from the Pi start Menu.? I them added and installed a lot of stuff around CMake.? But I guess I didn't install enough to keep moving forward with your instructions.
?
bash: cmake: command not found
pi@sbitx:~/codec2/build_linux $ cmake ..
?
-Jeff?
AE9J


 

Jeff run this command and then try again:?
sudo apt install git build-essential cmake