This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
dexter gerrit-no-reply at lists.osmocom.orgHello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1120 to look at the new patch set (#3). lapd: adding support for ericsson's lapd dialect Ericsson's RBS2111-BTS (and similar) implements a lapdm dialect which uses a link establishment method that differs from the standard. While the BSC is transmitting sabm frames on one specific timeslot, the BTS will periodically scan through all timeslots to check for incoming sabm frames. When the BTS detcts the sabm fames on one of the timeslots it will stay there and continue to commence the link establishment. The described procedure requires a slightly modified lapd profile, the t200 retransmission timeout has to be configured to exactly 300 msek. Otherwise the link establishment will fail. Since the BTS will switch from timeslot to timeslot most of the sabm frames will not be seen by the BTS, so the maximum retransmission has to be increased. This patch suggests a maximum retry count of 300, which is an educated guess and has worked fine during our tests. Change-Id: I892af57013d7ab4216e9e2d0873a69129aaeb8e5 --- M include/osmocom/abis/lapd.h M src/input/lapd.c 2 files changed, 37 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/20/1120/3 diff --git a/include/osmocom/abis/lapd.h b/include/osmocom/abis/lapd.h index 2987633..d618187 100644 --- a/include/osmocom/abis/lapd.h +++ b/include/osmocom/abis/lapd.h @@ -18,8 +18,10 @@ int short_address; }; +/* predefined lapd profiles (see lapd.c for definition) */ extern const struct lapd_profile lapd_profile_isdn; extern const struct lapd_profile lapd_profile_abis; +extern const struct lapd_profile lapd_profile_abis_ericsson; extern const struct lapd_profile lapd_profile_sat; struct lapd_instance { @@ -63,6 +65,13 @@ void *rx_cbdata), void *rx_cbdata, const struct lapd_profile *profile); +/* In rare cases (e.g. Ericsson's lapd dialect), it may be necessary to + * exchange the lapd profile on the fly. lapd_instance_set_profile() + * allwos to set the lapd profile on a lapd instance danymically to + * one of the lapd profiles define above. */ +void lapd_instance_set_profile(struct lapd_instance *li, + const struct lapd_profile *profile); + void lapd_instance_free(struct lapd_instance *li); /* Start a (user-side) SAP for the specified TEI/SAPI on the LAPD instance */ diff --git a/src/input/lapd.c b/src/input/lapd.c index ac24fd8..f5909b4 100644 --- a/src/input/lapd.c +++ b/src/input/lapd.c @@ -95,6 +95,27 @@ .short_address = 0 }; +/* Ericssons OM2000 lapd dialect requires a sabm frame retransmission + * timeout of exactly 300 msek. Shorter or longer retransmission will + * cause the link establishment to fail permanently. Since the BTS is + * periodically scanning through all timeslots to find the timeslot + * where the bsc is transmitting its sabm frames the normal maximum + * retransmission (n200) of 3 is not enough. In order not to miss + * the bts, n200 has been increased to 300, which is an educated + * guess. */ + +const struct lapd_profile lapd_profile_abis_ericsson = { + .k = LAPD_SET_K(2,1), + .n200 = 300, + .n201 = 260, + .n202 = 0, /* infinite */ + .t200_sec = 0, .t200_usec = 300000, + .t201_sec = 1, .t201_usec = 0, + .t202_sec = 2, .t202_usec = 0, + .t203_sec = 10, .t203_usec = 0, + .short_address = 0 +}; + const struct lapd_profile lapd_profile_sat = { .k = LAPD_SET_K(15,15), .n200 = 5, @@ -664,6 +685,13 @@ return li; } +/* Change lapd-profile on the fly (use with caution!) */ +void lapd_instance_set_profile(struct lapd_instance *li, + const struct lapd_profile *profile) +{ + memcpy(&li->profile, profile, sizeof(li->profile)); +} + void lapd_instance_free(struct lapd_instance *li) { struct lapd_tei *teip, *teip2; -- To view, visit https://gerrit.osmocom.org/1120 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I892af57013d7ab4216e9e2d0873a69129aaeb8e5 Gerrit-PatchSet: 3 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: dexter <pmaier at sysmocom.de> Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Jenkins Builder