2016-03-01 17:40:38 +00:00
|
|
|
/* Common part for main.c of each base station type
|
|
|
|
*
|
|
|
|
* (C) 2016 by Andreas Eversberg <jolly@eversberg.eu>
|
|
|
|
* All Rights Reserved
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <signal.h>
|
2016-11-13 05:37:56 +00:00
|
|
|
#include <sched.h>
|
2016-06-17 05:28:45 +00:00
|
|
|
#include <unistd.h>
|
2016-05-06 05:00:27 +00:00
|
|
|
#include <math.h>
|
2016-06-17 05:28:45 +00:00
|
|
|
#include <termios.h>
|
2017-02-18 12:51:26 +00:00
|
|
|
#include <errno.h>
|
2017-11-18 07:06:06 +00:00
|
|
|
#include "../libsample/sample.h"
|
2017-08-20 06:27:02 +00:00
|
|
|
#include "main_mobile.h"
|
2017-11-18 07:58:57 +00:00
|
|
|
#include "../libdebug/debug.h"
|
2016-06-17 05:28:45 +00:00
|
|
|
#include "sender.h"
|
2017-11-13 19:00:52 +00:00
|
|
|
#include "../libtimer/timer.h"
|
2016-06-17 05:28:45 +00:00
|
|
|
#include "call.h"
|
2020-08-09 12:27:56 +00:00
|
|
|
#include "../libosmocc/endpoint.h"
|
|
|
|
#include "console.h"
|
2017-01-04 13:21:49 +00:00
|
|
|
#ifdef HAVE_SDR
|
2017-11-17 21:51:18 +00:00
|
|
|
#include "../libsdr/sdr.h"
|
|
|
|
#include "../libsdr/sdr_config.h"
|
2017-01-04 13:21:49 +00:00
|
|
|
#endif
|
2018-05-19 08:56:43 +00:00
|
|
|
#include "../liboptions/options.h"
|
2018-11-10 14:16:20 +00:00
|
|
|
#include "../libfm/fm.h"
|
2019-06-30 06:10:33 +00:00
|
|
|
#include "image.h"
|
2016-03-01 17:40:38 +00:00
|
|
|
|
2017-12-04 13:12:11 +00:00
|
|
|
#define DEFAULT_LO_OFFSET -1000000.0
|
|
|
|
|
2017-08-30 15:42:49 +00:00
|
|
|
static int got_init = 0;
|
|
|
|
|
|
|
|
/* common mobile settings */
|
2016-04-25 18:20:54 +00:00
|
|
|
int num_kanal = 0;
|
2019-07-20 16:11:17 +00:00
|
|
|
const char *kanal[MAX_SENDER];
|
2017-01-04 13:14:02 +00:00
|
|
|
int num_audiodev = 0;
|
|
|
|
const char *audiodev[MAX_SENDER] = { "hw:0,0" };
|
2020-06-13 07:08:03 +00:00
|
|
|
int allow_sdr = 1;
|
2017-08-30 15:42:49 +00:00
|
|
|
int use_sdr = 0;
|
2017-09-21 17:22:03 +00:00
|
|
|
static const char *call_audiodev = "";
|
2016-03-01 17:40:38 +00:00
|
|
|
int samplerate = 48000;
|
2017-09-21 17:22:03 +00:00
|
|
|
static int call_samplerate = 48000;
|
2016-06-18 17:33:08 +00:00
|
|
|
int interval = 1;
|
2016-03-01 17:40:38 +00:00
|
|
|
int latency = 50;
|
2017-01-02 09:16:49 +00:00
|
|
|
int uses_emphasis = 1;
|
2016-05-06 05:00:27 +00:00
|
|
|
int do_pre_emphasis = 0;
|
|
|
|
int do_de_emphasis = 0;
|
|
|
|
double rx_gain = 1.0;
|
2020-06-14 18:59:41 +00:00
|
|
|
double tx_gain = 1.0;
|
2017-09-21 17:22:03 +00:00
|
|
|
static int echo_test = 0;
|
2020-08-09 12:27:56 +00:00
|
|
|
static int use_osmocc_cross = 0;
|
|
|
|
static int use_osmocc_sock = 0;
|
|
|
|
#define MAX_CC_ARGS 1024
|
|
|
|
static int cc_argc = 0;
|
|
|
|
static const char *cc_argv[MAX_CC_ARGS];
|
2020-01-12 15:45:16 +00:00
|
|
|
int send_patterns = 1;
|
2017-09-21 17:22:03 +00:00
|
|
|
static int release_on_disconnect = 1;
|
2016-03-01 17:40:38 +00:00
|
|
|
int loopback = 0;
|
2018-05-20 14:30:35 +00:00
|
|
|
int rt_prio = 1;
|
2018-11-10 14:16:20 +00:00
|
|
|
int fast_math = 0;
|
2016-11-27 05:47:06 +00:00
|
|
|
const char *write_tx_wave = NULL;
|
2017-07-11 18:26:40 +00:00
|
|
|
const char *write_rx_wave = NULL;
|
2017-07-09 17:17:37 +00:00
|
|
|
const char *read_tx_wave = NULL;
|
2017-07-11 18:26:40 +00:00
|
|
|
const char *read_rx_wave = NULL;
|
2020-04-04 14:34:39 +00:00
|
|
|
const char *console_digits = "0123456789";
|
2017-08-30 15:42:49 +00:00
|
|
|
|
|
|
|
void main_mobile_init(void)
|
|
|
|
{
|
2020-08-09 12:27:56 +00:00
|
|
|
cc_argv[cc_argc++] = strdup("remote auto");
|
|
|
|
|
2017-08-30 15:42:49 +00:00
|
|
|
got_init = 1;
|
2017-05-14 10:27:56 +00:00
|
|
|
#ifdef HAVE_SDR
|
2017-12-04 13:12:11 +00:00
|
|
|
sdr_config_init(DEFAULT_LO_OFFSET);
|
2017-05-14 10:27:56 +00:00
|
|
|
#endif
|
2017-08-30 15:42:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void main_mobile_print_help(const char *arg0, const char *ext_usage)
|
2016-03-01 17:40:38 +00:00
|
|
|
{
|
2016-03-11 05:59:05 +00:00
|
|
|
printf("Usage: %s -k <kanal/channel> %s[options] [station-id]\n", arg0, ext_usage);
|
2017-01-29 07:07:07 +00:00
|
|
|
printf("\nGlobal options:\n");
|
2016-03-01 17:40:38 +00:00
|
|
|
/* - - */
|
|
|
|
printf(" -h --help\n");
|
|
|
|
printf(" This help\n");
|
2016-11-27 05:47:06 +00:00
|
|
|
printf(" -v --verbose <level> | <level>,<category>[,<category>[,...]] | list\n");
|
2016-06-12 08:50:55 +00:00
|
|
|
printf(" Use 'list' to get a list of all levels and categories\n");
|
2016-11-27 05:47:06 +00:00
|
|
|
printf(" Verbose level: digit of debug level (default = '%d')\n", debuglevel);
|
|
|
|
printf(" Verbose level+category: level digit followed by one or more categories\n");
|
2016-06-12 08:50:55 +00:00
|
|
|
printf(" -> If no category is specified, all categories are selected\n");
|
2016-03-01 17:40:38 +00:00
|
|
|
printf(" -k --kanal <channel>\n");
|
2016-11-27 05:47:06 +00:00
|
|
|
printf(" -k --channel <channel>\n");
|
|
|
|
printf(" Channel (German = Kanal) number of \"Sender\" (German = Transceiver)\n");
|
2017-05-14 10:27:56 +00:00
|
|
|
printf(" -a --audio-device hw:<card>,<device>\n");
|
2017-01-04 13:21:49 +00:00
|
|
|
printf(" Sound card and device number (default = '%s')\n", audiodev[0]);
|
2017-05-14 10:27:56 +00:00
|
|
|
printf(" Don't set it for SDR!\n");
|
2016-03-01 17:40:38 +00:00
|
|
|
printf(" -s --samplerate <rate>\n");
|
|
|
|
printf(" Sample rate of sound device (default = '%d')\n", samplerate);
|
2016-06-18 17:33:08 +00:00
|
|
|
printf(" -i --interval 1..25\n");
|
|
|
|
printf(" Interval of processing loop in ms (default = '%d' ms)\n", interval);
|
|
|
|
printf(" Use 25 to drastically reduce CPU usage. In case of buffer underrun,\n");
|
|
|
|
printf(" increase latency accordingly.\n");
|
2016-11-27 05:47:06 +00:00
|
|
|
printf(" -b --buffer <ms>\n");
|
|
|
|
printf(" How many milliseconds are processed in advance (default = '%d')\n", latency);
|
2017-01-02 09:16:49 +00:00
|
|
|
if (uses_emphasis) {
|
2016-11-27 05:47:06 +00:00
|
|
|
printf(" -p --pre-emphasis\n");
|
2016-05-06 05:00:27 +00:00
|
|
|
printf(" Enable pre-emphasis, if you directly connect to the oscillator of the\n");
|
|
|
|
printf(" transmitter. (No pre-emphasis done by the transmitter.)\n");
|
2016-11-27 05:47:06 +00:00
|
|
|
printf(" -d --de-emphasis\n");
|
2016-05-06 05:00:27 +00:00
|
|
|
printf(" Enable de-emphasis, if you directly connect to the discriminator of\n");
|
|
|
|
printf(" the receiver. (No de-emphasis done by the receiver.)\n");
|
2017-01-02 09:16:49 +00:00
|
|
|
}
|
2020-06-14 18:59:41 +00:00
|
|
|
printf(" --rx-gain <dB>\n");
|
|
|
|
printf(" Raise/lower receiver's RX level by given gain in dB.\n");
|
|
|
|
printf(" (Works with sound card only.)\n");
|
|
|
|
printf(" --tx-gain <dB>\n");
|
|
|
|
printf(" Raise/lower transmitters's RX level by given gain in dB.\n");
|
|
|
|
printf(" (Works with sound card only.)\n");
|
2017-09-21 17:22:03 +00:00
|
|
|
printf(" -e --echo-test\n");
|
|
|
|
printf(" Use echo test, to send back audio from mobile phone's microphone to\n");
|
|
|
|
printf(" the speaker. (German: 'Blasprobe').\n");
|
|
|
|
printf(" -c --call-device hw:<card>,<device>\n");
|
|
|
|
printf(" Sound card and device number for headset (default = '%s')\n", call_audiodev);
|
|
|
|
printf(" --call-samplerate <rate>\n");
|
|
|
|
printf(" Sample rate of sound device for headset (default = '%d')\n", call_samplerate);
|
2020-08-09 12:27:56 +00:00
|
|
|
printf(" -x --osmocc-cross\n");
|
2017-10-29 06:58:20 +00:00
|
|
|
printf(" Enable built-in call forwarding between mobiles. Be sure to have\n");
|
|
|
|
printf(" at least one control channel and two voice channels. Alternatively\n");
|
|
|
|
printf(" use one combined control+voice channel and one voice channels.\n");
|
2020-08-09 12:27:56 +00:00
|
|
|
printf(" -o --osmocc-sock\n");
|
2021-01-01 21:11:48 +00:00
|
|
|
printf(" Disable built-in call control and offer socket\n");
|
2020-08-09 12:27:56 +00:00
|
|
|
printf(" --cc \"<osmo-cc arg>\" [--cc ...]\n");
|
|
|
|
printf(" Pass arguments to Osmo-CC endpoint. Use '-cc help' for description.\n");
|
2016-11-27 05:47:06 +00:00
|
|
|
printf(" -t --tones 0 | 1\n");
|
2016-07-20 10:50:22 +00:00
|
|
|
printf(" Connect call on setup/release to provide classic tones towards fixed\n");
|
|
|
|
printf(" network (default = '%d')\n", send_patterns);
|
2016-11-27 05:47:06 +00:00
|
|
|
printf(" -l --loopback <type>\n");
|
2016-03-01 17:40:38 +00:00
|
|
|
printf(" Loopback test: 1 = internal | 2 = external | 3 = echo\n");
|
|
|
|
printf(" -r --realtime <prio>\n");
|
2021-01-01 21:11:48 +00:00
|
|
|
printf(" Set prio: 0 to disable, 99 for maximum (default = %d)\n", rt_prio);
|
2018-11-10 14:16:20 +00:00
|
|
|
printf(" --fast-math\n");
|
|
|
|
printf(" Use fast math approximation for slow CPU / ARM based systems.\n");
|
2016-11-27 05:47:06 +00:00
|
|
|
printf(" --write-rx-wave <file>\n");
|
2017-01-13 06:31:15 +00:00
|
|
|
printf(" Write received audio to given wave file.\n");
|
2016-11-27 05:47:06 +00:00
|
|
|
printf(" --write-tx-wave <file>\n");
|
2017-01-13 06:31:15 +00:00
|
|
|
printf(" Write transmitted audio to given wave file.\n");
|
2016-11-27 05:47:06 +00:00
|
|
|
printf(" --read-rx-wave <file>\n");
|
2017-01-13 06:31:15 +00:00
|
|
|
printf(" Replace received audio by given wave file.\n");
|
2017-07-09 17:17:37 +00:00
|
|
|
printf(" --read-tx-wave <file>\n");
|
|
|
|
printf(" Replace transmitted audio by given wave file.\n");
|
2017-01-04 13:21:49 +00:00
|
|
|
#ifdef HAVE_SDR
|
2020-06-13 07:08:03 +00:00
|
|
|
if (allow_sdr) {
|
2018-05-19 08:56:43 +00:00
|
|
|
printf(" --limesdr\n");
|
|
|
|
printf(" Auto-select several required options for LimeSDR\n");
|
2018-08-25 08:25:25 +00:00
|
|
|
printf(" --limesdr-mini\n");
|
|
|
|
printf(" Auto-select several required options for LimeSDR Mini\n");
|
2017-08-30 15:42:49 +00:00
|
|
|
sdr_config_print_help();
|
2020-06-13 07:08:03 +00:00
|
|
|
}
|
2017-01-04 13:21:49 +00:00
|
|
|
#endif
|
2017-01-29 07:07:07 +00:00
|
|
|
printf("\nNetwork specific options:\n");
|
2016-03-01 17:40:38 +00:00
|
|
|
}
|
|
|
|
|
2017-08-30 15:42:49 +00:00
|
|
|
void main_mobile_print_hotkeys(void)
|
2016-12-09 15:42:38 +00:00
|
|
|
{
|
|
|
|
printf("\n");
|
2017-09-25 16:46:50 +00:00
|
|
|
printf("Press digits '0'..'9' and then 'd' key to dial towards mobile station.\n");
|
2016-12-09 15:42:38 +00:00
|
|
|
printf("Press 'h' key to hangup.\n");
|
2017-05-25 16:43:54 +00:00
|
|
|
printf("Press 'w' key to toggle display of RX wave form.\n");
|
|
|
|
printf("Press 'c' key to toggle display of channel status.\n");
|
2017-09-25 16:46:50 +00:00
|
|
|
printf("Press 'm' key to toggle display of measurement value.\n");
|
2017-05-25 16:43:54 +00:00
|
|
|
#ifdef HAVE_SDR
|
2020-06-13 07:08:03 +00:00
|
|
|
if (allow_sdr) {
|
2017-08-30 15:42:49 +00:00
|
|
|
sdr_config_print_hotkeys();
|
2020-06-13 07:08:03 +00:00
|
|
|
}
|
2017-05-25 16:43:54 +00:00
|
|
|
#endif
|
2016-12-09 15:42:38 +00:00
|
|
|
}
|
|
|
|
|
2016-11-27 05:47:06 +00:00
|
|
|
#define OPT_CHANNEL 1000
|
2020-06-14 18:59:41 +00:00
|
|
|
#define OPT_RX_GAIN 1001
|
|
|
|
#define OPT_TX_GAIN 1002
|
2020-08-09 12:27:56 +00:00
|
|
|
#define OPT_OSMO_CC 1003
|
|
|
|
#define OPT_WRITE_RX_WAVE 1004
|
|
|
|
#define OPT_WRITE_TX_WAVE 1005
|
|
|
|
#define OPT_READ_RX_WAVE 1006
|
|
|
|
#define OPT_READ_TX_WAVE 1007
|
|
|
|
#define OPT_CALL_SAMPLERATE 1008
|
2020-06-14 18:59:41 +00:00
|
|
|
#define OPT_FAST_MATH 1009
|
2018-05-19 08:56:43 +00:00
|
|
|
#define OPT_LIMESDR 1100
|
2018-08-25 08:25:25 +00:00
|
|
|
#define OPT_LIMESDR_MINI 1101
|
2017-01-13 06:31:15 +00:00
|
|
|
|
2018-05-19 08:56:43 +00:00
|
|
|
void main_mobile_add_options(void)
|
2016-11-27 05:47:06 +00:00
|
|
|
{
|
2018-05-19 08:56:43 +00:00
|
|
|
option_add('h', "help", 0);
|
2020-08-09 12:27:56 +00:00
|
|
|
option_add('v', "verbose", 1);
|
2018-05-19 08:56:43 +00:00
|
|
|
option_add('k', "kanal", 1);
|
|
|
|
option_add(OPT_CHANNEL, "channel", 1);
|
|
|
|
option_add('a', "audio-device", 1);
|
|
|
|
option_add('s', "samplerate", 1);
|
|
|
|
option_add('i', "interval", 1);
|
|
|
|
option_add('b', "buffer", 1);
|
|
|
|
option_add('p', "pre-emphasis", 0);
|
|
|
|
option_add('d', "de-emphasis", 0);
|
2020-06-14 18:59:41 +00:00
|
|
|
option_add(OPT_RX_GAIN, "rx-gain", 1);
|
|
|
|
option_add(OPT_TX_GAIN, "tx-gain", 1);
|
2018-05-19 08:56:43 +00:00
|
|
|
option_add('e', "echo-test", 0);
|
2020-08-09 12:27:56 +00:00
|
|
|
option_add('x', "osmocc-cross", 0);
|
|
|
|
option_add('o', "osmocc-sock", 0);
|
|
|
|
option_add(OPT_OSMO_CC, "cc", 1);
|
2018-05-19 08:56:43 +00:00
|
|
|
option_add('c', "call-device", 1);
|
|
|
|
option_add(OPT_CALL_SAMPLERATE, "call-samplerate", 1);
|
2018-05-27 04:03:23 +00:00
|
|
|
option_add('t', "tones", 1);
|
2018-05-19 08:56:43 +00:00
|
|
|
option_add('l', "loopback", 1);
|
|
|
|
option_add('r', "realtime", 1);
|
2018-11-10 14:16:20 +00:00
|
|
|
option_add(OPT_FAST_MATH, "fast-math", 0);
|
2018-05-19 08:56:43 +00:00
|
|
|
option_add(OPT_WRITE_RX_WAVE, "write-rx-wave", 1);
|
|
|
|
option_add(OPT_WRITE_TX_WAVE, "write-tx-wave", 1);
|
|
|
|
option_add(OPT_READ_RX_WAVE, "read-rx-wave", 1);
|
|
|
|
option_add(OPT_READ_TX_WAVE, "read-tx-wave", 1);
|
2017-08-30 15:42:49 +00:00
|
|
|
#ifdef HAVE_SDR
|
2018-05-19 08:56:43 +00:00
|
|
|
option_add(OPT_LIMESDR, "limesdr", 0);
|
2018-08-25 08:25:25 +00:00
|
|
|
option_add(OPT_LIMESDR_MINI, "limesdr-mini", 0);
|
2018-05-19 08:56:43 +00:00
|
|
|
sdr_config_add_options();
|
2017-08-30 15:42:49 +00:00
|
|
|
#endif
|
2018-05-19 08:56:43 +00:00
|
|
|
};
|
2016-03-01 17:40:38 +00:00
|
|
|
|
2017-08-30 15:42:49 +00:00
|
|
|
void print_help(const char *arg0);
|
|
|
|
|
2018-05-19 08:56:43 +00:00
|
|
|
int main_mobile_handle_options(int short_option, int argi, char **argv)
|
2016-03-01 17:40:38 +00:00
|
|
|
{
|
2016-05-06 05:00:27 +00:00
|
|
|
double gain_db;
|
2017-08-30 15:42:49 +00:00
|
|
|
int rc;
|
2016-05-06 05:00:27 +00:00
|
|
|
|
2018-05-19 08:56:43 +00:00
|
|
|
switch (short_option) {
|
2016-03-01 17:40:38 +00:00
|
|
|
case 'h':
|
2018-05-19 08:56:43 +00:00
|
|
|
print_help(argv[0]);
|
|
|
|
return 0;
|
2016-11-27 05:47:06 +00:00
|
|
|
case 'v':
|
2018-05-19 08:56:43 +00:00
|
|
|
if (!strcasecmp(argv[argi], "list")) {
|
2016-06-12 08:50:55 +00:00
|
|
|
debug_list_cat();
|
2018-05-19 08:56:43 +00:00
|
|
|
return 0;
|
2016-06-12 08:50:55 +00:00
|
|
|
}
|
2018-05-19 08:56:43 +00:00
|
|
|
rc = parse_debug_opt(argv[argi]);
|
|
|
|
if (rc < 0) {
|
2016-06-12 08:50:55 +00:00
|
|
|
fprintf(stderr, "Failed to parse debug option, please use -h for help.\n");
|
2018-05-19 08:56:43 +00:00
|
|
|
return rc;
|
2016-06-12 08:50:55 +00:00
|
|
|
}
|
2016-03-01 17:40:38 +00:00
|
|
|
break;
|
|
|
|
case 'k':
|
2016-11-27 05:47:06 +00:00
|
|
|
case OPT_CHANNEL:
|
2019-07-20 16:11:17 +00:00
|
|
|
OPT_ARRAY(num_kanal, kanal, argv[argi])
|
2016-03-01 17:40:38 +00:00
|
|
|
break;
|
2016-11-27 05:47:06 +00:00
|
|
|
case 'a':
|
2018-05-19 08:56:43 +00:00
|
|
|
OPT_ARRAY(num_audiodev, audiodev, strdup(argv[argi]))
|
2016-03-01 17:40:38 +00:00
|
|
|
break;
|
|
|
|
case 's':
|
2018-05-19 08:56:43 +00:00
|
|
|
samplerate = atoi(argv[argi]);
|
2016-03-01 17:40:38 +00:00
|
|
|
break;
|
2016-06-18 17:33:08 +00:00
|
|
|
case 'i':
|
2018-05-19 08:56:43 +00:00
|
|
|
interval = atoi(argv[argi]);
|
2016-06-18 17:33:08 +00:00
|
|
|
if (interval < 1)
|
|
|
|
interval = 1;
|
|
|
|
if (interval > 25)
|
|
|
|
interval = 25;
|
|
|
|
break;
|
2016-11-27 05:47:06 +00:00
|
|
|
case 'b':
|
2018-05-19 08:56:43 +00:00
|
|
|
latency = atoi(argv[argi]);
|
2016-03-01 17:40:38 +00:00
|
|
|
break;
|
2016-11-27 05:47:06 +00:00
|
|
|
case 'p':
|
2017-01-02 09:16:49 +00:00
|
|
|
if (!uses_emphasis) {
|
|
|
|
no_emph:
|
2017-01-08 11:10:29 +00:00
|
|
|
fprintf(stderr, "This network does not use emphasis, please do not enable pre- or de-emphasis! Disable emphasis on transceiver, if possible.\n");
|
2018-05-19 08:56:43 +00:00
|
|
|
return -EINVAL;
|
2017-01-02 09:16:49 +00:00
|
|
|
}
|
2016-05-06 05:00:27 +00:00
|
|
|
do_pre_emphasis = 1;
|
|
|
|
break;
|
2016-11-27 05:47:06 +00:00
|
|
|
case 'd':
|
2017-01-02 09:16:49 +00:00
|
|
|
if (!uses_emphasis)
|
|
|
|
goto no_emph;
|
2016-05-06 05:00:27 +00:00
|
|
|
do_de_emphasis = 1;
|
|
|
|
break;
|
2020-06-14 18:59:41 +00:00
|
|
|
case OPT_RX_GAIN:
|
2018-05-19 08:56:43 +00:00
|
|
|
gain_db = atof(argv[argi]);
|
2016-05-06 05:00:27 +00:00
|
|
|
rx_gain = pow(10, gain_db / 20.0);
|
|
|
|
break;
|
2020-06-14 18:59:41 +00:00
|
|
|
case OPT_TX_GAIN:
|
|
|
|
gain_db = atof(argv[argi]);
|
|
|
|
tx_gain = pow(10, gain_db / 20.0);
|
|
|
|
break;
|
2017-09-21 17:22:03 +00:00
|
|
|
case 'e':
|
|
|
|
echo_test = 1;
|
|
|
|
break;
|
2017-10-29 06:58:20 +00:00
|
|
|
case 'x':
|
2020-08-09 12:27:56 +00:00
|
|
|
use_osmocc_cross = 1;
|
2017-10-29 06:58:20 +00:00
|
|
|
break;
|
2020-08-09 12:27:56 +00:00
|
|
|
case 'o':
|
|
|
|
use_osmocc_sock = 1;
|
2016-03-01 17:40:38 +00:00
|
|
|
break;
|
2020-08-09 12:27:56 +00:00
|
|
|
case OPT_OSMO_CC:
|
|
|
|
if (!strcasecmp(argv[argi], "help")) {
|
|
|
|
osmo_cc_help();
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
if (cc_argc == MAX_CC_ARGS) {
|
|
|
|
fprintf(stderr, "Too many osmo-cc args!\n");
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
cc_argv[cc_argc++] = strdup(argv[argi]);
|
2017-06-04 10:18:49 +00:00
|
|
|
break;
|
2016-11-27 05:47:06 +00:00
|
|
|
case 'c':
|
2018-05-19 08:56:43 +00:00
|
|
|
call_audiodev = strdup(argv[argi]);
|
2016-11-27 05:47:06 +00:00
|
|
|
break;
|
2017-01-13 12:38:57 +00:00
|
|
|
case OPT_CALL_SAMPLERATE:
|
2018-05-19 08:56:43 +00:00
|
|
|
call_samplerate = atoi(argv[argi]);
|
2017-01-13 12:38:57 +00:00
|
|
|
break;
|
2016-11-27 05:47:06 +00:00
|
|
|
case 't':
|
2018-05-19 08:56:43 +00:00
|
|
|
send_patterns = atoi(argv[argi]);
|
2016-03-01 17:40:38 +00:00
|
|
|
break;
|
2016-11-27 05:47:06 +00:00
|
|
|
case 'l':
|
2018-05-19 08:56:43 +00:00
|
|
|
loopback = atoi(argv[argi]);
|
2016-03-01 17:40:38 +00:00
|
|
|
break;
|
|
|
|
case 'r':
|
2018-05-19 08:56:43 +00:00
|
|
|
rt_prio = atoi(argv[argi]);
|
2016-03-01 17:40:38 +00:00
|
|
|
break;
|
2018-11-10 14:16:20 +00:00
|
|
|
case OPT_FAST_MATH:
|
|
|
|
fast_math = 1;
|
|
|
|
break;
|
2016-11-27 05:47:06 +00:00
|
|
|
case OPT_WRITE_RX_WAVE:
|
2018-05-19 08:56:43 +00:00
|
|
|
write_rx_wave = strdup(argv[argi]);
|
2016-11-27 05:47:06 +00:00
|
|
|
break;
|
|
|
|
case OPT_WRITE_TX_WAVE:
|
2018-05-19 08:56:43 +00:00
|
|
|
write_tx_wave = strdup(argv[argi]);
|
2016-03-25 12:58:16 +00:00
|
|
|
break;
|
2016-11-27 05:47:06 +00:00
|
|
|
case OPT_READ_RX_WAVE:
|
2018-05-19 08:56:43 +00:00
|
|
|
read_rx_wave = strdup(argv[argi]);
|
2016-03-25 12:58:16 +00:00
|
|
|
break;
|
2017-07-09 17:17:37 +00:00
|
|
|
case OPT_READ_TX_WAVE:
|
2018-05-19 08:56:43 +00:00
|
|
|
read_tx_wave = strdup(argv[argi]);
|
2017-07-09 17:17:37 +00:00
|
|
|
break;
|
2018-05-19 08:56:43 +00:00
|
|
|
#ifdef HAVE_SDR
|
|
|
|
case OPT_LIMESDR:
|
2020-06-13 07:08:03 +00:00
|
|
|
if (allow_sdr) {
|
2018-05-19 08:56:43 +00:00
|
|
|
char *argv_lime[] = { argv[0],
|
|
|
|
"--sdr-soapy",
|
|
|
|
"--sdr-rx-antenna", "LNAL",
|
|
|
|
"--sdr-rx-gain", "30",
|
|
|
|
"--sdr-tx-gain", "30",
|
|
|
|
"--sdr-samplerate", "5000000",
|
|
|
|
"--sdr-bandwidth", "15000000",
|
|
|
|
"-s", "200000",
|
|
|
|
};
|
|
|
|
int argc_lime = sizeof(argv_lime) / sizeof (*argv_lime);
|
|
|
|
return options_command_line(argc_lime, argv_lime, main_mobile_handle_options);
|
|
|
|
}
|
2020-06-13 07:08:03 +00:00
|
|
|
break;
|
2018-08-25 08:25:25 +00:00
|
|
|
case OPT_LIMESDR_MINI:
|
2020-06-13 07:08:03 +00:00
|
|
|
if (allow_sdr) {
|
2018-08-25 08:25:25 +00:00
|
|
|
char *argv_lime[] = { argv[0],
|
|
|
|
"--sdr-soapy",
|
|
|
|
"--sdr-rx-antenna", "LNAW",
|
|
|
|
"--sdr-tx-antenna", "BAND2",
|
|
|
|
"--sdr-rx-gain", "25",
|
|
|
|
"--sdr-tx-gain", "30",
|
|
|
|
"--sdr-samplerate", "5000000",
|
|
|
|
"--sdr-bandwidth", "15000000",
|
|
|
|
"-s", "200000",
|
|
|
|
};
|
|
|
|
int argc_lime = sizeof(argv_lime) / sizeof (*argv_lime);
|
|
|
|
return options_command_line(argc_lime, argv_lime, main_mobile_handle_options);
|
|
|
|
}
|
2020-06-13 07:08:03 +00:00
|
|
|
break;
|
2018-05-19 08:56:43 +00:00
|
|
|
#endif
|
2017-08-30 15:42:49 +00:00
|
|
|
default:
|
2017-05-14 10:27:56 +00:00
|
|
|
#ifdef HAVE_SDR
|
2020-06-13 07:08:03 +00:00
|
|
|
if (allow_sdr)
|
|
|
|
return sdr_config_handle_options(short_option, argi, argv);
|
2017-05-14 10:27:56 +00:00
|
|
|
#endif
|
2020-06-13 07:08:03 +00:00
|
|
|
return -EINVAL;
|
2016-03-01 17:40:38 +00:00
|
|
|
}
|
2018-05-19 08:56:43 +00:00
|
|
|
|
|
|
|
return 1;
|
2016-03-01 17:40:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* global variable to quit main loop */
|
|
|
|
int quit = 0;
|
|
|
|
|
|
|
|
void sighandler(int sigset)
|
|
|
|
{
|
|
|
|
if (sigset == SIGHUP)
|
|
|
|
return;
|
|
|
|
if (sigset == SIGPIPE)
|
|
|
|
return;
|
|
|
|
|
2017-12-03 08:30:54 +00:00
|
|
|
if (clear_console_text)
|
|
|
|
clear_console_text();
|
2016-11-28 08:16:48 +00:00
|
|
|
printf("Signal received: %d\n", sigset);
|
2016-03-01 17:40:38 +00:00
|
|
|
|
|
|
|
quit = 1;
|
|
|
|
}
|
|
|
|
|
2016-06-17 05:28:45 +00:00
|
|
|
static int get_char()
|
|
|
|
{
|
|
|
|
struct timeval tv = {0, 0};
|
|
|
|
fd_set fds;
|
|
|
|
char c = 0;
|
|
|
|
int __attribute__((__unused__)) rc;
|
|
|
|
|
|
|
|
FD_ZERO(&fds);
|
|
|
|
FD_SET(0, &fds);
|
|
|
|
select(0+1, &fds, NULL, NULL, &tv);
|
|
|
|
if (FD_ISSET(0, &fds)) {
|
|
|
|
rc = read(0, &c, 1);
|
|
|
|
return c;
|
|
|
|
} else
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
2017-03-04 06:12:12 +00:00
|
|
|
/* Loop through all transceiver instances of one network. */
|
2020-08-09 12:27:56 +00:00
|
|
|
void main_mobile(const char *name, int *quit, int latency, int interval, void (*myhandler)(void), const char *station_id, int station_id_digits)
|
2017-01-13 06:28:31 +00:00
|
|
|
{
|
2017-03-04 06:12:12 +00:00
|
|
|
int latspl;
|
|
|
|
sender_t *sender;
|
|
|
|
double last_time_call = 0, begin_time, now, sleep;
|
|
|
|
struct termios term, term_orig;
|
|
|
|
int c;
|
2017-01-13 06:28:31 +00:00
|
|
|
int rc;
|
|
|
|
|
2017-08-30 15:42:49 +00:00
|
|
|
if (!got_init) {
|
|
|
|
fprintf(stderr, "main_mobile_init was not called, please fix!\n");
|
|
|
|
abort();
|
|
|
|
}
|
|
|
|
|
2017-07-24 08:09:05 +00:00
|
|
|
/* latency of send buffer in samples */
|
|
|
|
latspl = samplerate * latency / 1000;
|
|
|
|
|
2020-08-09 12:27:56 +00:00
|
|
|
/* check OSMO-CC support */
|
|
|
|
if (use_osmocc_cross && num_kanal == 1) {
|
2017-10-29 06:58:20 +00:00
|
|
|
fprintf(stderr, "You selected built-in call forwarding, but only channel is used. Does this makes sense?\n");
|
|
|
|
return;
|
|
|
|
}
|
2020-08-09 12:27:56 +00:00
|
|
|
if (use_osmocc_sock && use_osmocc_cross) {
|
|
|
|
fprintf(stderr, "You selected OSMO-CC socket interface and built-in call forwarding, but only one can be selected.\n");
|
2017-10-29 06:58:20 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (echo_test && call_audiodev[0]) {
|
|
|
|
fprintf(stderr, "You selected call device (headset) and echo test, but only one can be selected.\n");
|
|
|
|
return;
|
|
|
|
}
|
2020-08-09 12:27:56 +00:00
|
|
|
if (use_osmocc_sock && call_audiodev[0]) {
|
|
|
|
fprintf(stderr, "You selected OSMO-CC socket interface, but it cannot be used with call device (headset).\n");
|
2017-10-29 06:58:20 +00:00
|
|
|
return;
|
|
|
|
}
|
2020-08-09 12:27:56 +00:00
|
|
|
if (use_osmocc_cross && call_audiodev[0]) {
|
2017-10-29 06:58:20 +00:00
|
|
|
fprintf(stderr, "You selected built-in call forwarding, but it cannot be used with call device (headset).\n");
|
2017-10-28 05:11:40 +00:00
|
|
|
return;
|
|
|
|
}
|
2020-08-09 12:27:56 +00:00
|
|
|
if (use_osmocc_sock && echo_test) {
|
|
|
|
fprintf(stderr, "You selected OSMO-CC socket interface, but it cannot be used with echo test.\n");
|
2017-10-28 05:11:40 +00:00
|
|
|
return;
|
|
|
|
}
|
2020-08-09 12:27:56 +00:00
|
|
|
if (use_osmocc_cross && echo_test) {
|
2017-10-29 06:58:20 +00:00
|
|
|
fprintf(stderr, "You selected built-in call forwarding, but it cannot be used with echo test.\n");
|
2017-10-28 05:11:40 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2020-08-09 12:27:56 +00:00
|
|
|
/* init OSMO-CC */
|
|
|
|
if (!use_osmocc_sock)
|
2020-04-04 14:34:39 +00:00
|
|
|
console_init(station_id, call_audiodev, call_samplerate, latency, station_id_digits, loopback, echo_test, console_digits);
|
2017-01-13 06:28:31 +00:00
|
|
|
|
2017-10-28 05:11:40 +00:00
|
|
|
/* init call control instance */
|
2020-08-09 12:27:56 +00:00
|
|
|
rc = call_init(name, (use_osmocc_sock) ? send_patterns : 0, release_on_disconnect, use_osmocc_sock, cc_argc, cc_argv);
|
2017-01-13 06:28:31 +00:00
|
|
|
if (rc < 0) {
|
|
|
|
fprintf(stderr, "Failed to create call control instance. Quitting!\n");
|
2017-03-04 06:12:12 +00:00
|
|
|
return;
|
2017-01-13 06:28:31 +00:00
|
|
|
}
|
|
|
|
|
2017-05-14 10:27:56 +00:00
|
|
|
#ifdef HAVE_SDR
|
2017-08-30 15:42:49 +00:00
|
|
|
rc = sdr_configure(samplerate);
|
2017-01-13 06:28:31 +00:00
|
|
|
if (rc < 0)
|
2017-03-04 06:12:12 +00:00
|
|
|
return;
|
2017-01-13 06:28:31 +00:00
|
|
|
#endif
|
|
|
|
|
2017-01-04 13:14:02 +00:00
|
|
|
/* open audio */
|
2017-08-30 15:42:49 +00:00
|
|
|
if (sender_open_audio(latspl))
|
2017-01-04 13:14:02 +00:00
|
|
|
return;
|
2017-10-28 05:11:40 +00:00
|
|
|
if (console_open_audio(latspl))
|
2017-01-29 15:54:28 +00:00
|
|
|
return;
|
|
|
|
|
2019-06-30 06:10:33 +00:00
|
|
|
if (!loopback)
|
|
|
|
print_image();
|
|
|
|
|
2016-11-13 05:37:56 +00:00
|
|
|
/* real time priority */
|
|
|
|
if (rt_prio > 0) {
|
|
|
|
struct sched_param schedp;
|
|
|
|
int rc;
|
|
|
|
|
|
|
|
memset(&schedp, 0, sizeof(schedp));
|
|
|
|
schedp.sched_priority = rt_prio;
|
|
|
|
rc = sched_setscheduler(0, SCHED_RR, &schedp);
|
|
|
|
if (rc)
|
|
|
|
fprintf(stderr, "Error setting SCHED_RR with prio %d\n", rt_prio);
|
|
|
|
}
|
|
|
|
|
2016-06-17 05:28:45 +00:00
|
|
|
/* prepare terminal */
|
|
|
|
tcgetattr(0, &term_orig);
|
|
|
|
term = term_orig;
|
|
|
|
term.c_lflag &= ~(ISIG|ICANON|ECHO);
|
|
|
|
term.c_cc[VMIN]=1;
|
|
|
|
term.c_cc[VTIME]=2;
|
|
|
|
tcsetattr(0, TCSANOW, &term);
|
|
|
|
|
2017-01-04 13:14:02 +00:00
|
|
|
/* catch signals */
|
|
|
|
signal(SIGINT, sighandler);
|
|
|
|
signal(SIGHUP, sighandler);
|
|
|
|
signal(SIGTERM, sighandler);
|
|
|
|
signal(SIGPIPE, sighandler);
|
|
|
|
|
2017-02-25 06:09:53 +00:00
|
|
|
/* start streaming */
|
|
|
|
if (sender_start_audio())
|
|
|
|
*quit = 1;
|
2017-10-28 05:11:40 +00:00
|
|
|
if (console_start_audio())
|
2017-02-25 06:09:53 +00:00
|
|
|
*quit = 1;
|
|
|
|
|
2016-06-17 05:28:45 +00:00
|
|
|
while(!(*quit)) {
|
2017-01-14 07:05:30 +00:00
|
|
|
begin_time = get_time();
|
|
|
|
|
2016-06-17 05:28:45 +00:00
|
|
|
/* process sound of all transceivers */
|
|
|
|
for (sender = sender_head; sender; sender = sender->next) {
|
|
|
|
/* do not process audio for an audio slave, since it is done by audio master */
|
|
|
|
if (sender->master) /* if master is set, we are an audio slave */
|
|
|
|
continue;
|
|
|
|
process_sender_audio(sender, quit, latspl);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* process timers */
|
|
|
|
process_timer();
|
|
|
|
|
2020-08-09 12:27:56 +00:00
|
|
|
/* process audio for call instances */
|
2016-06-17 05:28:45 +00:00
|
|
|
now = get_time();
|
2017-01-14 07:05:30 +00:00
|
|
|
if (now - last_time_call >= 0.1)
|
|
|
|
last_time_call = now;
|
|
|
|
if (now - last_time_call >= 0.020) {
|
|
|
|
last_time_call += 0.020;
|
2016-06-17 05:28:45 +00:00
|
|
|
/* call clock every 20ms */
|
2017-10-28 05:11:40 +00:00
|
|
|
call_clock();
|
2016-06-17 05:28:45 +00:00
|
|
|
}
|
|
|
|
|
2016-06-19 15:43:48 +00:00
|
|
|
next_char:
|
2016-06-17 05:28:45 +00:00
|
|
|
c = get_char();
|
|
|
|
switch (c) {
|
|
|
|
case 3:
|
|
|
|
/* quit */
|
2017-12-03 08:30:54 +00:00
|
|
|
if (clear_console_text)
|
|
|
|
clear_console_text();
|
2016-11-28 08:16:48 +00:00
|
|
|
printf("CTRL+c received, quitting!\n");
|
2016-06-17 05:28:45 +00:00
|
|
|
*quit = 1;
|
2016-06-19 15:43:48 +00:00
|
|
|
goto next_char;
|
2016-06-17 05:28:45 +00:00
|
|
|
case 'w':
|
2017-09-25 16:46:50 +00:00
|
|
|
/* toggle wave display */
|
|
|
|
display_status_on(0);
|
|
|
|
display_measurements_on(0);
|
2017-02-05 07:54:56 +00:00
|
|
|
#ifdef HAVE_SDR
|
2017-01-07 18:53:43 +00:00
|
|
|
display_iq_on(0);
|
2017-02-05 07:54:56 +00:00
|
|
|
display_spectrum_on(0);
|
|
|
|
#endif
|
2016-06-17 05:28:45 +00:00
|
|
|
display_wave_on(-1);
|
2016-06-19 15:43:48 +00:00
|
|
|
goto next_char;
|
2017-05-25 16:43:54 +00:00
|
|
|
case 'c':
|
2017-09-25 16:46:50 +00:00
|
|
|
/* toggle call state display */
|
|
|
|
display_wave_on(0);
|
|
|
|
display_measurements_on(0);
|
2017-05-25 16:43:54 +00:00
|
|
|
#ifdef HAVE_SDR
|
|
|
|
display_iq_on(0);
|
|
|
|
display_spectrum_on(0);
|
|
|
|
#endif
|
|
|
|
display_status_on(-1);
|
|
|
|
goto next_char;
|
2017-09-25 16:46:50 +00:00
|
|
|
case 'm':
|
|
|
|
/* toggle measurements display */
|
|
|
|
display_wave_on(0);
|
|
|
|
display_status_on(0);
|
|
|
|
#ifdef HAVE_SDR
|
|
|
|
display_iq_on(0);
|
|
|
|
display_spectrum_on(0);
|
|
|
|
#endif
|
|
|
|
display_measurements_on(-1);
|
|
|
|
goto next_char;
|
2017-02-05 07:54:56 +00:00
|
|
|
#ifdef HAVE_SDR
|
2017-01-07 18:53:43 +00:00
|
|
|
case 'q':
|
2017-09-25 16:46:50 +00:00
|
|
|
/* toggle IQ display */
|
2017-01-07 18:53:43 +00:00
|
|
|
display_wave_on(0);
|
2017-05-25 16:43:54 +00:00
|
|
|
display_status_on(0);
|
2017-09-25 16:46:50 +00:00
|
|
|
display_measurements_on(0);
|
2017-02-05 07:54:56 +00:00
|
|
|
display_spectrum_on(0);
|
2017-01-07 18:53:43 +00:00
|
|
|
display_iq_on(-1);
|
|
|
|
goto next_char;
|
2017-02-05 07:54:56 +00:00
|
|
|
case 's':
|
2017-09-25 16:46:50 +00:00
|
|
|
/* toggle spectrum display */
|
2017-02-05 07:54:56 +00:00
|
|
|
display_wave_on(0);
|
2017-05-25 16:43:54 +00:00
|
|
|
display_status_on(0);
|
2017-09-25 16:46:50 +00:00
|
|
|
display_measurements_on(0);
|
2017-02-05 07:54:56 +00:00
|
|
|
display_iq_on(0);
|
|
|
|
display_spectrum_on(-1);
|
|
|
|
goto next_char;
|
|
|
|
#endif
|
2016-08-02 07:03:46 +00:00
|
|
|
case 'i':
|
|
|
|
/* dump info */
|
|
|
|
dump_info();
|
|
|
|
goto next_char;
|
2017-11-26 07:53:09 +00:00
|
|
|
#ifdef HAVE_SDR
|
2020-04-04 14:34:39 +00:00
|
|
|
case 'b':
|
2017-11-26 07:53:09 +00:00
|
|
|
calibrate_bias();
|
|
|
|
goto next_char;
|
|
|
|
#endif
|
2016-06-17 05:28:45 +00:00
|
|
|
}
|
|
|
|
|
2017-10-28 05:11:40 +00:00
|
|
|
/* process call control */
|
2020-08-09 12:27:56 +00:00
|
|
|
call_media_handle();
|
|
|
|
while (call_handle());
|
|
|
|
if (!use_osmocc_sock)
|
2017-10-28 05:11:40 +00:00
|
|
|
process_console(c);
|
2016-06-19 15:43:48 +00:00
|
|
|
|
2016-07-09 09:15:48 +00:00
|
|
|
if (myhandler)
|
|
|
|
myhandler();
|
|
|
|
|
2017-09-25 16:46:50 +00:00
|
|
|
display_measurements((double)interval / 1000.0);
|
|
|
|
|
2017-01-14 07:05:30 +00:00
|
|
|
now = get_time();
|
|
|
|
|
|
|
|
/* sleep interval */
|
|
|
|
sleep = ((double)interval / 1000.0) - (now - begin_time);
|
|
|
|
if (sleep > 0)
|
|
|
|
usleep(sleep * 1000000.0);
|
|
|
|
|
|
|
|
// now = get_time();
|
|
|
|
// printf("duration =%.6f\n", now - begin_time);
|
2016-06-17 05:28:45 +00:00
|
|
|
}
|
|
|
|
|
2017-01-04 13:14:02 +00:00
|
|
|
/* reset signals */
|
|
|
|
signal(SIGINT, SIG_DFL);
|
|
|
|
signal(SIGHUP, SIG_DFL);
|
|
|
|
signal(SIGTERM, SIG_DFL);
|
|
|
|
signal(SIGPIPE, SIG_DFL);
|
|
|
|
|
2016-11-28 08:16:48 +00:00
|
|
|
/* get rid of last entry */
|
2017-12-03 08:30:54 +00:00
|
|
|
if (clear_console_text)
|
|
|
|
clear_console_text();
|
2016-07-24 07:12:54 +00:00
|
|
|
|
2016-06-17 05:28:45 +00:00
|
|
|
/* reset terminal */
|
|
|
|
tcsetattr(0, TCSANOW, &term_orig);
|
2016-11-13 05:37:56 +00:00
|
|
|
|
|
|
|
/* reset real time prio */
|
|
|
|
if (rt_prio > 0) {
|
|
|
|
struct sched_param schedp;
|
|
|
|
|
|
|
|
memset(&schedp, 0, sizeof(schedp));
|
|
|
|
schedp.sched_priority = 0;
|
|
|
|
sched_setscheduler(0, SCHED_OTHER, &schedp);
|
|
|
|
}
|
2016-06-17 05:28:45 +00:00
|
|
|
|
2020-08-09 12:27:56 +00:00
|
|
|
//* cleanup call control */
|
|
|
|
call_exit();
|
2017-10-29 06:58:20 +00:00
|
|
|
|
2020-08-09 12:27:56 +00:00
|
|
|
/* cleanup console */
|
|
|
|
if (!use_osmocc_sock)
|
|
|
|
console_cleanup();
|
2017-01-13 06:28:31 +00:00
|
|
|
}
|
|
|
|
|