Builds static versions of wxWidgets, portaudio, codec2-dev, which are commonly
missing on many Linux systems, or of the wrong (older) version.
-1/ Assuming the freedv-dev sources is checked out into ~/fdmdv2-dev:
+1/ Assuming the fdmdv2-dev source is checked out into ~/fdmdv2-dev:
$ sudo apt-get install libgtk2.0-dev libhamlib-dev libsamplerate-dev libasound2-dev libao-dev
$ cd fdmdv2-dev
2/ Then you can configure FreeDV using your local codec-dev, something like:
- $ cmake -DCMAKE_BUILD_TYPE=Debug -DBOOTSTRAP_WXWIDGETS=TRUE -DCODEC2_INCLUDE_DIRS=/home/david/codec2-dev/src -DCODEC2_LIBRARY=/home/david/codec2-dev/build_linux/src/libcodec2.so -DUSE_STATIC_CODEC2=FALSE -DUSE_STATIC_PORTAUDIO=TRUE -DUSE_STATIC_SOX=TRUE ../
+ $ cmake -DCMAKE_BUILD_TYPE=Debug -DBOOTSTRAP_WXWIDGETS=TRUE -DCODEC2_INCLUDE_DIRS=/path/to/codec2-dev/src -DCODEC2_LIBRARY=/path/to/codec2-dev/build_linux/src/libcodec2.so -DUSE_STATIC_CODEC2=FALSE -DUSE_STATIC_PORTAUDIO=TRUE -DUSE_STATIC_SOX=TRUE ../
3/ OR build a local copy of codec2-dev:
[ ] normalise output pwr across modes?
+ or maybe peak output?
+ option?
- [ ] test mode
- [ ] get error patterns working again, both 700 and 1600
- [ ] how to plot error histogram
+ [ ] test frames
+ [X] freedv API support
+ [X] BER displayed on GUI for 700 and 1600
+ [ ] plot error patterns for 700 and 1600
+ [ ] plot error histograms for 700 and 1600
[X] file sample replay at 7500Hz work OK?
[X] interp 7500 to 8k for spectrum plotting
[X] rotation of scatter diagram on FreeDV 700
[X] freq track plot
+[ ] Mel Bugs
+ [X] resync issue
+ [X] equalise power on 700 and 1600
+ [X] research real and complex PAPR
+ [ ] Squelch control on 1600 mode will not open up squelch to 0 (appears to be around 2 dB)
+ [ ] waterfall and spectrum in analog mode
+ [ ] On TX, intermittently PTT will cause signal to be heard in speakers. Toggle PTT or
+ Stop/Start toggle and then starts working.
+ [ ] There is a .dll missing otherwise FreeDV will not excite. We tested it on xp, win7, 8, 8.1 and 10.
+ Needs ilbusb0.dll the 32bit one on all releases.
+ [ ] The waterfall in analog mode appears to quit working sometimes?
+ [ ] I am not sure the "checksum" is still working when enabled (1600 mode)
+
[ ] FreeDV 700 improvements
[ ] bpf filter after clipping to remove clicks
[ ] tcohpsk first, measure PAPR, impl loss
[ ] error masking
[ ] plotting other demod stats like ch ampl and phase ests
-[ ] win32 X-compile
- [ ] installer
- [ ] works
-
+[ ] win32
+ [X] X-compile works
+ [X] basic installer
+ [ ]
+
[ ] Small fixes
[X] Playfile bug
[X] running again
[X] default squelch 2dB
[ ] cmd line file decode
[ ] Waterfall direction
- [ ] test mode on 1600 with freedv api
- + maybe calc stats, hist
[ ] documenttation or use, walk through,you tube, blog posts
+ [ ] scatter diagram agc with hysteresis
[ ] Web support for Presence/spotting hooks
// WxWidgets - initialize the application
IMPLEMENT_APP(MainApp);
+//FILE *ft;
FILE *g_logfile;
//-------------------------------------------------------------------------
frame->Show();
g_parent =frame;
+ //ft = fopen("tmp.raw","wb");
+ //assert(ft != NULL);
+
return true;
}
int w;
int h;
+ //fclose(ft);
#ifdef __WXMSW__
fclose(g_logfile);
#endif
if (snr_limited > 20.0) snr_limited = 20.0;
char snr[15];
- sprintf(snr, "%d", (int)(snr_limited+0.5)); // round to nearest dB
+ sprintf(snr, "%d", (int)(g_snr+0.5)); // round to nearest dB
//printf("snr_est: %f m_snrBeta: %f g_snr: %f snr_limited: %f\n", g_stats.snr_est, m_snrBeta, g_snr, snr_limited);
g_Nc = 14;
}
- // init freedv states
+ // init freedv states
g_pfreedv = freedv_open(g_mode);
g_pfreedv->callback_state = NULL;
g_pfreedv->freedv_get_next_tx_char = &my_get_next_tx_char;
g_pfreedv->freedv_put_next_rx_char = &my_put_next_rx_char;
+ //if (g_mode == FREEDV_MODE_700)
+ // cohpsk_set_verbose(g_pfreedv->cohpsk, 1);
//cohpsk_set_verbose(g_pfreedv->cohpsk, 1);
assert(g_pfreedv != NULL);
g_speex_st = speex_preprocess_state_init(g_pfreedv->n_speech_samples, FS);
-#ifdef TODO
- g_sz_error_pattern = fdmdv_error_pattern_size(g_pfreedv->fdmdv);
- g_error_pattern = (short*)malloc(g_sz_error_pattern*sizeof(short));
-
- assert(g_error_pattern != NULL);
-
-#endif
// adjust spectrum and waterfall freq scaling base on mode
m_panelSpectrum->setFreqScale(MODEM_STATS_NSPEC*((float)MAX_F_HZ/(g_pfreedv->modem_sample_rate/2)));
resample_for_plot(g_plotDemodInFifo, in8k_short, n8k, samplerate);
- // Get some audio to send to headphones/speaker. If out of
- // sync or in analog mode we pass thru the "from radio" audio
- // to the headphones/speaker. When out of sync it's useful to
- // hear the audio from the channel, e.g. as a tuning aid
-
+ // Get some audio to send to headphones/speaker. If in analog
+ // mode we pass thru the "from radio" audio to the
+ // headphones/speaker.
+
if (g_analog) {
memcpy(out8k_short, in8k_short, sizeof(short)*n8k);
+
+ // compute rx spectrum
+
+ COMP rx_fdm[n8k];
+ float rx_spec[MODEM_STATS_NSPEC];
+ unsigned int i;
+
+ for(i=0; i<n8k; i++) {
+ rx_fdm[i].real = in8k_short[i];
+ rx_fdm[i].imag = 0.0;
+ }
+ modem_stats_get_rx_spectrum(&g_stats, rx_spec, rx_fdm, n8k);
+
+ // Average rx spectrum data using a simple IIR low pass filter
+
+ for(i = 0; i<MODEM_STATS_NSPEC; i++) {
+ g_avmag[i] = BETA * g_avmag[i] + (1.0 - BETA) * rx_spec[i];
+ }
}
else {
fifo_write(cbData->rxinfifo, in8k_short, n8k);
per_frame_rx_processing(cbData->rxoutfifo, cbData->rxinfifo);
memset(out8k_short, 0, sizeof(short)*N8);
fifo_read(cbData->rxoutfifo, out8k_short, N8);
- }
+ }
+
// Optional Spk Out EQ Filtering, need mutex as filter can change at run time
g_mutexProtectingCallbackData.Lock();
assert(nin <= g_pfreedv->n_max_modem_samples);
nin_prev = nin;
+ //fwrite(input_buf, sizeof(short), nin, ft);
// demod per frame processing
for(i=0; i<nin; i++)
}
// only implemented for FreeDV 1600 at this stage
+
if (g_channel_noise && FREEDV_MODE_1600) {
fdmdv_simulate_channel(g_pfreedv->fdmdv, rx_fdm, nin, 2.0);
}
nin = freedv_nin(g_pfreedv);
g_State = g_pfreedv->sync;
- // compute rx spectrum & get demod stats, and update GUI plot data
+ // compute rx spectrum
modem_stats_get_rx_spectrum(&g_stats, rx_spec, rx_fdm, nin_prev);
+
+ // Average rx spectrum data using a simple IIR low pass filter
+
+ for(i = 0; i<MODEM_STATS_NSPEC; i++) {
+ g_avmag[i] = BETA * g_avmag[i] + (1.0 - BETA) * rx_spec[i];
+ }
+
if (g_pfreedv->mode == FREEDV_MODE_1600)
fdmdv_get_demod_stats(g_pfreedv->fdmdv, &g_stats);
if (g_pfreedv->mode == FREEDV_MODE_700)
cohpsk_get_demod_stats(g_pfreedv->cohpsk, &g_stats);
- // Average rx spectrum data using a simple IIR low pass filter
- for(i = 0; i < MODEM_STATS_NSPEC; i++)
- {
- g_avmag[i] = BETA * g_avmag[i] + (1.0 - BETA) * rx_spec[i];
- }
-
}
}
-#ifdef TODO
- if (n_ascii) {
- short ashort = ascii_out;
- fifo_write(g_rxDataOutFifo, &ashort, 1);
- }
-#endif
-
-
-
//-------------------------------------------------------------------------
// txCallback()
//-------------------------------------------------------------------------