Commit Graph

360 Commits

Author SHA1 Message Date
Vasil Velichkov 4b034e7141 MacOS fixes
- Include grgsm/endian.h in tch_h_decoder_impl.cc
- Revert 0ed39fbf93 as linking with
  boost_thread is needed

Fixes GH-444

Change-Id: I00884962295082cff3eb64fa21e9f73437be0001
2019-07-18 10:31:27 +02:00
Vasil Velichkov 4d300e9c61 Improve voice boundary detection
Decode Alerting and Progress messages and if the in-band information
flag is set start decoding the voice
2019-07-18 10:31:26 +02:00
Vasil Velichkov 5968552b47 Add TCH/H decoder block with AMR multirate support
Add new TCHH channel mode
Add two new optional arguments

    -m CHAN_MODE, --mode=CHAN_MODE
                        Channel mode. Valid options are 'BCCH' (Non-combined
                        C0), 'BCCH_SDCCH4'(Combined C0), 'SDCCH8' (Stand-alone
                        control channel) 'TCHF' (Traffic Channel, Full rate),
                        'TCHH' (Traffic Channel, Half rate)

    --sub-channel=TCH_H_CHANNEL
                        TCH/H sub-channel. [default=0]
    --multi-rate=MULTI_RATE
                        The MultiRrate configuration element from the
                        Assigment Command message. Example: 28111a40. See 3GPP
                        TS 44.018 - 10.5.2.21aa MultiRate configuration

Example:
    grgsm_decode -m TCHH --sub-channel 0 --multi-rate 2811 -o voice.amr ...
2019-07-18 10:31:26 +02:00
Vasil Velichkov 63e568dc3d Move HR demapping into a separate block 2019-07-18 10:31:26 +02:00
Andrew Artyushok 3e2f883ba0 Add HR demapping 2019-07-18 10:31:26 +02:00
Piotr Krysik 7fb1738cd8 transmitter/txtime_setter: fix error print syntax error 2019-07-18 10:31:26 +02:00
David Holm 9aadf3db64 lib/trx, lib/transmitter: Include grgsm/endian.h
MacOS X does not have endian.h and the build will fail unless
grgsm/endian.h is used.
2019-07-18 10:31:26 +02:00
Vadim Yanitskiy fad602b2b0 trx/txtime_setter: print error if reference fn is missing
Change-Id: I2a6e3f41b6fe79b92d85ff98bc2cd9afd9bdc568
2019-07-18 10:31:26 +02:00
Vadim Yanitskiy 06f76fb3a6 trx/txtime_setter: reduce code nesting in process_txtime_of_burst()
Change-Id: I5c334e16d6b28a5e32cd62a177ad56bfc8e748ee
2019-07-18 10:31:26 +02:00
Piotr Krysik 554aa905e4 receiver/time_sample_ref: improve accuracy of offset<->time conversions
Change-Id: Ie6e7ea4337c9e23a8e4445136a3adffc96b19942
2018-11-02 11:52:43 +01:00
Piotr Krysik 89dc99016e misc_utils/resampler: Add offsets of tags at the input
This change is done to make keeping track of sample counter
at the input of the resampler easier from blocks connected
to its output. Each tag leaving the resampler has accompanying
"original_offset" tag with its offset before sample rate change.

Change-Id: Iea8ca4a092029f774406dced8a97a17810f21f62
2018-11-02 11:50:14 +01:00
Piotr Krysik acd7d71db4 misc_utils/resampler: Cosmetic changes
Change variables names to more readable.
Remove old comment.

Change-Id: Ibe22677cfc4b3e1a9fb900e5055cdce0a7656a92
2018-11-02 11:31:32 +01:00
Piotr Krysik 6a0fb1a415 misc_utils/resampler: Fix repetition of tags at the output
When tag appears at the last sample of the ouput buffer
it will be added again in the next run of the work function.

Here this issue was solved by changing the codition so the
tag appearing at the end of the output buffer is not added.

Change-Id: Ia4f0923e2071184879a023d0fe01026d8e9ccbda
2018-11-02 11:26:13 +01:00
Vasil Velichkov 492f48c7d3 burst_file_source: Fix reading longer bursts
- Read bursts with pmt::deserialize directly from the std::filebuf
- Remove the unused unserialized variable
- Add tests

Since df978693 when the rx_time tags are present in the incomming stream
the gsm receiver adds fm_time to the burst's PMT and the bursts that
burst file sink writes becomes longer because of the additional field.

The burst file source block was expecting all burst to be 147 bytes long
and reading files with longer bursts was failing with an unhandled exception.

terminate called after throwing an instance of 'pmt::exception'
thread[thread-per-block[5]: <block dummy_burst_filter (2)>]: pmt_cdr: wrong_type : #f
  what():  pmt::deserialize: malformed input stream, tag value = : 115

Change-Id: I989b0d6a6b214088b7880e5cbf7bb6725492dbfc
2018-09-13 15:35:44 +02:00
Vasil Velichkov 9e46c4807d Format the output into ostringstream and then write it at once.
This fixes the garbled output when multiple printers are used in a
flowgraph.

closes #255
closes #420

Change-Id: I1012ed26371b4c67163545652f0a1ce0f576af9e
2018-09-13 15:35:44 +02:00
Vadim Yanitskiy f94a51b64d gsm_trx_burst_if: allow to customize the bind address
Pleviously remote address for DATA interface was also used as the
bind address, what is definitely wrong. Let's change the API a bit
in order to allow one to specify a custom bind address.

Change-Id: I6e5f7b7119ac454217b8dd04f9ee0dd3b23972b6
2018-09-13 15:35:44 +02:00
Piotr Krysik 6a64ce82f7 Simplify cmake checks related to libosmocore 2018-09-13 15:35:44 +02:00
Piotr Krysik ded359bf36 Separating libosmogsm from the rest 2018-09-13 15:35:44 +02:00
Piotr Krysik 6463dc7641 Freq hopping fixes 2018-06-18 14:43:50 +02:00
Piotr Krysik 4e4a92ea05 Added functions for arfcn conversions taken from libosmocore 2018-05-11 11:39:23 +02:00
Piotr Krysik 1a32fc42a0 Added block for doing hopping for mobile station transceiver 2018-05-11 11:38:07 +02:00
Piotr Krysik b7cce89e55 Distilled function to generate hopping from cx_channel hopper 2018-05-11 11:37:21 +02:00
Piotr Krysik fd3d883d4e Fix includes after moving trx_burst_if 2018-05-06 22:23:06 +02:00
Piotr Krysik 1373c32d7e Moving trx burst interface to trx directory
and to new 'Transceiver' cathegory in gnuradio-companion
2018-05-05 12:38:11 +02:00
Piotr Krysik 2471052cfe Merge branch 'fixeria/trx' of https://github.com/axilirator/gr-gsm into fixeria_trx
# Resolved conflicts:
#	apps/grgsm_trx
#	python/trx/radio_if.py
#	swig/grgsm_swig.i
2018-04-17 09:10:33 +02:00
Piotr Krysik 8a8d41a583 Merge branch 'ptrkrysik/trx' into development 2018-04-16 22:21:29 +02:00
Piotr Krysik e24860f9c0 Reformatting control_channels_decoder 2018-04-06 15:22:51 +02:00
Vasil Velichkov 924d1873da Fix an assert in ViterbiR2O4::decode
The table length was wrong becuase matchCostTable is a float pointer and
not an array since 792330777d

python2.7: /home/user/gr-gsm/lib/decoding/openbts/ViterbiR204.cpp:288: virtual void ViterbiR2O4::decode(const SoftVector&, BitVector&): Assertion `match-matchCostTable<(float)sizeof(matchCostTable)/sizeof(matchCostTable[0])-1' failed.

 (gdb) f 4
 #4  0x00007fffdff820c3 in ViterbiR2O4::decode (this=0x5555563bbdf0, in=..., target=...)
     at /home/vasko/sources/gr-gsm/gr-gsm/lib/decoding/openbts/ViterbiR204.cpp:288
 288				assert(match-matchCostTable<(float)sizeof(matchCostTable)/sizeof(matchCostTable[0])-1);
 (gdb) p match-matchCostTable
 $1 = 2
 (gdb) p (float)sizeof(matchCostTable)/sizeof(matchCostTable[0])-1
 $2 = 1
 (gdb) p (float)sizeof(matchCostTable)/sizeof(matchCostTable[0])
 $3 = 2
 (gdb) p sizeof(matchCostTable)
 $4 = 8
2018-04-06 15:18:26 +02:00
Vasil Velichkov bc2a23e0e7 Check the gsm0503_xcch_decode return value
- Discard the message when gsm0503_xcch_decode returns -1
- Add automated decrypt test

See https://groups.google.com/d/msg/gr-gsm/9nOkIdrGOck/qTZh47McCQAJ
2018-03-30 22:34:52 +02:00
Piotr Krysik c097ce73c5 Added block for extracting assignment commands 2018-03-05 13:16:32 +01:00
Piotr Krysik b1e67fe527 Define __attribute__ and __deprecated__ on MSWin 2018-03-04 22:09:23 +01:00
Piotr Krysik 86c9164000 Change buildsystem message on libosmocore not being found 2018-03-04 22:08:52 +01:00
Piotr Krysik 1a5e87ea1a Conditional compilation of local libosmocore depending if there is or is not libosmocore installation present on the system 2018-03-04 19:36:24 +01:00
Piotr Krysik d8a576618d Fixing warning caused by local libosmocore version 2018-03-04 19:35:00 +01:00
Piotr Krysik daa26e80be Fixing 'free' position 2018-03-03 20:04:13 +01:00
Piotr Krysik 1fd7cfb47e Removing part that causes problems with 'make test' 2018-02-28 14:58:10 +01:00
Piotr Krysik b24beebaf9 Adding include to have 'bool' type 2018-02-28 10:11:08 +01:00
Piotr Krysik 4cd494bbf8 Slight changes to CMake file and libosmocoding file (include change) 2018-02-28 10:08:38 +01:00
Piotr Krysik 70f549abae Merge remote-tracking branch 'origin/quick-hack' into grgsm_on_win 2018-02-27 14:46:18 +01:00
Piotr Krysik b3bd68ed8f Commenting out some problematic and not apsolutely necessary stuff from libosmocore 2018-02-27 14:45:14 +01:00
Piotr Krysik 813fedd36e Fixing types in gsm0503_mapping 2018-02-27 14:45:14 +01:00
Piotr Krysik 1aede38857 Moving gsm0503.h to gsm subdir 2018-02-27 14:45:14 +01:00
Piotr Krysik 9e2e8358a3 Portability fix: Adding local partial copy of libosmocore (TODO: minimize it) 2018-02-27 14:45:14 +01:00
Piotr Krysik eb81b03c02 Portability fix: Replaced problematic includes 2018-02-27 14:45:14 +01:00
Piotr Krysik 15219abe00 sch.c: Changed include from local to global 2018-02-27 14:45:14 +01:00
Piotr Krysik 3b11689d22 Change ints to size_t 2018-02-27 14:45:14 +01:00
Piotr Krysik ebe95fc7b6 Fix: replaced u_int32 type with uint32 2018-02-27 14:45:14 +01:00
Piotr Krysik 792330777d Portability fix: replacing tables of variable size with memory allocations 2018-02-27 14:45:14 +01:00
Piotr Krysik 8bed612c39 Hack: commented out linking with libosmocore libraries
Portability fix: If on windows link wsock32 and ws2_32 libraries
2018-02-27 14:45:14 +01:00
Vadim Yanitskiy 0123232305 txtime_setter_impl: fix wrong time_hint reference 2017-12-09 20:16:44 +07:00