I have some questions:
1) When I start bsc_hack bsc_init.c first establishes OML link and
initializes the bts then it establishes RSL link and bts starts
broadcasting. However, it takes so much time to start the bts. Instead of
this I want to do the following: it establishes OML link at the beginning
and only once, then when i want to start broadcasting it establishes just
the RSL link and bts will start faster since i don't have to wait for OML
link. What should be done for this?
2) If i send one or two word messages from telnet interface it is okay. But
if i send a longer message the phone could't receive the end of the message
correctly(last words may be incomplete). Did any one encounter with this
problem? What is wrong with me?
3) Could I send SMS in which extension of the sender is text not integer.
For example, i want to send an information SMS that this is a test network.
For this purpose i want to send an SMS from 'OpenBSC'. I set the extension
of the first subscriber in database as text and tried to send the SMS but
SMS wasn't delivered. What should i do?
4) Can i add SMS externally to SMS table of database?
Thanks.
Jason
From: Pablo Neira Ayuso <pablo(a)gnumonks.org>
With multiple BTS attached to a single line, we have to call
->line_update() multiple times. I broke this myself while avoiding
that A-bis over IP drivers bind to the socket several times.
To fix this situation, Harald prefers that this case is internally
handled by the ipaccess and hsl drivers by means of the driver_data
field in the e1inp_line structure.
Reported-by: Gus Bourg <gus(a)bourg.net>
---
src/e1_input.c | 4 ----
src/input/hsl.c | 20 ++++++++++++++++++++
src/input/ipaccess.c | 20 ++++++++++++++++++++
3 files changed, 40 insertions(+), 4 deletions(-)
diff --git a/src/e1_input.c b/src/e1_input.c
index a549ba4..ad0778a 100644
--- a/src/e1_input.c
+++ b/src/e1_input.c
@@ -676,10 +676,6 @@ int e1inp_line_update(struct e1inp_line *line)
e1inp_line_get(line);
- /* This line has been already initialized, skip this. */
- if (line->refcnt > 2)
- return 0;
-
if (line->driver && line->ops && line->driver->line_update) {
rc = line->driver->line_update(line);
} else
diff --git a/src/input/hsl.c b/src/input/hsl.c
index dc7532b..60eea17 100644
--- a/src/input/hsl.c
+++ b/src/input/hsl.c
@@ -456,9 +456,29 @@ static int hsl_bts_connect(struct ipa_client_link *link)
return 0;
}
+struct hsl_line {
+ int line_already_initialized;
+};
+
static int hsl_line_update(struct e1inp_line *line)
{
int ret = -ENOENT;
+ struct hsl_line *hl;
+
+ if (!line->driver_data)
+ line->driver_data = talloc_zero(line, struct hsl_line);
+
+ if (!line->driver_data) {
+ LOGP(DLINP, LOGL_NOTICE, "hsl: OOM in line update\n");
+ return -ENOMEM;
+ }
+ hl = line->driver_data;
+
+ /* We only initialize this line once. */
+ if (hl->line_already_initialized)
+ return 0;
+
+ hl->line_already_initialized = 1;
switch(line->ops->cfg.ipa.role) {
case E1INP_LINE_R_BSC:
diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c
index b7391b3..ea04e8d 100644
--- a/src/input/ipaccess.c
+++ b/src/input/ipaccess.c
@@ -813,9 +813,29 @@ static int ipaccess_bts_cb(struct ipa_client_link *link, struct msgb *msg)
return 0;
}
+struct ipaccess_line {
+ int line_already_initialized;
+};
+
static int ipaccess_line_update(struct e1inp_line *line)
{
int ret = -ENOENT;
+ struct ipaccess_line *il;
+
+ if (!line->driver_data)
+ line->driver_data = talloc_zero(line, struct ipaccess_line);
+
+ if (!line->driver_data) {
+ LOGP(DLINP, LOGL_ERROR, "ipaccess: OOM in line update\n");
+ return -ENOMEM;
+ }
+ il = line->driver_data;
+
+ /* We only initialize this line once. */
+ if (il->line_already_initialized)
+ return 0;
+
+ il->line_already_initialized = 1;
switch(line->ops->cfg.ipa.role) {
case E1INP_LINE_R_BSC: {
--
1.7.2.5
Hi
I just tried to use the newest versions of libosmocore, openbsc and lcr.
But i can't configure openbsc (the master branch). It complains about
missing libosmoabis. Where can i find this library? This happens even if
i use the pablo/libosmo-abis branch from libosmocore.
Best regards
Dennis
I've pulled everything fresh from trunk in my quest to get multiple BTS's
working on one E1 card. :) However, I'm seeing a core dump when I start
osmo-nitb in the box now.
A BT is available here:
http://pastebin.com/KAaxt5d3
This is in a configuration where I only have one BTS configured. Though I
get the same issue if I have more than one configured too.
Thanks,
Gus
Hello all,
I'm attempting to connect multiple BTS's to one E1 card. Each BTS is a
single TRX and I'm using a dahdi card plugged into a DCS. The DCS maps the
channels as follows:
Name Src Dest Speed
Type
--------------------------------------------------------------------------------
bscnok1 01.T1E1-A.02.01 01.T1E1-A.03.01 0256k D
FDX
bscnok2 01.T1E1-A.02.05 01.T1E1-A.04.01 0256k D
FDX
bscnok3 01.T1E1-A.01.09 01.T1E1-B.01.01 0256k D
FDX
So essentially:
TS 1,2,3,4 from OpenBSC (T1E1-A-02) are mapped to nok1 1,2,3,4 (T1E1-A-03)
TS 5,6,7,8 from OpenBSC (T1E1-A-02) are mapped to nok2 1,2,3,4 (T1E1-A-04)
TS 9,10,11,12 from OpenBSC (T1E1-A-02) are mapped to nok3 1,2,3,4
(T1E1-B-01)
This all works fine. The BTS operates on TS1,2,3,4 on any of the ports I
have configured. I just swap timeslots in openbsc.cfg from 1,2,3,4 to
5,6,7,8 or 9,10,11,12 and everything is happy.
Where I run into a problem is when I try to actually run multiple BTS's at
once. So I take everything defined in "bts 0" and duplicate it as "bts 1".
I change the time slots for oml, rsl, and traffic channels to match the
appropriate channels for bts 1/2. But when I go to start osmo-nitb I get an
error that it can't open /dev/dahdi/1 because it's already in use. It
appears for some reason that it's attempting to open /dev/dahdi/1 for both
BTS's even though only bts 0 uses /dev/dahdi/1 for OML - bts 1 should use
/dev/dahdi/5 and bts 2 should use /dev/dahdi/9.
My /etc/dahdi/system.conf is defined as:
span=1,1,0,ccs,hdb3,crc4
bchan=2-4,6-8,10-12
dchan=1,5,9
I'm at a loss. Has anyone tried to run multiple BTS's with dahdi on a
single E1 or T1 span? Is there something special I need to specify so that
OpenBSC doesn't grab the first dchan for each BTS?
Thanks,
Gus
_please_ use the mailing list!
On Wed, Aug 24, 2011 at 11:39:53AM -0700, Gus Bourg wrote:
> It looks like e1inp_ts needs to have a member lapd:
>
> input/dahdi.c:471:14: error: ‘struct e1inp_ts’ has no member named ‘lapd’
you are probably using a non-current version of openbsc.git and
libosmo-abis.git
> Problem is that we go into a bootstrap loop:
Well, that should be relatively easy to workaround with a small hack
like a static variable that checks whether the BTS has been
bootstrapped before. That's of course not a proper solution... I
currently don't have time to debug this further, and I am far away from
any of my E1 equipment for testing.
--
- 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)
Dear Group
>
>
>
> I have been for the past few months Following your project very
> closely and have to say how amazed I am at this project. I would love
> to do something like this here in the uk but finding hardware to do it
> is just impossible I would like to get my hands on a Simens BS-11 but
> cant source any. I will continue to watch this project but felt I
> should email you to ask if you know of anywhere that I can purchase
> hardware that able to work with your open bts software if there is any
advice you can give that would be great.
>
Regards Andre
In case we have multiple BTS attached to the same E1 line, the
e1inp_driver::line_update() function will be called multiple times,
and we need to make sure this is handled gracefully.
---
src/input/dahdi.c | 27 ++++++++++++++++++++++++---
1 files changed, 24 insertions(+), 3 deletions(-)
diff --git a/src/input/dahdi.c b/src/input/dahdi.c
index a4dbd03..66bf53f 100644
--- a/src/input/dahdi.c
+++ b/src/input/dahdi.c
@@ -393,6 +393,10 @@ static int dahdi_e1_setup(struct e1inp_line *line)
struct osmo_fd *bfd = &e1i_ts->driver.dahdi.fd;
int dev_nr;
+ /* unregister FD if it was already registered */
+ if (bfd->list.next && bfd->list.next != LLIST_POISON1)
+ osmo_fd_unregister(bfd);
+
/* DAHDI device names/numbers just keep incrementing
* even over multiple boards. So TS1 of the second
* board will be 32 */
@@ -405,10 +409,20 @@ static int dahdi_e1_setup(struct e1inp_line *line)
switch (e1i_ts->type) {
case E1INP_TS_TYPE_NONE:
+ /* close/release LAPD instance, if any */
+ if (e1i_ts->lapd) {
+ lapd_instance_free(e1i_ts->lapd);
+ e1i_ts->lapd = NULL;
+ }
+ if (bfd->fd) {
+ close(bfd->fd);
+ bfd->fd = 0;
+ }
continue;
break;
case E1INP_TS_TYPE_SIGN:
- bfd->fd = open(openstr, O_RDWR | O_NONBLOCK);
+ if (!bfd->fd)
+ bfd->fd = open(openstr, O_RDWR | O_NONBLOCK);
if (bfd->fd == -1) {
fprintf(stderr, "%s could not open %s %s\n",
__func__, openstr, strerror(errno));
@@ -416,10 +430,17 @@ static int dahdi_e1_setup(struct e1inp_line *line)
}
bfd->when = BSC_FD_READ | BSC_FD_EXCEPT;
dahdi_set_bufinfo(bfd->fd, 1);
- e1i_ts->lapd = lapd_instance_alloc(1, dahdi_write_msg, bfd);
+ if (!e1i_ts->lapd)
+ e1i_ts->lapd = lapd_instance_alloc(1, dahdi_write_msg, bfd);
break;
case E1INP_TS_TYPE_TRAU:
- bfd->fd = open(openstr, O_RDWR | O_NONBLOCK);
+ /* close/release LAPD instance, if any */
+ if (e1i_ts->lapd) {
+ lapd_instance_free(e1i_ts->lapd);
+ e1i_ts->lapd = NULL;
+ }
+ if (!bfd->fd)
+ bfd->fd = open(openstr, O_RDWR | O_NONBLOCK);
if (bfd->fd == -1) {
fprintf(stderr, "%s could not open %s %s\n",
__func__, openstr, strerror(errno));
--
1.7.5.4
--oJ71EGRlYNjSvfq7--