This is to prepare for the introduction of STATUS-REPORT messages.
--
Regards,
Alexander Chemeris.
CEO, Fairwaves, Inc. / ООО УмРадио
https://fairwaves.co
03.40 9.2.3.6TP-Message-Reference (TP-MR)
The SMS-STATUS-REPORT also contains a TP-Message-Reference field. The value sent
to the MS will be the sameas the TP-Message-Reference value generated by the MS
in the earlier SMS-SUBMIT or SMS-COMMAND to whichthe status report relates.
--
Regards,
Alexander Chemeris.
CEO, Fairwaves, Inc. / ООО УмРадио
https://fairwaves.co
Hi.
Attached is a small patch which replaces direct call to comp128 from libosmocore to
auth api call. This will help to remove comp128 from libosmocore public api and to
use other auth functions in openbsc in future.
--
best regards,
Max, http://fairwaves.ru
Hi, I am also interested in being able to send SMS messages.
Harald, the question is interesting, as I not only want to send "normal" messages but also
"special" messages, like silent SMS, or messages formatted with ie SharpSMS.
https://github.com/pbansky/SharpSMS
I know that there are applications for mobile devices allowing to format these kind of SMS messages but this can be done much easier if we could do it from a PC.
I am also interested in how can it be done with OpenBSC and OpenBTS.
Robert
> Date: Wed, 5 Mar 2014 22:04:06 +0100
> From: Harald Welte <laforge(a)gnumonks.org>
> To: George News <george.news(a)gmx.net>
> Cc: Holger Hans Peter Freyther <holger(a)freyther.de>,
> openbsc(a)lists.osmocom.org
> Subject: Re: Support for binary SMS (GSM 03.48)
>
> On Tue, Mar 04, 2014 at 09:10:48PM +0100, George News wrote:
> > Could you please give me an extra hint about the library or application
> > I have to run. I'm quite new to the environment.
>
> If you're not familiar with the network side of GSM, I suggest you
> simply send a binary SMS from one phone (attached to OpenBSC) to another
> phone (also attached to OpenBSC). This is implemented for
> 7bit/ucs2/binary SMS.
>
Added to detect breakage in the VTY interface, caused by:
a9fae1ae66df57f76a0aedbd0b56228959d37d56
bsc: rf_ctrl will always be created, remove the NULL checks
---
openbsc/tests/vty_test_runner.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/openbsc/tests/vty_test_runner.py b/openbsc/tests/vty_test_runner.py
index 7c8fe8c..9975d85 100644
--- a/openbsc/tests/vty_test_runner.py
+++ b/openbsc/tests/vty_test_runner.py
@@ -248,6 +248,10 @@ class TestVTYNITB(TestVTYGenericBSC):
res = self.vty.command("show paging-group 0 1234567")
self.assertEquals(res, "%Paging group for IMSI 1234567 on BTS #0 is 7")
+ def testShowNetwork(self):
+ res = self.vty.command("show network")
+ self.assert_(res.startswith('BSC is on Country Code') >= 0)
+
class TestVTYBSC(TestVTYGenericBSC):
def vty_command(self):
--
1.7.9.5
Hi all,
Prevent crash introduced in the a9fae1ae commit.
Call "show network" in the NITB VTY without any BTS connected to
reproduce the crash.
Before it was stored in a local variable, but accessed from a net
structure in the msc_signal_handler().
--
Regards,
Alexander Chemeris.
CEO, Fairwaves, Inc. / ООО УмРадио
https://fairwaves.co
The OpenBSC(a)lists.osmocom.org mailing list has 2 request(s) waiting
for your consideration at:
https://lists.osmocom.org/mailman/admindb/openbsc
Please attend to this at your earliest convenience. This notice of
pending requests, if any, will be sent out daily.
Pending posts:
From: tlab.tester(a)googlemail.com on Mon Mar 3 13:01:09 2014
Subject: Unsubscribe
Cause: Message may contain administrivia
From: zielonka.markus(a)googlemail.com on Mon Mar 3 15:16:07 2014
Subject: unsubscribe
Cause: Message may contain administrivia
Hi all,
¿Is it possible to use the OpenBSC system to send binary SMS? If yes
how? and if not could you please point me on how to start the development?
I know using the monitor app with the motorola phone is possible to send
sms and make calls. Now I want to send binary SMS (03.48).
TA.
Jorge
This patch adds a function bts_update_agch_max_queue_length()
to compute a limit of the AGCH queue. This is based on the idea,
that the AGCH queue has a limited drain rate and that CHANNEL
REQUESTs must be answered within a certain time frame, given
by the minimum value of T3126 (see GSM 04.08). When the AGCH queue
reaches that limit, the last message would be delivered in time if
there were no other delays involved (which is not the case).
The calculation is based on the ratio of the number RACH slots and
CCCH blocks per time:
Lmax = (T + 2*S) / R_RACH * R_CCCH
where
T3126_min = (T + 2*S) / R_RACH
R_RACH is the RACH slot rate (e.g. RACHs per multiframe)
R_CCCH is the CCCH block rate (same time base like R_RACH)
The value depends control_channel_desc.ccch_conf and
rach_control.tx_integer (both from SYSINFO_TYPE_3) and should
therefore by called at least each time after one of these is changed.
For this reason, a signal callback is registered under
SS_GLOBAL/S_NEW_SYSINFO which invokes bts_update_agch_max_queue_length().
Based-On: "bts: Calculate length of agch queue" by Ivan Kluchnikov
<kluchnikovi(a)gmail.com>
---
include/osmo-bts/bts.h | 1 +
include/osmo-bts/gsm_data.h | 1 +
src/common/bts.c | 86 ++++++++++++++++++++++++++++++++++++++++++-
3 files changed, 87 insertions(+), 1 deletion(-)
diff --git a/include/osmo-bts/bts.h b/include/osmo-bts/bts.h
index 49ef617..ec061e8 100644
--- a/include/osmo-bts/bts.h
+++ b/include/osmo-bts/bts.h
@@ -26,6 +26,7 @@ void bts_setup_slot(struct gsm_bts_trx_ts *slot, uint8_t comb);
int bts_agch_enqueue(struct gsm_bts *bts, struct msgb *msg);
struct msgb *bts_agch_dequeue(struct gsm_bts *bts);
+void bts_update_agch_max_queue_length(struct gsm_bts *bts);
int bts_ccch_copy_msg(struct gsm_bts *bts, uint8_t *out_buf, struct gsm_time *gt,
int is_ag_res);
diff --git a/include/osmo-bts/gsm_data.h b/include/osmo-bts/gsm_data.h
index aee56a9..ea3fa5e 100644
--- a/include/osmo-bts/gsm_data.h
+++ b/include/osmo-bts/gsm_data.h
@@ -50,6 +50,7 @@ struct gsm_bts_role_bts {
uint8_t max_ta;
struct llist_head agch_queue;
int agch_queue_length;
+ int agch_max_queue_length;
struct paging_state *paging_state;
char *bsc_oml_host;
unsigned int rtp_jitter_buf_ms;
diff --git a/src/common/bts.c b/src/common/bts.c
index 7bbf587..2a6c1bd 100644
--- a/src/common/bts.c
+++ b/src/common/bts.c
@@ -42,6 +42,7 @@
#include <osmo-bts/bts_model.h>
#include <osmo-bts/rsl.h>
#include <osmo-bts/oml.h>
+#include <osmo-bts/signal.h>
struct gsm_network bts_gsmnet = {
@@ -51,11 +52,32 @@ struct gsm_network bts_gsmnet = {
void *tall_bts_ctx;
+/* Table 3.1 TS 04.08: Values of parameter S */
+static const uint8_t tx_integer[] = {
+ 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16, 20, 25, 32, 50,
+};
+
+static const uint8_t s_values[][2] = {
+ { 55, 41 }, { 76, 52 }, { 109, 58 }, { 163, 86 }, { 217, 115 },
+};
+
+static int bts_signal_cbfn(unsigned int subsys, unsigned int signal,
+ void *hdlr_data, void *signal_data)
+{
+ if (subsys == SS_GLOBAL && signal == S_NEW_SYSINFO) {
+ struct gsm_bts *bts = signal_data;
+
+ bts_update_agch_max_queue_length(bts);
+ }
+ return 0;
+}
+
int bts_init(struct gsm_bts *bts)
{
struct gsm_bts_role_bts *btsb;
struct gsm_bts_trx *trx;
int rc;
+ static int initialized = 0;
/* add to list of BTSs */
llist_add_tail(&bts->list, &bts_gsmnet.bts_list);
@@ -110,6 +132,11 @@ int bts_init(struct gsm_bts *bts)
bts_gsmnet.num_bts++;
+ if (!initialized) {
+ osmo_signal_register_handler(SS_GLOBAL, bts_signal_cbfn, NULL);
+ initialized = 1;
+ }
+
return rc;
}
@@ -209,11 +236,68 @@ int lchan_init_lapdm(struct gsm_lchan *lchan)
return 0;
}
+#define CCCH_RACH_RATIO_COMBINED256 (256*1/9)
+#define CCCH_RACH_RATIO_SEPARATE256 (256*10/55)
+
+void bts_update_agch_max_queue_length(struct gsm_bts *bts)
+{
+ struct gsm_bts_role_bts *btsb = bts_role_bts(bts);
+ struct gsm48_system_information_type_3 *si3;
+ int T, S, ccch_rach_ratio256, i;
+ int T_group = 0;
+ int ccch_comb = 0;
+ int old_max_length = btsb->agch_max_queue_length;
+
+ if (!(bts->si_valid & (1<<SYSINFO_TYPE_3)))
+ return;
+
+ si3 = GSM_BTS_SI(bts, SYSINFO_TYPE_3);
+
+ if (si3->control_channel_desc.ccch_conf == 1)
+ ccch_comb = 1;
+
+ /*
+ * The calculation is based on the ratio of the number RACH slots and
+ * CCCH blocks per time:
+ * Lmax = (T + 2*S) / R_RACH * R_CCCH
+ * where
+ * T3126_min = (T + 2*S) / R_RACH, as defined in GSM 04.08, 11.1.1
+ * R_RACH is the RACH slot rate (e.g. RACHs per multiframe)
+ * R_CCCH is the CCCH block rate (same time base like R_RACH)
+ * S and T are defined in GSM 04.08, 3.3.1.1.2
+ * The ratio is mainly influenced by the downlink only channels
+ * (BCCH, FCCH, SCH, CBCH) that can not used for CCCH.
+ * An estimation with an error of < 10% is used:
+ * ~ 1/9 if CCCH is combined with SDCCH, and
+ * ~ 1/5.5 otherwise.
+ */
+ ccch_rach_ratio256 = ccch_comb ?
+ CCCH_RACH_RATIO_COMBINED256 :
+ CCCH_RACH_RATIO_SEPARATE256;
+
+ T = si3->rach_control.tx_integer;
+ for (i = 0; i < 15; i++) {
+ if (tx_integer[i] == T) {
+ T_group = i % 5;
+ break;
+ }
+ }
+ S = s_values[T_group][ccch_comb];
+
+ btsb->agch_max_queue_length = (T + 2 * S) * ccch_rach_ratio256 / 256;
+
+ if (btsb->agch_max_queue_length != old_max_length)
+ LOGP(DRSL, LOGL_INFO, "Updated AGCH max queue length to %d, "
+ "T = %d, S = %d, CCCH/RACH = %d%%, AG_BLK_RES = %d\n",
+ btsb->agch_max_queue_length,
+ T, S, ccch_rach_ratio256 * 100 / 256,
+ si3->control_channel_desc.bs_ag_blks_res);
+}
+
int bts_agch_enqueue(struct gsm_bts *bts, struct msgb *msg)
{
struct gsm_bts_role_bts *btsb = bts_role_bts(bts);
- /* FIXME: implement max queue length */
msgb_enqueue(&btsb->agch_queue, msg);
btsb->agch_queue_length++;
--
1.7.9.5