Commit Graph

3553 Commits

Author SHA1 Message Date
Vadim Yanitskiy 1c4a77adbf mobile: gsm_settings_init(): set TCH frame format explicitly
Change-Id: I4660b07977b6701ad5dc4bf25f12cba374101f8b
Related: OS#4396
2023-11-03 13:25:55 +07:00
Vadim Yanitskiy e80d302255 mobile: clarify TCH I/O {handler,format} naming
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
2023-11-03 13:23:06 +07:00
Vadim Yanitskiy 5bdebfaae3 mobile: rename 'audio' node to 'tch-voice' node
Change-Id: I2cab597c5de92ecb343cad7aaaa48035ca5f8365
Related: OS#4396
2023-11-02 15:15:45 +07:00
Vadim Yanitskiy e73a604de0 mobile: add support for Circuit Switched Data calls
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
2023-11-02 14:41:23 +07:00
Vadim Yanitskiy 011308cbcc mobile: move 'struct gsm_call' from <mncc.h> to <mncc_ms.h>
The only file using this structure is mnccms.c.

Change-Id: Iaa43609849ac3c755d47258d3aca4bfe7a6b3a49
Related: OS#4396
2023-10-30 15:05:58 +07:00
Vadim Yanitskiy e1bcc5af88 mobile: cosmetic: use '#pragma once' in mncc.h
Change-Id: I2f350c5b67e57097b71b12ba42c90ce0941b8fea
2023-10-30 15:05:58 +07:00
Vadim Yanitskiy df8801bed6 layer23: rework L1CTL TRAFFIC.{ind,req} related logging
Make these Rx/Tx messages more informative.

Change-Id: I9c73db3c3650547030b8c354016e65195daebb62
Related: OS#4396
2023-10-30 15:05:58 +07:00
Andreas Eversberg 9d765a66fc ASCI: Correctly set and store 'uplink-release-local' flag
Also this option is enabled by default and show in the VTY if it is
disabled.

Change-Id: I6af44f0dd7ff842de633587fb0dcbe78126d30e1
Related: OS#5364
2023-10-27 09:12:28 +02:00
Andreas Eversberg d7e611472a ASCI: Add option to join voice group/broadcast calls without valid SIM
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
2023-10-27 09:12:26 +02:00
Andreas Eversberg bfebc81384 ASCI: Use correct mobile identiy in TALKER INDICATION message
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
2023-10-27 09:12:22 +02:00
Andreas Eversberg 8c190e6f92 ASCI: Handle rejection of voice group/broadcast call correctly
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
2023-10-27 09:12:16 +02:00
Vadim Yanitskiy 1c7c713760 mobile: vty: rework support enable/disable commands
Change-Id: Ibfef31f6dd7694dad535ad07fdf47bd32571b7b2
Related: OS#4396
2023-10-18 20:46:35 +07:00
Vadim Yanitskiy 40609ca94b mobile: improve handling of Bearer Capability IE for MT calls
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
2023-10-18 20:46:35 +07:00
Vadim Yanitskiy 292f39900c mobile: fix mncc_get_bearer(): return -1 straightaway
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
2023-10-18 20:46:35 +07:00
Vadim Yanitskiy 9130b2d8f5 mobile: cosmetic: improve mncc_{get,set}_bearer()
Change-Id: I5647bdf58cbf58065dbe8eebe16f330d98fd0d22
Related: OS#4396
2023-10-18 20:46:35 +07:00
Vadim Yanitskiy 7a413ffb26 mobile: mnccms: use constants from libosmogsm (gsm_04_08.h)
Change-Id: I5ce59db39ad865620aaed2d778bc3710cf37bc3b
Related: OS#4396
2023-10-18 20:46:35 +07:00
Andreas Eversberg 162398a0d9 ASCI: Register state machines only once, when the application starts
Related: OS#5364
Change-Id: I46d68e31e0bfd6a64c190e439f45b24502dd1f30
2023-10-18 08:08:25 +02:00
Andreas Eversberg 014646fc66 ASCI: Change state correctly when leaving group mode
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
2023-10-18 08:08:24 +02:00
Andreas Eversberg 86fed8fc97 ASCI: Select correct state when returning to idle or group receive mode
This fixes I05957182a57423ad947ab200b52f65fde859e110.

Related: OS#5364 and OS#6214
Change-Id: I626195161b987f1ba0065134afcf3936c9c090eb
2023-10-18 08:08:18 +02:00
Andreas Eversberg e45abc96ec ASCI: Ignore cell selection event during group receive mode
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
2023-10-18 08:08:14 +02:00
Andreas Eversberg 2c0f71ac43 ASCI: Join a group/bcast call in correct MM states only
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
2023-10-18 08:08:10 +02:00
Vadim Yanitskiy 026f113280 mobile: clean up call related VTY commands
Change-Id: I8bccdf776ad541932ad4a6d6a68426a6ab856e08
Related: OS#4396
2023-10-16 14:14:28 +07:00
Vadim Yanitskiy 8f1091ee4b mobile: separate 'call MS_NAME NUMBER' command
This will allow us adding an optional switch for data calls.

Change-Id: I5d2332df09a81cb0747ecd9d95351ab59f99358e
Related: OS#4396
2023-10-16 14:14:28 +07:00
Vadim Yanitskiy b525577a5e mobile: mncc_call(): make *number argument const
Change-Id: I4558ce1313b8e9aadd73474a6514c136aa512de3
2023-10-16 14:14:28 +07:00
Vadim Yanitskiy 8d18e106a9 mobile: mncc_recv_internal(): make struct gsm_mncc ptr const
Change-Id: I0a5522b7df112bfaefc684c872a618c1e9118e61
2023-10-16 14:14:25 +07:00
Vadim Yanitskiy ed9e949dd9 mobile: fix AUDIO_IOH_LOOPBACK mode: pull DL info header
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
2023-10-16 14:10:21 +07:00
Vadim Yanitskiy 069b627abe firmware/layer1: handle CSD related channel modes
Change-Id: Ib73210b273826ded56d42c41ffeb835eef96dd2b
Related: OS#4396
2023-10-16 14:10:21 +07:00
Vadim Yanitskiy a6d0a3e170 firmware/layer1: emit TRAFFIC.ind even if B_BFI is set
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
2023-10-16 14:10:21 +07:00
Vadim Yanitskiy 7286560a33 firmware/layer1: fill-in DL info for L1CTL TRAFFIC.ind
Change-Id: I1c9727b183214f3d1a4f9a48489479f8435a4c5a
Related: OS#4396
2023-10-16 14:10:21 +07:00
Vadim Yanitskiy 5523c0084d firmware/layer1: fix l1s_tch_resp(): use the right A_DD header
Change-Id: Idd48438e47ac3ef1172621e77688d094cdcdbf34
Related: OS#4396
2023-10-16 14:10:21 +07:00
Vadim Yanitskiy f492a99d36 firmware/layer1: clean up l1s_tch_resp()
* 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
2023-10-16 14:10:19 +07:00
Vadim Yanitskiy c6c392aafd firmware/layer1: cosmetic: labels should not be indented
Change-Id: Ie32501df19cc2eedd1042c9917583d7386a665bc
Related: OS#4396
2023-10-16 14:06:56 +07:00
Vadim Yanitskiy 8a2422db1f firmware/layer1: clean up l1s_tch_cmd(): reduce nesting
Change-Id: If4f0bb37cb3e12e09078027461cd5040524e43b2
Related: OS#4396
2023-10-16 12:21:40 +07:00
Vadim Yanitskiy 79baca14d4 firmware/layer1: mute UL/DL vocodec if it's not needed
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
2023-10-16 12:21:40 +07:00
Vadim Yanitskiy de630abfc8 layer23: send UL/DL GPRS blocks over GSMTAP
Note that despite the VTY interface offers various channel type
filtering facilities, the actual filtering is not implemented.

This patch simply brings PS domain in consistency with CS domain:
the UL and DL GPRS blocks are now being sent over GSMTAP without
any filtering, just like GSM MAC blocks.

Change-Id: I338205bee44fe182233efc5619a3d528cd07d932
Related: OS#5500, OS#6209
2023-10-13 18:09:04 +07:00
Andreas Eversberg bcc047e5e1 Provide create_conn_and_push_mm_hdr() with correct SAPI
Change-Id: I454178f45aed49417f8cd7744155be66b9ac509f
Fixes: 00507bdc "Cleaning gsm48_mm_data_ind()"
Related: OS#6216
2023-10-10 19:31:26 +07:00
Andreas Eversberg 6708699b22 Correctly detect the follow-on proceed information element
Even if follow-on proceed is not supported, the warning message about
not beeing supported should only show when the follow-on proceed
information element is included in the location update accept messages.

Change-Id: I2b1aceb8b85bdd9faabe354501f9036f1fc6fe33
2023-10-09 23:39:01 +02:00
Andreas Eversberg 203014d744 Fix indices of ARFCNs for measurement report
The order of ARFCNs are described in TS 44.018 §10.5.2.20.

The function arfcn_from_freq_index() is re-used to get the ARFCNs in
correct order for the report.

Change-Id: I0674467eb5a38a341cf65f95a25aa5f7232df069
2023-10-05 16:25:00 +02:00
Andreas Eversberg beed281a0a Fix selection of correct ARFCN at arfcn_from_freq_index()
The selection of ARFCN is described in TS 44.018 §10.5.2.20.

The frequencies found in SI5 and SI5bis are counted first, in the
following order: ARFCN 1..1023,0.

The frequencies found in SI5ter are counted afterwards, in the following
order: ARFCN 1..1023,0.

Related: OS#5782
Change-Id: I090d84a5550d89743e8f5a886f400df6483f50d7
2023-10-05 16:24:57 +02:00
Andreas Eversberg 22e79a87fa ASCI: Fix false return value checks, discovered by Coverity Scan
See: CID 32637 - 323644

Related: OS#5364
Change-Id: If72590bb94597e434386bbcd312919a71abf0aae
2023-10-05 13:41:42 +00:00
Vadim Yanitskiy a397330e10 modem: grr_fsm: permit loop transition for GRR_ST_PACKET_ACCESS
I forgot to permit the loop state transmission, so the modem app
gets stuck in GRR_ST_PACKET_ACCESS is no IMM ASS is received...

Change-Id: I059d2929f7f724cfe26935bf35c167e60157451f
Fixes: 9978b00e "modem: grr: implement RACH.req retransmission"
2023-10-05 20:16:32 +07:00
Andreas Eversberg 0cee735aca Fix settings for VGCS/VBS
The "support" flags must be copied to the settings, because they are
enabled by default and may be omitted in the VTY config.

Related: OS#5364
Change-Id: I81575dd3f2ade70101df32935a1c3d5469327577
2023-10-04 12:55:30 +02:00
Andreas Eversberg c8fed7fba7 ASCI: Add VTY command to display group call neighbor cells
Related: OS#5782
Change-Id: Ie84221507bdf247c1563b829d6cf0adb53ce161f
2023-10-04 12:55:29 +02:00
Andreas Eversberg 61ea0ac0ab ASCI: Add decoding of SYSTEM INFORMATION TYPE 10 $(ASCI)$
Related: OS#5782
Change-Id: I81c7929f6d951d8eef7d08624f0b72830370c448
2023-10-04 12:55:26 +02:00
Andreas Eversberg 1cc4c0f487 Fix potential NULL pointer dereferences, discovered by Coverity Scan
See: CID 323362 + CID 323363
Change-Id: I47aa506014d8bddb8c8ce9b506c1c5c7b8056d30
2023-10-04 12:55:03 +02:00
Andreas Eversberg d6b2a4d685 Correctly use SUP_WRITE() macro for GSM 850
Change-Id: I52c99c63e38934fb26c26dba5bf2551ea311228b
2023-10-02 19:37:30 +02:00
Andreas Eversberg 3fb118bd91 Fix typo in sysinfo.c
Change-Id: I12405bef9f7910a354d9ac5153f4adc55095d747
2023-10-02 19:37:28 +02:00
Andreas Eversberg a67c8b32fb Correctly extract bits from SI2*/SI5*
These bits are:
 * EXT-IND
 * BA-IND
 * Multiband reporting

Change-Id: Ie5349464fed0a4276955235c7c87b5bcb299f20d
2023-10-02 19:37:25 +02:00
Andreas Eversberg 00507bdc13 Cleaning gsm48_mm_data_ind()
Get rid of goto and double switch/case by putting connection handling
code into a separate function.

Change-Id: I12454cab06c105ccd9e2495e3a6f0640f2884885
2023-10-02 19:37:24 +02:00
Andreas Eversberg 06b4885b18 ASCI: Show NCH position in VTY together with system information
Related: OS#5364
Change-Id: I5e0a9d469eb70608502dca881808621fa153b666
2023-10-02 19:37:20 +02:00