drowe67 / freedv-gui

GUI Application for FreeDV – open source digital voice for HF radio
https://freedv.org/
GNU Lesser General Public License v2.1
206 stars 52 forks source link

No text decode for 1600 mode #114

Closed tmiw closed 3 years ago

tmiw commented 3 years ago

During testing of FreeDV 1.5.3 Siegfried Jackstien discovered that no text was being decoded by FreeDV in 1600 mode. On further investigation, it looks like Codec2 properly calls my_get_next_tx_char() to transmit the text but the following if block (freedv_1600.c lines 207-210) never calls my_put_next_rx_char():

                n_ascii = varicode_decode(&f->varicode_dec_states, &ascii_out, abit, 1, 1);
                if (n_ascii && (f->freedv_put_next_rx_char != NULL)) {
                    (*f->freedv_put_next_rx_char)(f->callback_state, ascii_out);
                }

Test procedure:

  1. Start FreeDV with PSK Reporter functionality turned off and in full duplex mode.
  2. Ensure radio AF levels are zero to mute receive audio.
  3. Set the FreeDV application to use 1600 mode (700D/E/2020 do not exhibit the issue).

Expected behavior: Text begins to appear in the text field at the bottom of the main GUI. Actual behavior: Generally no text. Rarely characters appear in the text field at the bottom due to corruption between TX and RX.

Codec2 branch tested: https://github.com/drowe67/codec2/tree/dr-2020-passthrough

tmiw commented 3 years ago

@drowe67, just realized I should have created this issue in codec2 and not here. Should I recreate there and close this one?

drowe67 commented 3 years ago

@drowe67, just realized I should have created this issue in codec2 and not here. Should I recreate there and close this one?

Nah it's OK here :+1:

I'll write a ctest at the Codec 2 API level for the 1600 txt feature. I just noticed it's not part of the standard freedv_rx.c demo any more, so I may have broken the feature and not realised.

drowe67 commented 3 years ago

@tmiw pls see https://github.com/drowe67/codec2/pull/176 from c5e58d03

Tracking that one down made me realise the protocol/frame format for FreeDV 1600 isn't documented anywhere!

tmiw commented 3 years ago

@drowe67, no worries. Just tested the latest changes from the linked PR and 1600's text field works fine now. 👍