Age | Commit message (Collapse) | Author | Files | Lines |
|
This implements a multiplexer and de-multiplexer for the ITU-T I.460
standard. The latter covers the transmission of sub-slots of 32/16/8k
inside 64k timeslots.
Change-Id: Id522f06e73b77332b437b7a27e4966872da70eda
|
|
Fix osmo_mi_name_buf() to snprintf() into the buf in *all* cases.
osmo_mi_name_c() is implemented via osmo_mi_name_buf(), which returns
compile-time string constants in special cases. That means that
osmo_mi_name_c() does return non-allocated strings in these special cases.
The caller of functions like osmo_mi_name_c() must always be able to rely on
getting a talloced string, or run a danger of deallocating const pointers.
Change-Id: I623959f01b72642bcdd18508097c5c405c59f6f1
|
|
Change-Id: I81646ff8284061a60c208bd8f9233f66c3e410f8
|
|
Related: osmo-bts Ic22ab71e520ab44429a93724250d349d16250801
Change-Id: Ib4147a33a75c3cf425c30da8b0678c7fba8a371d
|
|
Allow dumping the VTY XML reference (for generating manuals) to a normal FILE*
stream instead of a vty output buffer.
We currently generate the VTY reference by starting the client program,
connecting to the VTY telnet and dumping the reference. That is weirdly
convoluted, especially since there has to be a valid config file that
successfully starts up a minimal set of external links before the reference can
be generated. IMO we should have dumped the XML reference to stdout from the
start, and never to a VTY session.
With this patch, it is trivial to generate the XML VTY reference by a
commandline switch. The client program will set up the entire VTY, and
immediately after parsing the cmdline options but before parsing a config file,
just dumps the reference and doesn't even start establishing local ports. That
would allow generating the XML reference on the fly during the build process of
the manuals, without the need of a docker container or somesuch.
A first implementation of such a commandline switch is `osmo-bsc -X`, added in
I316efedb2c1652791434ecf14a1e261367cd2fb7
This patch jumps through a bit of a hoop to still allow dumping to a VTY buffer
without code dup, to still allow dumping the XML reference through telnet VTY,
until all our programs have implemented an -X switch (TM).
Change-Id: Ic74bbdb6dc5ea05f03c791cc70184861e39cd492
|
|
Also add a test for an actual CONFUSION message parsing.
Change-Id: If8afd2d096fb66c6c2f255a08fc1129de3d09cec
|
|
This is basically I16d5190b3cdc997c5609b52d41203f10264b017c.
Change-Id: Ife660f00d7a6d3b874ab2e59e34dca2109fa82d8
Related: OS#4546
|
|
This implementation is taken from OsmocomBB, in particular from:
target/firmware/layer1/rfch.c
Change return type to uint16_t, because neither ARFCN, nor MAI
can be negative. Add prefix 'gsm0502_' to the function's name.
Change-Id: I8aba1578cc9d1bd89d4f5d33a6e8fedc8bea789a
Related: OS#4546
|
|
These functions implement re-ordering of bits as per TS 06.90 / 26.101
based on the already existing tables we've had in libosmocoding.
Change-Id: Ia4ac2aea2e96f9185f082a07ca64dfc5276efb46
|
|
As was pointed out by pespin, some compilers may not like the
lack of spaces around the format macro constants.
Change-Id: I4b6517989030c8e3f6a1bf16c43044e4e9137f40
|
|
notice.
In Change-Id Idf2b99e9ef014eba26e3d4f0f38c2714d3a0520a we accidentially removed this
symbol, let's re-introduce it.
Change-Id: I9fbcbcc6619ef0c63d3682fc86adc80045baab02
|
|
Function gsm0808_get_cipher_reject_cause() was previously available
in private gsm0808_utils.h. In practice, the exact same code is useful
to extract Cause IE value from any of the many other BSSMAP messages
which use it.
So let's rename it to gsm0808_get_cause() and make it avilable
to everyone to use.
Change-Id: Idf2b99e9ef014eba26e3d4f0f38c2714d3a0520a
|
|
The value string array that explain the type of the AMR DTX / SID
frames is incomplete, lets add the missing strings.
Change-Id: If9e80b4bd8bdc31323c7c276155b2538e20a99be
Related: OS#2978
|
|
calling log_init() multiple times would lead into memory leaks. The
function should only be called once on startup of the process. Lets make
sure that it does not get called multiple times by accident.
Change-Id: Ibb300e4c9b04767581116ab530b2e6a9a195db08
|
|
when the API user of libosmocores logging infrastructure does not set a
pre-defined logging level in struct log_info_cat, the result would be an
invalid logging level. In order to avoid problems with that and to spare
all the additional .loglevel = LOGL_NOTICE (API users are advised to use
LOGL_NOTICE as default) lines in the user code lets check the logging
level on startup and set LOGL_NOTICE if there is no logging level set.
Change-Id: Ib9e180261505062505fc4605a98023910f76cde6
Related: OS#2577
|
|
The pointer *pw is only populated when the the parameter *user is given,
otherwise it remains uninitalized while it is used later when the
previleges are being dropped.
Change-Id: Idec7041e9ea17a252aefbf6fa90091ae17fd4fcd
Fixes: CID#209895
|
|
This function offers the highest level of API among all libosmousb
helper functions. It is intended as a one-stop shop for everything
related to grabbing an interface.
Change-Id: I748ded6cc7b73a73625588bd7a34a017a905b6bf
|
|
See TS 08.08 section 3.2.1.34 SAPI "n" REJECT:
1) DLCI is a TV element, not V.
2) Cause is a TLV element and we have a special function to encode it.
Change-Id: I033afe556c06427d06ac55c4f78854a45e41aae6
|
|
Change-Id: I053c2bfe461aa82085e7dac1cdcc95dd77219949
|
|
while skipping `0` might be visually pleasant for non-repeating groups, e.g.:
bsc.assignment.completed
it makes metrics parsing very awkward for repeating groups, e.g.:
bts.chreq.total
bts.1.chreq.total
bts.2.chreq.total
and since nobody's going to look at raw statsd stream anyway,
we can live with some extra zeroes
Change-Id: Id294202fbcebe0b6b155c7f267b2da73af20adf4
|
|
Previously the interval between stats flushes would slowly increase
which would lead to reporting time jitter and confuse a timescale
database.
Change-Id: I23d8b5157ef8a9833ba16a81d9b28a126f303c30
|
|
Reliable monitoring requires regular flush of all stat values, even
if they have not changed. Otherwise (1) the monitoring app has to
maintain state and (2) can go out of sync if it's restarted while
the app is still running.
Change-Id: I04f1e7bdf0d6f20e4f15571e94191de61c47ddad
|
|
Change-Id: Ie07a03251d6fe9d40b62815feb51ec8af9ed7c95
|
|
cfg_stats_interval_cmd() function was (probably mistakenly)
inserted between cfg_stats_reporter_statsd_cmd() and
cfg_no_stats_reporter_statsd_cmd() function which makes no sense.
Move it below the cfg_no_stats_reporter_log_cmd() to follow the order
of the osmo_stats_vty_add_cmds() function calls.
Change-Id: I1ecec7025e95cf5ffc21ae3b1c75cf6da8c58de2
|
|
Change-Id: I6fb4d20d149abc724d477420b5eba482a0b63259
|
|
So far we only looked at SW definitions of the card profile. However,
if we have a currently selected application, we also must check
that application for SW definitions.
This breaks ABI and API all over the place, but as there are no
known users beyond osmo-sim-test, this is acceptable.
Change-Id: I3a1d60898529c173f73587e34c155660ba5f5fb1
|
|
Change-Id: I6df515a00518fabb3eb8f65054addd3aead14bfe
Relates: OS#3075
|
|
Change-Id: I8513126286083ebf02d14043cf072c8297878dd7
|
|
This is implicitly used by the libosmocore select abstraction, which
might be used in multiple threads at the same time.
Change-Id: I5a3802c94af6ff0315f1553f20870342d51ce726
|
|
The signalfd(2) mechanism of Linux allows signals to be delivered
and processed via normal file descriptor I/O. This avoids any of the
usual problems about re-entrancy of signal processing, as signals can
be processed from the osmocom select() loop abstraction just like any
other event.
Change-Id: If8d89dd1f6989e1cd9b9367fad954d65f91ada30
|
|
For a process running as root, it may be desirable to drop privileges
down to a normal user before executing an external command. Let's
add a new API function for that.
Change-Id: If1431f930f72a8d6c1d102426874a11b7a2debd9
|
|
gsm0503_coding contains AMR decoder functions for HR and FR. Those can
only decode AMR payload frames but not amr DTX frames. Lets add
functionality to detect DTX frames. Also lets add decoding for SID_UPDATE
frames as well as error checking for the SID frame recognition patterns.
Related: OS#2978
Change-Id: I2bbdb39ea20461ca08b2e6f1a33532cb55cd5195
|
|
Change-Id: I596c10960bd1ff1b1ec14ad953ce5e1ed040d35a
|
|
osmo-gsm-tester raised an ASan warning in osmo-bts-trx during execution
of a test with EGPRS enabled and a modem connecting to it (see OS#4483
for full trace):
==12388==ERROR: AddressSanitizer: global-buffer-overflow on address 0x7fa20b9ab8d0 at pc 0x7fa20b982894 bp 0x7ffdfea8b9c0 sp 0x7ffdfea8b9b8
READ of size 1 at 0x7fa20b9ab8d0 thread T0
#0 0x7fa20b982893 in gsm0503_mcs1_dl_interleave /home/osmocom-build/jenkins/workspace/osmo-gsm-tester_build-osmo-bts/libosmocore/src/coding/gsm0503_interleaving.c:165
Function gsm0503_mcs1_dl_interleave() was being passed the 6-bit USF
encoding while clrearly expecting a 12 element array. TS 05.03 5.1.5.1.2
"USF precoding" also clearly states that 12bit encoding is to be used
for MCS1-4.
Fixes: OS#4483
Change-Id: I94db14de770070b17894a9071aa14391d26e776c
|
|
Change-Id: I563c60271e218f9953e26f9bf0304d442c6acd43
|
|
According to 3GPP TS 44.004, figure 7.4a.b, the format of 11-bit
RACH uplink / Uplink access burst block is as defined follows:
<---------------------------------------------------
8 7 6 5 4 3 2 1
+--------------------------------------------------+
| 11 bit RACH uplink / Uplink access burst block | OCT1
+--------------------------------------------------+
| | OCT2
+-------------------+
As was (correctly) assumed in [1], the bit ordering in 11-bit RACH
coding functions is wrong. The problem is that neither of generic
functions from bit16gen.h can be used to load / store the RA11
value (regardless of the endianness), because they assume that
the payload is 16 bit long.
With this patch applied, RA11 values from [1] look correct:
< EGPRS Packet channel request message content > ::=
< Signalling : 110011 < RandomBits : 00111 > > |
< Signalling : 110011 < RandomBits : 00110 > > |
< Signalling : 110011 < RandomBits : 01111 > > |
< Signalling : 110011 < RandomBits : 01100 > > |
< Signalling : 110011 < RandomBits : 00111 > > |
< Signalling : 110011 < RandomBits : 10110 > > ;
[1] Id80e471d252b9416217b56f4c8c0a8f5f1289fee
Change-Id: I43d30611dd69f77f2b3b46f4b56056a8891d3c24
Related: OS#1548
|
|
Change-Id: Ia38723fb9424551eaf5747d736ae73ab20873def
|
|
Change-Id: I883faae5e170803b8301d10c8b9fad7892da009c
|
|
Various new files and some new status words have been defined
by now. Let's add them.
Change-Id: Ia007281bcb61dcd8260d0a77203abeff21d5255f
|
|
an USIM application can very well exist on a UICC without supporting
classic DF.GSM access. However, most commonly, both are found on
cards.
Change-Id: I6180a3f81a7d3006e8ece4302c2433db2588bfaa
|
|
Before this change, a card application (USIM, ISIM, ...) didn't
exist as a separate concept from a card profile. This meant,
we had a manual combination of UICC card profile with USIM application,
and another one of UICC card profile and ISIM application. But what
if there's a combined USIM+ISIM?
In reality, applications exist as separate objects, on top of an
ETSI UICC. Lets therefore register all known applications to the
osim library core, and add code to osmo-sim-test which dynamically
detects all applications present on a given card (by reading EF.DIR).
Change-Id: Ic4b4ac433a9976842b30a017fb0fc347d87201cd
|
|
Change-Id: I80468c8c4f4590c262019f42285e8d8fd3444f7f
|
|
... as that doesn't work if we want to create a similarly-named
file in the local file system.
Change-Id: Ib8734e2e4b81c915ab0fbd0d9b6662275b1d33d1
|
|
The 3GPP spec document also contains this error at one point, and
it seems I copied it from there :/
Change-Id: I7ad9f491c06f6540747b77017678ee37e6a1550d
|
|
libosmosim contains a variety of definitions and utility fuinctions
useful when working with SIM card [protocol]. They can not only
be used with PC/SC readers but also in other contexts.
Change-Id: I741940d3dc2a5653c760e9d1597d7f08afb3b631
|
|
The table amr_len_by_ft represents the length of the raw AMR speech bits
in bytes. The table is based on the Table found in RFC 4867 §3.6, Table 1,
Column "Total speech bits". The number of bits is divided by 8 and then
rounded up to get the number of consumed octets.
An AMR SID frame (including STI and MI) takes up 39 bits, this will
result in 5 octets, not in 7. Lets correct this.
Related: OS#2978
Change-Id: Icf330450981b32be5d1cee5b10aa92bac4cb72f5
|
|
Change-Id: Ib52d22710020b56965aefcef09bde8247ace4a9c
Related: OS#2966
|
|
AMR SID update frames are protected using an 1/4 convolutional coder,
wich is similar to the one used with 6,7 kbit voice frames. Except that
there is no puncturing and the length is different.
Change-Id: Ia35ed4178a7f0d816052b7e5d6478b93a1d9744f
Related: OS#2978
|
|
AMR not only specifies a 6 bit CRC for regular voice information. It also
specifies a 14 bit CRC to protect the comfort noise updates contained in
the SID_UPDATE frames.
Change-Id: I5cfd8ca806aba8d42cb9787f69605cea7de6e900
Related: OS#2978
|
|
* What we used to call TCH/F and TCH/H in gsmtap are actually only
FACCH/F and FACCH/H, i.e. the signaling part of Bm/Lm channels
* Give them proper names with backwards compatibility #define
* Split VOICE into VOICE_F and VOICE_H. If we don't differentiate this,
a receiver is not able to determine the RSL channel ID of a frame
without looking at external state/context. That in turn has been a
design feature of GSMTAP Um format so far, and programs like
osmo-bts-virtual rely on it.
Change-Id: I952044a17334f35712e087dc41781805000aebc1
Related: OS#2557
|