Attention is currently required from: falconia.
laforge has posted comments on this change by falconia. ( https://gerrit.osmocom.org/c/osmo-bsc/+/42726?usp=email )
Change subject: nokia cosmetic: factor out BTS_CONF_COMPL handling
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/42726?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I26e9b25ba4e68e945f7dd8a632009cc3683a322c
Gerrit-Change-Number: 42726
Gerrit-PatchSet: 1
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: falconia <falcon(a)freecalypso.org>
Gerrit-Comment-Date: Tue, 05 May 2026 07:45:20 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: falconia.
laforge has posted comments on this change by falconia. ( https://gerrit.osmocom.org/c/osmo-bsc/+/42725?usp=email )
Change subject: nokia cosmetic: add bts_is_insite() function
......................................................................
Patch Set 1: Code-Review+1
(1 comment)
Patchset:
PS1:
I think I'd prefer something like @if (nokia_bts_type(bts) == NOKIA_BTS_INSITE)@ as it would scale more logically with further BTS models. But that's not a blocker, just a comment.
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/42725?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I44bbcd79d9741f1df280b6b2391f04f754598035
Gerrit-Change-Number: 42725
Gerrit-PatchSet: 1
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: falconia <falcon(a)freecalypso.org>
Gerrit-Comment-Date: Tue, 05 May 2026 07:45:01 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/42317?usp=email )
Change subject: ccid: Handle the TPDU-length = 4 case according to CCID spec
......................................................................
ccid: Handle the TPDU-length = 4 case according to CCID spec
While ISO7816-3 forbids any TPDU shorter from 5 bytes, the CCID spec
begs to differ and actually permits a host to send us 4-byte TPDUs of
Form 1, giving the responsibility of adding the P3=00h octet to the CCID
implementation.
Let's implement this accordingly. While at it, also reject TPDUs of
lengths 1, 2 and 3 bytes - just like zero-length TPDUs.
Change-Id: Ia27962bda526af3373b36d637e2b548aa01a3346
Closes: OS#6973
---
M ccid_common/ccid_device.c
1 file changed, 12 insertions(+), 3 deletions(-)
Approvals:
laforge: Looks good to me, approved
Jenkins Builder: Verified
jolly: Looks good to me, but someone else must approve
diff --git a/ccid_common/ccid_device.c b/ccid_common/ccid_device.c
index 7866d9f..63a4d70 100644
--- a/ccid_common/ccid_device.c
+++ b/ccid_common/ccid_device.c
@@ -457,17 +457,26 @@
/* Section 6.1.4 */
static int ccid_handle_xfr_block(struct ccid_slot *cs, struct msgb *msg)
{
- const union ccid_pc_to_rdr *u = msgb_ccid_out(msg);
+ union ccid_pc_to_rdr *u = msgb_ccid_out(msg);
const struct ccid_header *ch = (const struct ccid_header *) u;
struct msgb *resp;
int rc;
- if (u->xfr_block.hdr.dwLength == 0) {
+ /* TODO: The checks below assume TPDU-level exchange and T=0. When adding
+ * APDU-level or character level exchange or T=1 support, this needs adjustment */
+ if (u->xfr_block.hdr.dwLength < 4) {
/* CCID Rev 1.1 permits a zero-length XfrBlock on the protocol level, but what should we do
- * with a zero-length TPDU? We need to reject it as bError=1 (Bad dwLength) */
+ * with a zero-length or otherwise short TPDU? We need to reject it as bError=1 (Bad dwLength) */
resp = ccid_gen_data_block(cs, u->xfr_block.hdr.bSeq, CCID_CMD_STATUS_FAILED, 1, 0, 0);
goto out;
+ } else if (u->xfr_block.hdr.dwLength == 4) {
+ /* CCID v1.1 Section 3.2.1:
+ * Command TPDU = CLA INS P1 P2, the CCID is responsible to add P3=00h */
+ msgb_put(msg, 1);
+ u->xfr_block.hdr.dwLength = 5;
+ u->xfr_block.abData[4] = 0x00;
}
+ /* from 5 bytes upwards, we can simply transceive it */
/* handle this asynchronously */
rc = cs->ci->slot_ops->xfr_block_async(cs, msg, &u->xfr_block);
--
To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/42317?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-ccid-firmware
Gerrit-Branch: master
Gerrit-Change-Id: Ia27962bda526af3373b36d637e2b548aa01a3346
Gerrit-Change-Number: 42317
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
laforge has posted comments on this change by laforge. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/42317?usp=email )
Change subject: ccid: Handle the TPDU-length = 4 case according to CCID spec
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/42317?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-ccid-firmware
Gerrit-Branch: master
Gerrit-Change-Id: Ia27962bda526af3373b36d637e2b548aa01a3346
Gerrit-Change-Number: 42317
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Tue, 05 May 2026 07:42:50 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
falconia has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/42725?usp=email )
Change subject: nokia cosmetic: add bts_is_insite() function
......................................................................
nokia cosmetic: add bts_is_insite() function
Nokia InSite gets a different config than the larger Nokia BTS models,
and make_bts_config() function checks the BTS type to decide which
config to send. Change the BTS type check from a long 'if' line that
compares against 3 different InSite BTS type codes to bts_is_insite()
helper function that encapsulates a switch statement.
Upcoming code additions will need to check for Flexi Multiradio BTS
family in a similar manner - so be consistent.
Change-Id: I44bbcd79d9741f1df280b6b2391f04f754598035
---
M src/osmo-bsc/bts_nokia_site.c
1 file changed, 14 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/25/42725/1
diff --git a/src/osmo-bsc/bts_nokia_site.c b/src/osmo-bsc/bts_nokia_site.c
index 340405e..29b1929 100644
--- a/src/osmo-bsc/bts_nokia_site.c
+++ b/src/osmo-bsc/bts_nokia_site.c
@@ -1162,12 +1162,24 @@
/* TODO: put in a separate file ? */
+static bool bts_is_insite(uint8_t bts_type)
+{
+ switch (bts_type) {
+ case 0x0E: /* InSite 900 MHz */
+ case 0x0F: /* InSite 1800 MHz */
+ case 0x10: /* InSite 1900 MHz */
+ return true;
+ default:
+ return false;
+ }
+}
+
/* build the configuration data */
static int make_bts_config(struct gsm_bts *bts, uint8_t bts_type, int n_trx, uint8_t * fu_config,
int need_hopping, int hopping_type)
{
- /* is it an InSite BTS ? */
- if (bts_type == 0x0E || bts_type == 0x0F || bts_type == 0x10) { /* TODO */
+ /* InSite BTS gets its own special config */
+ if (bts_is_insite(bts_type)) {
if (n_trx != 1) {
LOG_BTS(bts, DNM, LOGL_ERROR, "InSite has only one TRX\n");
return 0;
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/42725?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I44bbcd79d9741f1df280b6b2391f04f754598035
Gerrit-Change-Number: 42725
Gerrit-PatchSet: 1
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
falconia has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/42727?usp=email )
Change subject: Nokia Flexi Multiradio: reset non-BCCH TRX
......................................................................
Nokia Flexi Multiradio: reset non-BCCH TRX
In the case of MetroSite and UltraSite BTS, it has been determined
empirically that TRX reset needs to be skipped for non-BCCH TRX.
However, the opposite situation holds on Flexi MR: non-BCCH TRX
do need to be reset, or they fail to come up. Solution:
conditionalize reset of non-BCCH TRX on Nokia BTS type.
Change-Id: I270c1ffab074c1e5a43ab9dfa103725a1518f718
---
M src/osmo-bsc/bts_nokia_site.c
1 file changed, 23 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/27/42727/1
diff --git a/src/osmo-bsc/bts_nokia_site.c b/src/osmo-bsc/bts_nokia_site.c
index c8ac578..9c1e5a1 100644
--- a/src/osmo-bsc/bts_nokia_site.c
+++ b/src/osmo-bsc/bts_nokia_site.c
@@ -1174,6 +1174,21 @@
}
}
+static bool bts_is_flexi_mr(uint8_t bts_type)
+{
+ switch (bts_type) {
+ case 0x20: /* Flexi MultiRadio (no shared radio modules) */
+ case 0x21: /* Flexi MultiRadio (some or all radios shared, SW=GSM) */
+ case 0x25: /* Flexi MultiRadio (some or all radios shared, SW is other than GSM) */
+ case 0x28: /* Flexi MultiRadio 10 (no shared radio modules) */
+ case 0x29: /* Flexi MultiRadio 10 (some or all radios shared, SW=GSM) */
+ case 0x2A: /* Flexi MultiRadio 10 (some or all radios shared, SW is other than GSM) */
+ return true;
+ default:
+ return false;
+ }
+}
+
/* build the configuration data */
static int make_bts_config(struct gsm_bts *bts, uint8_t bts_type, int n_trx, uint8_t * fu_config,
int need_hopping, int hopping_type)
@@ -1787,6 +1802,7 @@
static int handle_conf_complete(struct e1inp_sign_link *sign_link, uint16_t ref)
{
struct gsm_bts *bts = sign_link->trx->bts;
+ bool is_flexi_mr = bts_is_flexi_mr(bts->nokia.bts_type);
struct gsm_bts_trx *trx;
int bcch_trx_nr = -1;
@@ -1808,6 +1824,13 @@
if (trx->nr != bcch_trx_nr) {
/* unlock TRX */
abis_nm_cha_adm_trx_unlock(bts, trx->nr+1, ref);
+ /* On Flexi Multiradio we have to reset non-BCCH TRX
+ * too, otherwise they never come up. But on
+ * MetroSite and UltraSite, non-BCCH TRX work
+ * correctly only when we *don't* reset them here!
+ */
+ if (is_flexi_mr)
+ abis_nm_trx_reset(bts, trx->nr+1, ref);
}
}
/* start TRX (RSL link) */
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/42727?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I270c1ffab074c1e5a43ab9dfa103725a1518f718
Gerrit-Change-Number: 42727
Gerrit-PatchSet: 1
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
jolly has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/42724?usp=email )
Change subject: Fix: Reject TPDUs fromm host with less than 5 bytes
......................................................................
Abandoned
There is another fix. See 42317
--
To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/42724?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: abandon
Gerrit-Project: osmo-ccid-firmware
Gerrit-Branch: master
Gerrit-Change-Id: Iba01c29fb0aa3ab2ce7270bf12cb29c8ba59b389
Gerrit-Change-Number: 42724
Gerrit-PatchSet: 1
Gerrit-Owner: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Attention is currently required from: laforge.
jolly has posted comments on this change by laforge. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/42317?usp=email )
Change subject: ccid: Handle the TPDU-length = 4 case according to CCID spec
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/42317?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-ccid-firmware
Gerrit-Branch: master
Gerrit-Change-Id: Ia27962bda526af3373b36d637e2b548aa01a3346
Gerrit-Change-Number: 42317
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Mon, 04 May 2026 16:48:51 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes