Commit Graph

361 Commits

Author SHA1 Message Date
Vadim Yanitskiy a11692085e Fix compilation error: '_1' was not declared in this scope
Change-Id: I0f1f2df817a65f7d5b72c5280451346a0a011d47
2021-05-03 20:34:13 +02:00
Piotr Krysik e4da417f8d Remove local copy of associated osmo libraries
Change-Id: I2b4afedd9f2d568b5287d791891b2c2893fc6843
2021-05-03 07:14:00 +02:00
Piotr Krysik 21b0f7d228 cmake: change 'gsm' to 'grgsm'
Change-Id: I130a7912e179b1f04e68eb131e06800becca5a00
2021-05-03 07:14:00 +02:00
Vasil Velichkov b82bbeb026 Fix compiling with the local libosmocore copy
Change-Id: Ic72e6ca7f9cc40bc2d78b931e54e66cd71444835
2021-05-03 07:14:00 +02:00
Vasil Velichkov 1789ae28ee GNU Radio 3.8 support
https://wiki.gnuradio.org/index.php/GNU_Radio_3.8_OOT_Module_Porting_Guide

Change-Id: I23dd638c8c48ed0a4b50559ce33fbd5e60b7dcbc
2021-05-03 07:14:00 +02:00
Vasil Velichkov fa184a9447 Fix uplink sub_slot and sub_types assignment in the sdcch4 and bcch_ccch demappers blocks
Add support for RACH bursts although they are not yet supported in the
receiver and control channel decoder blocks.

3GPP TS 45.002 version 15.1.0 Release 15
Table 3 : Mapping of logical channels onto physical channels (see subclauses 6.3, 6.4, 6.5)
Figure 8a: TDMA frame mapping for FCCH + SCH + BCCH + CCCH

Fixes the following tests:
qa_gsm_bcch_ccch_demapper.test_uplink
qa_gsm_bcch_ccch_sdcch4_demapper.test_uplink

Change-Id: Ia6b3070c1085bcdda6d98fd94a89c6e0982e2aec
2019-07-29 21:12:24 +03:00
Vasil Velichkov 4954ae6fbf Fix sub_slot assignment in the universal_ctrl_chans_demapper block
3GPP TS 45.002 version 15.1.0 Release 15
Table 3 : Mapping of logical channels onto physical channels (see subclauses 6.3, 6.4, 6.5)
Table 4 : Mapping of logical channels onto physical channels (see subclauses 6.3, 6.4, 6.5)

Fixes the following tests:
qa_gsm_bcch_ccch_sdcch4_demapper.test_downlink
qa_gsm_sdcch8_demapper.test_downlink

Change-Id: Idc63407694fd1f7be962ab630d4e8c13b4a5d348
2019-07-29 21:12:24 +03:00
Vasil Velichkov ff88ba41ec Add control channels demappers tests
3GPP TS 45.002 version 15.1.0 Release 15
Table 3 : Mapping of logical channels onto physical channels (see subclauses 6.3, 6.4, 6.5)
Table 4 : Mapping of logical channels onto physical channels (see subclauses 6.3, 6.4, 6.5)
Figure 8a: TDMA frame mapping for FCCH + SCH + BCCH + CCCH
Figure 8b: TDMA frame mapping for FCCH + SCH + BCCH + CCCH + SDCCH/4(0...3) + SACCH/4(0...3)

Five of the six tests currently fail and are marked with
@unittest.expectedFailure. Fixes in subsequent commits.

Change-Id: I33b0948832a0c2506bffd389cc134c3236c74d27
2019-07-29 21:09:07 +03:00
Vasil Velichkov 61a3ca6cb4 Improve the TCH/H decoder logs
- Change "6,90 kbit/s" to "5.9 kbit/s"
  A typo reported in github ptrkrysik/gr-gsm#456
- Comment out the "Error! frame_nr:" message as it turns out to confuse
  users more then it actually helps debugging.
- When voice-boundary detection is enabled write the name of decoded
  control channel messages

Change-Id: I697ef944f30c4cabb62c888317dd3a7f8dcd5611
2019-05-02 12:59:20 +02:00
Vasil Velichkov 2f0c096e30 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-02-05 14:28:37 +00:00
Vasil Velichkov 06321a39e0 Improve voice boundary detection
Decode Alerting and Progress messages and if the in-band information
flag is set start decoding the voice
2018-12-29 00:52:05 +01:00
Vasil Velichkov 7f259fdb68 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 ...
2018-12-29 00:52:05 +01:00
Vasil Velichkov 1828a315a8 Move HR demapping into a separate block 2018-12-29 00:52:05 +01:00
Andrew Artyushok fbcee39107 Add HR demapping 2018-12-29 00:52:05 +01:00
Piotr Krysik 003c8720f5 transmitter/txtime_setter: fix error print syntax error 2018-12-28 22:36:40 +01:00
David Holm 17852163ad 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.
2018-12-28 18:55:12 +01:00
Vadim Yanitskiy dc342dc88a trx/txtime_setter: print error if reference fn is missing
Change-Id: I2a6e3f41b6fe79b92d85ff98bc2cd9afd9bdc568
2018-12-21 06:55:11 +07:00
Vadim Yanitskiy b73b4a8637 trx/txtime_setter: reduce code nesting in process_txtime_of_burst()
Change-Id: I5c334e16d6b28a5e32cd62a177ad56bfc8e748ee
2018-12-21 06:50:44 +07:00
Vasil Velichkov 89585b374b 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 09:35:28 +00:00
Vasil Velichkov 75ae9cc361 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-11 09:12:02 +00:00
Vadim Yanitskiy 5394c6012d 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-08-10 16:38:59 +07:00
Piotr Krysik ac140210c9 Simplify cmake checks related to libosmocore 2018-06-19 12:07:28 +02:00
Piotr Krysik c711e97af1 Separating libosmogsm from the rest 2018-06-18 15:13:13 +02:00
Piotr Krysik 2779e62094 Fix includes after moving trx_burst_if 2018-05-06 22:23:06 +02:00
Piotr Krysik 993055342d 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