Commit Graph

202 Commits

Author SHA1 Message Date
Andreas Eversberg 538b4a42ec Add wave file playback to replace TX audio 2017-07-15 07:38:16 +02:00
Andreas Eversberg 57d4d1739e AMPS/C-Netz: Correctly release pending transaction when creating a new one
If transactions is created, look on all channels for pending transaction
with same subscriber.

1. Remove that transaction.

2. Make channel return to IDLE.

3. Release call, if callref exists.
2017-06-10 13:08:22 +02:00
Andreas Eversberg 6adfcf7466 Status display
Alows to show status of current channels and users
2017-06-10 13:08:21 +02:00
Andreas Eversberg 76a3484c5c C-Netz: Make demodulation algorithm (slope or leve) slectable via option
By default (auto), the algorithm is selected, depending on sound card
or SDR usage. For testing and debugging purpose, the algorithm can be
forced.
2017-05-19 19:11:59 +02:00
Andreas Eversberg c086e66b7c minor cleanups 2017-05-17 20:14:37 +02:00
Andreas Eversberg ef7ff26793 C-Netz: SDR now uses zero-crossing to detect level changes.
This does not work with analog radio, but with SDR it works.
The quality should be better and the process is faster.
2017-05-17 20:06:46 +02:00
Andreas Eversberg 9d87b5bf0f C-Netz: Improved transmission of speech
The speech is now correctly ramped up and down during pause bits.
2017-05-17 20:06:44 +02:00
Andreas Eversberg 4d10ee7c82 No "sdr" audio device option required anymore (when using SDR) 2017-05-17 20:06:42 +02:00
Andreas Eversberg ca10048e5c Rename filter -> iir_filter (file name and instance name)
This is useful when using fir_filter in the future.
2017-05-15 21:46:32 +02:00
Andreas Eversberg 369bda87a9 C-Netz: Improved decoder debugging
FM decoder debug output is now written to text files for better
debugging of process.
2017-05-15 21:46:25 +02:00
Andreas Eversberg 8e0d7d2513 samplerate.c: Allow transcoding to lower sample rate other than 8000 Hz 2017-03-04 16:52:20 +01:00
Andreas Eversberg 3fc4fc54be main_common: Move init and cleanup function to main function 2017-03-04 07:12:12 +01:00
Andreas Eversberg f689244f98 C-Netz: OgK must be on first channel, so sync works correctly 2017-02-18 21:02:56 +01:00
Andreas Eversberg 438ce08add SoapySDR support
There is no time stamp handling. It is just TX'ing in advance and
synchronous to received RX rate.
2017-02-18 21:02:55 +01:00
Andreas Eversberg 17b6124122 C-Netz: Remove useless -V option 2017-02-18 21:02:54 +01:00
Andreas Eversberg 4de1e0188d C-Netz: Add low pass filter to eliminate high frequency noise
This improves the FSK decoding quite allot, especially with SDR.
2017-02-18 21:02:52 +01:00
Andreas Eversberg 3fb2ade352 C-Netz: Fix release of call process when no dialing was received from phone 2017-02-18 21:02:48 +01:00
Andreas Eversberg 0611f62b52 Show channel number and basic info when channel was created 2017-02-18 21:02:47 +01:00
Andreas Eversberg 5f1d7bc970 C-Netz: Improve clock speed measurements.
Sound card's clock measurements only requires a few minutes to get sub-ppm
accuracy results.
2017-02-18 21:02:46 +01:00
Andreas Eversberg faa3dfb7d4 C-Netz: Make average to clock measurements for a quicker result 2017-02-18 21:01:19 +01:00
Andreas Eversberg 8cb0187133 C-Netz: Remove the obviously useless noise function for unused timeslots 2017-02-18 21:01:17 +01:00
Andreas Eversberg 7e45f556ce Correcting all levels and move all remaining integer samples to sample_t
The leves are based on the standards of each mobile network. They
are adjusted to the specified frequency deviation now.
2017-02-18 21:01:13 +01:00
Andreas Eversberg bd7ccc5fa0 Add global DC-Filter and remove all individual DC-Filters 2017-02-18 21:01:12 +01:00
Andreas Eversberg 71e556e7ff Work on emphasis filter: Neutral @ 1000 Hz; Use filter before de-emphasis 2017-02-18 21:01:11 +01:00
Andreas Eversberg 7ea3bc188d Move samples of int16_t format to sample_t, that is of type double
This prepares the correction of all levels
2017-02-18 21:01:08 +01:00
Andreas Eversberg 538a959128 Indexing tables by casting index to unsigned integer only 2017-02-18 21:01:06 +01:00
Andreas Eversberg ac0da3f76e Filter improvement: LP and HP filters, added test function
The -3 dB level at cut-off frequency is now maintained for multiple
iterations.
2017-02-18 21:01:04 +01:00
Andreas Eversberg 2d8d7e62c1 Use global init/cleanup function 2017-02-18 21:00:58 +01:00
Andreas Eversberg a5fd375237 Fixed typos 2017-02-18 21:00:55 +01:00
Andreas Eversberg fee4846c3f SDR forces default settings: emphasis and FSK polarity 2017-02-18 21:00:52 +01:00
Andreas Eversberg 8b9277615d Neu structure for the paging process (B-Netz)
Paging tones are not created within sound_alsa.c
The audio API is now responsible to switch to paging channel.
In case of SDR, the sdr.c will switch frequency offset.
2017-02-18 21:00:50 +01:00
Andreas Eversberg 57993e3e48 Support for UHD SDR interface 2017-02-18 21:00:49 +01:00
Andreas Eversberg c5cf88ce57 Prepare for SDR: Add bandwidth and deviation info to sender instance 2017-02-18 21:00:47 +01:00
Andreas Eversberg 9ff8c3bb25 Rework on audio interface
Sound instance is now called audio instance and uses funcation pointers.
This gives a clean interface to be exchanged with other technologies,
linke SDR.
2017-02-18 21:00:45 +01:00
Andreas Eversberg d54d3ac265 prepare audio handling for multi carrier SDR 2017-01-07 06:28:24 +01:00
Andreas Eversberg 713b1ab118 Rename functions and structure of biquad lowpass filter 2017-01-07 06:28:23 +01:00
Andreas Eversberg 2d0bc92cde C-Netz: Make demodulation buffer size dynamic 2017-01-07 06:26:50 +01:00
Andreas Eversberg a37dfe38ab C-Netz: Fixed double free bug 2017-01-07 06:26:49 +01:00
Andreas Eversberg 3400f555fe Add common function to give hotkey help
* Key to dial and hangup
* Key to display wave form
2016-12-09 16:42:38 +01:00
Andreas Eversberg 7585f9c22d Add function to change dsp state, more debug with channel info 2016-12-09 16:34:33 +01:00
Andreas Eversberg 27c6e3d860 C-Netz: Add code documentation... 2016-12-01 17:59:08 +01:00
Andreas Eversberg e34d74aa23 C-Netz: Simplifying TX signal clock sync between two channels 2016-11-30 18:09:38 +01:00
Andreas Eversberg 0b43b63d1f Fixed command line option descriptions 2016-11-29 10:59:09 +01:00
Andreas Eversberg d52d0242bf Output enhancements
* no more flicker on wave form display while scrolling
* dialing console gets cleared/overwritten correctly
* fixes on stderr output
2016-11-29 07:49:21 +01:00
Andreas Eversberg b1c452cf12 Changed command line options
* All lower case options define common options
* All upper case options define network specific options
2016-11-27 22:06:47 +01:00
Andreas Eversberg f911717aa4 C-Netz: Minor coding style changes, no changes to process 2016-11-22 19:09:05 +01:00
Andreas Eversberg 2a4abc62b2 Move realtime scheduling and signal handling to common code 2016-11-13 06:37:56 +01:00
Andreas Eversberg c6d3a41b81 C-Netz: Increment error counter only when trying to reach the phone 2016-10-23 11:50:02 +02:00
Andreas Eversberg 1ea95de120 C-Netz: Use emphasis with 200 uS time constant 2016-10-23 08:46:05 +02:00
Andreas Eversberg 8864db8269 C-Netz: Adjusting compandor response level 2016-10-23 08:45:24 +02:00
Andreas Eversberg e763d3c6ed C-Netz: Changing keepalive interval to 2 minutes and retry to 1 minute 2016-10-23 07:32:21 +02:00
Andreas Eversberg 33e0bc5f4e C-Netz: Remove global variables, because they don't speed up anything 2016-10-07 09:14:22 +02:00
Andreas Eversberg 27938d111e Added and fixed extra compiler warnings 2016-10-07 08:55:18 +02:00
Andreas Eversberg 8ef966aa21 C-Netz: Reset FSK decoder when switching channel mode
This prevents corrupt frames, as well as clear pending frames that
were received during the old mode, but may not be received during
the new mode.
2016-10-07 08:00:34 +02:00
Andreas Eversberg eac595bd17 C-Netz: Don't access transaction after destroying it 2016-10-07 08:00:10 +02:00
Andreas Eversberg 0cec2f28be Add check if fromat at PDEBUG() is consistent (like printf)
The bugs it found are fixed too.
2016-10-07 07:52:17 +02:00
Andreas Eversberg b205cfcf03 B-Netz: Work on pilot signal generation
The pilot signal to switch to channel 19 can be:
 * a tone
 * a tone that is turned off (notone)
 * positive amplitude
 * negative amplitude
2016-10-03 14:56:15 +02:00
Andreas Eversberg 17930af920 C-Netz: callref is moved completely to transaction object 2016-10-02 09:06:04 +02:00
Andreas Eversberg 8d7c7f4425 callref: Move callref from 'sender' to individual implementation of a, b, c-netz
Cellular networks use transaction instances, so callref is now member of
transaction object.
2016-10-02 09:06:03 +02:00
Andreas Eversberg 767daf73cd C-Netz: Documentation of the call process in the source code 2016-08-13 15:22:28 +02:00
Andreas Eversberg 7f786fc00a C-Netz: Fix missing callref assignment (MT call) 2016-08-07 17:20:06 +02:00
Andreas Eversberg 5182f70671 C-Netz: Documentation of some system informations 2016-08-07 17:17:38 +02:00
Andreas Eversberg e484814c0a C-Netz: Add hack to increase voice deviation for some newer phone 2016-08-03 12:40:56 +02:00
Andreas Eversberg 3a7388ba7f C-Netz: Fixed some debugging output 2016-08-03 12:40:55 +02:00
Andreas Eversberg 2bd7c16baa C-Netz: Add support for extended frequency band. (October 1989) 2016-08-03 12:40:54 +02:00
Andreas Eversberg e4079b8ce8 C-Netz: Fix release cause coding 2016-08-03 12:03:54 +02:00
Andreas Eversberg 038ce9d1b7 Add info key 'i' to show some states.
Currently showing C-Netz attached subscribers
2016-08-03 12:03:49 +02:00
Andreas Eversberg c9012c7663 C-Netz: Release MT call, if mobile phone does not respond 2016-08-02 09:02:58 +02:00
Andreas Eversberg eb85afa49c C-Netz: Use cosine-square ramp for better signal generation 2016-08-02 07:39:02 +02:00
Andreas Eversberg ce7a98206a C-Netz: Move callref to transaction. Callref on SpK only when its busy.
Only when busy, the channel has callref. This is required for audio
routing. During setup, the callref assigned to transaction and kept
there until release to/from upper layer.
2016-08-01 19:17:13 +02:00
Andreas Eversberg 664f8c7ac0 C-Netz: retry call setup messages up to 3 times 2016-08-01 12:15:12 +02:00
Andreas Eversberg b84a64f872 C-Netz: Autoselect polarity on all transceivers 2016-08-01 12:15:09 +02:00
Andreas Eversberg 77cd21e7c2 C-Netz: Fix transaction list corruption 2016-08-01 12:15:08 +02:00
Andreas Eversberg f729b32745 C-Netz: Fixed multi-transceiver mode and show channel in various logs 2016-07-31 18:48:19 +02:00
Andreas Eversberg 6a5af9aeac Typos: acknowledgement -> acknowledgment signalling -> signaling 2016-07-24 12:31:08 +02:00
Andreas Eversberg 4745b29115 NMT: Caller ID support 2016-07-24 12:31:07 +02:00
Andreas Eversberg f39ee2f15a common code: Add support for main loop handler 2016-07-09 11:27:02 +02:00
Andreas Eversberg 2ee51022f4 Rename 'compander' to 'compandor' 2016-06-20 19:37:56 +02:00
Andreas Eversberg 4d52f955b3 common code: Add processing interval option to decrese CPU usage 2016-06-18 19:33:08 +02:00
Andreas Eversberg e10898c1e8 C-Netz: Minor cosmetic fixes 2016-06-18 08:05:18 +02:00
Andreas Eversberg 051cc81b13 C-Netz: Move transaction routines to seperate file 2016-06-12 16:11:20 +02:00
Andreas Eversberg c933250685 Add dsp mode change fuction to A and B Netz, fixed NMT 2016-06-12 16:11:20 +02:00
Andreas Eversberg 1ceb3026dd Fixed link problem with alsa lib
Thanx to Martin for pointing to this problem.
2016-05-16 18:41:21 +02:00
Andreas Eversberg 90dbc0cbd7 C-Netz: Debug fixes 2016-05-15 20:44:07 +02:00
Andreas Eversberg e9640c0cd8 C-Netz: Fix TX polarity selection 2016-05-15 20:43:49 +02:00
Andreas Eversberg 9ecb87f3e6 Fixing station ID command line parameter 2016-05-15 20:43:38 +02:00
Andreas Eversberg 7aa2445b47 Move amplitude (level) debugging to debug.c 2016-05-15 20:37:06 +02:00
Andreas Eversberg 60d9a7b496 C-Netz: Advice about requirement of emphasis done by software 2016-05-13 19:23:43 +02:00
Andreas Eversberg 46fa72894e C-Netz: Calibration/fix processing of tone levels on TX and RX side
FSK and compander levels are adjusted.

Eliminate offsets between subsequent speech chunks. This is done by
high-pass filter. An offset is not passed to the filter.

Do correct audio processing chain:
 time compress -> compressor -> scrambler / pre-emphasis -> TX
 RX -> de-scrambler / de-emphasis -> expander -> time expand
2016-05-13 09:37:03 +02:00
Andreas Eversberg 5a9c9c7401 C-Netz: Send 5280 Hz test tone on idle speech channel 2016-05-13 09:37:03 +02:00
Andreas Eversberg 3a54f46b81 C-Netz: Fixup debug output at database 2016-05-13 09:37:02 +02:00
Andreas Eversberg e2a9c2c6a5 Automatic FSK polarity selection on TX side
This is done by simulating two cells with different polarities.
On first message from mobile station, the cell with the correct
polarity is used, the other is disabled.

On RX side the polarity is not selected, since FSK decoder detects
polarity for every frame.
2016-05-13 09:37:01 +02:00
Andreas Eversberg 57ba648ac4 C-Netz: Add tiny database to track if phones are online
Reject calls, if not online.

Use an interval to check if the phones are still online.
2016-05-08 15:53:00 +02:00
Andreas Eversberg bae12156a2 common code: Add input gain option 2016-05-08 15:49:45 +02:00
Andreas Eversberg 1ce67c14e9 C-netz: Tuning scrambler 2016-05-08 15:49:29 +02:00
Andreas Eversberg 7434e21dc2 Multi transceiver support
This can be multiple transceivers on multiple sound cards.

Two transceivers can be bundled on one sound device as well, using both channels.
2016-05-08 15:48:13 +02:00
Andreas Eversberg de0ce7ba98 C-Netz: Correct clear cause on clearing by mobile station 2016-05-08 15:47:01 +02:00
Andreas Eversberg 8b6b87d8cc C-Netz: Lowest mobile station power by default 2016-05-08 15:46:51 +02:00
Andreas Eversberg 95f44e9840 C-Netz: Fixed typo 2016-05-08 15:46:43 +02:00
Andreas Eversberg 11302272ce C-Netz: Minor fix on clock speed indication 2016-05-08 15:46:34 +02:00
Andreas Eversberg 97c9eee322 Fix display of correct program name 2016-05-08 08:11:35 +02:00
Andreas Eversberg 16acdbf59d Implementation of C-Netz (German mobile telephone system) 2016-04-24 15:19:00 +02:00