Yesterday I came across gsm_ts2chan_nr() in openbsc gsm_data_shared.c
(which is used both in openbsc and osmo-bts).
IIUC this case would expect lchan_nr to be in the range 0..3:
case GSM_PCHAN_CCCH_SDCCH4:
case GSM_PCHAN_CCCH_SDCCH4_CBCH:
cbits = 0x04;
cbits += lchan_nr;
break;
Because if we'd add 4 or more, we would be walking into this cbits space:
case GSM_PCHAN_SDCCH8_SACCH8C:
case GSM_PCHAN_SDCCH8_SACCH8C_CBCH:
cbits = 0x08;
cbits += lchan_nr;
break;
The thing is, I added an assert for lchan_nr < 4, and it hits. We're
actually passing lchan_nr == 4 and thus use cbits = 0x08 for a
GSM_PCHAN_CCCH_SDCCH4: wrong.
This code in osmo-bts-*/oml.c:opstart_compl() activates lchan[4] of a
CCCH+SDCCH4 ts:
/* ugly hack to auto-activate all SAPIs for the BCCH/CCCH on TS0 */
if (mo->obj_class == NM_OC_CHANNEL && mo->obj_inst.trx_nr == 0 &&
mo->obj_inst.ts_nr == 0) {
struct gsm_lchan *cbch = gsm_bts_get_cbch(mo->bts);
DEBUGP(DL1C, "====> trying to activate lchans of BCCH\n");
mo->bts->c0->ts[0].lchan[4].rel_act_kind = LCHAN_REL_ACT_OML;
lchan_activate(&mo->bts->c0->ts[0].lchan[4]);
if (cbch) {
cbch->rel_act_kind = LCHAN_REL_ACT_OML;
lchan_activate(cbch);
}
}
This [4] the first SDCCH4, because this has CCCH in the first [0..3], right?
But then we should use lchan->nr - 4 to add to the cbits, right?
It seems pretty much everyone, our code and various BTS models, are ignoring
the erratic cbits, but would be good to fix.
My SysmoBTS GSM cell still works if I pass cbits = 0x04 instead of 0x08, like
this:
case GSM_PCHAN_CCCH_SDCCH4:
case GSM_PCHAN_CCCH_SDCCH4_CBCH:
/* SDCCH4 is in lchan_nr 4..7, so subtract 4 before adding to
* the cbits. */
if (lchan_nr >= 4)
lchan_nr -= 4;
OSMO_ASSERT(lchan_nr < 4);
cbits = 0x04;
cbits += lchan_nr;
However, I guess passing 0x04 cbits for a CCCH lchan is wrong as well (0x04 is
RSL_CHAN_SDCCH4_ACCH). Instead, we should pass RSL_CHAN_RACH (Uplink CCCH) or
RSL_CHAN_PCH_AGCH (Downlink CCCH), right? How to decide which of the two?
Thanks for any hints,
~Neels
[[[
[...]
<0001> oml.c:830 OC=CHANNEL(03) INST=(00,00,00) Rx OPSTART
<0006> oml.c:500 (bts=0,trx=0,ts=0,ss=0) pchan=CCCH+SDCCH4 ts_connect_as(CCCH+SDCCH4) logChComb=4
^ SDCCH4
<0007> l1_if.c:164 Tx L1 prim MPH-CONNECT.req
<0001> oml.c:249 OC=CHANNEL INST=(00,00,00) AVAIL STATE Dependency -> OK
<0001> oml.c:256 OC=CHANNEL INST=(00,00,00) OPER STATE Disabled -> Enabled
<0001> oml.c:217 OC=CHANNEL INST=(00,00,00) Tx STATE CHG REP
<0006> oml.c:285 ====> trying to activate lchans of BCCH
<0006> lchan.c:31 (bts=0,trx=0,ts=0,ss=4) state NONE -> ACTIVATION REQUESTED
^ ss=4 means lchan->nr=4
<0006> oml.c:1040 (bts=0,trx=0,ts=0,ss=4) MPH-ACTIVATE.req (hL2=0x000004bb, FCCH TxDL)
<0007> l1_if.c:164 Tx L1 prim MPH-ACTIVATE.req
<0006> oml.c:777 (bts=0,trx=0,ts=0,ss=4) MPH-ACTIVATE.conf (FCCH TxDL)
<0006> oml.c:783 Successful activation of L1 SAPI FCCH on TS 0
<0006> oml.c:1040 (bts=0,trx=0,ts=0,ss=4) MPH-ACTIVATE.req (hL2=0x000004bb, SCH TxDL)
<0007> l1_if.c:164 Tx L1 prim MPH-ACTIVATE.req
<0006> oml.c:777 (bts=0,trx=0,ts=0,ss=4) MPH-ACTIVATE.conf (SCH TxDL)
<0006> oml.c:783 Successful activation of L1 SAPI SCH on TS 0
<0006> oml.c:1040 (bts=0,trx=0,ts=0,ss=4) MPH-ACTIVATE.req (hL2=0x000004bb, BCCH TxDL)
<0007> l1_if.c:164 Tx L1 prim MPH-ACTIVATE.req
<0006> oml.c:777 (bts=0,trx=0,ts=0,ss=4) MPH-ACTIVATE.conf (BCCH TxDL)
<0006> oml.c:783 Successful activation of L1 SAPI BCCH on TS 0
<0006> oml.c:1040 (bts=0,trx=0,ts=0,ss=4) MPH-ACTIVATE.req (hL2=0x000004bb, AGCH TxDL)
<0007> l1_if.c:164 Tx L1 prim MPH-ACTIVATE.req
<0006> oml.c:777 (bts=0,trx=0,ts=0,ss=4) MPH-ACTIVATE.conf (AGCH TxDL)
<0006> oml.c:783 Successful activation of L1 SAPI AGCH on TS 0
<0006> oml.c:1040 (bts=0,trx=0,ts=0,ss=4) MPH-ACTIVATE.req (hL2=0x000004bb, PCH TxDL)
<0007> l1_if.c:164 Tx L1 prim MPH-ACTIVATE.req
<0006> oml.c:777 (bts=0,trx=0,ts=0,ss=4) MPH-ACTIVATE.conf (PCH TxDL)
<0006> oml.c:783 Successful activation of L1 SAPI PCH on TS 0
<0006> oml.c:1040 (bts=0,trx=0,ts=0,ss=4) MPH-ACTIVATE.req (hL2=0x000004bb, RACH RxUL)
<0007> l1_if.c:164 Tx L1 prim MPH-ACTIVATE.req
<0006> oml.c:777 (bts=0,trx=0,ts=0,ss=4) MPH-ACTIVATE.conf (RACH RxUL)
<0006> oml.c:783 Successful activation of L1 SAPI RACH on TS 0
<0006> lchan.c:31 (bts=0,trx=0,ts=0,ss=4) state ACTIVATION REQUESTED -> ACTIVE
Assert failed lchan_nr < 4 gsm_data_shared.c:518
^ from mph_info_chan_confirm(), lchan_nr == 4
(gdb) bt
#0 0x47d47208 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1 0x47d4ad8c in __GI_abort () at abort.c:89
#2 0x000186e4 in gsm_ts2chan_nr (ts=<optimized out>, lchan_nr=<optimized out>) at ../../../openbsc/openbsc/src/libcommon/gsm_data_shared.c:518
#3 0x00018710 in gsm_lchan2chan_nr (lchan=lchan@entry=0xb6d5b000) at ../../../openbsc/openbsc/src/libcommon/gsm_data_shared.c:540
#4 0x0000eb0c in mph_info_chan_confirm (lchan=0xb6d5b000, lchan@entry=0xb6d283c8, type=type@entry=PRIM_INFO_ACTIVATE, cause=cause@entry=0 '\000') at oml.c:56
#5 0x00010730 in sapi_activate_cb (lchan=0xb6d283c8, status=0) at oml.c:1080
#6 0x000108d4 in sapi_queue_dispatch (lchan=0x1, lchan@entry=0xb6d283c8, status=<optimized out>) at oml.c:729
#7 0x00010c2c in lchan_act_compl_cb (trx=<optimized out>, l1_msg=l1_msg@entry=0x4f850, data=<optimized out>) at oml.c:814
#8 0x0000da2c in l1if_handle_l1prim (wq=<optimized out>, fl1h=0xafdc0, msg=msg@entry=0x4f850) at l1_if.c:1037
]]]
--
- Neels Hofmeyr <nhofmeyr(a)sysmocom.de> http://www.sysmocom.de/
=======================================================================
* sysmocom - systems for mobile communications GmbH
* Alt-Moabit 93
* 10559 Berlin, Germany
* Sitz / Registered office: Berlin, HRB 134158 B
* Geschäftsführer / Managing Directors: Harald Welte
Hi list,
I've got a jenkins job ready that adds --enable-iu to the openbsc build matrix.
I'd like to verify with you guys: so far we had a build matrix of 2 x 2, so
openbsc and all its dependencies are built four times over (~22 min).
Adding --enable-iu doubles this matrix to eight times.
This means that any new commit would take about 55 min to verify with jenkins,
even if it is just a comment tweak.
I assume we want to bring this time down a bit?
I'd have these suggestions:
(1)
Just add --enable-iu, let jenkins build for hours and proliferate global
warming, and care about this once it actually bugs us.
(2)
Limit the build matrix: Only build --enable-iu once, e.g. with --enable-smpp
and --enable-mgcp-transcoding, not with all of the other combinations. (Would
--disable-mgcp make more sense?)
(3)
Don't build all of the dependencies over and over. In pseudo sort of:
dep_hashes = ""
for dep in libosmo*:
dep_hashes += "," + dep.get_current_git_hash()
if dep.last_hashes == dep_hashes:
dep."make install"
continue
dep.wipe_out()
dep."autoreconf; configure; make check; make install"
cat dep_hashes > "${dep.dir}/last_hashes"
That would shorten the build time substantially, and we could keep the build
matrix fully featured without taking too much time.
I've so far spent 5 minutes on implementing something like this and could
polish that up, maybe using a global dependencies workspace somewhere else on
the build slave so the separate matrix items benefit from each other.
But do we like that? I would consider re-using previous builds safe enough for
our jenkins verifier, since all deps would be rebuilt even if only one dep's
git hash changes; assuming that it *works*, of course. Do you guys agree?
http://jenkins.osmocom.org/jenkins/job/OpenBSC-gerrit-test/
openbsc.git branches osmocom/jenkins-test and neels/speed_up_matrix_builds
Thanks for your opinions!
~Neels
--
- Neels Hofmeyr <nhofmeyr(a)sysmocom.de> http://www.sysmocom.de/
=======================================================================
* sysmocom - systems for mobile communications GmbH
* Alt-Moabit 93
* 10559 Berlin, Germany
* Sitz / Registered office: Berlin, HRB 134158 B
* Geschäftsführer / Managing Directors: Harald Welte
Hello all,
I am playing around with osmocom now for more then 2 years.
i pretty much seen every possible error's when compiling and building stuff but i always used OpenBTS for running my network, but now a couple months back i wanted to try and do the same thing using openbsc
I got most off the tools working on a Debian 8.5, but when i try to run
osmo-nitb -c ~/.osmocom/open-bsc.cfg
i get the an error Aborted
since there is no more information about the error i can't seem to figure out what is wrong maybe something to do with ipaccess?Did anyone else also came up to this problem ?I tried many many times with a fresh installOn Ubuntu 12.04Debian 8.5Kali linux 2016.1also with kali in a docker container i got pretty far with doing it in docker, and osmo-nitb worked, until i installed all the rest and then when i needed to run osmo-nitb i also got back the error Aborted when trying to run it
Please help me out
Thanks in advance
Develectron
Hi Max,
in e.g. e6052c4cc756f7d3a5023a0ba57fe8d80783967c you have added #include
<stdbool.h> in various files.
I'd like to nitpick about the place where you put it:
index 3cba5d1..3d7c244 100644
--- a/openbsc/include/openbsc/gsm_subscriber.h
+++ b/openbsc/include/openbsc/gsm_subscriber.h
@@ -5,6 +5,8 @@
#include <osmocom/core/linuxlist.h>
#include <osmocom/gsm/protocol/gsm_23_003.h>
+#include <stdbool.h>
+
(there are also some more instances)
I'd prefer if we keep system headers grouped on top.
Thanks :)
~Neels
About http://osmocom.org/issues/1757#note-4
With the current naming scheme, the logical name for a fully dynamic
TCH/F-TCH/H-PDCH channel would be
GSM_PCHAN_TCH_F_TCH_H_PDCH
timeslot 2
phys_chan_config TCH/F_TCH/H_PDCH
Is it asking for trouble to just name it DYN instead?
GSM_PCHAN_DYN
timeslot 2
phys_chan_config DYN
I'm in (at least) two minds about it, opinions welcome...
~Neels
Dear Harald,
Just seen your branch regarding FSM:
http://cgit.osmocom.org/openbsc/log/?h=laforge/om2000-fsm
Do you think this is also doable for the Nokia Site BTS series?
Because if you think its doable, based on your work I a would like to try and implement this for Nokia support too, as even between different Site versions (InSite, Metro and UltraStie), there are some differences in the OML initialization (especially in the timing of it) which is now handled by hard coded values, instead of a proper state machine.
Regards,
Csaba
Hi osmo-bts-trx folks,
reviews on https://gerrit.osmocom.org/498 would be appreciated :)
Thanks!
~Neels
--
- Neels Hofmeyr <nhofmeyr(a)sysmocom.de> http://www.sysmocom.de/
=======================================================================
* sysmocom - systems for mobile communications GmbH
* Alt-Moabit 93
* 10559 Berlin, Germany
* Sitz / Registered office: Berlin, HRB 134158 B
* Geschäftsführer / Managing Directors: Harald Welte
Hello all, in order to try grgsm software, it asked for the libosmocore
library and i proceed to configura and install it. Configure process went
ok, but when trying to "make", it gets a error about unidentified symbols.
I have been searching on the web and got several hints that it could be
based on the 64bit version of gcc used. The error in question is this:
**********Output error begins here**********
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-recursive
Making all in include
make[2]: Nothing to be done for `all'.
Making all in src
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-am
make[3]: Nothing to be done for `all-am'.
Making all in src/vty
make[2]: Nothing to be done for `all'.
Making all in src/codec
CCLD libosmocodec.la
Undefined symbols for architecture x86_64:
"_bitvec_get_bit_pos", referenced from:
_osmo_fr_check_sid in gsm610.o
"_bitvec_get_uint", referenced from:
_osmo_hr_check_sid in gsm620.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
make[2]: *** [libosmocodec.la] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
*********End of output error************
I tried to also made a reconfigure -i but without success. Has anyone
experienced this error or have an idea about what could be happening?.
Thanks in advance!!!!