Commit Graph

148 Commits

Author SHA1 Message Date
Sebastien Van Cauwenberghe 9a1e8769ab Add EOT message
When program keeps running, the ### EOT message allows the user
to know that the stdin has been fully transmitted.
2017-02-16 14:05:31 -08:00
Kamal Mostafa c2e4d9e1c4 Do not emit 0.5 sec flush for audio file output 2016-04-17 09:49:27 -07:00
Chris Osborn 513a11d454 Limit carrier/idle generation for input with delays
For non-interactive output (writing to an audio file), generate the
idle output carrier for same duration that the input is idle.  Makes
this case generate an output .wav file of just over 1 second duration:

  { echo hello; sleep 1; echo world; } | minimodem --tx -f /tmp/xx.wav 300
2016-04-17 08:49:36 -07:00
Kamal Mostafa 84b2406b97 Rename tv_idletimeout (no functional change) 2016-04-17 08:43:32 -07:00
Kamal Mostafa ad83ef5df3 Refactor emit idle tone (no functional change)
Clean up the "emit idle tone" code, which should never have involved
tx_leader_bits_len (that was a copy-paste laziness).

"Emit idle tone" simply generates the idle tone for a hardcoded period
of time now codified as 'idle_tone_usec' and set to 1/25 of a second
(to match the existing behavior).
2016-04-13 09:41:20 -07:00
Colin Ian King d6a616fff8 Use %td for ptrdiff_t printf format specifier
Signed-off-by: Colin Ian King <colin.king@canonical.com>
2016-03-21 12:42:29 -07:00
Colin Ian King 632e92f1ae Use %u printf format specifier for unsigned int
Signed-off-by: Colin Ian King <colin.king@canonical.com>
2016-03-21 12:42:29 -07:00
Kamal Mostafa 3a8d490074 fix harmless strncasecmp off-by-one 2016-02-20 07:02:09 -08:00
Kamal Mostafa f801ae3f28 update copyright dates 2016 2016-02-19 12:29:58 -08:00
Rodrigo Menezes f48257ac59 TTY/TDD support 2016-01-20 10:07:21 -08:00
Kamal Mostafa 2b5e2c6a40 Do not enable tx-carrier for non-interactive --file sessions
The logic that determined whether to 'block_input' was backwards with
respect to non-interactive --file sessions, such that using --file
*enabled* the tx-carrier behavior when it should have disabled it.
This went unnoticed because on reasonably fast systems, reading the
input data from the file never induce the timeout anyway -- only very
slow machines reveal the problem: long gaps of 'mark' between each
frame, as if each input character was slowly typed interactively.

Fixes: ecebf01 Add ability to output a carrier while waiting for data
2015-08-24 13:54:34 -07:00
Kamal Mostafa 639b695f31 eliminate all instances of implicit double-promotion 2015-08-23 10:16:15 -07:00
Kamal Mostafa d002c60a92 appease clang self-assignment warning 2015-08-23 09:12:34 -07:00
Kamal Mostafa ed8e633af0 fix non-integer mark/space frequency handling 2015-08-23 09:00:40 -07:00
Nick Moriarty ecebf013f0 Add ability to output a carrier while waiting for data
Added --tx-carrier, which continues to output a tone while a blocking source
waits for more data on stdin.
2015-04-22 17:48:28 +01:00
Kamal Mostafa 49bfa06f8e minimodem: --binary-raw {nbits} output mode 2015-04-21 14:01:03 -07:00
Kamal Mostafa ff47edfb68 minimodem: accept "uic*" for uic-ground 2014-11-16 12:46:14 -08:00
Marcos Vives Del Sol 532bcfb84c Honor --invert-start-stop in TX 2014-11-16 12:46:14 -08:00
Marcos Vives Del Sol 25d01f73d8 Add UIC-751-3 decoding and optional MSB-first TX/RX
[ kamal: cleanup ]
2014-11-16 12:46:14 -08:00
Marcos Vives Del Sol ff0346f5a8 Really use 64 data types for demodulation
[ kamal: cleanup ]
2014-11-16 12:46:14 -08:00
Kamal Mostafa 2cdf2d29e4 build_expect_bits_string cleanup 2014-11-16 12:46:14 -08:00
Marcos Vives Del Sol bbf121a63f Compute expected bit strings outside of main loop 2014-11-16 12:46:14 -08:00
Marcos Vives Del Sol cc6b5c9123 Change code to use 64-bit variables for decoding 2014-11-16 12:46:13 -08:00
Marcos Vives Del Sol 909adf0d59 Add option to change start-stop polarity 2014-11-16 12:46:13 -08:00
Kamal Mostafa 746f0f6c7a minimodem: free samplebuf to appease valgrind 2014-11-14 09:12:27 -08:00
Kamal Mostafa ba5ecec2f7 update copyright dates 2014 2014-11-13 10:56:31 -08:00
Kamal Mostafa a6a7e0da35 callerid: warn when used with --auto-carrier 2014-11-08 09:27:31 -08:00
Kamal Mostafa 151e360720 minimodem: -7 implements 7-bit ASCII 2013-09-17 07:56:20 -07:00
Kamal Mostafa a524e38222 minimodem: fix --baudot cmdline switch
The --baudot (a.k.a. -5) command line switch didn't actually engage
the Baudot encoder/decoder, just set 5 bits per frame.
2013-09-05 15:36:49 -07:00
Kamal Mostafa f9bdf43423 update copyright dates 2013-06-10 09:28:02 -07:00
Kamal Mostafa 0140e0df12 minimodem: --tx SAME emits 16 sync-byte preamble
Emit a preamble of 16 (hardcoded) sync-bytes if --sync-byte is
specified with --tx mode.  This makes --tx SAME emit the required
preamble of 16 0xAB's automatically.  So --rx SAME now directly
decodes the output of --tx SAME without needing to manually inject
the preamble byte(s), simplifying the test case.

Thanks to Harold Giddings, for reporting the issue.
2013-06-08 10:16:56 -07:00
Kamal Mostafa 24f1acff4f minimodem: fsk_transmit_frame factored out 2013-06-08 10:04:06 -07:00
Kamal Mostafa 8876f6674a minimodem: rename bfsk_sync_on_data to bfsk_do_rx_sync 2013-06-08 09:27:01 -07:00
Kamal Mostafa d774ad74dd minimodem: handle arbitrary --startbits N
minimodem --startbits N works for rx and tx, where (0 <= N <= 20).

Thanks Martyn (kronalias), for reporting.
2013-03-20 12:08:52 -07:00
Kamal Mostafa 7ab18a268f minimodem: do not call setitimer(new_value=NULL)
Linux kernel warns:

    minimodem calls setitimer() with new_value NULL pointer. Misfeature support
    will be removed

Thanks Robert Hooker, for reporting.
2013-01-25 15:03:54 -08:00
Kamal Mostafa 032d0bb79c minimodem: refine frame position if confidence falls
Allows for more accurate tracking, esp. for no-frame-bits protocols.
Fixes tests/test-80-SAME-datastream.
2012-11-03 14:20:33 -07:00
Kamal Mostafa 1446844d32 minimodem: do not transmit leader tone if no start bits 2012-11-03 14:10:44 -07:00
Kamal Mostafa 6ad778ce03 minimodem: fix --tx startbits/stopbits handling
Make --tx support specified --startbits and --stopbits; also enables --tx SAME.

Thanks to Jamie Batmanglidj for reporting the issue.
2012-11-01 12:48:40 -07:00
Kamal Mostafa 65493fa12a minimodem: --rx callerid
New "callerid" baudmode supports Bell202 Caller-ID (MDMF or SDMF) prototol.
2012-10-05 19:40:17 -07:00
Kamal Mostafa 49ccd10e1f minimodem: --rx prints all bytes unmolested, unless --print-filter
Now, minimodem prints all received bytes without isprint() filtering,
unless --print-filter is specified.  Allows for binary file transfers
and multibyte characters.
2012-10-05 13:29:30 -07:00
Kamal Mostafa 761cf00b16 minimodem: handle SIGINT on --rx: close the sa backend and print stats 2012-10-02 14:22:38 -07:00
Kamal Mostafa 2373364d9a minimodem: performance: read samples in larger blocks
For performance, read samples from the simpleaudio backend in larger
blocks when the number of bits per frame ends up being small.
2012-10-01 21:00:28 -07:00
Kamal Mostafa 6340365e2f simpleaudio-sndfile: fix minimodem tx_interactive
Un-break tx_interactive: minimodem enables tx_interactive whenever the
stream_name is NULL, so go back to using the stream_name as the sndfile
filename.
2012-09-10 20:02:53 -07:00
Kamal Mostafa 9f1695a3b6 minimodem: fix --auto-carrier crash on positive-shift modes 2012-09-09 17:42:53 -07:00
Kamal Mostafa d603fc444d minimodem: --alsa[=plughw:X,Y] 2012-09-09 15:24:35 -07:00
Kamal Mostafa fabd47ba99 minimodem: less aggressive refine on acquisition 2012-09-05 23:22:27 -07:00
Kamal Mostafa c8dd7ac06b minimodem: fix --rx-one 2012-09-05 09:37:06 -07:00
Kamal Mostafa 3a1469b85e minimodem: fix usage message 2012-09-05 09:36:12 -07:00
Kamal Mostafa 30de59026b minimodem: --inverted switches the mark/space freqs 2012-09-04 16:26:10 -07:00
Kamal Mostafa 8731b54bc2 minimodem: refine fsk frame position on carrier acquisition
FSK_ANALYZE_NSTEPS was previously 10.

Now FSK_ANALYZE_NSTEPS_CARRIER_LOCK is 100, and FSK_ANALYZE_NSTEPS is
reduced to 4.

(Also, try_confidence_search_limit = INFINITY on carrier acquisition frame).

Effects: Better initial phase lock on signal in the first
place; sloppier tracking of fast/slow signals; reduced longterm CPU load.
2012-09-03 23:31:16 -07:00