projecthorus / wenet

Wenet ("The Swift One") - Transmit and Receive code for the Project Horus High-Speed Imagery Payload.
GNU General Public License v3.0
89 stars 9 forks source link

Problems with the FSK demodulator #7

Closed radio-satellites closed 11 months ago

radio-satellites commented 11 months ago

Hello!

Thank you for your wonderful software!

I am having problems with integrating the FSK demodulator from codec2 into my software. I have referenced your scripts multiple times, but I am unable to make any progress.

I am using the command nc -l -u localhost 7355 | ./fsk_demod --stats=100 -b 1 -u 23500 2 48000 100 - - 2> >(python3 test_read_1.py) | python3 test_read_2.py to receive audio from GQRX and then demodulate.

I'm expecting the stderr (i.e info from the demodulator) to go to test_read_1.py and the actual FSK data to go into test_read_2.py. Is that not right? I'm seeing nothing from test_read_1.py and only the stderr from test_read_2.py.

Here are the files, by the way:

test_read_1.py:

import sys

while True:
    data = sys.stdin.readline()
    print(data)
    print("RECEIVED DATA NO 1!")

test_read_2.py:

import sys

while True:
    data = sys.stdin.buffer.read(256) #Read 256 bytes
    print("BAGUETTE")

I have been struggling for a few weeks now, and I would extremely appreciate any insight into this issue!

radio-satellites commented 11 months ago

Ah and while I'm here... what format does the FSK demodulator output to? It says in the helpfile that it outputs in a "one-byte-per-bit format," does that signify that 00000001 represents a logic 1 and a 00000000 represents a logic 0? I am not using soft symbols.

darksidelemm commented 11 months ago

This is not really the place to ask for help with the fsk demodulator. That code is from the codec2 repository ( https://github.com/drowe67/codec2 ) , so it would be best to ask for help there, and also to use the latest version of the demodulator from there, since what is in this repository was forked off from codec2 some time ago.