Hello guys,
I was studying the sourcecode of OpenBSC to get a good understanding of
how things work.
But due to my lack of experience in Linux programming I have some
difficulties to understand the source.
I understand that the way bsc_hack works is based on event-queue
concept, am I right?
Anyway, in select.c I don't understand what's going on when it comes to
registering and unregistering fd's in combination with linuxlist.c.
Can someone please give me some links where such concepts are being
explained, so I can study it?
Thanks in advance.
Hello guys,
While I'm still busy with understanding the OpenBSC sourcecodes and GSM
protocols, I wonder if it's possible to control the nanoBTS's
transmissionpower. If some additional code is needed, I'd like to give a
try with some hints or directions to look at.
Thank you.
correction: patch 12 (not 13) uses dynamic transactions.
-----Ursprüngliche Nachricht-----
Von: openbsc-bounces(a)lists.gnumonks.org [mailto:openbsc-bounces@lists.gnumonks.org] Im Auftrag von Andreas.Eversberg
Gesendet: Samstag, 23. Mai 2009 10:21
An: Harald Welte
Cc: openbsc(a)lists.gnumonks.org
Betreff: AW: patch: 8_paging
here is the problem: we don't know about the called bts, if
- the subscriber detaches after paging was started and the current_bts pointer inside subscriber is NULL.
- the lchan is not set because paging expires.
we can use the network pointer instead of the bts pointer for paging callback function. the gsm_network is required when paging result is received. all transactions (call instances) are linked in a list in gsm_network. (see patch 13) even if paging expires, the transactions in this list with the same subscriber must be released. (MO out of order)
but it is more complex: the subscriber will not be NULL, because it is "used" by the transactions. the use-counter of subscriber is increased for every transaction created and decreased on release of that transaction. if there is a call process for the paged subscriber, the subscr is set when paging response is received. we need at least a pointer to the network to access the transactions.
we can keep paging callback function without bts (or network) pointer, but then we need a network pointer in gsm_subscriber to process the network's paging result.
-----Ursprüngliche Nachricht-----
Von: openbsc-bounces(a)lists.gnumonks.org [mailto:openbsc-bounces@lists.gnumonks.org] Im Auftrag von Andreas.Eversberg
Gesendet: Samstag, 23. Mai 2009 09:47
An: Harald Welte
Cc: openbsc(a)lists.gnumonks.org
Betreff: AW: patch: 8_paging
i use the calling party's BTS, because the subscriber database does not contain the current BTS number of the subscriber last seen. (or detached)
i agree that the subscriber gives us information about the paged bts and we can resolve the gsm_network from that also.
-----Ursprüngliche Nachricht-----
Von: Harald Welte [mailto:laforge@gnumonks.org]
Gesendet: Samstag, 23. Mai 2009 08:30
An: Andreas.Eversberg
Cc: openbsc(a)lists.gnumonks.org
Betreff: Re: patch: 8_paging
Hi again,
On Sat, May 23, 2009 at 02:23:11PM +0800, Harald Welte wrote:
> On Thu, May 21, 2009 at 02:27:36PM +0200, Andreas.Eversberg wrote:
> > Paging refers to a BTS. To page a mobile phone, the current location
> > is required. If paging succeeds or expires, the BTS structure is
> > also given to the callback function (cbfn).
> >
> > Because paging refers to a BTS, the cbfn (callback function) must
> > include a pointer to bts.
>
> The paging response includes a lchan pointer, which can be resolved to
> the physical channel / timeslot and to the trx and finally to the BTS.
> Is this not sufficient?
Ah, ok, in the case we do not successfully allocate a lchan, then that's obviously NULL.
Still, when you call paging_request() you actually pass on a number of parameters, including:
1) the BTS on which you want to page (whcih, indeed, is currently the
BTS of the calling party rather than the called party). So this parameter
is likely to get removed soon.
2) The subscriber that was called. This should be used by paging_request()
to resolve the BTS that this subscriber was last seen/registered to.
3) a reference to the call, which is treated as an opaque pointer that
is passed back as a reference when calling the call-back function. So
if the bts of the calling or called party needs to be known, it should
probably be referenced from that data structure.
Or am I missing something?
--
- Harald Welte <laforge(a)gnumonks.org> http://laforge.gnumonks.org/
============================================================================
"Privacy in residential applications is a desirable marketing option."
(ETSI EN 300 175-7 Ch. A6)
hi,
finally my patch is documented (almost). you will find the documentation
of the patch:
http://home.eversberg.eu/stage1.html
the patch in plain text fromat:
http://home.eversberg.eu/stage1.patch
it also includes the changes i posted here before. if you have
questions, ask.
regards,
andreas
Hi,
I am having difficulty compiling openbsc and the error message is as
follows. Does anyone know why?
1; fi
db.c:30:21: error: dbi/dbi.h: No such file or directory
db.c:34: error: expected ?? ?? ?? �sm?or �_attribute__?before �onn?
db.c:91: error: expected ??before �onn?
db.c: In function �b_init?
db.c:98: warning: implicit declaration of function �bi_initialize?
db.c:99: error: �onn?undeclared (first use in this function)
db.c:99: error: (Each undeclared identifier is reported only once
db.c:99: error: for each function it appears in.)
db.c:99: warning: implicit declaration of function �bi_conn_new?
db.c:105: warning: implicit declaration of function �bi_conn_error_handler?
db.c:105: error: �b_error_func?undeclared (first use in this function)
db.c:118: warning: implicit declaration of function �bi_conn_set_option?
db.c:121: warning: implicit declaration of function �bi_conn_connect?
db.c: In function �b_prepare?
db.c:133: error: �bi_result?undeclared (first use in this function)
db.c:133: error: expected ??before �esult?
db.c:137: error: �esult?undeclared (first use in this function)
db.c:137: warning: implicit declaration of function �bi_conn_query?
db.c:137: error: �onn?undeclared (first use in this function)
db.c:142: warning: implicit declaration of function �bi_result_free?
db.c: In function �b_fini?
db.c:149: warning: implicit declaration of function �bi_conn_close?
db.c:149: error: �onn?undeclared (first use in this function)
db.c:150: warning: implicit declaration of function �bi_shutdown?
db.c: In function �b_create_subscriber?
db.c:160: error: �bi_result?undeclared (first use in this function)
db.c:160: error: expected ??before �esult?
db.c:166: error: �esult?undeclared (first use in this function)
db.c:166: warning: implicit declaration of function �bi_conn_queryf?
db.c:166: error: �onn?undeclared (first use in this function)
db.c:190: warning: implicit declaration of function �bi_conn_sequence_last?
db.c:193: warning: format ?llu?expects type �ong long unsigned int? but
argument 2 has type �ong unsigned int?
db.c: In function �b_get_subscriber?
db.c:198: error: �bi_result?undeclared (first use in this function)
db.c:198: error: expected ??before �esult?
db.c:205: warning: implicit declaration of function
�bi_conn_quote_string_copy?
db.c:205: error: �onn?undeclared (first use in this function)
db.c:206: error: �esult?undeclared (first use in this function)
db.c:239: warning: implicit declaration of function �bi_result_next_row?
db.c:247: warning: implicit declaration of function
�bi_result_get_ulonglong?
db.c:248: warning: implicit declaration of function �bi_result_get_string?
db.c:248: warning: assignment makes pointer from integer without a cast
db.c:252: warning: assignment makes pointer from integer without a cast
db.c:256: warning: assignment makes pointer from integer without a cast
db.c:260: warning: assignment makes pointer from integer without a cast
db.c:264: warning: implicit declaration of function �bi_result_get_uint?
db.c:268: warning: format ?llu?expects type �ong long unsigned int? but
argument 2 has type �ong unsigned int?
db.c: In function �b_sync_subscriber?
db.c:274: error: �bi_result?undeclared (first use in this function)
db.c:274: error: expected ??before �esult?
db.c:275: error: �esult?undeclared (first use in this function)
db.c:275: error: �onn?undeclared (first use in this function)
db.c: In function �b_subscriber_alloc_tmsi?
db.c:294: error: �bi_result?undeclared (first use in this function)
db.c:294: error: expected ??before �esult?
db.c:298: error: �onn?undeclared (first use in this function)
db.c:299: error: �esult?undeclared (first use in this function)
db.c:309: warning: implicit declaration of function �bi_result_get_numrows?
db.c: In function �b_subscriber_assoc_imei?
db.c:325: error: �bi_result?undeclared (first use in this function)
db.c:325: error: expected ??before �esult?
db.c:327: error: �esult?undeclared (first use in this function)
db.c:327: error: �onn?undeclared (first use in this function)
db.c:339: warning: implicit declaration of function
�bi_result_get_numrows_affected?
db.c:344: warning: format ?llu?expects type �ong long unsigned int? but
argument 2 has type �_int64_t?
db.c:382: warning: format ?llu?expects type �ong long unsigned int? but
argument 2 has type �_int64_t?
db.c:396: warning: format ?llu?expects type �ong long unsigned int? but
argument 2 has type �_int64_t?
db.c: In function �b_sms_store?
db.c:405: error: �bi_result?undeclared (first use in this function)
db.c:405: error: expected ??before �esult?
db.c:408: error: �onn?undeclared (first use in this function)
db.c:409: error: �esult?undeclared (first use in this function)
db.c: In function �b_sms_get_unsent?
db.c:428: error: �bi_result?undeclared (first use in this function)
db.c:428: error: expected ??before �esult?
db.c:436: error: �esult?undeclared (first use in this function)
db.c:436: error: �onn?undeclared (first use in this function)
db.c: In function �b_sms_mark_sent?
db.c:453: error: �bi_result?undeclared (first use in this function)
db.c:453: error: expected ??before �esult?
db.c:455: error: �esult?undeclared (first use in this function)
db.c:455: error: �onn?undeclared (first use in this function)
db.c:460: warning: format ?llu?expects type �ong long unsigned int? but
argument 2 has type �_int64_t?
make[1]: *** [db.o] Error 1
make[1]: Leaving directory `/usr/src/openbsc/src'
make: *** [all-recursive] Error 1
Thank you for your help.
JB
> In my menuconfig I put an * for :
> <*> Modular ISDN driver ---> <*>Digital Audio Processing of
transparent data
> <*>ISDN over IP tunnel
> <*>Support for HFC PCI
cards
> <*>Support for HFC
multiport cards (HFC-4S/8S/E1)
try compile as module then load after boot
modprobe mISDN_core
modprobe hfcmulti dslot=1
> Is there something more to do for mISDN? I saw on mISDN.org that
mISDNv2 is already in the kernel >= 2.6.27 so I were thinking it should
work directly.
no it doesn't! it works for ISDN, but not for openbsc. openbsc requires
differen SAPI values and multiple layer 2 processes on the d-channel.
it will work with the latest mISDN from git repository:
git clone git://git.misdn.org/git/mISDN.git
cd mISDN
sh checkout-branch.sh socket <- change to socket branch (mISDNv2)
make force <- delete all mISDN includes from kernel.
make
make install
be sure to disable mISDN support from kernel. the modules from git will
be installed under /lib/modules/xxxx/extra. the "extra" modules have
lower priority than the kernel modules, so disable mISDN in kernel
config and reinstall modules (make modules && make modules_install).
unused modules will then be removed. then install the git modules as
described above.
Hello,
Now I can configure the bs11 using the bs11_config. Everything worked fine
and I obtained this on bs11_config query :
LMT LOGON: ACK
PHASE: 3 Normal MBCCU0: Load MBCCU1: No Load
Abis-link: Restoring
BS11 ATTRIBUTES:
BS-11 ESN PCB Serial Number: 001073
BS-11 ESN Hardware Code Number: 135-2044/03.03
BS-11 ESN Firmware Code Number: 135-2044/03.03
PLL Set Value=1053, Work Value=1053
SITE MANAGER ATTRIBUTES:
E1 Channel: Port=0 Timeslot=1 (Full Slot)
TEI: 25
BS11 Line Interface ATTRIBUTES:
PLL Mode: Standalone
BS11 Power Amplifier 0 ATTRIBUTES:
TRX Power: 30mW (GSM)
Mon May 25 16:01:12 2009 <0020> abis_nm.c:811 GET ATTRIBUTE NACK
LMT LOGOFF: ACK
I didn't doanwload:
-the SAFETY LOAD software
-the BTS software
Is it necessary since I can reach Phase 3 and since I can see the Firmware
Code Number?
I continued to follow the "getting started" tutorial untill the E1 Link and
I have the following problem when launching bsc_hack :
./bsc_hack -f 123 --debug=DRLL:DCC:DMM:DRR:DRSL:DNM:DMI:DMUX:DPAG:DRLL:DSMS
DB: Database initialized.
DB: Database prepared.
1 device found
id: 0
Dprotocols: 00000018
Bprotocols: 0000006e
protocol: 4
nrbchan: 30
name: hfc-e1.1
activate bchan
activate bchan
Mon May 25 16:07:39 2009 <1000> input/misdn.c:125 alen =6, dev(0) channel(0)
sapi(63) tei(127)
Mon May 25 16:07:39 2009 <1000> input/misdn.c:128 <= len = 12, prim(0x8)
id(0x7f3f): DL_INFORMATION_IND
Mon May 25 16:07:39 2009 <1000> input/misdn.c:135 DL_INFORMATION_IND: use
channel(0) sapi(63) tei(127) for now
mISDN message for unknown sign_link
May be it's coming from my BN1E1 card from Beronet. I only changed the Dip
switches for 120 ohms.
I can see 2 steady red led (which means i am in NT mode, TE mode
deactivate). Both green leds are off (is it normal?).
/* HFC-E1 OEM */
+ /* 2 red blinking: NT mode deactivate
+ * 2 red steady: TE mode deactivate
+ * left green: L1 active
+ * left red: frame sync, but no L1
+ * right green: L2 active
+ */
Anyone?
Thanks in advance!
Best regards
Eric Cathelinaud
Hi,
I wrote a small howto for the setup of OpenBSC, LCR and Asterisk.
I'll add it to the wiki within the next days.
https://brezn.muc.ccc.de/~codec/openbsc/howto.txt
Sorry for the broken english. ;P
cheers,
--
codec
"All children are artists. The problem is
how to remain an artist as one grows up." -- Picasso
did you load hfcmulti.ko with dslot=1 parameter? this is required to
move dchannel slot from 16 to 1.
> Mon May 25 16:07:39 2009 <1000> input/misdn.c:125 alen =6, dev(0)
channel(0) sapi(63) tei(127)
> Mon May 25 16:07:39 2009 <1000> input/misdn.c:128 <= len = 12,
prim(0x8) id(0x7f3f): DL_INFORMATION_IND
> Mon May 25 16:07:39 2009 <1000> input/misdn.c:135 DL_INFORMATION_IND:
use channel(0) sapi(63) tei(127) for now
> ISDN message for unknown sign_link
>
This patch in conjunction with patch 15 (paging lac) makes patch 8
(paging) obsolete.
> The patch will store the current LAC in the HLC when the subscriber
successfully attaches. If the subscriber detaches, the LAC will be set
to 0.
> This patch is required to make patch 15 (paging) work. This patch
does not depend on any other patch i made.