Fixed many typos in output and source code comments

pull/1/head
Martin Hauke 3 years ago committed by Andreas Eversberg
parent c357ab5ad5
commit 75765d49b7
  1. 2
      INSTALL
  2. 12
      docs/b-netz.html
  3. 4
      src/amps/amps.c
  4. 4
      src/amps/dsp.c
  5. 4
      src/amps/frame.c
  6. 2
      src/bnetz/bnetz.h
  7. 4
      src/bnetz/dsp.c
  8. 2
      src/cnetz/cnetz.c
  9. 4
      src/cnetz/fsk_demod.c
  10. 2
      src/cnetz/main.c
  11. 4
      src/jolly/dsp.c
  12. 2
      src/jolly/dsp.h
  13. 10
      src/jolly/jolly.c
  14. 2
      src/jolly/main.c
  15. 2
      src/libdisplay/display_wave.c
  16. 4
      src/libfsk/fsk.c
  17. 2
      src/libgoertzel/goertzel.c
  18. 4
      src/libsample/sample.c
  19. 2
      src/libsdr/sdr.c
  20. 2
      src/libsdr/sdr_config.c
  21. 2
      src/libsdr/soapy.c
  22. 2
      src/libsquelch/squelch.c
  23. 2
      src/nmt/main.c
  24. 2
      src/nmt/sms.c
  25. 4
      src/nmt/sms.h
  26. 2
      src/r2000/main.c
  27. 2
      src/r2000/r2000.c
  28. 2
      src/radio/radio.c
  29. 2
      src/test/test_performance.c
  30. 4
      src/tv/bas.c

@ -1,4 +1,4 @@
You need to have the folowing packages install:
You need to have the following packages install:
* automake, gcc for compilation
* libasound2 for sound card support, which is what you need!

@ -558,7 +558,7 @@ bnetz.c:351 info : Entering IDLE state, sending 'Gruppenfreisignal' 2.
Base station for channel 1 ready, please tune transmitter to 153.010 MHz and receiver to 148.410 MHz.
To call phone, switch transmitter (using paging signal) to 153.370 MHz.
mncc_sock.c:137 notice : MNCC socket connected.
dsp.c:159 info : Detecting continous tone: 2070:Level= 80% Quality=100%
dsp.c:159 info : Detecting continuous tone: 2070:Level= 80% Quality=100%
bnetz.c:470 info : Received signal 'Kanalbelegung' from mobile station, sending signal 'Wahlabruf'.
bnetz.c:509 info : Digit RX Level: 80% Quality=85
bnetz.c:524 info : Received telegramm digit 'Funkwahl ohne Gebuehrenuebermittlung'.
@ -692,15 +692,15 @@ call.c:859 info : Outgoing call from to '50993'
bnetz.c:757 info : Call to mobile station, paging station id '50993'
bnetz.c:374 info : Entering paging state (try 1), sending 'Selektivruf' to '50993'.
bnetz.c:410 info : Paging mobile station 50993 complete, waiting for answer.
dsp.c:159 info : Detecting continous tone: 1950:Level= 105% Quality=100%
dsp.c:159 info : Detecting continuous tone: 1950:Level= 105% Quality=100%
bnetz.c:480 info : Received signal 'Rufbestaetigung' from mobile station, sending signal 'Rufhaltung'.
(call is ringing)
call.c:641 info : Call is alerting
...
dsp.c:159 info : Detecting continous tone: 2070:Level= 102% Quality=99%
dsp.c:159 info : Detecting continuous tone: 2070:Level= 102% Quality=99%
bnetz.c:491 info : Received signal 'Beginnsignal' from mobile station, call establised.
call.c:684 info : Call has been answered by '50993'
dsp.c:159 info : Detecting continous tone: 2070:Level= 104% Quality=100%
dsp.c:159 info : Detecting continuous tone: 2070:Level= 104% Quality=100%
</pre>
@ -727,7 +727,7 @@ squelch.c:94 info : RF signal measurement: -69.2 dB noise floor, using thresho
</pre>
<p>
In the following example I cut off the power of the phone beeing in a call and waited 12 seconds for the base station to time out:
In the following example I cut off the power of the phone being in a call and waited 12 seconds for the base station to time out:
</p>
<pre>
@ -749,7 +749,7 @@ Kennungsspeicher (The Security Module)
<p>
Older phones used soldered jumpers to set the phone number (ID) of the phone.
Just by soldering a different number, the network could be used without paying.
So simple was hacking back then - if you could affort an expensive B-Netz phone.
So simple was hacking back then - if you could afford an expensive B-Netz phone.
The security module "Kennungsspeicher" was introduced to prevent using the phone, if it is not inserted into the internal socket.
The idea was to disable unsubscribed phones, just by removing the module.
This module was owned by the German post office and I got a phone without it.

@ -184,7 +184,7 @@ void amps_number2min(const char *number, uint32_t *min1, uint16_t *min2)
int i;
if (nlen != 10) {
fprintf(stderr, "illegal lenght %d. Must be 10, aborting!", nlen);
fprintf(stderr, "illegal length %d. Must be 10, aborting!", nlen);
abort();
}
@ -580,7 +580,7 @@ int amps_create(int channel, enum amps_chan_type chan_type, const char *audiodev
amps->pre_emphasis = pre_emphasis;
amps->de_emphasis = de_emphasis;
/* the AMPS uses a frequency rage of 300..3000 Hz, but we still use the default low pass filter, wich is not too far above */
/* the AMPS uses a frequency rage of 300..3000 Hz, but we still use the default low pass filter, which is not too far above */
rc = init_emphasis(&amps->estate, samplerate, CUT_OFF_EMPHASIS_DEFAULT, CUT_OFF_HIGHPASS_DEFAULT, CUT_OFF_LOWPASS_DEFAULT);
if (rc < 0)
goto error;

@ -39,7 +39,7 @@
* The average level change offsets of the dotting sequence is used to set the
* window for the first bit. When all samples for the window are received, a
* raise in level is detected as 1, fall in level is detected as 0. This is done
* by substracting the average sample value of the left side of the window by
* by subtracting the average sample value of the left side of the window by
* the average sample value of the right side. After the bit has been detected,
* the samples for the next window will be received and detected.
*
@ -108,7 +108,7 @@
#define AMPS_BITRATE 10000
/* for some reason, 4000 Hz deviation works better */
#define TACS_DBM0_DEVIATION 4000.0 /* 2300 Hz deviation at 1 kHz (according to panasonic manual) */
#define TACS_MAX_DEVIATION 6400.0 /* (according to texas intruments and other sources) */
#define TACS_MAX_DEVIATION 6400.0 /* (according to texas instruments and other sources) */
#define TACS_MAX_MODULATION 9500.0 /* (according to panasonic manual) */
#define TACS_FSK_DEVIATION (6400.0 / TACS_DBM0_DEVIATION) /* no emphasis */
#define TACS_SAT_DEVIATION (1700.0 / TACS_DBM0_DEVIATION) /* no emphasis (panasonic / TI) */

@ -2221,7 +2221,7 @@ struct amps_ie_desc amps_ie_desc[] = {
{ AMPS_IE_DMAC, "DMAC", "Digital mobile attenuation code field", ie_cmac },
{ AMPS_IE_DTX, "DTX", "Discontinuous-Transmission field", ie_yes },
{ AMPS_IE_DTX_Support, "DTX Support", "Indicates the nature of DTX supported on an analog voice", ie_dtx_support },
{ AMPS_IE_DVCC, "DVCC", "Digital Verfication Color Code", NULL},
{ AMPS_IE_DVCC, "DVCC", "Digital Verification Color Code", NULL},
{ AMPS_IE_Data_Part, "Data Part", "Identifies the Data Port associated with a data/fax call", ie_data_part },
{ AMPS_IE_Data_Privacy, "Data Privacy", "This field indicates whether or not Data Privacy is supported", ie_yes },
{ AMPS_IE_E, "E", "Extended address field", ie_yes },
@ -3699,7 +3699,7 @@ int amps_decode_frame(amps_t *amps, const char *bits, int count, double level, d
} else if (count == 240) {
more = amps_decode_bits_recc(amps, bits, 0);
} else {
PDEBUG_CHAN(DFRAME, DEBUG_ERROR, "Frame with unknown lenght = %d, please fix!\n", count);
PDEBUG_CHAN(DFRAME, DEBUG_ERROR, "Frame with unknown length = %d, please fix!\n", count);
}
return more;

@ -92,7 +92,7 @@ typedef struct bnetz {
double rx_telegramm_quality[16];/* quality of each bit in telegramm */
double rx_telegramm_level[16]; /* level of each bit in telegramm */
int rx_telegramm_qualidx; /* index of quality array above */
uint16_t rx_tone; /* rx shift register for receiveing continous tone */
uint16_t rx_tone; /* rx shift register for receiveing continuous tone */
double rx_tone_quality[16]; /* quality of tone fragment (100th of second) */
double rx_tone_level[16]; /* level of tone fragment (100th of second) */
int rx_tone_qualidx; /* index of quality array above */

@ -152,7 +152,7 @@ static void fsk_receive_tone(bnetz_t *bnetz, int tone, int goodtone, double leve
if (!goodtone && bnetz->tone_detected > -1) {
bnetz->tone_count++;
if (bnetz->tone_count == TONE_LOST_CNT) {
/* substract TONE_LOST_CNT from duration, because it took that long to detect loss of tone */
/* subtract TONE_LOST_CNT from duration, because it took that long to detect loss of tone */
PDEBUG_CHAN(DDSP, DEBUG_INFO, "Lost F%d tone after %.2f seconds.\n", bnetz->tone_detected, (double)(bnetz->tone_duration - TONE_LOST_CNT) / 100.0);
bnetz->tone_detected = -1;
bnetz_receive_tone(bnetz, -1);
@ -194,7 +194,7 @@ static void fsk_receive_bit(void *inst, int bit, double quality, double level)
display_measurements_update(bnetz->dmp_tone_stddev, level_stddev / level_avg * 100.0, 0.0);
display_measurements_update(bnetz->dmp_tone_quality, quality_avg * 100.0, 0.0);
/* collect bits, and check for level and continous tone */
/* collect bits, and check for level and continuous tone */
bnetz->rx_tone = (bnetz->rx_tone << 1) | bit;
for (i = 0; i < TONE_DETECT_CNT; i++) {
if (((bnetz->rx_tone >> i) & 1) != bit)

@ -96,7 +96,7 @@
*
* In case of a combined OgK+SpK, the channel stays the same, but will change.
*
* See below for detailled processing.
* See below for detailed processing.
*/
/*

@ -81,7 +81,7 @@
* When we are synced:
*
* After we recorded the time of all level changes during the sync sequence, we
* calulate an average and use it as a time base for sampling the subsequent 150
* calculate an average and use it as a time base for sampling the subsequent 150
* bit of a message. From now on, a bit change does not cause any resync. We
* just remember what change we received. Later we use it for sampling the 150
* bits.
@ -100,7 +100,7 @@
* since the mobile phone is perfectly synced to us.
*
* After receiving and decoding of a frame, we use the time of received sync
* sequence to synchronize the reciever to the mobile phone. If we receive a
* sequence to synchronize the receiver to the mobile phone. If we receive a
* message on the OgK (control channel), we know that this is a response to a
* message of a specific time slot we recently sent. Then we can fully sync the
* receiver's clock. For any other frame, we cannot determine the absolute

@ -280,7 +280,7 @@ static int handle_options(int short_option, int argi, char **argv)
case 'C':
p = strchr(argv[argi], ',');
if (!p) {
fprintf(stderr, "Illegal clock speed, use two values, seperated by comma and no spaces!\n");
fprintf(stderr, "Illegal clock speed, use two values, separated by comma and no spaces!\n");
return -EINVAL;
}
clock_speed[0] = strtold(argv[argi], NULL);

@ -143,9 +143,9 @@ void dsp_cleanup_sender(jolly_t *jolly)
}
}
void set_speech_string(jolly_t *jolly, char anouncement, const char *number)
void set_speech_string(jolly_t *jolly, char announcement, const char *number)
{
jolly->speech_string[0] = anouncement;
jolly->speech_string[0] = announcement;
jolly->speech_string[1] = '\0';
strncat(jolly->speech_string, number, sizeof(jolly->speech_string) - 1);
jolly->speech_digit = 0;

@ -2,6 +2,6 @@
void dsp_init(void);
int dsp_init_sender(jolly_t *jolly, int nbfm, double squelch_db, int repeater);
void dsp_cleanup_sender(jolly_t *jolly);
void set_speech_string(jolly_t *jolly, char anouncement, const char *number);
void set_speech_string(jolly_t *jolly, char announcement, const char *number);
void reset_speech_string(jolly_t *jolly);

@ -88,7 +88,7 @@
* | '#' received | stop timer
* | | call setup
* | | if call setup fails:
* | | play release anouncement
* | | play release announcement
* | | go to state RELEASED
* | | go to state CALL
* | |
@ -98,18 +98,18 @@
* CALL | '*' received | start timer T-DIAL2
* | | go to state CALL-DIALING
* | |
* | call release | play release anouncement
* | call release | play release announcement
* | | go to state RELEASED
* | |
* -------------+-----------------------+--------------------------------------
* CALL-DIALING | '#' received | stop timer
* | | call release
* | | play release anouncement
* | | play release announcement
* | | go to state RELEASED
* | |
* | timeout | go state CALL
* | |
* | call release | play release anouncement
* | call release | play release announcement
* | | go to state RELEASED
* | |
* -------------+-----------------------+--------------------------------------
@ -121,7 +121,7 @@
* | call release | go to state IDLE
* | |
* -------------+-----------------------+--------------------------------------
* RELEASED | end of anouncement | go to state IDLE
* RELEASED | end of announcement | go to state IDLE
* | |
*/

@ -93,7 +93,7 @@ static int handle_options(int short_option, int argi, char **argv)
string_ul = strsep(&string, ",");
string_step = strsep(&string, ",");
if (!string_dl || !string_ul || !string_step) {
fprintf(stderr, "Please give 3 values for --frequency, seperated by comma and no space!\n");
fprintf(stderr, "Please give 3 values for --frequency, separated by comma and no space!\n");
exit(0);
}
dl_freq = atof(string_dl);

@ -120,7 +120,7 @@ void display_wave(dispwav_t *disp, sample_t *samples, int length, double range)
if (pos == width + 2) {
memset(&screen, ' ', sizeof(screen));
for (j = 0; j < width; j++) {
/* Input value is scaled to range -1 .. 1 and then substracted from 1,
/* Input value is scaled to range -1 .. 1 and then subtracted from 1,
* so the result ranges from 0 .. 2.
* HEIGHT-1 is multiplied with the range, so a HEIGHT of 3 would allow
* 0..4 (5 steps) and a HEIGHT of 11 would allow 0..20 (21 steps).

@ -157,7 +157,7 @@ void fsk_receive(fsk_t *fsk, sample_t *sample, int length)
int bit;
double level, quality;
/* demod samples to offset arround center frequency */
/* demod samples to offset around center frequency */
fm_demodulate_real(&fsk->demod, frequency, length, sample, I, Q);
for (i = 0; i < length; i++) {
@ -187,7 +187,7 @@ void fsk_receive(fsk_t *fsk, sample_t *sample, int length)
fsk->rx_bitpos = 0.5;
}
}
/* if bit counter reaches 1, we substract 1 and sample the bit */
/* if bit counter reaches 1, we subtract 1 and sample the bit */
if (fsk->rx_bitpos >= 1.0) {
/* peak level is the length of I/Q vector
* since we filter out the unwanted modulation product, the vector is only half of length */

@ -68,7 +68,7 @@ void audio_goertzel_init(goertzel_t *goertzel, double freq, int samplerate)
*
* samples: pointer to sample buffer
* length: length of buffer
* offset: for ring buffer, start here and wrap arround to 0 when length has been hit
* offset: for ring buffer, start here and wrap around to 0 when length has been hit
* coeff: array of coefficients (coeff << 15)
* result: array of result levels (average value of the sine, that is 1 / (PI/2) of the sine's peak)
* k: number of frequencies to check

@ -30,14 +30,14 @@ static double int_16_speech_level = SPEECH_LEVEL * 0.7079; /* 16 dBm below dBm0,
* support high numbers. 'double' or 'float' types are sufficient.
*
* When using sample_t inside signal processing of each base station, the
* level of +- 1 is relative to the normal speach evenlope.
* level of +- 1 is relative to the normal speech evenlope.
*
* When converting sample_t to int16_t, the level of +- 1 is reduced by factor.
* This way the speech may be louder before clipping happens.
*
* When using sample_t to modulate (SDR or sound card), the level is changed,
* so it represents the frequency deviation in Hz. The deviation of speech
* envelope is network dependant.
* envelope is network dependent.
*/
void samples_to_int16(int16_t *spl, sample_t *samples, int length)

@ -967,7 +967,7 @@ int sdr_get_tosend(void *inst, int latspl)
count /= sdr->oversample;
if (sdr->threads) {
/* substract what we have in write buffer, because this is not jent sent to the SDR */
/* subtract what we have in write buffer, because this is not jent sent to the SDR */
int fill;
fill = (sdr->thread_write.in - sdr->thread_write.out + sdr->thread_write.buffer_size) % sdr->thread_write.buffer_size;

@ -62,7 +62,7 @@ void sdr_config_print_help(void)
printf(" --sdr-device-args <args>\n");
printf(" --sdr-stream-args <args>\n");
printf(" --sdr-tune-args <args>\n");
printf(" Optional SDR device arguments, seperated by comma\n");
printf(" Optional SDR device arguments, separated by comma\n");
printf(" e.g. --sdr-device-args <key>=<value>[,<key>=<value>[,...]]\n");
printf(" --sdr-samplerate <samplerate>\n");
printf(" Sample rate to use with SDR. By default it equals the regular sample\n");

@ -501,7 +501,7 @@ int soapy_get_tosend(int latspl)
tosend = latspl - (tx_count - rx_count);
/* in case of underrun: */
if (tosend > latspl) {
// It is normal that we have underruns, prior inital filling of buffer.
// It is normal that we have underruns, prior initial filling of buffer.
// FIXME: better solution to detect underrun
// PDEBUG(DSOAPY, DEBUG_ERROR, "SDR TX underrun!\n");
tosend = 0;

@ -104,7 +104,7 @@ enum squelch_result squelch(squelch_t *squelch, double rf_level_db, double durat
}
}
/* enough RF level, so we unmute when mute_count reched 0 */
/* enough RF level, so we unmute when mute_count reached 0 */
if (rf_level_db >= squelch->threshold_db) {
squelch->mute_count -= duration;
if (squelch->mute_count <= 0.0) {

@ -76,7 +76,7 @@ void print_help(const char *arg0)
printf(" -Y --traffic-area <traffic area> | list\n");
printf(" NOTE: MUST MATCH WITH YOUR ROAMING SETTINGS IN THE PHONE!\n");
printf(" Your phone will not connect, if country code is different!\n");
printf(" Give short country code and traffic area seperated by comma.\n");
printf(" Give short country code and traffic area separated by comma.\n");
printf(" (Example: Give 'SE,1' for Sweden, traffic area 1)\n");
printf(" Add '!' to force traffic area that is not supported by country.\n");
printf(" (Example: Give 'B,12!' for Belgium, traffic area 12)\n");

@ -326,7 +326,7 @@ int sms_deliver(nmt_t *nmt, uint8_t ref, const char *orig_address, uint8_t orig_
/* RP length */
*tpdu_length = length - (uint8_t)(tpdu_length - data) - 1;
PDEBUG(DSMS, DEBUG_DEBUG, " -> TPDU lenght = %d\n", *tpdu_length);
PDEBUG(DSMS, DEBUG_DEBUG, " -> TPDU length = %d\n", *tpdu_length);
nmt->sms.mt = 1;
dms_send(nmt, data, length, 1);

@ -1,5 +1,5 @@
#define SMS_TYPE_UKNOWN 0x0
#define SMS_TYPE_UNKNOWN 0x0
#define SMS_TYPE_INTERNATIONAL 0x1
#define SMS_TYPE_NATIONAL 0x2
#define SMS_TYPE_NETWORK 0x3
@ -8,7 +8,7 @@
#define SMS_TYPE_ABBREVIATED 0x6
#define SMS_TYPE_RESERVED 0x7
#define SMS_PLAN_UNKOWN 0x0
#define SMS_PLAN_UNKNOWN 0x0
#define SMS_PLAN_ISDN_TEL 0x1
#define SMS_PLAN_DATA 0x3
#define SMS_PLAN_TELEX 0x4

@ -345,7 +345,7 @@ int main(int argc, char *argv[])
fprintf(stderr, "*******************************************************************************\n");
fprintf(stderr, "I strongly suggest to let me do pre- and de-emphasis (options -p -d)!\n");
fprintf(stderr, "Use a transmitter/receiver without emphasis and let me do that!\n");
fprintf(stderr, "Because 50 baud supervisory signalling arround 150 Hz will not be tranmitted by\n");
fprintf(stderr, "Because 50 baud supervisory signalling around 150 Hz will not be tranmitted by\n");
fprintf(stderr, "regular radio, use direct input to the PLL of your transmitter (or use SDR).\n");
fprintf(stderr, "*******************************************************************************\n");
}

@ -49,7 +49,7 @@
This offset of 0x400000000 is required for MNCC interface. */
static int new_callref = 0x40000000;
/* definiton of bands and channels */
/* definition of bands and channels */
#define CHANNEL_SPACING 0.0125
static struct r2000_bands {

@ -633,7 +633,7 @@ int radio_rx(radio_t *radio, float *baseband, int signal_num)
/* mix pilot tone (double phase) with differential signal */
for (i = 0; i < signal_num; i++) {
p = atan2(samples[2][i], samples[1][i]);
/* substract measured phase difference (use double amplitude, because we filter later) */
/* subtract measured phase difference (use double amplitude, because we filter later) */
samples[1][i] = samples[0][i] * sin((radio->rx_pilot_phase - p) * 2.0) * 2.0;
radio->rx_pilot_phase += radio->pilot_phasestep;
if (radio->rx_pilot_phase >= 2.0 * M_PI)

@ -82,7 +82,7 @@ int main(void)
iir_lowpass_init(&lp, 10000.0 / 2.0, 50000, 4);
T_START()
iir_process(&lp, samples, SAMPLES);
T_STOP("low-pass filter (eigth order)", SAMPLES)
T_STOP("low-pass filter (eighth order)", SAMPLES)
fm_exit();

@ -42,7 +42,7 @@
#define H_SYNC2_START (H_SYNC_START + H_LINE_END/2.0)
#define H_SYNC2_STOP (H_SYNC_STOP + H_LINE_END/2.0)
#define V_SYNC_STOP (H_SYNC2_START - (H_SYNC_STOP - H_SYNC_START))
#define V_SYNC2_STOP (H_SYNC_START - (H_SYNC_STOP - H_SYNC_START) + H_LINE_END) // wraps, so we substract H_LINE_END
#define V_SYNC2_STOP (H_SYNC_START - (H_SYNC_STOP - H_SYNC_START) + H_LINE_END) // wraps, so we subtract H_LINE_END
#define SYNC_RAMP 0.0000003
#define IMAGE_RAMP 0.0000002
#define H_CBURST_START 0.0000068
@ -71,7 +71,7 @@ void bas_init(bas_t *bas, double samplerate, enum bas_type type, int fbas, doubl
/* filter color signal */
iir_lowpass_init(&bas->lp_u, 1300000.0, samplerate, COLOR_FILTER_ITER);
iir_lowpass_init(&bas->lp_v, 1300000.0, samplerate, COLOR_FILTER_ITER);
/* filter final FBAS, so we prevent from beeing in the audio carrier spectrum */
/* filter final FBAS, so we prevent from being in the audio carrier spectrum */
iir_lowpass_init(&bas->lp_y, 4500000.0, samplerate, COLOR_FILTER_ITER);
}

Loading…
Cancel
Save