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
Hello
Our goal was to send status sms via the vty interface. But all of our
sms were cropped. In contrast sms from one MS to another MS are
displayed correctly (despite the fact, that the text at the database
contains several '@' at the end / the user_data contains several
zero-octets). Therefore i have inspect the code and found several bugs.
The main problem is that the "user_data_len" is not correctly used. As
per GSM 03.40, 9.2.3.16 TP‑User‑Data‑Length (TP‑UDL):
"If the TP‑User‑Data is coded using the GSM 7 bit default alphabet, the
TP‑User‑Data‑Length field gives an integer representation of the number
of septets within the TP‑User‑Data field to follow."
Currently the "user_data_len" contains the number of octets (returned
from gsm_7bit_encode(...) at gsm_utils.c (libosmocore)).
The big problem here is that this information is not unique, e.g.:
1.) 46 non-extension characters + 1 extension character => (46 * 7 bit +
(1 * (2 * 7 bit))) / 8 bit = 42 octets
2.) 47 non-extension characters => (47 * 7 bit) / 8 bit = 41,125 = 42 octets
3.) 48 non-extension characters => (48 * 7 bit) / 8 bit = 42 octects
But the MS has to know the correct "user_data_len" to decode the correct
number of characters.
For this reason i updated the gsm_7bit_encode() function to return the
correct number of septets. However sometimes it is needed to know the
correct number of octets (e.g. at gsm_04_11.c: gsm340_gen_tpdu(...)) =>
i added a function to gsm_utils.c named:
uint8_t get_octet_len(const uint8_t sept_len)
I have also fixed the problem, that the sms are wrongly stored /
displayed on the database. But the solution on the function
*sms_from_result(...) (at db.c) is not really "beautiful". This is
because there exists no "user_data_len" field at the database. To store
the right value for "user_data_len" (which is further needed) i have to
get the length from the "text" field. Unfortunately this is not enough.
If the text contains extension characters like {[]} etc. then the
"user_data_len" has to be bigger because these characters needs two
septets. Therefore i use a switch statement so search for these
characters. A better solution for that is to store the right
"user_data_len" to the database (on the encoding / decoding procedure).
But i don't know if this is a suitable solution for all of you (because
you have to change your database structure etc.).
Best Regards
Dennis Wehrle
From: Pablo Neira Ayuso <pablo(a)gnumonks.org>
This patch includes some updates for the wireshark RSL dissector.
See patch for details.
This changes are available in the pablo/wireshark-rsl branch of
openBSC.
Please, merge it.
Pablo Neira Ayuso (1):
wireshark: update extension of RSL dissector with ip.access nanoBTS
support
wireshark/0004-rsl-ipaccess.patch | 228 ++++++++++++++++++++++---------------
1 files changed, 134 insertions(+), 94 deletions(-)
--
1.7.2.3
Hi List
I want to use OpenBSC with Asterisk and LCR.
After a lot of reading I found out that openbsc must start with the
Paramters "-m" and "-P".
But i got a lot error messages like:
<0006> gsm_04_08.c:2960 receive message GSM_TCH_FRAME
<0006> gsm_04_08.c:2992 TCH frame to lchan without RTP connection
So i tried a lot and start only with -P and the RTP-Proxy started. But
LCR and Asterisk sure not involved because the missing "-m". So i need
"-m".
It is a bug or a feature that "-P" will be ignored if I set "-m"?
I´m sitting over the bsc code but until this moment I didnt found
something so I hope somebody here can help.
Ulrich Meckel
Hi, list!
We are trying to connect OpenBSC and Asterisk together (through LCR),
but we have many problems.
We start OpenBSC with the parameters -P -m
--debug=DRLL:DCC:DMM:DRR:DRSL:DMNCC:DMSC:DNM:DLCH:DMUX:DHO
Now, if we try to call a mobile phone from another one, we get many
errors:
<0006> gsm_04_08.c:2960 receive message GSM_TCH_FRAME
<0006> gsm_04_08.c:2992 TCH frame to lchan without RTP connection
Now, if I understand what mncc_tx_to_cc does, I can just think, that
the RTP-Proxy is NOT active, but a part of OpenBSC thinks that it IS
active.
Another interesting problem is, that, although we start OpenBSC to
debug the CC, we do NOT get a message like:
Setting up TCH map between ...
(gsm_04_08.c line 1606)
Could someone confirm me my idea? And, maybe, give me a suggestion to
fix our problem?
We use OpenBSC in the version 0.9.11.375-ca8f.
Thanks a lot in advance for your help
Luca Bertoncello
--
_______________________________________________________________________
Luca Bertoncello
Entwicklung Mail: bertoncello(a)netzing.de
NETZING Solutions AG Tel.: 0351/41381 - 23
Fröbelstr. 57, 01159 Dresden Fax: 0351/41381 - 12
_______________________________________________________________________
Impressum:
NETZING Solutions AG - Fröbelstraße 57 - 01159 Dresden
Sitz der Gesellschaft Amtsgericht Dresden HRB 18926
Vorstand Dieter Schneider - Aufsichtsratsvorsitzender Volker Kanitz
USt.Id DE211326547 Mail: netzing.ag(a)netzing.de
From: Pablo Neira Ayuso <pablo(a)gnumonks.org>
This patchset includes several cleanups previous to another patchset
that will contain the namespace pollution fix (to appear soon).
They're available in the branch pablo/cleanups in libosmocore.
Please merge it.
Pablo Neira Ayuso (4):
bitvec: add bitvec_find_first_bit_pos() from gsm/rxlev_stat.c
write_queue: use full path of includes in osmocom/core/write_queue.h
vty: move vty_out_rate_ctr_group prototype to osmocom/vty/misc.h
utils: move OSMO_SNPRINT_RET() macro definition to
osmocom/core/utils.h
include/osmocom/core/bitvec.h | 2 ++
include/osmocom/core/rate_ctr.h | 3 ---
include/osmocom/core/utils.h | 9 +++++++++
include/osmocom/core/write_queue.h | 4 ++--
include/osmocom/vty/Makefile.am | 2 +-
include/osmocom/vty/misc.h | 10 ++++++++++
src/bitvec.c | 14 ++++++++++++++
src/gsm/rxlev_stat.c | 12 ------------
src/logging.c | 26 ++++++++------------------
9 files changed, 46 insertions(+), 36 deletions(-)
create mode 100644 include/osmocom/vty/misc.h
--
1.7.2.3
From: Pablo Neira Ayuso <pablo(a)gnumonks.org>
This patch is a RFC, I can add the prefix osmocom_ to all functions
in libosmocore to fix with the existing namespace pollution.
This task was proposed by Harald.
Let me know if you are OK with this approach and I'll send a
patchset along this week.
---
include/osmocom/core/backtrace.h | 2 +-
src/backtrace.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/osmocom/core/backtrace.h b/include/osmocom/core/backtrace.h
index bbbb2c2..7c248aa 100644
--- a/include/osmocom/core/backtrace.h
+++ b/include/osmocom/core/backtrace.h
@@ -1,6 +1,6 @@
#ifndef _OSMO_BACKTRACE_H_
#define _OSMO_BACKTRACE_H_
-void generate_backtrace();
+void osmocom_generate_backtrace();
#endif
diff --git a/src/backtrace.c b/src/backtrace.c
index ecd6b9c..5c609bb 100644
--- a/src/backtrace.c
+++ b/src/backtrace.c
@@ -29,7 +29,7 @@
#ifdef HAVE_EXECINFO_H
#include <execinfo.h>
-void generate_backtrace()
+void osmocom_generate_backtrace()
{
int i, nptrs;
void *buffer[100];
--
1.7.2.3
From: Pablo Neira Ayuso <pablo(a)gnumonks.org>
Minor change in openBSC due to new osmocom/vty/misc.h file that was
added in the patchset entitled:
libosmocore: several cleanups
It's available in pablo/cleanups branch in openbsc git tree.
Please, merge it.
Pablo Neira Ayuso (1):
src: include new file osmocom/vty/misc.h for vty_out_rate_ctr_group()
openbsc/src/gprs/sgsn_vty.c | 1 +
openbsc/src/libgb/gprs_bssgp_vty.c | 1 +
openbsc/src/libgb/gprs_ns_vty.c | 1 +
openbsc/src/osmo-bsc_nat/bsc_nat_vty.c | 1 +
4 files changed, 4 insertions(+), 0 deletions(-)
--
1.7.2.3
From: Pablo Neira Ayuso <pablo(a)gnumonks.org>
This patch adds bitvec_find_bit_pos() to bitvec.c where it really
belongs to. Before this patch used to be part of gsm/rxlev_stat.c
---
include/osmocom/core/bitvec.h | 2 ++
src/bitvec.c | 14 ++++++++++++++
src/gsm/rxlev_stat.c | 12 ------------
3 files changed, 16 insertions(+), 12 deletions(-)
diff --git a/include/osmocom/core/bitvec.h b/include/osmocom/core/bitvec.h
index 42977fb..bbe1641 100644
--- a/include/osmocom/core/bitvec.h
+++ b/include/osmocom/core/bitvec.h
@@ -68,6 +68,8 @@ int bitvec_set_uint(struct bitvec *bv, unsigned int in, int count);
/* get multiple bits (based on numeric value) from current pos */
int bitvec_get_uint(struct bitvec *bv, int num_bits);
+/* find the first bit set in bit vector */
+int bitvec_find_bit_pos(const struct bitvec *bv, unsigned int n, enum bit_value val);
/* Pad the bit vector up to a certain bit position */
int bitvec_spare_padding(struct bitvec *bv, unsigned int up_to_bit);
diff --git a/src/bitvec.c b/src/bitvec.c
index 4984af2..4fd3834 100644
--- a/src/bitvec.c
+++ b/src/bitvec.c
@@ -217,3 +217,17 @@ int bitvec_spare_padding(struct bitvec *bv, unsigned int up_to_bit)
return 0;
}
+
+/* find first bit set in bit vector */
+int bitvec_find_bit_pos(const struct bitvec *bv, unsigned int n,
+ enum bit_value val)
+{
+ unsigned int i;
+
+ for (i = n; i < bv->data_len*8; i++) {
+ if (bitvec_get_bit_pos(bv, i) == val)
+ return i;
+ }
+
+ return -1;
+}
diff --git a/src/gsm/rxlev_stat.c b/src/gsm/rxlev_stat.c
index 626aaff..d226861 100644
--- a/src/gsm/rxlev_stat.c
+++ b/src/gsm/rxlev_stat.c
@@ -30,18 +30,6 @@
#include <osmocom/core/bitvec.h>
#include <osmocom/gsm/rxlev_stat.h>
-int bitvec_find_bit_pos(const struct bitvec *bv, unsigned int n, enum bit_value val)
-{
- unsigned int i;
-
- for (i = n; i < bv->data_len*8; i++) {
- if (bitvec_get_bit_pos(bv, i) == val)
- return i;
- }
-
- return -1;
-}
-
void rxlev_stat_input(struct rxlev_stats *st, uint16_t arfcn, uint8_t rxlev)
{
struct bitvec bv;
--
1.7.2.3
From: Pablo Neira Ayuso <pablo(a)gnumonks.org>
This patch fixes a segfault if we or one BTS start a TCP connection
and close it before any IPAC_MSGT_ID_RESP message is sent.
---
openbsc/src/ipaccess/ipaccess-proxy.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/openbsc/src/ipaccess/ipaccess-proxy.c b/openbsc/src/ipaccess/ipaccess-proxy.c
index 56fe160..d98eb54 100644
--- a/openbsc/src/ipaccess/ipaccess-proxy.c
+++ b/openbsc/src/ipaccess/ipaccess-proxy.c
@@ -806,6 +806,11 @@ static void handle_dead_socket(struct bsc_fd *bfd)
switch (bfd->priv_nr & 0xff) {
case OML_FROM_BTS: /* incoming OML data from BTS, forward to BSC OML */
+ /* The BTS started a connection with us but we got no
+ * IPAC_MSGT_ID_RESP message yet, in that scenario we did not
+ * allocate the ipa_bts_conn structure. */
+ if (ipbc == NULL)
+ break;
ipbc->oml_conn = NULL;
bsc_conn = ipbc->bsc_oml_conn;
/* close the connection to the BSC */
--
1.7.2.3