Commit Graph

195 Commits

Author SHA1 Message Date
Harald Welte ce2eb871e1 fix SMS RP message type definitions to reflect SMMA and MT ERROR 2009-08-09 14:58:21 +02:00
Harald Welte 66b6a8dde0 move ms_pwr utility function to gsm_utils.c
also, they should both take the gsm_band parameter, not a BTS
2009-08-09 14:45:18 +02:00
Harald Welte 31f03a6df6 configure MS CCH max power IEI of SI3 and SI4 to 20dBM (100mW) 2009-08-09 14:38:49 +02:00
Harald Welte e122855f3c define data structure for gsm48_cell_sel_par IEI of SI3 / SI4 2009-08-09 14:38:32 +02:00
Harald Welte 1c40927355 fix timer and linked list handling of new RLL code 2009-08-09 14:13:58 +02:00
Harald Welte edcc527371 Add new BSC RLL layer of code
A caller can call rll_establish(lchan, link_id) and a callback to the GSM RLL
code.  He will get called back if the RLL link is established or receives some
error message, or the establishment times out.

We need this for proper SMS implementation, where we need to restablish a SAPI3
RLL link before transmitting the actual CP-DATA messages.
2009-08-09 13:47:35 +02:00
Harald Welte 42b4557fca ensure vty code uses talloc_strdup() rather than regular strdup 2009-08-08 17:41:43 +02:00
Harald Welte 1bf1972d29 use one talloc context for entire vty code 2009-08-08 17:41:33 +02:00
Harald Welte 76042188e0 first 'working' SMS implementation
we now have the full path from the MS into the database (SUBMIT), as well as
back from the database to the MS (DELIVER).  The database gets correctly
updated once a SMS has been successfully delivered.

What's still missing is the periodic scan over all undelivered messages,
trying to deliver them to the respective MS.  So far, you have to manually
trigger this on the telnet interface with 'sms send pending 1'
2009-08-08 16:03:15 +02:00
Harald Welte 1d014a5dfc parse_btstype() can use const qualifier 2009-08-08 15:38:29 +02:00
Harald Welte f6cea1db99 when paging a MS, use the channel type indicated by caller
The existing code always paged for a TCH/F, which is really wasteful
when considering the delivery of SMS messages.

Also, increase the verbosity of the debug message a bit.
2009-08-08 15:08:19 +02:00
Harald Welte d2dc1de9d9 start using the RLL RELEASE procedures
So far, we immediately disable the RF channel without following a proper
RLL RELEASE procedure.  This patch changes this.

If we locally terminate the connection, the channel allocator now triggers a
RLL RELEASE REQuest, which is responsed by the MS with a RLL RELEASE CONFirm,
based on which we send the RF CHANnel RELease to the BTS.

If the MS terminates the connection, we receive a RLL RELEASE INDication,
based on which we trigger RF CHANnel RELease to the BTS.
2009-08-08 13:15:07 +02:00
Harald Welte 81cff3c8c5 ipaccess-find: don't try to parse packets that are not IPAC_MSGT_ID_RESP 2009-08-08 12:14:53 +02:00
Harald Welte e26d079c97 no more need to specify local IP address to ipaccess-find
Actually, depending on the system configuration, we don't even need to
specify the interface name or be root.
2009-08-08 11:47:20 +02:00
Harald Welte c7310385ca implement nanoBTS frequency error test
This helps us to detect the frequency error of BS-11 if it is located
next to the nanoBTS 900.

If 'ipaccess-config -l' is called, it will produce a report like
<0020> ipaccess-config.c:85 TEST REPORT: test_no=0x42 test_res=0
<0020> ipaccess-config.c:108 ==> ARFCN  220, Frequency Error     22
<0020> ipaccess-config.c:108 ==> ARFCN    1, Frequency Error    -37
<0020> ipaccess-config.c:108 ==> ARFCN   10, Frequency Error      0
<0020> ipaccess-config.c:108 ==> ARFCN   20, Frequency Error     11
<0020> ipaccess-config.c:108 ==> ARFCN   53, Frequency Error      5
<0020> ipaccess-config.c:108 ==> ARFCN   63, Frequency Error     -4
<0020> ipaccess-config.c:108 ==> ARFCN   84, Frequency Error     11
<0020> ipaccess-config.c:108 ==> ARFCN  101, Frequency Error      0
<0020> ipaccess-config.c:108 ==> ARFCN  123, Frequency Error    -52

where in this case the ARFCN 123 is the BS-11 with a frequency error
larger than all the other (regular) BTS in the vicinity.
2009-08-08 00:02:36 +02:00
Harald Welte bd30506628 Merge branch 'master' into sms 2009-08-07 00:33:03 +02:00
Harald Welte 2477d93c6e switch vty implementation over to talloc 2009-08-07 00:32:41 +02:00
Harald Welte 65da9125df add function declaration for gsm_pchan_parse() 2009-08-07 00:32:22 +02:00
Harald Welte 3820254f7a telnet: deal gracefully with vty being closed by vty layer
also: ignore vty's that are not terminals (e.g. VTY_FILE)
2009-08-07 00:31:23 +02:00
Harald Welte 31c3d34e61 in case of SIGABRT, don't exit(0) and thus prevent creating a core file 2009-08-07 00:29:44 +02:00
Harald Welte a6fd58eaed add telnet/vty commands for TS pchan and e1_subslot 2009-08-07 00:25:23 +02:00
Harald Welte a171a1be47 implement gsm_pchan_parse() function 2009-08-07 00:24:39 +02:00
Harald Welte 99a452a197 Merge branch 'master' into sms 2009-08-06 19:20:22 +02:00
Harald Welte 67ce073110 add code to save BTS/TRX/TS config to config file
we don't yet have the parser to fully re-read it. So this has not mcuh use so far.
2009-08-06 19:06:46 +02:00
Harald Welte 9fb3b8bff4 change order of BTS and TRX list as well as band names for prettier printout 2009-08-06 19:05:58 +02:00
Harald Welte b1f21d4844 don't define zencrypt function if VTY_CRYPT is not defined 2009-08-06 18:51:23 +02:00
Harald Welte 4a3023df12 re-enable config file handling of vty layer 2009-08-06 18:50:10 +02:00
Harald Welte 1989c089da add function for performing 'CONNECT MULTI-DROP LINK" as per GSM 12.21
don't be confused, BS-11 does not need this.  But since I wrote the code
before knowing that, I can just as well commit it.
2009-08-06 17:58:31 +02:00
Harald Welte 4fbfd3a43b add more ip.access attribute TLV definitions 2009-08-06 17:57:23 +02:00
Harald Welte 5146006df2 introduce '-2' commandline option for second BS-11
Using this option, you can use two BS-11 connected to the same E1
link.  The first BS-11 needs to have BPORT0 and BPORT1 objects created with E1
Line Configuration attribute "multi-drop".  The second BS-11 is configured with
only BPORT0 in star configuration, and needs to have the OML signalling on TS6
instead of TS1.  Also, a kernel patch providing a second virtual E1 interface
is needed.
2009-08-06 17:54:21 +02:00
Harald Welte f294f45ca6 shut down the OML (and thus the BTS) when bsc_hack is terminated with ctrl+c 2009-08-06 17:43:50 +02:00
Harald Welte d158605db1 only set BCCH INFO on first TRX (C0) of BTS 2009-08-06 17:41:19 +02:00
Harald Welte ac56e8b442 use HARDCODED_BTSn_TS defines from bsc_hack.c 2009-08-06 17:40:24 +02:00
Harald Welte 63589bef52 add HARDCODED_BTSn_TS to define the base TS for each BTS 2009-08-06 17:38:10 +02:00
Harald Welte ac606dcf92 use talloc_free() rather than free()
Fix two bugs in OML software download code where we allocate data structures
using talloc, but free() them using the system memory allocator.  Spotted by
dexter.
2009-08-06 15:44:18 +02:00
Harald Welte 4e55d6883b e1_config now supports up to three BTS
Each BTS gets its own E1 line data structure.  They are meant to bind
each to their own (virtual?) mISDN device.

BTS0 uses TS01 (siganlling) and TS02/03 (TRX0), TS04/05(TRX1)
BTS1 uses TS11 (siganlling) and TS12/13 (TRX0), TS14/15(TRX1)
BTS2 uses TS21 (siganlling) and TS22/23 (TRX0), TS24/25(TRX1)
2009-08-04 14:13:35 +02:00
Harald Welte 9e85b54799 prepare mISDN driver for multiple lines/instances
In order to use multiple mISDN cards, we need to:
1) move driver initialization out of line initialization
2) make sure we allow partial (virtual) E1 cards with < 30 B-channels
2009-08-04 14:11:49 +02:00
Harald Welte 602f2b88d6 fix \n at end of line of certain RSL debug messages 2009-08-04 02:50:21 +02:00
Harald Welte f89abbd16a alter initial MS RF power to 100mW 2009-08-04 02:31:55 +02:00
Harald Welte 2da8629b7c parse and decode Siemens specific T_MSRFPCI message 2009-08-04 02:31:05 +02:00
Harald Welte fad0559aee fix initialization of TRX1 / TS0
also fix a minor error when printing BTS/TRX number
2009-08-04 01:31:53 +02:00
Harald Welte a1b285861e gsm_04_08 no longer needs to iterate over all BTS in LAC
this task is performed by the paging.c code already.
2009-08-01 19:31:47 +02:00
Harald Welte ed640c4519 add ip.access specific channel combinations 2009-08-01 18:23:01 +02:00
Harald Welte ea5cf30d15 issue a signal once a subscriber is attached or detached 2009-07-29 23:14:15 +02:00
Harald Welte e34e117ff1 Merge branch 'master' into sms 2009-07-29 18:05:54 +02:00
Harald Welte d46299da00 make channel allocator policy multi-TRX aware
For now, we assume that TRX1 (and higher) all have a TCH/F configuration
on all of their timeslots
2009-07-29 16:46:37 +02:00
Harald Welte 67b4c30a9d complete TRX1 support for BS11
* remove old HAVE_TRX1 definition, replace it with '-1' commandline argument
* make sure we actually configure the OML TRX attributes with a different
  ARFCN than TRX0
* make sure we configure timeslot 0 of TRX1 also in TCH/F mode

This code is untested, but if you have a dual-trx BS-11, and the second TRX
is activated, you should be able to run bsc_hack with the -1 option to enable
and use the second trx.  It works like this:
* TRX1 shares E1 timeslot 0 for signalling
* TRX1 RSL link uses TEI2 (TRX0 uses 1)
* TRX1 on ARFCN+2, i.e. if you have TRX0 on 122, TRX1 will be 124
2009-07-29 16:42:16 +02:00
Harald Welte 9943c5bbac generalize channel activation / channel mode modify
* we only need one piece of code to calculate rsl_ie_chan_mode from
  our run-time data structures (gsm_lchan)
* add some more channel modes for TCH/H and data
* use enum's to make the compiler warn us about unhandled enum values
* make sure the caller determines the (signalling,speech,data) mode
2009-07-29 15:41:29 +02:00
Harald Welte 58ca5b7ae7 actually derive the ip.access speech mode from tch_mode
also make sure we always print the speech_mode on IPAC_BIND
and IPAC_CONNECT.
2009-07-29 12:12:18 +02:00
Harald Welte 13cac66bb7 postpone IPAC_BIND until we do a LCHAN_MODIFY
only after the LCHAN_MODIFY we know the final mode of the channel,
so we have to postpone our IPAC_BIND until then to make sure we set
the correct speech codec.
2009-07-29 12:10:35 +02:00