Hello Christian,
On Thu, 30 Apr 2009 03:13:33 +0200, "hotshot" <hotshot(a)koeln.ccc.de> wrote:
>
> Unfortunately I see the same behavior (even with restarting the
> BS-11) as in E1-locked ('hfcmulti' and 'hfcmulti port=0x200) - a
> network scan shows either your BS-11 or the other networks and only
> sometimes you see all networks
In the latest OpenBSC version there is support to show the "Set Value"
and the "Work Value" of the PLL setting. The "Set Value" is the
configuration value from the factory. The "Work Value" is not 100%
clear yet but most certainly it is the value the PLL is actually
using. In "Locked" mode the PLL follows the E1 clock and the
"Work Value" can change quite a lot. Switching to "Standalone"
mode seems to freeze the current "Work Value". The question now
is if the PLL still used this "Work Value" in "Standalone" mode.
If yes and the "Work Value" is off by a large amount the clock is
not accurate (although its most certainly stable) and you still
won't the test network and the other networks at once.
If the "Work Value" of your BS-11 is off by a large amount from
the "Set Value" you can try to switch to "Locked" mode and watch
if the "Work Value" follows the E1 clock. If its close to the
"Set Value", switch back to "Standalone" mode.
I have not tested this and I don't know a better way yet (I don't
think the "Work Value" can be set from the outside) but you can
give it a try.
Best regards,
Dieter
--
Dieter Spaar, Germany spaar(a)mirider.augusta.de
Hello Harald,
On Fri, 17 Apr 2009 10:17:13 +0200, "Harald Welte" <laforge(a)gnumonks.org> wrote:
>
> Dieter, what I just found out is that the LI object has a user-configurable
> setting, where we can force it to be stand alone or locked to the E1.
>
> We could add this setting to the bs11_config program so people can try
> if their E1 clock or their [10 years uncalibrated] BS11 internal oscillator
> is better.
>
> What do you think?
I did a quick test with this setting and it seems to work fine
with the BS-11 (so we should not believe the documentation ;-).
Here is the LMT dump for the PLL Mode, it can be changed during
normal operation:
; Locked
Tx D0A5070000FC0102
Rx D1A5070000FC0102
; Standalone
Tx D0A5070000FC0103
Rx D1A5070000FC0103
A little bit strange is the behaviour of NM_ATT_BS11_CCLK_ACCURACY,
if the PLL Mode is set to "Standalone", it changes to "high accuracy",
however if you restart the BS-11, this attribute stays at "medium
accuracy". Maybe NM_ATT_BS11_CCLK_ACCURACY has no meaning if the
PLL Mode is set to "Standalone".
Best regards,
Dieter
--
Dieter Spaar, Germany spaar(a)mirider.augusta.de
Hallo Bjoern,
> I tried it several times,
> and left the BTS on over night.
> The LMT cable wasn't always plugged in.
> When I boot up the BTS it always says that the second TRX
> has Load and the first not.
You did turn the power off for a restart, just to be sure ?
> If I try to bring up the BTS with your SW under Win.
> I get the Abis Link Up but when I try the Load DB I get some
> error messages on LMT.
> Then the second TRX goes down to No Load.
If the firmware for the first TRX is not loaded, the Abis
communication will still work because the microcontroller
which takes care about the commnunication is working. The
error messages result from the not working TRX (I guess
it would work if TRX1 instead of TRX0 is used, however I
have not tried it yet).
> And this is the condition until I reboot the BTS.
> Maybe its a software issue?
I don't think so because the communication processor loads the
same firmware in both TRX. This is done in parallel. In your
trace there is the same behavior I experience here, loading the
firmware for TRX0 ad TRX1 starts, however loading TRX0 stops
immediately. Of course I can only speak for my BS-11, but here
it is most certainly a hardware issue (at one time I could even
see an error message that the first power supply unit did not
start).
Best regards,
Dieter
--
Dieter Spaar, Germany spaar(a)mirider.augusta.de
i must check with cologechip (vendor), if the subvendor id is correct, then i will check it into the GIT.
-----Ursprüngliche Nachricht-----
Von: openbsc-bounces(a)lists.gnumonks.org [mailto:openbsc-bounces@lists.gnumonks.org] Im Auftrag von Harald Welte
Gesendet: Montag, 27. April 2009 10:12
An: Nico
Cc: openbsc(a)lists.gnumonks.org
Betreff: Re: [patch] support for recent Single E1 PCI ISDN cards tolinux-2.6.27.4
Hi Nico,
On Sun, Apr 26, 2009 at 12:54:36AM +0200, Nico wrote:
> Here's a patch I've been using to get a SingleE1 PCI ISDN card (recently
> bought from Junghanns.NET) to work with the hfcmulti.ko driver. I'm not
> sure the mapping between the PCI subdevice id and the driver data is
> right, but at least the card can "talk" to the BS-11 now.
Thanks for your patch. I think this should be forwarded to the mISDN folks for
mainline inclusion. Andreas Eversberg (reading this list) is heavily involved
with them, maybe he can take care of that.
> I'm curious if any of you are also using such cards and how they get
> them to work.
I've so far only worked with HFC-E1 evaluation boards so far, sorry.
--
- 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,
Here's a patch I've been using to get a SingleE1 PCI ISDN card (recently
bought from Junghanns.NET) to work with the hfcmulti.ko driver. I'm not
sure the mapping between the PCI subdevice id and the driver data is
right, but at least the card can "talk" to the BS-11 now.
I'm curious if any of you are also using such cards and how they get
them to work.
Best regards,
--
Nico
Hello Bjoern,
[ I sent it to the OpenBSC list too, because there are the Linux
experts ]
> Ok, Ill give it a try later on today.
> Just one thing:
> Ive now compiled OpenBSC on a fresh installed Debian lenny machine,
> and LMT etc. works great but if I try to start bsc_hack I get the
> following:
>
> gsmbase1:/home/tec/openbsc/src# ./bsc_hack
> DB: Database initialized.
> DB: Database prepared.
> could not open socket Address family not supported by protocol
>
> It seems to be related to af_packet Kernel module, but I cant find the
> mod.
>
> Do you have an idea?
Don't ask me about Linux details, I am coming from Windows ;-)
Maybe it is related to mISDN, I think there is also a special
tunnel for capturing the traces in Wireshark. The rest (Telnet
interface) should be standard socket operations.
Maybe someone else can give a better explanation, the above is
just my understanding.
Best regards,
Dieter
--
Dieter Spaar, Germany spaar(a)mirider.augusta.de
i just want to know, if my recent patch arrived on this list (my last
mail), because my first mail formatting was detected as spam. i see no
reaction to my last mail.
JFYI, there now is a Chaosradio Express podcast about OpenBSC
available at http://chaosradio.ccc.de/cre120.html
Regards,
--
- 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)
Hello Harald,
On Fri, 17 Apr 2009 10:17:13 +0200, "Harald Welte" <laforge(a)gnumonks.org> wrote:
>
> Dieter, what I just found out is that the LI object has a user-configurable
> setting, where we can force it to be stand alone or locked to the E1.
You mean the "PLL synchonisation mode" attribute which is set to
"locked mode" ? I am not sure if we can change it for our version
of the BS-11. As far as I understand the documentation, this is
a setting which is only available with the CCU ("Combo Card Unit", the
universal interface which also allows to use a standard ISDN line).
The documentation mentions at one place that for the CCU variant
they use an oven controlled oscillator which fulfilles the GSM
clock stability requirements even without being snchronized to
the E1 line.
But we should of course try it.
> We could add this setting to the bs11_config program so people can try
> if their E1 clock or their [10 years uncalibrated] BS11 internal oscillator
> is better.
>
> What do you think?
Yes, why not try it. Probably the result is similar to disabling
the master clock of the HFC-E1 card, this way the BS-11 clock
determines the E1 clock (the HFC-E1 card synchronizes to the
trasmitter E1 clock of the BS-11 and the BS-11 locks to the
transmitter clock of the HFC-E1 which is determined by the BS-11).
Surely the cleaner way is to adjust the clock setting in the BS-11
(if this settings works for our BS-11 variant).
> I'm quite sure there must be an option to do this externally. The internal
> oscillator must be calibrated every two years, and I'm sure they do this
> without opening the case (in the field...)
Its possible to calibrate the PLL without opening the case. The attribute
is protected by some checksum, I have not looked at the details. And
"officially" out LMT version should not even allow to see the calibration
dialog ;-) The problem for me is how to measure the clock without opening
the case. I can measure an unmodulated carrier very accurate if it is
within the 10 MHz to 1 GHz range (the HP 8922 is accurate enough to do
this). However I don't have the equippment to measure the modulated and
pulsed signal of the BS-11. Maybe there is some hidden setting to send
just the unmodulated carrier, but I have not yet found anything in this
direction.
Another problem is that changing the calibration requires a restart of
the BS-11 (at least I only saw any effect when I restarted). Additionally
when you query the calibration, you get the "PLL Set Value" and the
"PLL Work Value", the "Set Value" seems to be used when starting up
and the "Work Value" changes, most certainly locking to an external
clock also influences it. I did not find anything in the documentation,
actually those settings are not indended for the end user, just the
factory.
Best regards,
Dieter
--
Dieter Spaar, Germany spaar(a)mirider.augusta.de
Hello,
I think I finally found a way to measure the frequency of the
BS-11 in a reliable way. My BS-11 is accurate to within 0.1 ppm
if the oscillator is set to "Standalone Mode". If the oscillator
is locked to the E1 clock of the HFC-E1 card and the HFC-E1 card
is generating the clock, the frequency of the BS-11 drifts more
than +/-1 ppm in about one minute.
I did just a short test, but this results fits to the previous
observations (remember, an old Nokia phone was not able to see
the official networks and the test network at the same time if
the frequency of the test network is off by more than 1 ppm).
Of course I don't know how good the calibration of the other
BS-11 units is, but setting the oscillator to "Standalone Mode"
surely is better than using the HFC-E1 card for synchronisation
(if the HFC-E1 card is not synchronized to the official ISDN
network clock as Andreas suggested).
Best regards,
Dieter
--
Dieter Spaar, Germany spaar(a)mirider.augusta.de
ok, next time i will split the patches for easier understanding. if you require splitting of my first patch, let me know.
for better understanding and review, i will explain the usleep replacement patch again. only commit it, if you fully understand the changes. the usleep is replaced by a timer, one for each time slot (signalling only ts).
1. whenever data is queued into the tx-queue, a tx-delay timer is checked:
- the timer is not running: mISDN write event is triggered with BSC_FD_WRITE flag on file descriptor.
- the timer is running: nothing is triggered, because we still have to wait until the tx-timer timed out
2. whenever a time out occurrs:
- the BSC_FD_WRITE flag is set to trigger write event, even if tx-queue is empty.
3. whenever a write event is triggered: if it is ok to write (select() indicated that writing is possible), the tx-queue is checked:
- if queue is empty: nothing is done, delay timer remains disabled, no BSC_FD_WRITE flag is set.
- if queue is not empty: the first message is dequeued and sent to mISDN. the tx-delay timer is started and set for next write event.
special cases:
- if tx-queue is not empty, delay timer is not running and BSC_FD_WRITE flag is set (e.g. right after timeout event), subsequent data is queued and BSC_FD_WRITE flag remains set.
- if tx-timer times out, but there is no data in the tx-queue, the BSC_FD_WRITE flag will be set. the write event handler always checks for data in the tx-queue. if it is empty, the delay timer will not be started and the BSC_FD_WRITE flag will be cleared.
- the timers is not cleared on release of libbsc data structures. i expect all times to be removed on release of libbsc also.
-----Ursprüngliche Nachricht-----
Von: openbsc-bounces(a)lists.gnumonks.org [mailto:openbsc-bounces@lists.gnumonks.org] Im Auftrag von Holger Freyther
Gesendet: Donnerstag, 23. April 2009 00:11
An: openbsc(a)lists.gnumonks.org
Betreff: Re: AW: first patch: mISDN handling
On Wednesday 22 April 2009 15:44:44 Holger Freyther wrote:
> On Wednesday 22 April 2009 15:25:59 Andreas.Eversberg wrote:
> > i just want to know, if my recent patch arrived on this list (my last
> > mail), because my first mail formatting was detected as spam. i see no
> > reaction to my last mail.
>
> Yes, I waited for Harald to respond as he is the boss. My taste regarding
> patches is very special and I prefer the smaller patches... e.g. I would
> like to have separate patches for things like LAC, auto release of layer2,
> and it is hard for me to judge the actual mISDN changes as you are the
> expert there. One thing that is clearly missing is an updated configure.in
> to check for the mISDNuser header files and fail when they are not there
> and is it really necessary to invoke init_af_isdn()? Where is this coming
> from?
>
>
> I will probably/hopefully merge your:
> - LAC
> - Card NR
> - autorelease
Okay, I managed to do this today. It would be cool if you could split out your
improved log messages (__func__) and extended error checking (making sure we
have 30 bchan's) into a separate patch and I would be happy to merge this
then, afterwards the killing of the usleep should be done.
z.
Hallo Bjoern,
> What do I have to do to use the second TRX instead?
> Plug in the other Twinax connectors?
> Do I need to setup the second TRX separately on LMT?
The PC software (OpenBSC or my Windows software) has to
be adjusted to use TRX1 instead of TRX0. Its basically
"only" changing a parameter at several places, but as
far as I am aware noone tried it yet so some debugging
might be necessary.
Best regards,
Dieter
--
Dieter Spaar, Germany spaar(a)mirider.augusta.de
Hello Bjoern,
> I finally got time to try out my BTS.
> When I looked at the LMT I was confused about the
> "MBCCU0: No Load" which seems to be the TRX0 ?
Probably this is a similar problem I have with my BS-11, when
turning on the cold BS-11 the first time, frequently the firmware
load for TRX0 fails. Most certainly this comes from a hardware
problem (maybe aged capacitors ?).
I have to restart (turn off and on) the BS-11 a few times till it
works. If the unit has warmed up, I never saw this problem till now.
I also made the experience that it could help if no LMT cable (serial
cable) is attached so I usually try it this way: Turn the BS-11 on
without the LMT cable plugged in (at the BS-11 side) and after a
while (around 5 to 10 minutes) check if the firmware for TRX0 is
loading or is already loaded. If it fails, unplug the LMT cable,
turn the BS-11 off and try again. I am not really sure about the
effect of the LMT cable, but maybe the cable receives noise.
Best regards,
Dieter
--
Dieter Spaar, Germany spaar(a)mirider.augusta.de
Hey,
I had some time during a train ride to do some updates to the existing patch
set. I have merged the hopefully non controversial parts already and would
like to share the current set with you.
What is missing:
- There are still plenty of FIXMEs and the channel allocation is pretty
stupid. One request after another, no attempt to do GSM submit and call
handling at the same time... we just release the channel and start paging
again.
- VLR handling in db.c (remember where the subscriber was and load it....)
- Testing, I have not seen a powered up Siemens BS11 lately and need to test
What is there:
- Having two requests (SMS submit and Phone) should work in a way... and the
API should be "finished".
feedback is welcomed
z.
hi,
finally i finished my patch about mISDN handling, reversed time slots
and other things.
i sent this mail again, because my last formatting might be detected as
spam by "spam assassin" filters.
you will find documentation text between this patch, so scroll and look.
here is what i did:
the first part will allow new options for bsc_hack:
- alter LAC (location-area-code)
- select mISDN card number other than 0
- release layer 2 after closing
diff -Nur -x '*.Po' -x 'Makefile*' -x '*~' -x '*rej' -x '*.o'
openbsc.orig/src/bsc_hack.c openbsc/src/bsc_hack.c
--- openbsc.orig/src/bsc_hack.c 2009-03-28 11:36:37.000000000 +0100
+++ openbsc/src/bsc_hack.c 2009-04-18 06:58:34.000000000 +0200
@@ -53,8 +53,11 @@
/* MCC and MNC for the Location Area Identifier */ static int MCC = 1;
static int MNC = 1;
+static int LAC = 1;
static int ARFCN = HARDCODED_ARFCN;
static enum gsm_bts_type BTS_TYPE = GSM_BTS_TYPE_BS11;
+static int cardnr = 0;
+static int release_l2 = 0;
static const char *database_name = "hlr.sqlite3";
/* The following definitions are for OM and NM packets that we cannot
yet @@ -901,7 +904,7 @@
gsmnet->name_long = "OpenBSC";
gsmnet->name_short = "OpenBSC";
bts = &gsmnet->bts[0];
- bts->location_area_code = 1;
+ bts->location_area_code = LAC;
bts->trx[0].arfcn = ARFCN;
/* Control Channel Description */
@@ -920,7 +923,7 @@
/* E1 mISDN input setup */
if (BTS_TYPE == GSM_BTS_TYPE_BS11)
- return e1_config(bts);
+ return e1_config(bts, cardnr, release_l2);
else
return ia_config(bts);
}
@@ -952,14 +955,17 @@
printf(" Some useful help...\n");
printf(" -d option --debug=DRLL:DCC:DMM:DRR:DRSL:DNM enable
debugging\n");
printf(" -s --disable-color\n");
- printf(" -n --network-code number(MNC) \n");
+ printf(" -n --network-code number (MNC) \n");
printf(" -c --country-code number (MCC) \n");
+ printf(" -L --location-area-code number (LAC) \n");
printf(" -f --arfcn number The frequency ARFCN\n");
printf(" -l --database db-name The database to use\n");
printf(" -a --authorize-everyone Allow everyone into the
network.\n");
printf(" -r --reject-cause number The reject cause for LOCATION
UPDATING REJECT.\n");
printf(" -p --pcap file The filename of the pcap file\n");
printf(" -t --bts-type type The BTS type (bs11, nanobts900,
nanobts1800)\n");
+ printf(" -C --cardnr number For bs11 select E1 card number
other than 0\n");
+ printf(" -R --release-l2 Releases mISDN layer 2 after exit, to
unload
+driver.\n");
printf(" -h --help this text\n");
}
@@ -973,16 +979,19 @@
{"disable-color", 0, 0, 's'},
{"network-code", 1, 0, 'n'},
{"country-code", 1, 0, 'c'},
+ {"location-area-code", 1, 0, 'L'},
{"database", 1, 0, 'l'},
{"authorize-everyone", 0, 0, 'a'},
{"reject-cause", 1, 0, 'r'},
{"pcap", 1, 0, 'p'},
{"arfcn", 1, 0, 'f'},
{"bts-type", 1, 0, 't'},
+ {"cardnr", 1, 0, 'C'},
+ {"release-l2", 0, 0, 'R'},
{0, 0, 0, 0}
};
- c = getopt_long(argc, argv, "hc:n:d:sar:p:f:t:",
+ c = getopt_long(argc, argv, "hc:n:d:sar:p:f:t:C:RL:",
long_options, &option_index);
if (c == -1)
break;
@@ -1004,6 +1013,9 @@
case 'c':
MCC = atoi(optarg);
break;
+ case 'L':
+ LAC = atoi(optarg);
+ break;
case 'f':
ARFCN = atoi(optarg);
break;
@@ -1022,6 +1034,12 @@
case 't':
BTS_TYPE = parse_btstype(optarg);
break;
+ case 'C':
+ cardnr = atoi(optarg);
+ break;
+ case 'R':
+ release_l2 = 1;
+ break;
default:
/* ignore */
break;
the next part will create both e1 time slots for audio traffic. this is
required, because uninitialized slots cause segementation faults due to
invalid structure pointers.
i tested it, by using making calls on four phones.
diff -Nur -x '*.Po' -x 'Makefile*' -x '*~' -x '*rej' -x '*.o'
openbsc.orig/src/e1_config.c openbsc/src/e1_config.c
--- openbsc.orig/src/e1_config.c 2009-03-28 11:36:37.000000000
+0100
+++ openbsc/src/e1_config.c 2009-04-19 13:24:20.000000000 +0200
@@ -15,7 +15,7 @@
#define TEI_RSL 1
/* do some compiled-in configuration for our BTS/E1 setup */ -int
e1_config(struct gsm_bts *bts)
+int e1_config(struct gsm_bts *bts, int cardnr, int l2_release)
{
struct e1inp_line *line;
struct e1inp_ts *sign_ts;
@@ -29,7 +29,7 @@
/* create E1 timeslots for signalling and TRAU frames */
e1inp_ts_config(&line->ts[1-1], line, E1INP_TS_TYPE_SIGN);
e1inp_ts_config(&line->ts[2-1], line, E1INP_TS_TYPE_TRAU);
- //e1inp_ts_config(&line->ts[3-1], line, E1INP_TS_TYPE_TRAU);
+ e1inp_ts_config(&line->ts[3-1], line, E1INP_TS_TYPE_TRAU);
/* create signalling links for TS1 */
sign_ts = &line->ts[1-1];
@@ -47,13 +47,11 @@
subch_demux_activate(&line->ts[2-1].trau.demux, 2);
subch_demux_activate(&line->ts[2-1].trau.demux, 3);
-#if 0
/* enable subchannel demuxer on TS3 */
subch_demux_activate(&line->ts[3-1].trau.demux, 0);
subch_demux_activate(&line->ts[3-1].trau.demux, 1);
subch_demux_activate(&line->ts[3-1].trau.demux, 2);
subch_demux_activate(&line->ts[3-1].trau.demux, 3); -#endif
#ifdef HAVE_TRX1
/* create E1 timeslots for TRAU frames of TRX1 */ @@ -68,7 +66,7
@@
bts->trx[1].rsl_link = rsl_link;
#endif
- return mi_setup(0, line);
+ return mi_setup(cardnr, line, l2_release);
}
/* do some compiled-in configuration for our BTS/E1 setup */
then i changed the inclusion of mISDN headers. the mISDNif.h from
/usr/include/mISDNuser must be used.
in e1_input.c is no mISDN header required, so i commented them out.
in misdn.c i changed the definition of AF_ISDN and PF_ISDN.
compat_af_isdn.h will provide correct protocol family. in order to
resolve correct protocol family, init_af_isdn() must be called. this
will then work with kernel release and with GIT release. (remember that
the current kernel does not have the sapi extension in it, so use GIT.)
in order to solve the transmission delay problem (usleep(100000)) on the
timeslot 1, i added a timer to the timeslot. this timer will be started
after a tx-frame is dequeued. the BSC_FD_WRITE flag will be cleared,
because we do not require to write until the timer expires. after
timeout event, the BSC_FD_WRITE is set, even if no frame is in the
queue. the subsequent write event will dequeue the frame and restart the
timer again (if a frame is in the tx-queue).
the DL_ESTABLISH_IND will tell use when we can use the layer 2 link. i
replaced MPH_ACTIVATE_IND.
diff -Nur -x '*.Po' -x 'Makefile*' -x '*~' -x '*rej' -x '*.o'
openbsc.orig/src/e1_input.c openbsc/src/e1_input.c
--- openbsc.orig/src/e1_input.c 2009-03-28 11:36:37.000000000 +0100
+++ openbsc/src/e1_input.c 2009-04-19 13:20:00.000000000 +0200
@@ -31,12 +31,10 @@
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <arpa/inet.h>
-#include <mISDNif.h>
+//#include <mISDNuser/mISDNif.h>
-//#define AF_COMPATIBILITY_FUNC
-//#include <compat_af_isdn.h>
-#define AF_ISDN 34
-#define PF_ISDN AF_ISDN
+//#define MISDN_OLD_AF_COMPATIBILITY
+//#include <mISDNuser/compat_af_isdn.h>
#include <openbsc/select.h>
#include <openbsc/msgb.h>
@@ -223,6 +221,7 @@
{
struct e1inp_sign_link *sign_link;
struct e1inp_driver *e1inp_driver;
+ struct e1inp_ts *e1i_ts;
msg->l2h = msg->data;
@@ -232,11 +231,16 @@
}
sign_link = msg->trx->rsl_link;
+ e1i_ts = sign_link->ts;
+
+ if (!timer_pending(&e1i_ts->sign.tx_timer)) {
+ /* notify the driver we have something to write */
+ e1inp_driver = sign_link->ts->line->driver;
+ e1inp_driver->want_write(e1i_ts);
+ }
+
msgb_enqueue(&sign_link->tx_list, msg);
- /* notify the driver we have something to write */
- e1inp_driver = sign_link->ts->line->driver;
- e1inp_driver->want_write(sign_link->ts);
return 0;
}
@@ -245,6 +249,7 @@
{
struct e1inp_sign_link *sign_link;
struct e1inp_driver *e1inp_driver;
+ struct e1inp_ts *e1i_ts;
msg->l2h = msg->data;
@@ -254,11 +259,15 @@
}
sign_link = msg->trx->bts->oml_link;
- msgb_enqueue(&sign_link->tx_list, msg);
+ e1i_ts = sign_link->ts;
- /* notify the driver we have something to write */
- e1inp_driver = sign_link->ts->line->driver;
- e1inp_driver->want_write(sign_link->ts);
+ if (!timer_pending(&e1i_ts->sign.tx_timer)) {
+ /* notify the driver we have something to write */
+ e1inp_driver = sign_link->ts->line->driver;
+ e1inp_driver->want_write(e1i_ts);
+ }
+
+ msgb_enqueue(&sign_link->tx_list, msg);
return 0;
}
diff -Nur -x '*.Po' -x 'Makefile*' -x '*~' -x '*rej' -x '*.o'
openbsc.orig/src/input/misdn.c openbsc/src/input/misdn.c
--- openbsc.orig/src/input/misdn.c 2009-03-28 11:36:36.000000000
+0100
+++ openbsc/src/input/misdn.c 2009-04-19 13:20:20.000000000 +0200
@@ -32,12 +32,11 @@
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <arpa/inet.h>
-#include <mISDNif.h>
+#include <mISDNuser/mISDNif.h>
-//#define AF_COMPATIBILITY_FUNC
-//#include <compat_af_isdn.h>
-#define AF_ISDN 34
-#define PF_ISDN AF_ISDN
+#define MISDN_OLD_AF_COMPATIBILITY
+#define AF_COMPATIBILITY_FUNC
+#include <mISDNuser/compat_af_isdn.h>
#include <openbsc/select.h>
#include <openbsc/msgb.h>
@@ -114,8 +113,10 @@
return ret;
}
- if (alen != sizeof(l2addr))
+ if (alen != sizeof(l2addr)) {
+ fprintf(stderr, "error len\n");
return -EINVAL;
+ }
msgb_put(msg, ret);
@@ -129,7 +130,7 @@
case DL_INFORMATION_IND:
/* mISDN tells us which channel number is allocated for
this
* tuple of (SAPI, TEI). */
- DEBUGP(DMI, "use channel(%d) sapi(%d) tei(%d) for
now\n",
+ DEBUGP(DMI, "DL_INFORMATION_IND: channel(%d) sapi(%d)
tei(%d)\n",
l2addr.channel, l2addr.sapi, l2addr.tei);
link = e1inp_lookup_sign_link(e1i_ts, l2addr.tei,
l2addr.sapi);
if (!link) {
@@ -140,10 +141,16 @@
/* save the channel number in the driver private struct
*/
link->driver.misdn.channel = l2addr.channel;
break;
- case MPH_ACTIVATE_IND:
+// case MPH_ACTIVATE_IND:
+ case DL_ESTABLISH_IND:
+ DEBUGP(DMI, "DL_ESTABLISH_IND: channel(%d) sapi(%d)
tei(%d)\n",
+ l2addr.channel, l2addr.sapi, l2addr.tei);
ret = e1inp_event(e1i_ts, EVT_E1_TEI_UP, l2addr.tei,
l2addr.sapi);
break;
- case MPH_DEACTIVATE_IND:
+// case MPH_DEACTIVATE_IND:
+ case DL_RELEASE_IND:
+ DEBUGP(DMI, "DL_RELEASE_IND: channel(%d) sapi(%d)
tei(%d)\n",
+ l2addr.channel, l2addr.sapi, l2addr.tei);
ret = e1inp_event(e1i_ts, EVT_E1_TEI_DN, l2addr.tei,
l2addr.sapi);
break;
case DL_DATA_IND:
@@ -157,6 +164,27 @@
return ret;
}
+static int ts_want_write(struct e1inp_ts *e1i_ts) {
+ /* We never include the mISDN B-Channel FD into the
+ * writeset, since it doesn't support poll() based
+ * write flow control */
+ if (e1i_ts->type == E1INP_TS_TYPE_TRAU)
+ return 0;
+
+ e1i_ts->driver.misdn.fd.when |= BSC_FD_WRITE;
+
+ return 0;
+}
+
+static void timeout_ts1_write(void *data) {
+ struct e1inp_ts *e1i_ts = (struct e1inp_ts *)data;
+
+ /* trigger write of ts1, due to tx delay timer */
+ ts_want_write(e1i_ts);
+}
+
static int handle_ts1_write(struct bsc_fd *bfd) {
struct e1inp_line *line = bfd->data;
@@ -169,10 +197,12 @@
u_int8_t *l2_data;
int ret;
+ bfd->when &= ~BSC_FD_WRITE;
+
/* get the next msg for this timeslot */
msg = e1inp_tx_ts(e1i_ts, &sign_link);
if (!msg) {
- bfd->when &= ~BSC_FD_WRITE;
+ /* no message after tx delay timer */
return 0;
}
@@ -182,8 +212,8 @@
hh = (struct mISDNhead *) msgb_push(msg, sizeof(*hh));
hh->prim = DL_DATA_REQ;
- DEBUGP(DMI, "TX TEI(%d): %s\n", sign_link->tei,
- hexdump(l2_data, msg->len - MISDN_HEADER_LEN));
+ DEBUGP(DMI, "TX TEI(%d) SAPI(%d): %s\n", sign_link->tei,
+ sign_link->sapi, hexdump(l2_data, msg->len -
MISDN_HEADER_LEN));
/* construct the sockaddr */
sa.family = AF_ISDN;
@@ -193,10 +223,14 @@
ret = sendto(bfd->fd, msg->data, msg->len, 0,
(struct sockaddr *)&sa, sizeof(sa));
+ if (ret < 0)
+ fprintf(stderr, "sendto failed %d\n", ret);
msgb_free(msg);
- /* FIXME: this has to go */
- usleep(100000);
+ /* set tx delay timer for next event */
+ e1i_ts->sign.tx_timer.cb = timeout_ts1_write;
+ e1i_ts->sign.tx_timer.data = e1i_ts;
+ schedule_timer(&e1i_ts->sign.tx_timer, 0, 50000);
return ret;
}
@@ -253,8 +287,9 @@
msgb_put(msg, ret);
- DEBUGP(DMIB, "<= BCHAN len = %d, prim(0x%x) id(0x%x): %s\n",
- ret, hh->prim, hh->id, get_prim_name(hh->prim));
+ if (hh->prim != PH_CONTROL_IND)
+ DEBUGP(DMIB, "<= BCHAN len = %d, prim(0x%x) id(0x%x):
%s\n",
+ ret, hh->prim, hh->id, get_prim_name(hh->prim));
switch (hh->prim) {
case PH_DATA_IND:
@@ -332,28 +367,16 @@
return ret;
}
-static int ts_want_write(struct e1inp_ts *e1i_ts) -{
- /* We never include the mISDN B-Channel FD into the
- * writeset, since it doesn't support poll() based
- * write flow control */
- if (e1i_ts->type == E1INP_TS_TYPE_TRAU)
- return 0;
-
- e1i_ts->driver.misdn.fd.when |= BSC_FD_WRITE;
-
- return 0;
-}
-
struct e1inp_driver misdn_driver = {
.name = "mISDNuser",
.want_write = ts_want_write,
};
-static int mi_e1_setup(struct e1inp_line *line)
+static int mi_e1_setup(struct e1inp_line *line, int release_l2)
{
struct mi_e1_handle *e1h = line->driver_data;
int ts, ret;
+ int clean = 1;
/* TS0 is CRC4, don't need any fd for it */
for (ts = 1; ts < NUM_E1_TS; ts++) {
@@ -384,8 +407,8 @@
}
if (bfd->fd < 0) {
- fprintf(stderr, "could not open socket %s\n",
- strerror(errno));
+ fprintf(stderr, "%s could not open socket %s\n",
+ __func__, strerror(errno));
return bfd->fd;
}
@@ -395,8 +418,6 @@
switch (e1i_ts->type) {
case E1INP_TS_TYPE_SIGN:
addr.channel = 0;
- /* SAPI not supported yet in kernel */
- //addr.sapi = e1inp_ts->sign.sapi;
addr.sapi = 0;
addr.tei = GROUP_TEI;
break;
@@ -415,6 +436,13 @@
strerror(errno));
return -EIO;
}
+ if (e1i_ts->type == E1INP_TS_TYPE_SIGN && release_l2) {
+ ret = ioctl(bfd->fd, IMCLEAR_L2, &clean);
+ if (ret < 0) {
+ fprintf(stderr, "could not send IOCTL
IMCLEAN_L2 %s\n", strerror(errno));
+ return -EIO;
+ }
+ }
/* FIXME: only activate B-Channels once we start to
* use them to conserve CPU power */
@@ -432,12 +460,14 @@
return 0;
}
-int mi_setup(int cardnr, struct e1inp_line *line)
+int mi_setup(int cardnr, struct e1inp_line *line, int release_l2)
{
struct mi_e1_handle *e1h;
int sk, ret, cnt;
struct mISDN_devinfo devinfo;
+ init_af_isdn();
+
/* register the driver with the core */
/* FIXME: do this in the plugin initializer function */
ret = e1inp_driver_register(&misdn_driver);
@@ -457,7 +487,7 @@
/* open the ISDN card device */
sk = socket(PF_ISDN, SOCK_RAW, ISDN_P_BASE);
if (sk < 0) {
- fprintf(stderr, "could not open socket %s\n",
strerror(errno));
+ fprintf(stderr, "%s could not open socket %s\n",
__func__,
+strerror(errno));
return sk;
}
@@ -484,9 +514,20 @@
fprintf(stdout, " protocol: %d\n",
devinfo.protocol);
fprintf(stdout, " nrbchan: %d\n",
devinfo.nrbchan);
fprintf(stdout, " name: %s\n", devinfo.name);
+#else
+ printf("using device %d\n", e1h->cardnr);
#endif
- ret = mi_e1_setup(line);
+ if (!(devinfo.Dprotocols & (1 << ISDN_P_NT_E1))) {
+ fprintf(stderr, "error: card is not of type E1
(NT-mode)\n");
+ return -EINVAL;
+ }
+ if (devinfo.nrbchan != 30) {
+ fprintf(stderr, "error: E1 card has no 30
B-channels\n");
+ return -EINVAL;
+ }
+
+ ret = mi_e1_setup(line, release_l2);
if (ret)
return ret;
the subchanneling is reversed in my case. maybe we can use "#ifdef"
until we know why this works for me and not in the reverse case: bit
order "87654321" work, but "21436587" does not.
here is my theory why this works for others: first i enabled second
b-channel, so i expect that others have it disabled.
because we use timeslot 1 of TRX for signalling, others can use just 3
timeslots on TRX for audio, and can make no more than one call at a
time, because two slots are required for a call. in my case, i have the
first call on time slot 3 and 4 (channel 2 and 3 on TRX). i did not
debug why channel 1 is not selected for first call. if others use time
slot 2 and 3 (channel 1 and 2 on TRX), it does not matter if the channel
order is swapped, because slot 2 is swapped with slot 3, and both will
not change their position. you will not notice the difference, until
slots on different positions are used.
diff -Nur -x '*.Po' -x 'Makefile*' -x '*~' -x '*rej' -x '*.o'
openbsc.orig/src/subchan_demux.c openbsc/src/subchan_demux.c
--- openbsc.orig/src/subchan_demux.c 2009-02-23 17:58:34.000000000
+0100
+++ openbsc/src/subchan_demux.c 2009-04-19 13:30:08.000000000 +0200
@@ -100,7 +100,7 @@
if (!(dmx->chan_activ & (1 << c)))
continue;
- inbits = inbyte >> ((3-c)*2);
+ inbits = inbyte >> (c << 1);
/* two bits for each subchannel */
if (inbits & 0x01)
@@ -230,10 +230,10 @@
int rc;
/* combine two bits of every subchan */
- rc = get_subch_bits(mx, 3, &bits[0], 2);
- rc = get_subch_bits(mx, 2, &bits[2], 2);
- rc = get_subch_bits(mx, 1, &bits[4], 2);
- rc = get_subch_bits(mx, 0, &bits[6], 2);
+ rc = get_subch_bits(mx, 0, &bits[0], 2);
+ rc = get_subch_bits(mx, 1, &bits[2], 2);
+ rc = get_subch_bits(mx, 2, &bits[4], 2);
+ rc = get_subch_bits(mx, 3, &bits[6], 2);
*byte = compact_bits(bits);
finally the includes:
diff -Nur -x '*.Po' -x 'Makefile*' -x '*~' -x '*rej' -x '*.o'
openbsc.orig/include/openbsc/e1_input.h
openbsc/include/openbsc/e1_input.h
--- openbsc.orig/include/openbsc/e1_input.h 2009-03-28
11:36:36.000000000 +0100
+++ openbsc/include/openbsc/e1_input.h 2009-04-19 12:46:37.000000000
+0200
@@ -63,7 +63,10 @@
union {
struct {
+ /* list of all signalling links on this TS */
struct llist_head sign_links;
+ /* timer when to dequeue next frame */
+ struct timer_list tx_timer;
} sign;
struct {
/* subchannel demuxer for frames from E1 */ @@
-142,7 +145,7 @@ struct subch_mux *e1inp_get_mux(u_int8_t e1_nr,
u_int8_t ts_nr);
/* e1_config.c */
-int e1_config(struct gsm_bts *bts);
+int e1_config(struct gsm_bts *bts, int card, int l2_release);
int ia_config(struct gsm_bts *bts);
int ipaccess_setup(struct e1inp_line *line);
diff -Nur -x '*.Po' -x 'Makefile*' -x '*~' -x '*rej' -x '*.o'
openbsc.orig/include/openbsc/misdn.h openbsc/include/openbsc/misdn.h
--- openbsc.orig/include/openbsc/misdn.h 2009-03-28
11:36:36.000000000 +0100
+++ openbsc/include/openbsc/misdn.h 2009-04-19 12:48:28.000000000
+0200
@@ -22,7 +22,7 @@
#include "e1_input.h"
-int mi_setup(int cardnr, struct e1inp_line *line);
+int mi_setup(int cardnr, struct e1inp_line *line, int l2_release);
void mi_set_pcap_fd(int fd);
int _abis_nm_sendmsg(struct msgb *msg);
Hello Matthias,
On Fri, 17 Apr 2009 11:44:06 +0200, "Matthias Wenzel" <bs11(a)mazzoo.de> wrote:
>
> can someone post the pinout of the rs232 LMT cable - db9 on one end, and
> the 8pin header on the bs11 on the other side.
If you look at the BS-11 interface (Antenne connectors top), its the
upper 8-pin connector:
The four E1 BNC connectors are above here.
(Rx) x x x x (right pin: Gnd)
(Tx) x x x x (right pin: +5V)
|
+ LMT
You just need a three wire connection (Gnd, Rx, Tx). Tx/Rx is from
the BS-11 side, so Tx (the lower pin) has to be connected to Rx of
the PC. The levels are standard RS-232 level, to be sure just measure
the Tx pin, it has a high voltage (ca. +/- 9 Volt).
And if someone want to play with the other ports, here is how
they are connected:
The four E1 BNC connectors are above here.
(Rx) x x x x (right pin: Gnd)
(Tx) x x x x (right pin: +5V)
1 2 3
1: ?
2: LMT
3: (no COM Port, dont't connect to RS232)
(Rx) x x x x (right pin: Gnd)
(Tx) x x x x (right pin: +5V)
1 2 3
1: TRX0 L1LAPDmProc
2: TRX0 L3Proc (pwd: L3Proc)
3: TRX0 OEM_Proc (pwd: LAPDOM)
(Rx) x x x x (right pin: Gnd)
(Tx) x x x x (right pin: +5V)
1 2 3
1: TRX1 L1LAPDmProc
2: TRX1 L3Proc (pwd: L3Proc)
3: TRX1 OEM_Proc (pwd: LAPDOM)
When you boot, and the firmware is not yet loaded, you get
a prompt and can see a menu. There is a password protected
menu, the password is above ("pwd:"). The baud rate is 9600 8n1
(except LMT: 19200 8n1).
When the firmware is loaded those menus are no longer there
(they are commands in the boot ROM), however if you type
"qwertyuiop" (without the quotes, there is no echo) you can
enter debug commands in the firmware. Some menus ask for a
password, however its empty (just hit return).
I have not found really usefull things, but if someone wants
to play, feel free to do so and of course post the results if
you find something usefull.
Disclaimer: Nothing of the above comes from the NDA documentation,
its not even mentioned there. All of the above was discovered by
having a close look.
Best regards,
Dieter
--
Dieter Spaar, Germany spaar(a)mirider.augusta.de
Hello Andreas,
On Fri, 17 Apr 2009 12:45:50 +0200, "Andreas.Eversberg" <Andreas.Eversberg(a)versatel.de> wrote:
> if you need clock signals, you can use the C4IO clock line of the ISDN
> cards. they clock 4096khz. you can use them to transfer clock from one
> card to another or to mesure the clock. the E1 card has this clock on
> one pin of the PCM connector. (see data sheet) the C4IO is also
> available on the HFC-PCI single port card. with an oscilloscope you can
> compare.
>
> in order to retieve the clock from E1 interface in NT-mode, you need to:
>
> modprobe hfcmulti port=0x200 debug=0x40000
>
> watch the dmesg about init process of controller. this will override the
> default behavior: provide clock to the NT interface.
>
> i would suggest to use a resistor of 1K to protect the e1 card. the
> signal must not look good, we just need the shift of both signals.
Thanks for this tip. I already though about the E1 clock, but its
below the 10 MHz limit of the HP8922. I think I have to build a
simple frequency counter (I don't have one) and use the reference
clock of the HP8922. BTW, there is also a GSM frame pulse available
at one of the connectors (one of the J01 pins, I have to look
it up).
OK, maybe a simple frequency counter is a good reason to finally do
something usefull with my FPGA boards ;-)
Best regards,
Dieter
--
Dieter Spaar, Germany spaar(a)mirider.augusta.de
Hello Andreas,
On Fri, 17 Apr 2009 12:05:16 +0200, "Andreas.Eversberg" <Andreas.Eversberg(a)versatel.de> wrote:
> i tested external clock from isdn line yesterday. modern phones, like
> the i-phone will not register to the base station. (tested it yesterday
> together with other phones). no packet is received by openbsc. so i set
> the clock to "locked" and retrieved the clock from my isdn line (layer 1
> up). it did not help at all. the phone found the base station id while
> scanning for networks, but the registration did not work.
>
> is it possible that the provisioning (during startup) is faulty?
If I remeber, several iPhones registered to the BS-11 during
25C3. So it should work (however I cannot test it here, but
feel free to send my an iPhone for playing ;-)
Do you see the test network with the iPhone or does the
registration not work ?
Have you tried to use the SIM card from a phone which has
already registered to the test network ? This way the iPhone
would look at the BS-11 first before trying to search for other
netwoks.
Best regards,
Dieter
--
Dieter Spaar, Germany spaar(a)mirider.augusta.de
just find pin 118 of the E1 controller on the pcm bus (connector) and compare the clock (4096khz) with pin 54 on the HFC-S PCI ISDN controller. use an oscilloscope and sync it to ISDN interface. one pin higher (on both controllers) you will find 8khz frame clock signal.
if the clock differs by 1ppm, the phase of both signals cycles about four times a second. for rough calibration, i would suggest the 8khz signal. it will take 125 seconds for a full phase shift at 1ppm clock skew.
-----Ursprüngliche Nachricht-----
Von: Dieter Spaar [mailto:spaar@mirider.augusta.de]
Gesendet: Freitag, 17. April 2009 15:03
An: Andreas.Eversberg
Cc: openbsc(a)lists.gnumonks.org
Betreff: Re: AW: BS-11 PLL clock source / calibration
Hello Andreas,
On Fri, 17 Apr 2009 12:45:50 +0200, "Andreas.Eversberg" <Andreas.Eversberg(a)versatel.de> wrote:
> if you need clock signals, you can use the C4IO clock line of the ISDN
> cards. they clock 4096khz. you can use them to transfer clock from one
> card to another or to mesure the clock. the E1 card has this clock on
> one pin of the PCM connector. (see data sheet) the C4IO is also
> available on the HFC-PCI single port card. with an oscilloscope you can
> compare.
>
> in order to retieve the clock from E1 interface in NT-mode, you need to:
>
> modprobe hfcmulti port=0x200 debug=0x40000
>
> watch the dmesg about init process of controller. this will override the
> default behavior: provide clock to the NT interface.
>
> i would suggest to use a resistor of 1K to protect the e1 card. the
> signal must not look good, we just need the shift of both signals.
Thanks for this tip. I already though about the E1 clock, but its
below the 10 MHz limit of the HP8922. I think I have to build a
simple frequency counter (I don't have one) and use the reference
clock of the HP8922. BTW, there is also a GSM frame pulse available
at one of the connectors (one of the J01 pins, I have to look
it up).
OK, maybe a simple frequency counter is a good reason to finally do
something usefull with my FPGA boards ;-)
Best regards,
Dieter
--
Dieter Spaar, Germany spaar(a)mirider.augusta.de
the registration did not work, the network was found.
i did not test the sim card. i will do this in the future.
-----Ursprüngliche Nachricht-----
Von: Dieter Spaar [mailto:spaar@mirider.augusta.de]
Gesendet: Freitag, 17. April 2009 14:54
An: Andreas.Eversberg
Cc: openbsc(a)lists.gnumonks.org
Betreff: Re: AW: BS-11 PLL clock source / calibration
Hello Andreas,
On Fri, 17 Apr 2009 12:05:16 +0200, "Andreas.Eversberg" <Andreas.Eversberg(a)versatel.de> wrote:
> i tested external clock from isdn line yesterday. modern phones, like
> the i-phone will not register to the base station. (tested it yesterday
> together with other phones). no packet is received by openbsc. so i set
> the clock to "locked" and retrieved the clock from my isdn line (layer 1
> up). it did not help at all. the phone found the base station id while
> scanning for networks, but the registration did not work.
>
> is it possible that the provisioning (during startup) is faulty?
If I remeber, several iPhones registered to the BS-11 during
25C3. So it should work (however I cannot test it here, but
feel free to send my an iPhone for playing ;-)
Do you see the test network with the iPhone or does the
registration not work ?
Have you tried to use the SIM card from a phone which has
already registered to the test network ? This way the iPhone
would look at the BS-11 first before trying to search for other
netwoks.
Best regards,
Dieter
--
Dieter Spaar, Germany spaar(a)mirider.augusta.de
if you need clock signals, you can use the C4IO clock line of the ISDN cards. they clock 4096khz. you can use them to transfer clock from one card to another or to mesure the clock. the E1 card has this clock on one pin of the PCM connector. (see data sheet) the C4IO is also available on the HFC-PCI single port card. with an oscilloscope you can compare.
in order to retieve the clock from E1 interface in NT-mode, you need to:
modprobe hfcmulti port=0x200 debug=0x40000
watch the dmesg about init process of controller. this will override the default behavior: provide clock to the NT interface.
i would suggest to use a resistor of 1K to protect the e1 card. the signal must not look good, we just need the shift of both signals.
-----Ursprüngliche Nachricht-----
Von: openbsc-bounces(a)lists.gnumonks.org [mailto:openbsc-bounces@lists.gnumonks.org] Im Auftrag von Dieter Spaar
Gesendet: Freitag, 17. April 2009 14:25
An: Harald Welte
Cc: openbsc(a)lists.gnumonks.org
Betreff: Re: BS-11 PLL clock source / calibration
Hello Harald,
On Fri, 17 Apr 2009 10:17:13 +0200, "Harald Welte" <laforge(a)gnumonks.org> wrote:
>
> Dieter, what I just found out is that the LI object has a user-configurable
> setting, where we can force it to be stand alone or locked to the E1.
You mean the "PLL synchonisation mode" attribute which is set to
"locked mode" ? I am not sure if we can change it for our version
of the BS-11. As far as I understand the documentation, this is
a setting which is only available with the CCU ("Combo Card Unit", the
universal interface which also allows to use a standard ISDN line).
The documentation mentions at one place that for the CCU variant
they use an oven controlled oscillator which fulfilles the GSM
clock stability requirements even without being snchronized to
the E1 line.
But we should of course try it.
> We could add this setting to the bs11_config program so people can try
> if their E1 clock or their [10 years uncalibrated] BS11 internal oscillator
> is better.
>
> What do you think?
Yes, why not try it. Probably the result is similar to disabling
the master clock of the HFC-E1 card, this way the BS-11 clock
determines the E1 clock (the HFC-E1 card synchronizes to the
trasmitter E1 clock of the BS-11 and the BS-11 locks to the
transmitter clock of the HFC-E1 which is determined by the BS-11).
Surely the cleaner way is to adjust the clock setting in the BS-11
(if this settings works for our BS-11 variant).
> I'm quite sure there must be an option to do this externally. The internal
> oscillator must be calibrated every two years, and I'm sure they do this
> without opening the case (in the field...)
Its possible to calibrate the PLL without opening the case. The attribute
is protected by some checksum, I have not looked at the details. And
"officially" out LMT version should not even allow to see the calibration
dialog ;-) The problem for me is how to measure the clock without opening
the case. I can measure an unmodulated carrier very accurate if it is
within the 10 MHz to 1 GHz range (the HP 8922 is accurate enough to do
this). However I don't have the equippment to measure the modulated and
pulsed signal of the BS-11. Maybe there is some hidden setting to send
just the unmodulated carrier, but I have not yet found anything in this
direction.
Another problem is that changing the calibration requires a restart of
the BS-11 (at least I only saw any effect when I restarted). Additionally
when you query the calibration, you get the "PLL Set Value" and the
"PLL Work Value", the "Set Value" seems to be used when starting up
and the "Work Value" changes, most certainly locking to an external
clock also influences it. I did not find anything in the documentation,
actually those settings are not indended for the end user, just the
factory.
Best regards,
Dieter
--
Dieter Spaar, Germany spaar(a)mirider.augusta.de
i tested external clock from isdn line yesterday. modern phones, like the i-phone will not register to the base station. (tested it yesterday together with other phones). no packet is received by openbsc. so i set the clock to "locked" and retrieved the clock from my isdn line (layer 1 up). it did not help at all. the phone found the base station id while scanning for networks, but the registration did not work.
is it possible that the provisioning (during startup) is faulty?
-----Ursprüngliche Nachricht-----
Von: openbsc-bounces(a)lists.gnumonks.org [mailto:openbsc-bounces@lists.gnumonks.org] Im Auftrag von Harald Welte
Gesendet: Freitag, 17. April 2009 10:17
An: Dieter Spaar
Cc: openbsc(a)lists.gnumonks.org
Betreff: BS-11 PLL clock source / calibration
On Wed, Apr 08, 2009 at 07:44:02PM +0200, Dieter Spaar wrote:
> The BS-11 takes the clock from the E1 line as reference. So you somehow
> have to make sure that this clock is stable and accurate. If you don't
> use another ISDN line, you have to generate a stable and accurate clock
> for the E1 card yourself.
Dieter, what I just found out is that the LI object has a user-configurable
setting, where we can force it to be stand alone or locked to the E1.
We could add this setting to the bs11_config program so people can try
if their E1 clock or their [10 years uncalibrated] BS11 internal oscillator
is better.
What do you think?
> Another approach might be to calibrate the BS-11 internal oscillator,
> this can be done by software. However it is not yet sure if this will
> solve the problem in a reliable way, also I have not yet found a way
> to measure the BS-11 clock without opening the case.
I'm quite sure there must be an option to do this externally. The internal
oscillator must be calibrated every two years, and I'm sure they do this
without opening the case (in the field...)
Regards,
--
- 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)
Hello Marcel,
On Wed, 08 Apr 2009 19:14:36 +0200, "Marcel Klein" <marcel(a)koeln.ccc.de> wrote:
>
> Hm wouldn't it be possible to sync our clock with the official networks
> (without an extra ISDN-line)? Somebody told me that there are several
> ways to sync the clock. Here we discussed the ISDN way, but somebody
> told me that it should also be possible to set the clock over GPS and/or
> other networks in our area.
The BS-11 takes the clock from the E1 line as reference. So you somehow
have to make sure that this clock is stable and accurate. If you don't
use another ISDN line, you have to generate a stable and accurate clock
for the E1 card yourself.
Another approach might be to calibrate the BS-11 internal oscillator,
this can be done by software. However it is not yet sure if this will
solve the problem in a reliable way, also I have not yet found a way
to measure the BS-11 clock without opening the case.
If you want to experiment with your test network only it should not
care, beside some additional effort to initially register to the
network, the BS-11 clock is most certainly stable enough so that
a phone can stay synchronized to the BS-11 network and that it can
be used with this network.
Best regards,
Dieter
--
Dieter Spaar, Germany spaar(a)mirider.augusta.de
i will work on several parts parallel, but i will provide a seperat patch for every part of course. the biggest (signalling) thing is the state machine + information elements + call control. i cannot split this into serveral patches.
for me "call handling" is the application ontop of OpenBSC. there must be an API to use OpenBSC in other applications. currently the "application" in OpenBSC just takes an incomming call, does a data base lookup, and sends "SETUP" message. also it forwards messages like "ALTERING" or "CONNECT". this must be replaced by a different application in order to terminate calls instead of forwarding them.
the interface, i like to introduce, will use primitives which are specified in GSM 04 07. they begin with MNCC_xxx_yyy, where xxx is the primitive type and yyy the info about request/acknowlede and direction info:
example: MNCC_SETUP_IND indicates a setup from the remote (requested by mobile, sent to us)
i like to use a structure for every message type with its information elements: (example)
struct MNCC_setup *setup = (struct MNCC_setup *arg) // arg depends on the message type
if (setup->emergency)
printf("emergency call\n");
else
printf("dialed number is %s, and type is %d\n", setup->called, setup->called_type);
....
i will parse/create all information elements, even if not needed by built-in "call handling" or by my application. messages to the layer 3 will use a send message. (mncc_send(struct gsm_call *call, int prim, void *arg)) messages from layer 3 will use a call back function with similar parameters. this callback function pointer will point towards selected application. a special function for "allocating" the call will also be provided. this is required for application to find a free call structure.
my goal is to make the API close to the GSM specs. also if someone has better idea for API interface, please let me know.
-----Ursprüngliche Nachricht-----
Von: openbsc-bounces(a)lists.gnumonks.org [mailto:openbsc-bounces@lists.gnumonks.org] Im Auftrag von Holger Freyther
Gesendet: Donnerstag, 16. April 2009 12:30
An: openbsc(a)lists.gnumonks.org
Betreff: Re: success
On Tuesday 14 April 2009 13:10:36 Andreas.Eversberg wrote:
> - remove all call/subscriber handling from layer 3 and put it into a
> seperat file (layer 4 call control). it will then be possible to
> initialize libbsc without the built-in call control and database, to use
> it for other applications like asterisk and linux-call-router.
my two cents on this.
call handling:
I think whatever we have/put into OpenBSC should be fully spec
compliant. I don't see the reason to allow to use an entire different
implementation of the call handling. I totally agree that policies
(e.g. which state to enter after ...) should be fully controllable on
the app layer.
> the estimated time for this will be about 2-3 months. the result will be
> a complete BSC+MSC with routing and PBX features and asterisk interface.
> i will provide a patch en-block, because i work on all parts at the same
> time.
hmm a patch accumulating 2-3 months of work? that will be pretty hard for
everyone to review or even change direction early on...
here is the layout of bchannel 2:
44332211
the bits for timeslot 1 (the right two) are not used, because we use this for signalling
the bits for timeslot 2 are also not used, when i do a phone call.
the bits for timeslot 3 and 4 are used when i do a call from mobile to mobile.
a second call will use timeslot 5 and 6. all audio works.
if a call would use timeslot 2 and 3, you would not notice that the channels are in reverse order. because the first timeslot used for audio is always 3 and the second is 4, i must select the right order.
-----Ursprüngliche Nachricht-----
Von: Harald Welte [mailto:laforge@gnumonks.org]
Gesendet: Mittwoch, 15. April 2009 23:27
An: Andreas.Eversberg
Cc: openbsc(a)lists.gnumonks.org
Betreff: Re: AW: success
On Wed, Apr 15, 2009 at 01:46:19AM +0200, Andreas.Eversberg wrote:
> did harald change the bit order on the controller? there is a flag for that.
> you can patch the hfcmulti.c. maybe harald did that but forgot to put it into
> the kernel patch. i will also provide patch to openbsc to automatically
> consider that bit order in conjunction with misdn interface.
I did not make any such change. Which brings up the question: Why is it
working for me, nibbler, zecke, ... ? Probably really just coincidence, after
all there are only four subslots in one slot, and we're typically using two of
them, so the chances we end up using the right bits might be quite big, right?
--
- 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,
on the easterhegg 2009 we got everything running. even audio worked! and
we catched our first imsi from a public network.
the following things must be changed in the software:
- sending time slot 1 frames requires a queue and a timer, rather than
using "usleep()". sleeping causes loss of audio and signalling
informations. (i work on that)
- subslots are in reverse order: slot 2 (0..3) must have mask 00110000
and not 00001100. this causes no audio.
- both time slots (2 and 3) must be configured, or unitialized pointers
cause a crash.
- data link is available since DL_ESTABLISH_IND is received and not
MPH_*.
- in order to release layer 2 and unload the driver after stopping of
bsc_hack, a special ioctl must be given after opening socket.
- some little extras: changing card number and "location area code" by
additional arguments.
@harald | @dieter: other isdn drivers (windows) have obviously reversed
bit order on transparent channel. bit 0 is exchanged with bit 7 and so
on. to make it work, i did not change the bit order, i just changed the
location of the subslot, and it worked.
i would like to provide a patch for the solutions above. i will see, if
i can do that this weekend.
furthermore i like to improve the libbsc:
- provide a real state machine to the layer 3 with timers. make calls
setup and release cleanly.
- support transcoding of all information elements.
- remove all call/subscriber handling from layer 3 and put it into a
seperat file (layer 4 call control). it will then be possible to
initialize libbsc without the built-in call control and database, to use
it for other applications like asterisk and linux-call-router.
- add application interface to traffic channels for transcoding and
switching.
- add support for libbsc to linux-call-router.
the estimated time for this will be about 2-3 months. the result will be
a complete BSC+MSC with routing and PBX features and asterisk interface.
i will provide a patch en-block, because i work on all parts at the same
time.
greetinx,
andreas
do we need a switch to select between mISDN bit order and other e1 drivers? what other e1 drivers are/will be supported? or can i just change the bit order, because no other e1 driver is used with the code? if not, i would suggest to add a "msb" flag to the time slot structure.
i was thinking of having a flag for using hardware multiplexing on hfc-e1 controller, but because the data is not synchronized (hdlc frames), we need to touch every bit to see where the frame starts and where it ends, so we have no speed benefit.
to make a better processing in kernel space, i need to put the gsm speech codec into kernel space. i need a source code that is open, light weight, and without integer math. any suggestions?
-----Ursprüngliche Nachricht-----
Von: Dieter Spaar [mailto:spaar@mirider.augusta.de]
Gesendet: Dienstag, 14. April 2009 16:26
An: Andreas.Eversberg
Cc: openbsc(a)lists.gnumonks.org
Betreff: Re: success
Hello Andreas,
On Tue, 14 Apr 2009 13:10:36 +0200, "Andreas.Eversberg" <Andreas.Eversberg(a)versatel.de> wrote:
>
> on the easterhegg 2009 we got everything running. even audio worked! and
> we catched our first imsi from a public network.
Congratulation, great to hear that !
> @harald | @dieter: other isdn drivers (windows) have obviously reversed
> bit order on transparent channel. bit 0 is exchanged with bit 7 and so
> on. to make it work, i did not change the bit order, i just changed the
> location of the subslot, and it worked.
I noticed the same with my own Windows driver (its not an official driver,
just my personal very experimental stuff for the HFC-E1 card). However
because it worked with the Linux version (at least on Haralds PC) I though
it was a problem with my implementation and did not take care.
Best regards,
Dieter
--
Dieter Spaar, Germany spaar(a)mirider.augusta.de
did harald change the bit order on the controller? there is a flag for that. you can patch the hfcmulti.c. maybe harald did that but forgot to put it into the kernel patch. i will also provide patch to openbsc to automatically consider that bit order in conjunction with misdn interface.
-----Ursprüngliche Nachricht-----
Von: Dieter Spaar [mailto:spaar@mirider.augusta.de]
Gesendet: Dienstag, 14. April 2009 19:27
An: Andreas.Eversberg
Cc: openbsc(a)lists.gnumonks.org
Betreff: Re: AW: success
Hello Andreas,
On Tue, 14 Apr 2009 16:54:40 +0200, "Andreas.Eversberg" <Andreas.Eversberg(a)versatel.de> wrote:
> do we need a switch to select between mISDN bit order and other e1
> drivers? what other e1 drivers are/will be supported? or can i just
> change the bit order, because no other e1 driver is used with the code?
> if not, i would suggest to add a "msb" flag to the time slot structure.
I can only talk for my "personal" Windows driver, for me the changed
bit order works. I just wonder why mISDN and the HFC-E1 works different
on Haralds PC than on others.
> to make a better processing in kernel space, i need to put the gsm
> speech codec into kernel space. i need a source code that is open, light
> weight, and without integer math. any suggestions?
For a Full Rate Codec (should work too, however OpenBSC has to
modified so that "Full Rate" is used by the phones too) you can
use Toast (http://kbs.cs.tu-berlin.de/~jutta/toast.html).
Best regards,
Dieter
--
Dieter Spaar, Germany spaar(a)mirider.augusta.de
Hello Andreas,
On Tue, 14 Apr 2009 16:54:40 +0200, "Andreas.Eversberg" <Andreas.Eversberg(a)versatel.de> wrote:
> do we need a switch to select between mISDN bit order and other e1
> drivers? what other e1 drivers are/will be supported? or can i just
> change the bit order, because no other e1 driver is used with the code?
> if not, i would suggest to add a "msb" flag to the time slot structure.
I can only talk for my "personal" Windows driver, for me the changed
bit order works. I just wonder why mISDN and the HFC-E1 works different
on Haralds PC than on others.
> to make a better processing in kernel space, i need to put the gsm
> speech codec into kernel space. i need a source code that is open, light
> weight, and without integer math. any suggestions?
For a Full Rate Codec (should work too, however OpenBSC has to
modified so that "Full Rate" is used by the phones too) you can
use Toast (http://kbs.cs.tu-berlin.de/~jutta/toast.html).
Best regards,
Dieter
--
Dieter Spaar, Germany spaar(a)mirider.augusta.de
Hello Andreas,
On Tue, 14 Apr 2009 13:10:36 +0200, "Andreas.Eversberg" <Andreas.Eversberg(a)versatel.de> wrote:
>
> on the easterhegg 2009 we got everything running. even audio worked! and
> we catched our first imsi from a public network.
Congratulation, great to hear that !
> @harald | @dieter: other isdn drivers (windows) have obviously reversed
> bit order on transparent channel. bit 0 is exchanged with bit 7 and so
> on. to make it work, i did not change the bit order, i just changed the
> location of the subslot, and it worked.
I noticed the same with my own Windows driver (its not an official driver,
just my personal very experimental stuff for the HFC-E1 card). However
because it worked with the Linux version (at least on Haralds PC) I though
it was a problem with my implementation and did not take care.
Best regards,
Dieter
--
Dieter Spaar, Germany spaar(a)mirider.augusta.de
Hi,
I'm starting a new thread because it's a new topic... ;)
Harald Welte wrote:
> it has all been implemented quite some time ago. Used to work fine
> here, though I haven't tested it since about one month ago. We can
> have multiple concurrent voice calls between two handsets, as soon as
> you have the IMSI provisioned with an extension in the database,
> i.e.
> UPDATE subscriber set extension=1001 where id=1;
> UPDATE subscriber set extension=1002 where id=2;
> and then you can call 1002 from the handset with id1 and vice-versa.
assigning extensions to connected cell phones works fine and I tried
calling. The other phone rings and I can take the call but voice
transmission doesn't seem to work (I don't know if it's supposed to work
yet. :D).
---
<0002> gsm_04_08.c:1175 A -> CONNECT
<0002> gsm_04_08.c:1141 Setting up TCH map between (bts=0,trx=0,ts=0)
and (bts=0,trx=0,ts=6)
<0002> trau_mux.c:52 Setting up TRAU mux map between (e1=0,ts=1,ss=255)
and (e1=0,ts=3,ss=2)
<0002> gsm_04_08.c:1184 A <- CONNECT ACK
<0002> gsm_04_08.c:1191 B <- CONNECT
<0001> abis_rsl.c:931 channel=(bts=0,trx=0,ts=6) chan_nr=0x0e DATA
INDICATION
<0002> gsm_04_08.c:1288 -> CONNECT_ACK (state->ACTIVE)
<0010> abis_rsl.c:687 channel=(bts=0,trx=0,ts=3) chan_nr=0x0b CONNECTION
FAIL: CAUSE: 18 01 0b IGNORING
<0010> abis_rsl.c:687 channel=(bts=0,trx=0,ts=4) chan_nr=0x0c CONNECTION
FAIL: CAUSE: 18 01 0c IGNORING
<0010> abis_rsl.c:687 channel=(bts=0,trx=0,ts=2) chan_nr=0x0a CONNECTION
FAIL: CAUSE: 18 01 0a IGNORING
<0010> abis_rsl.c:687 channel=(bts=0,trx=0,ts=5) chan_nr=0x0d CONNECTION
FAIL: CAUSE: 18 01 0d IGNORING
<0010> abis_rsl.c:687 channel=(bts=0,trx=0,ts=3) chan_nr=0x0b CONNECTION
FAIL: CAUSE: 18 01 0b IGNORING
<0010> abis_rsl.c:687 channel=(bts=0,trx=0,ts=4) chan_nr=0x0c CONNECTION
FAIL: CAUSE: 18 01 0c IGNORING
<0010> abis_rsl.c:687 channel=(bts=0,trx=0,ts=2) chan_nr=0x0a CONNECTION
FAIL: CAUSE: 18 01 0a IGNORING
<0010> abis_rsl.c:687 channel=(bts=0,trx=0,ts=5) chan_nr=0x0d CONNECTION
FAIL: CAUSE: 18 01 0d IGNORING
<0010> abis_rsl.c:687 channel=(bts=0,trx=0,ts=3) chan_nr=0x0b CONNECTION
FAIL: CAUSE: 18 01 0b IGNORING
<0010> abis_rsl.c:687 channel=(bts=0,trx=0,ts=4) chan_nr=0x0c CONNECTION
FAIL: CAUSE: 18 01 0c IGNORING
<0001> abis_rsl.c:931 channel=(bts=0,trx=0,ts=0) chan_nr=0x20 DATA
INDICATION
<0002> gsm_04_08.c:1203 A -> DISCONNECT (state->RELEASE_REQ)
<0002> gsm_04_08.c:1208 A <- RELEASE
<0002> gsm_04_08.c:1216 B <- DISCONNECT
<0001> abis_rsl.c:931 channel=(bts=0,trx=0,ts=6) chan_nr=0x0e DATA
INDICATION
<0002> gsm_04_08.c:1291 -> RELEASE
<0002> gsm_04_08.c:1292 <- RELEASE_COMPLETE
<0010> abis_rsl.c:687 channel=(bts=0,trx=0,ts=2) chan_nr=0x0a CONNECTION
FAIL: CAUSE: 18 01 0a IGNORING
<0001> abis_rsl.c:931 channel=(bts=0,trx=0,ts=0) chan_nr=0x20 DATA
INDICATION
<0002> gsm_04_08.c:1276 -> RELEASE COMPLETE (state->NULL)
<0010> abis_rsl.c:687 channel=(bts=0,trx=0,ts=6) chan_nr=0x0e CONNECTION
FAIL: CAUSE: 18 01 0e IGNORING
<0008> gsm_04_08.c:961 Sending Channel Release: Chan: Number: 0 Type: 2
<0001> chan_alloc.c:225 Recycling the channel with: 0 (0)
<0010> abis_rsl.c:518 Channel Release CMD channel=(bts=0,trx=0,ts=6)
chan_nr=0x0e
---
kenny_
hi harald,
that sounds good. i will try this in hamburg on easterhegg, starting friday.
also i started coding on gsm_04_08.c file. i like to implement a real state machine and like to extract the call handling (application) from the signalling part (protocol). this way libbsc can be used to terminate calls to applications rather than just forwarding them.
here is my idea: we must define an API for applications to communicate with libbsc. i would suggest a structure with "message type", "call reference" and all informations like "calling party number". if the informations are not used, like "calling party number" in the "ALERTING" message, they are ignored:
struct high_level_structure_type_name {
int message;
int callref;
u_char imei[..];
u_char imsi[..];
u_char tmsi[..];
u_char dialing[..];
u_char calling_pn[..];
int notify_ind;
....
};
i would use a special message "NEW" for creating a new callref. after the instance (call) is released and freed, a special message "FREE" could be used. an example:
send NEW -> returns callref (or error)
send SETUP (callref, imei)
recv PROCEEDING (callref)
recv ALERTING (callref)
recv CONNECT (callref)
recv DISCONNECT (callref, cause)
send RELEASE (callref)
recv FREE (callref)
paging, timers, release_complete, ... is handled by gsm_04_08.c, data base, numbering plan, call control is done by extracted application file. (let me call it callcontrol.c.)
the current application for call forwarding would be removed and put in a seperat file or even out of it and make it part of bsc_hack.
what do you think?
regards,
andreas
-----Ursprüngliche Nachricht-----
Von: Harald Welte [mailto:laforge@gnumonks.org]
Gesendet: Mittwoch, 8. April 2009 11:27
An: Andreas.Eversberg
Cc: openbsc(a)lists.gnumonks.org
Betreff: Re: Solved: BS-11 runs, but no Network on my Mobile
On Tue, Apr 07, 2009 at 04:11:05PM +0200, Andreas.Eversberg wrote:
> hi,
>
> everything works now, even without external (accurat) clock from telephone network.
>
> the problem was the driver for some reason. with the latest GIT commit it works every time i startup the base or the software. (until now)
>
> now comes the next part. what has to be done in order to terminate calls or
> make calls between mobiles?
it has all been implemented quite some time ago. Used to work fine here, though
I haven't tested it since about one month ago. We can have multiple concurrent
voice calls between two handsets, as soon as you have the IMSI provisioned with
an extension in the database, i.e.
UPDATE subscriber set extension=1001 where id=1;
UPDATE subscriber set extension=1002 where id=2;
and then you can call 1002 from the handset with id1 and vice-versa.
regards.
--
- 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)
Hello Marcel,
On Wed, 08 Apr 2009 18:19:20 +0200, "Marcel Klein" <marcel(a)koeln.ccc.de> wrote:
>
> Okay now I have access to some more cell phones. But still the same
> issue even with a Nokia 3330 and Nokia 6210.
>
> Sony Ericson k800i (no branding) - doesn't find the network most of the
> time or rather takes very long (when I'm lucky). Only one network in
> list when it manages to find my network. (Just happened once that
> everything was correct).
>
> Nokia 3330 and 6210 - Finds the network quick or just needs to be
> rebooted. Only one network in list.
>
> Siemens S45 - Network not found (yet)
>
> I already tried several networks that really exist but without success.
> ARFCN is free and stable - I checked this with a radio.
I am rather sure this is an issue with the BS-11 clock. It requires a
very accurate and stable clock for GSM (in my tests with just one
phone a BTS clock detuned by about 1 ppm causes the phone to no longer
see both test network and official network). There are most certainly
differences between the phones too in regards to how much inaccuracy
they tolerate.
You can make a test to see if it is a problem with the clock: take a SIM
card from a phone which is registered (location updated has been done)
to the BS-11 network and put it in a phone which did not find the
BS-11 network. Now the phone should be able to see the BS-11 network
when powered on because it immediately listens on the ARFCN of the
BS-11 and does not register (and synchronize its clock) to an
official network first. However it most certainly will no longer
find the official networks.
Best regards,
Dieter
--
Dieter Spaar, Germany spaar(a)mirider.augusta.de
Hello Marcel,
On Wed, 01 Apr 2009 15:52:21 +0200, "Marcel Klein" <marcel(a)koeln.ccc.de> wrote:
>
> Some phones can find the "001 01" network directly but most of the time
> it takes around an hour until some phones start to notice it (or they
> never do). I tried restarting bsc_hack several times, changed the
> ARFCN, MNC and MCC but without success. Even restarting the phone
> doesn't always help.
>
> So far everything seems to work fine, bsc_hack shows no warnings, I see
> lots of RXs when I use the debug option, and Abis-Link is up.
>
> I don't know if this is related but when a phone manages to see my
> network it's not able to see any others. I just see one - my own network.
You mean you can only see the "001 01" network and nothing else ?
Does this happen before or after having registered to the "001 01"
network ?
Something different to try: If finding the "001 01" network takes too
long and changing the ARFCN also does not help (to make sure that
there is no interference) maybe increasing the TRX power changes
the result ? Just try it for a short time (one or two minutes)
and see if that helps. Here at my place (most certainly a rather
"clean" RF environment) I don't have problems to find the "001 01"
network, this works with different phones (old and new ones) and only
takes about 30 seconds doing a "manual search". I can also see all the
other official networks.
Best regards,
Dieter
--
Dieter Spaar, Germany spaar(a)mirider.augusta.de
Hey Harald,
I didn't know your favorite way of getting patches so for now I simply
attached them to this mail. I found some time to continue with channel
management and would like to get feedback if this is running into the right
direction or if you have something else or other ideas.
The reason to not just apply these patches are within the first patch.
Currently we don't serialize the struct gsm_bts so after a restart of the
bsc_hack we would have to force another location updating request...
happy hacking and feedback would be welcomed
z.
Hello guys,
I'm a bit familiar with Linux, but not heavily experienced. Anyway, I
tried to get OpenBNC working but unfortunately with no succes. After
running the commands:
aclocal
autoconf
automake --add-missing
./configure
make
I get after running "make" the following errors:
libbsc.a(db.o)(.text+0x90d): In function `db_sms_mark_sent':
/home/nordin/Downloads/trunk/openbsc/src/db.c:447: undefined reference to `dbi_conn_queryf'
collect2: ld returned 1 exit status
make[1]: *** [bsc_hack] Error 1
make[1]: Leaving directory `/home/nordin/Downloads/trunk/openbsc/src'
make: *** [all-recursive] Error 1
This is the last part of the make output.
Befor this I had the following error running ./configure:
libc6-dev
libdbi-dev
libdbd-sqlite3
Comaplaining that these were missing.
I installed "libdbi-dev" with yum (yum showed me: libdbi-devel.i386, so I thought it's the same)
I than downloaded libdbd-sqlite3 from sourceforge (libdbi-drivers-0.8.3-1 <http://sourceforge.net/project/showfiles.php?group_id=65979&package_id=6377…>) and installed it too.
Finally I downloaded libc6-dev form http://packages.debian.org/search?keywords=libc6-dev, but don't know what to do with it.
Also couldn't find any usefull information on the net, except when using Debian.
I use Linux distro CentOS 4.4 (server edition).
Can you please help me with this?
Thank you very much.
hi,
everything works now, even without external (accurat) clock from telephone network.
the problem was the driver for some reason. with the latest GIT commit it works every time i startup the base or the software. (until now)
now comes the next part. what has to be done in order to terminate calls or make calls between mobiles?
here is the exact way on how to bind (open) mISDN time slots or bchannels: the "dev" field in the sockaddr_mISDN must equal the port number. in case of ony one card installed, it must be set to 0. the "channel" fiels must equal the time slot. because the base station uses time slot 2 and 3 for traffic channels, we must set it to 2 or 3. this is done correctly in misdn.c! is there any problem with getting data from BTS? what is the current state?
best regards,
andreas
-----Ursprüngliche Nachricht-----
Von: openbsc-bounces(a)lists.gnumonks.org [mailto:openbsc-bounces@lists.gnumonks.org] Im Auftrag von Dieter Spaar
Gesendet: Freitag, 3. April 2009 15:08
An: openbsc(a)lists.gnumonks.org
Betreff: Re: WG: BS-11 runs, but no Network on my Mobile
Hello Andreas,
On Fri, 3 Apr 2009 12:27:05 +0200, "Andreas.Eversberg" <Andreas.Eversberg(a)versatel.de> wrote:
>
> so, if this works, i will try to use an hfc-pci single port card
> (cheap) and provide a document on how to link the E1 card to the
> single port card. only two clocks are required, a frame clock and a
> bit clock. with the right settings, both clocks are compatible.
Great idea ! I am definitely interested in the results.
Best regards,
Dieter
--
Dieter Spaar, Germany spaar(a)mirider.augusta.de
i tried different network and country codes (other than '1'). also i tried different ARFCN, like 120 or so.
also note that eary tests showed me the network "01" just once, but at this time i did not get complete provisioning of BS-11 (only 3 channels were configured).
does BS-11 need to react on telephone messages in order to show the network to the phone? or does the phone just receive the BS-11 signalling information in order to display the available network? i don't know if the receiver works.
also i can create BBSIG1 and PA1, but it will not be used by bsc_hack. what do i need to change in order to use the second transponder? maybe this one works.
-----Ursprüngliche Nachricht-----
Von: Dieter Spaar [mailto:spaar@mirider.augusta.de]
Gesendet: Mittwoch, 1. April 2009 15:09
An: Andreas.Eversberg
Cc: openbsc(a)lists.gnumonks.org
Betreff: Re: AW: AW: BS-11 runs, but no Network on my Mobile
Hello Andreas,
On Wed, 1 Apr 2009 12:36:15 +0200, "Andreas.Eversberg" <Andreas.Eversberg(a)versatel.de> wrote:
> the load is correct. i get an error pop-up while starting bsc_hack. this
> is because the LMT seems not to be 100% compatible with the load. with
> an older load i don't get this error pop-up, but it also doesn't work.
> also no alarms show on the LMT after syncing database. i will get the
> exact error message this weekend.
The error message that LMT is not compatible to the firmware version
should be no problem, it just complains about unknown attributes.
Its strange, because you already know that the transmitter
is working, so I wonder why you don't receive something on
the phone. Have you tried a different phone, just to be
sure ? Maybe also using a different ARFCN might help.
Best regards,
Dieter
--
Dieter Spaar, Germany spaar(a)mirider.augusta.de
you can set the clock of BS-11 to internal oscillator. then you
need to set the E1 card into clock slave. (not pcm slave)
modprobe hfcmulti port=0x200 debug=0x40000 # see hfcmulti.h or http://www.linux-call-router.de/download/driver/hfc_multi-dsp-2.0.pdf
and watch the system messages. you can see that the card will get
the clock from the E1 interface and uses it for internal processing.
if you like to get the clock from a different card that is connected
to telephone network, you can connect the clocks, and the driver will
automatically switch to received clock. i will see, if i can provide
instructions on how to connect both clocks. also a small application
must keep layer 1 and layer 2 of the isdn line up all the time.
-----Ursprüngliche Nachricht-----
Von: openbsc-bounces(a)lists.gnumonks.org [mailto:openbsc-bounces@lists.gnumonks.org] Im Auftrag von Dieter Spaar
Gesendet: Samstag, 4. April 2009 20:00
An: openbsc(a)lists.gnumonks.org
Betreff: Re: BS-11 runs, but no Network on my Mobile
Hello,
I did a few more tests to check the BS-11 clock accuracy. I took
a phone which is registered to an official network and tried if
I can see the BS-11 test network doing a manual network search.
As long as the BS-11 oscillator is not locked to the E1 clock,
I can reliable find the test network.
After the BS-11 oscillator has locked to the E1-clock, the test
network is only found every now and then. Here with my BS-11 it
takes about 5 minutes till the oscillator is locked, the attribute
is NM_ATT_BS11_CCLK_ACCURACY, "0" means "high accuracy" (locked),
"1" means "medium accuracy" (free running), "2" most certainly
"low accuracy" (not yet warmed up, I have not verified this
value).
Most certainly the BS-11 oscillator is better than the oscillator
of the E1-card, however I don't know if the calibration is still
OK on all BS-11 units. I have not yet found an easy way to measure
the BS-11 clock (without opening the case), the RF signal is always
modulated and I don't have the equippment to measure the frequency
of the modulated and pulsed RF signal in an accurate way. So this
measurement has to wait.
What you can try is to disconnect the E1 line for about 30 seconds,
this should be enough so that the Abis Link goes down. If you
reconnect, I assume it takes a similar time to lock the oscillator
like it did here. So you have a few minutes to start OpenBSC and
check if you can find the test network.
If this works for most units, a possible workaround is to use the RX
clock for TX on the HFC-E1 card instead of its own oscillator (this
way the BS-11 oscillator determines the E1 clock). I tried that here
already (on Windows), and it seems to work. However I don't know if
mISDN can be configured this way or if it requires a small patch.
Best regards,
Dieter
--
Dieter Spaar, Germany spaar(a)mirider.augusta.de
Hello Andreas,
On Mon, 6 Apr 2009 10:55:14 +0200, "Andreas.Eversberg" <Andreas.Eversberg(a)versatel.de> wrote:
>
> finally it works. i had allot of trouble, because the BTSM was suddenly
> locked. no restart, no object recreation worked. i fixed this by doing a
> software download.
You have LMT, right ? If this happens again, it would be interesting
to know if there is some error message available. LMT has a menu
command (sorry, I don't have the exact name available right now)
which allows to read the errors (I think OpenBSC also receives those
errors when it starts up).
Best regards,
Dieter
--
Dieter Spaar, Germany spaar(a)mirider.augusta.de
finally it works. i had allot of trouble, because the BTSM was suddenly
locked. no restart, no object recreation worked. i fixed this by doing a
software download.
also i updated the mISDN driver, so i don't need the patch anymore. now
it works with the latest GIT commit.
i connected the clock from external isdn line card to the e1 card. but i
think it will also work without line clock.
after call setup from my mobile, i get disconnected, because the number
is not know. this is ok, but i get continuous messages about a time slot
(traffic channel) that cannot be .... (next time i write down the exact
message).
EH09: anyone at easterhegg in hamburg this year? (www.easterhegg.de)
i will bring test server and BS-11.
Hello,
I did a few more tests to check the BS-11 clock accuracy. I took
a phone which is registered to an official network and tried if
I can see the BS-11 test network doing a manual network search.
As long as the BS-11 oscillator is not locked to the E1 clock,
I can reliable find the test network.
After the BS-11 oscillator has locked to the E1-clock, the test
network is only found every now and then. Here with my BS-11 it
takes about 5 minutes till the oscillator is locked, the attribute
is NM_ATT_BS11_CCLK_ACCURACY, "0" means "high accuracy" (locked),
"1" means "medium accuracy" (free running), "2" most certainly
"low accuracy" (not yet warmed up, I have not verified this
value).
Most certainly the BS-11 oscillator is better than the oscillator
of the E1-card, however I don't know if the calibration is still
OK on all BS-11 units. I have not yet found an easy way to measure
the BS-11 clock (without opening the case), the RF signal is always
modulated and I don't have the equippment to measure the frequency
of the modulated and pulsed RF signal in an accurate way. So this
measurement has to wait.
What you can try is to disconnect the E1 line for about 30 seconds,
this should be enough so that the Abis Link goes down. If you
reconnect, I assume it takes a similar time to lock the oscillator
like it did here. So you have a few minutes to start OpenBSC and
check if you can find the test network.
If this works for most units, a possible workaround is to use the RX
clock for TX on the HFC-E1 card instead of its own oscillator (this
way the BS-11 oscillator determines the E1 clock). I tried that here
already (on Windows), and it seems to work. However I don't know if
mISDN can be configured this way or if it requires a small patch.
Best regards,
Dieter
--
Dieter Spaar, Germany spaar(a)mirider.augusta.de
Hello Andreas,
On Fri, 3 Apr 2009 12:27:05 +0200, "Andreas.Eversberg" <Andreas.Eversberg(a)versatel.de> wrote:
>
> so, if this works, i will try to use an hfc-pci single port card (cheap)
> and provide a document on how to link the E1 card to the single port
> card. only two clocks are required, a frame clock and a bit clock. with
> the right settings, both clocks are compatible.
Great idea ! I am definitely interested in the results.
Best regards,
Dieter
--
Dieter Spaar, Germany spaar(a)mirider.augusta.de
i forgot in send it to the list
-----Ursprüngliche Nachricht-----
Von: Andreas.Eversberg
Gesendet: Freitag, 3. April 2009 12:27
An: 'Dieter Spaar'
Betreff: AW: BS-11 runs, but no Network on my Mobile
this is an issue i understand.
here is my idea on testing it: i derrive clock from my t-com isdn line. the line clock is provided by a gps receiver and transferred via telekom's access hardware to my isdn line. because i talk to it PTP, it keeps up layer1. (the line provides coninuous clock signal.) i will connect a 4 port isdn card to it, to get the clock. this card is interlinked to the E1 card, so the clock is provided to that card. by default, the hfc-e1 card will use crystal clock if card is in NT-mode and clock master. in slave configuration, the clock is provided from pcm interface.
i will use an oscilloscope to verify the signal with the received clock on the 4 port isdn card and on the e1 card.
line ---> card 1 ----> e1-card
|
+-> card 2
on my line are two card: both are 4-port isdn cards. the second card provides one clock signal to the oscilloscope, the e1 card provide the second clock signal. so i can proove if the card 1 actually synchronize to the line clock.
so, if this works, i will try to use an hfc-pci single port card (cheap) and provide a document on how to link the E1 card to the single port card. only two clocks are required, a frame clock and a bit clock. with the right settings, both clocks are compatible.
Hello Marcel,
On Thu, 02 Apr 2009 22:33:01 +0200, "Marcel Klein" <marcel(a)koeln.ccc.de> wrote:
>
> Okay, second try didn't work anymore... so the problem still exists. I
> even tried 250mW.
I received an important hint that the problem is most certainly related
to a clock issue.
Some background: The BS-11 synchronizes its internal clock to the
clock of the E1 line. Its does not have a high stability clock which
is needed for GSM. The official networks use a very stable and exact
clock, the requirement for a BTS according to GSM 05.10 is +/-0.05 ppm.
(There was a variant of the BS-11 sold which had a versatile interface
card which can also work with standard ISDN, this variant had an
oven controlled oscillator which can run standalone with the required
stability. But we don't have any of this BS-11 variant).
The phone itself synchronizes its clock from the network it receives.
If the phone searches for networks, the carrier search range is limited
to a certain window, it will only find a network if the carrier falls
inside this window.
Now the problem: If the phone is synchronized to an official network
and searches for other networks, it will only find them if they are
within the search range. No problem for an official network, they use
exact timing. However if the BS-11 network is not within the range,
its network is not found.
When the phone is powered on and not yet synchronized, the search range
window is larger, however the phone starts looking at the ARFCNs first
which it received the last time when it was registered to a network.
So it normally would find an official network first and miss the BS-11
if its is clock is off too far.
To confirm this, I run a test with an HP 8922 GSM tester. It can
simulate a network and also has a tuneable reference. If I start
with a phone registered to an official network, I can only see the
HP 8922 network if the refenrence is with about +/- 1 ppm. The same
is true the other way round, if I start beeing registered to the
HP 8922 network, I can only see the official networks if the reference
is within the above range. I used an older Nokia phone for my tests,
the range may depend on the phone.
If the BS-11 is locked to the E1 clock, its reference is controlled
by the oscillator of the E1 card. ISDN timing requirements are not
very strict, +/- 50 ppm is good enough. I don't have the datasheet
for the oscillator on the HFC-E1 card, probably the clock can
be in the range of +/- 20 ppm.
Two ideas to solve this: Start at a place were no other network
than the BS-11 network can be received (OK, could be difficult ;-).
Or write the information of the BS-11 network to the SIM card
so that the phone starts receiving the BS-11 ARFCN when powerted
on. Basically this information is the cell allocation information
in SYSTEM INFORMATION 2 and have to be written to EF_BCCH on the
SIM card (if you want to change the location update information
on the SIM card so that the phone is already registered in advance,
EF_LOCI has to be modified).
One other thing: I did not notice those problems with the BS-11
yet. This ccould have two reasons: Differences in the oscillator
drift or because I usually turn off the HFC-E1 card if I don't
use OpenBSC. mISND on Linux is constantly running and the
E1 clock is on all the time, here in my configuration (Windows)
I turn off the HFC-E1 chip after running OpenBSC. According to
some documentation it can take up to 30 minutes until the
BS-11 synchronizes to the E1 clock. So maybe the BS-11 oscillator
is better than the oscillator of the E1 card and so the problem
only occurs if the BS-11 is locked to the E1 card ? Just a guess,
but I will try to see if I find an easy way to measure the BS-11
clock.
Best regards,
Dieter
--
Dieter Spaar, Germany spaar(a)mirider.augusta.de
Hello Andreas,
On Wed, 1 Apr 2009 13:44:52 +0200, "Andreas.Eversberg" <Andreas.Eversberg(a)versatel.de> wrote:
>
> does BS-11 need to react on telephone messages in order to show the
> network to the phone? or does the phone just receive the BS-11
> signalling information in order to display the available network? i
> don't know if the receiver works.
To just "see" the network, the phone does not have to send anything
and the BS-11 does not need to receive anything. This is necessary
only when the phone registers to the network (Location Update). However
the Abis link has to be up so that the cell information is sent, if
the Abis link is down, the transmitter is most certainly still sending
(I measured this here, but it was not yet confirmed by others so it
might be wrong) but a phone won't see the network (probably no
system information is sent in this case).
> also i can create BBSIG1 and PA1, but it will not be used by bsc_hack.
> what do i need to change in order to use the second transponder? maybe
> this one works.
I am not sure if OpenBSC already supports the second TRX.
Best regards,
Dieter
--
Dieter Spaar, Germany spaar(a)mirider.augusta.de
hi,
i finally completed the BS-11 setup:
- original kernel 2.6.27.4 the mISDN-patch was for
- bs11 with software load as described in the wiki
- all BS-11 objects created as described
- PA test passed
- LMT shows no alarms (except cabinet-alarm)
- after start of bsc_hack, all 8 channels on the first tansmitter are
provisioned.
- FM receiver clearly receives transmitter on channel 123, where no
other base station is transmitting
but i do not get any other network on my mobile. my mobile just finds:
e-plus, t-mobile, o2, vodafone
any ideas?
thanx in advance
andreas
Hello Andreas,
On Wed, 1 Apr 2009 12:36:15 +0200, "Andreas.Eversberg" <Andreas.Eversberg(a)versatel.de> wrote:
> the load is correct. i get an error pop-up while starting bsc_hack. this
> is because the LMT seems not to be 100% compatible with the load. with
> an older load i don't get this error pop-up, but it also doesn't work.
> also no alarms show on the LMT after syncing database. i will get the
> exact error message this weekend.
The error message that LMT is not compatible to the firmware version
should be no problem, it just complains about unknown attributes.
Its strange, because you already know that the transmitter
is working, so I wonder why you don't receive something on
the phone. Have you tried a different phone, just to be
sure ? Maybe also using a different ARFCN might help.
Best regards,
Dieter
--
Dieter Spaar, Germany spaar(a)mirider.augusta.de