xssfox / freedv-tnc

KISS TNC using FreeDV Modem
32 stars 4 forks source link

freedv_nin #3

Closed drowe67 closed 9 months ago

drowe67 commented 4 years ago

@xssfox looks cool, and nice to see this sort on innovation, I didn't know a TNC could be written in so few lines of code.

Without using freedv_nin() the demod will be busted.

I'm in the process of developing a longer packet mode for HF (a few seconds of data).

xssfox commented 4 years ago

Thanks @drowe67 !!! I just reviewed my code and it looks like I am in fact using nin. I'm currently using it when I call read on pyaudio to determine the amount of data required from the audio device. I assume this is the intended purpose.

drowe67 commented 4 years ago

You may have the call to freedv_nin() in the wrong place, should be just after freedv_rx(), see the freedv_rx.c example.

Some other thoughts:

Good idea to bench test/simulate (e.g. through a loopback device) first to make sure your app is working OK, e.g. try some simulated AWGN channels and see if you get the expected PER, compare to the ctests. Many things can go wrong with a real time system, and they are hard to find over the air :radio:

It's early days for the raw data interface, the API is the starting point. Several other steps need to be taken to reconfigure the modem from streaming voice to packet data, and make it useful for real HF channels. I'm working in that area atm. So have fun but don't expect too much with the modem in it's current state :smile:

However the general design (TNC/Python/audio) is pretty cool - will be useful as the modem performance increases.

drowe67 commented 4 years ago

More thoughts - maybe focus on getting the sound/TNC interface/general design all rock solid and doing sensible things over benign channels - then you'll be set up once the modem matures.

Is it possible to do simple GUIs using Python, like a waterfall. spectrum or scatter diagram? The Winlink modems pop up simple GUIs as tuning aids.

xssfox commented 4 years ago

Just for fun yesterday I I feed the modems output back into freedv-gui to demodulate as 700D voice just to see what it sounded like which was interesting 😄

I've been testing with a small amount of noise as I've noticed that without any noise passing through sometimes the modem thinks it's in sync and currently my TNC checks if the modem is in sync to determine if the channel is free to TX on (I'm not sure if this is related to my testing setup or the modem itself). I haven't yet done any performance testing yet, I need to come up with some nice ways of testing that include pyaudio as I think it's important to test some of the quirks of it's system.

@darksidelemm shared some code with me today of a ftt running in python's qt that would be interesting to add here as well.