* Migrate from deprecated gsm48_mi_to_string() API.
* Take a chance to unfify printing of mobile identity.
* Use osmo_load32be() for printing TMSI - this is what
the osmo_mobile_identity API does internally.
Change-Id: Ida67adaa61689c55505a89e1a1bebde041c91139
Depends: libosmocore.git If4f7be606e54cfa1c59084cf169785b1cbda5cf5
Checking the stderr makes a little sense, since it's an integer
value (usually equal to 2). The actual intention, most likely,
was to check 'stderr_target' against NULL.
Change-Id: Id597f766142f928135f9fd2b7cf4d69de7bc72f0
Related: OS#6299
After adding the strongest cell to the measurement report, the variables
'strongest' and 'strongest_i' are used to prevent that already added
cells are added again.
Please note that there are no neighbor cell measurements available,
because current layer 1 does not report BSIC of neighbor cells. This
means that there is no neighbor cell reported.
Related: OS#6280
Change-Id: Iaeeaf978da31611c47a20af41790bfa6640dcffd
A wrong index was used, causing the first neighbor cell to be
uninitialized. This uninitialized neighbor cell was reported by
MEASUREMENT REPORT.
Related: OS#6280
Change-Id: I192c0777450cbe24abb3c7c8736c678b97725e9f
While it is correct to use the band indicator from SI1 rest octets,
it may only be applied for ARFCN values in the range 512..810.
The function gsm_refer_pcs() is used to determine, if the cell (which
'talks' about ARFCNs) refers to them PCS or DCS channels. It returns
true, if it refers to PCS, but this only means that ARFCNs in the range
512..810 are PCS channels, not all ARFCNs.
The new function gsm_arfcn_refer_pcs() is used to add the PCS flag to an
ARFCN, if the given cell refers to PCS and the given ARFCN is in the PCS
range 512..810.
Change-Id: Id99c8534bf853f4f24f99364790c1ac1df6cc007
Related: OS#6078
Setting the flag was not required in earlier versions of libosmogsm,
because this feature was enabled by default.
The roundtrip delay for a LAPD link must be less than T200.
Osmocom-bb runs LAPDm on the host machine via serial interface and USB
interface that may cause a roundtrip delay that exceeds T200. Also
osmo-bts may have that problem, due to latency between physical
interface and osmo-bts software.
What may happen:
An I frame gets lost.
The sending side transmits the next I frame. The receiving side detects
the send-sequence error and responds with a REJ frame.
Due to the round trip delay, the T200 expires on the sending side and
causes the I frame to be retransmitted with the P bit set, it enters
the timer recovery state. The receiving side detects the send-sequence
error and responds with a REJ frame with the F bit set.
The sending side will then receive two REJ frames. The first REJ frame
will clear the timer recovery state. The second REJ frame (with F bit
set) is received when not in timer recovery state, causing an
MDL-ERROR-INDICATION.
The layer 2 connection is broken.
Early tests with osmocom-bb in a real network showed exactly this
problem.
The solution is to suppress every second REJ frame at the receiving
side, until the sequence error condition is cleared. If the first REJ
frame gets lost, the sending side would retransmit the I frame again
after another expiry of T200. Then the receiving side would respond
with a REJ frame again.
Relates: OS#5969
Depends: libosmocore.git I93994dbbd1fc2c9edb8f3015c6b18ecd0fce0565
Change-Id: Iaa1645fb1970fe513d71bc1b03f7c5eac62f35d7
It seems that those flags have always been gcc flags, and not ld flags.
After decades of tolerating this, binutils 2.36.x no longer tolerates
those flags but prints an error:
arm-none-eabi-ld: Error: unable to disambiguate: -nostartfiles (did you mean --nostartfiles ?)
See also https://github.com/apache/nuttx/issues/3826 and the related
https://github.com/apache/nuttx/pull/3836 how this was solved in another
project - I adopted that solution here 1:1
Change-Id: Id199e4d03d5aae07a347c98f47791f42c12008c6
As was reported by roox, osmocom-bb currently fails to build on OBS:
https://build.opensuse.org/build/home:mnhauke:osmocom:nightly/openSUSE_Tumbleweed/x86_64/osmocom-bb/_log
[ 24s] layer1/prim_tch.c: In function 'l1s_tch_meas_avg':
[ 24s] layer1/prim_tch.c:183:2: error: 'for' loop initial declarations are only allowed in C99 mode
[ 24s] layer1/prim_tch.c:183:2: note: use option -std=c99 or -std=gnu99 to compile your code
We don't specify the C standard explicitly, so let's move the variable
declaration out of the for-loop in l1s_tch_meas_avg().
Change-Id: I6c65fbead4e612c81728e9c6601d5f2107616ee6
Fixes: 7286560a3 "firmware/layer1: fill-in DL info for L1CTL TRAFFIC.ind"
In accordance with 3GPP TS 44.021, sections 8.1.6 and 10.2.3, the
transmission of idle frames to the DTE is mandated when no data is
received from the radio interface. An idle frame has all data,
status, and E-bits to binary '1' (excluding the alignment pattern).
This requirement is currently implemented by osmo-bts for the Uplink,
and is going to be adopted for the Downlink (see the related patch).
This patch brings trxcon/l1sched in sync with osmo-bts-trx.
Change-Id: I7dea3dde46bc02814e99c3e873298cc7ed045a51
Related: osmo-bts.git I0b25cfac41b6d8dcf3bfd9d46d51a9665f1b047a
Related: OS#1572, OS#4396
Not only this function can be used to transmit a voice frame,
but also a data frame during a CSD call.
Change-Id: I920300ae477e3c3d7c413cd1a35f2bc385266960
Related: OS#4396
Before we add handling of TCH I/O for data calls, let's rename the
existing voice related symbols and struct fields to have 'voice'
in their names.
Change-Id: If6c799d11e225ad00ca5da5ae63dca20568a0ce0
Related: OS#4396
This patch implements the signalling part for mobile originating
and mobile terminating CSD calls. The user plane interface is
to be implemented in follow-up patches.
Change-Id: I1995fa0a7a68d9b980852b664d472d4633777ac6
Related: OS#4396
This option must be enabled in the VTY and is disabled by default.
Calls can be joined when service is limited or normal. With that option
enabled, calls can be joined even with invalid SIM.
Talking is allowed when service is normal. With that option enabled,
talking is always allowed. It depends on the network, if it accepts the
talker.
Change-Id: I6ea851a8cb015ff685b985335968c6184beca816
Related: OS#5364
Use TMSI only if valid in the current location area. If the MS moves to
a different location area and joins a group call before location update,
TMSI is not valid. Then use IMSI instead. If no IMSI/TSMI is available,
send mobile identity without IMSI/TMSI.
Change-Id: I299604a0e12d91e9133b70757826ac9637da0e3e
Related: OS#5364
If joining a call gets rejected, the call must not be released, instead
it must return to U3 state (incoming call), because the call still
exists in the cell and it might possible to join it later.
If a call notification is gone, a new event is used in the state machine
to release incoming call.
Change-Id: I605387c6be409ef0e67caf7b9e2a83e1032b45f1
Related: OS#5364
This patch prepares for adding MT data call support:
* Move handling of the Bearer Capability IE into a function.
* Check transfer mode and coding standard in the received BCap.
Change-Id: I3a5cac8c35ba6b7bdc5fcb077690b32848747756
Related: OS#4396
Even though the function works as expected and *can* return -1,
which is first casted to unsigned and then back to signed, let's
make the code less confusing by returning -1 straightaway.
Change-Id: I3206fcfa9ab4cac85a1f0f2a4de3250b25f9058f
Related: OS#4396
Use new_mm_state() to leave group mode. This will trigger IMSI detach
when returning to IDLE mode, if it has been delayed.
Related: OS#5364
Change-Id: I3c83c9e0fe10b35d60d125df6929fcb5ddc35f1a
Cell selection is not supported during group receive mode. If it
happens anyway, give an error message and select correct sub-state.
This fixes I05957182a57423ad947ab200b52f65fde859e110.
Related: OS#5364 and OS#6214
Change-Id: Iea6fe623956003130000c59ec0e1b24b3177052d
These states are:
GSM48_MM_SST_NORMAL_SERVICE
GSM48_MM_SST_ATTEMPT_UPDATE
GSM48_MM_SST_LIMITED_SERVICE
GSM48_MM_SST_LOC_UPD_NEEDED
GSM48_MM_SST_PLMN_SEARCH (limited service)
GSM48_MM_SST_PLMN_SEARCH_NORMAL
If the service is limited, group/bcast calls can be joined, but uplink
access is not allowed.
Related: OS#5364
Change-Id: I2f8ff65f6e101972f9b1760013983d00ae6e7760
The loopback mode is currently broken because the DL info header
remains present, thus becoming a bogus "part" of the speech frame.
Change-Id: I1af187b4bc5f5a99bc7f7634d90bf14ad3db0e49
Related: OS#4396
Even if the DSP marks a traffic frame as bad (B_BFI), we still want
to deliver something to the upper layers, just like we do for FACCH.
Change-Id: I559793a3506089b1c1758ee7022cceb7753afb30
Related: OS#4396
* Reset both A_DD_0 and A_DD_1 headers, like in the case of FACCH.
* Reduce nesting, fix minor coding style issues.
* Add a FIXME for proper B_BFI checking.
Change-Id: Ie4faf386f54720888e73171bee26f93dfa0562d5
Related: OS#4396
The upper layers usually request either of the two configurations:
* (AUDIO_TX_MICROPHONE | AUDIO_RX_SPEAKER) - in this configuration
the phone (PHY) is both the origin and the destination of the TCH
frames. DL frames are played via the built-in speaker; UL frames
recorded using the built-in microphone.
* (AUDIO_TX_TRAFFIC_REQ | AUDIO_RX_TRAFFIC_IND) - in this case
the upper layers (host side) become the origin and the destination
of the TCH frames. The built-in speaker and microphone are
expected to be disabled.
However, when using the second configuration, one can still hear
DL TCH frames being played by the built-in speaker. The built-in
microphone does not seem to be causing any issues, but still we
definitely don't want the vocoder to interfere with the host.
Change-Id: I390db1889f079dea8112794c3e039a9136b897df
Related: OS#4396