Commit Graph

943 Commits

Author SHA1 Message Date
Harald Welte 746d6091d9 [abis_nm] introduce and use abis_nm_ipaccess_rsl_connect() 2009-10-19 22:11:11 +02:00
Harald Welte d004a6462a ip.access / multi-TRX: correctly identify TRX number on SW ACT REP 2009-10-19 21:47:54 +02:00
Harald Welte af7b2faf71 ip.access maximum output power depends on GSM band 2009-10-19 21:47:31 +02:00
Harald Welte a62202be31 [abis_nm]: Print Object Class of ip.access messages 2009-10-19 21:46:54 +02:00
Harald Welte 53f4b10b21 add ipaccess specific attribute set message
Partially apply 9ba65525eaa06a1768aaf35bdee98afcf8026e0a to get
rid of a compile problem. The other part of the mentioned commit
is still in the gprs branch.

Signed-off-by: Holger Hans Peter Freyther <zecke@selfish.org>
2009-10-09 05:26:46 +02:00
Harald Welte 4d0481dbe9 [bsc_init] use new NM_AVSTATE_* enum instead of hard-coded numbers 2009-10-08 20:53:42 +02:00
Harald Welte 2d820ccf67 add availability state abis_nm enum 2009-10-08 20:52:35 +02:00
Harald Welte 4bd0a98a77 [abis_nm] print object class/instance for NACK 2009-10-08 20:49:51 +02:00
Harald Welte 15c44179c3 [abis_nm]: print ip.access SET ATTR [N]ACK 2009-10-08 20:49:44 +02:00
Andreas Eversberg 38ae5cb2c2 use tx delay timer instead of usleep() in ip.access input driver
this fixes the delay of audio caused by stalling of the openbsc process.
the use of 'usleep(100000)' for slowing down transmission to nanoBTS is
replaced by the tx-delay timer. i did this on bs11 code, so i did it the
same way. it actually queues frames for transmission not nanoBTS. on
transmission a timer is started and when this timer expires, the next
frame in the queue is transmitted (timer restarted) until the queue is
empty.
2009-10-08 12:53:16 +02:00
Holger Hans Peter Freyther 736f65d16d Merge branch 'holger/merge-on-waves-msc' 2009-10-06 12:54:07 +02:00
Holger Hans Peter Freyther ca6bc1d10f [gsm0408] Add parameter to gsm48_send_rr_ciph_mode for controling the response
This parameter controls if the response should include the
IMEISV or not. This will be set by the MSC and this is why
this parameter was added.
2009-10-06 04:34:25 +02:00
Holger Hans Peter Freyther ea4088a7ea [gsm0408] Move encryption message creation to gsm_04_08_utils.c
Be able to use the cipher mode command message from the MSC code.
2009-10-06 04:34:25 +02:00
Mike Haben e2d8227499 [ipaccess] Add nanoBTS 1900 support
Add support for 1900 nanoBTS by using unified bts_type
GSM_BTS_TYPE_NANOBTS for 900, 1800 and 1900 versions.

Reduce the nanoBTS enum values to one and derive the
version from the user supplied band. In the future we
might want to do auto band detection.

The configuration file needs to be changed to refer
to nanobts instead of nanobts900/nanobts1800.

Signed-off-by: Mike Haben <michael.haben@btinternet.com>
Signed-off-by: Holger Hans Peter Freyther <zecke@selfish.org>
2009-10-05 12:12:54 +02:00
Mike Haben a03f97775b [ipaccess] Parse Software Activate parameters
Addresses a FIXME in abis_nm.c, parsing the parameters
passed by a Software Activate request.  I've tested this
on three different IpAccess BTSs (including one which
didn't work with the original code), would be good if
someone could check it on a BS11.

Signed-off-by: Mike Haben <michael.haben@btinternet.com>
Tested-by: Holger Hans Peter Freyther <zecke@selfish.org>
2009-10-01 14:58:30 +02:00
Holger Hans Peter Freyther e48b9562a4 [lac] Do not use the reserved LAC 0x0 for two different things
We are using LAC=0 for remembering that a GSM subscriber is
detached. I recently added code to gsm_bts_by_lac that will
return every BTS in case the lac is 0. Harald highlightes
that we would now search for detached subscribers at every
BTS of our network which is clearly not what we want.

Introduce two defines for the two reserved LAC, add a
pointer to the specification, check that our config files
do not contain these reserved values, use the define
and change gsm_bts_by_lac to use the other define.
2009-10-01 04:07:15 +02:00
Sylvain Munaut 86538c7fab input/ipaccess: Fix segv caused by use of uninitialized var
This is a regression coming from the recent split of the
handle_ts1_read method in two.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Signed-off-by: Holger Hans Peter Freyther <zecke@selfish.org>
2009-10-01 03:53:31 +02:00
Holger Hans Peter Freyther 1b7b39d557 Merge branch 'holger/merge-msc-bsc-split' 2009-09-30 06:29:28 +02:00
Holger Hans Peter Freyther f734a14485 [ipaccess] Add SCCP/A descriminator 2009-09-30 06:27:21 +02:00
Holger Hans Peter Freyther d5f052230c [ipaccess] Prepare to reuse parts of the code for the A-link
For the MSC<->BSC connection we are going to use the same header
as used from BTS<->BSC but we are not having an E1-Link, a gsm network
or a gsm_bts available and can not use this part of the code.
2009-09-30 06:27:16 +02:00
Holger Hans Peter Freyther 0b7f4b36be [lac] The lac must be 16 bit. Change it in gsm_bts and vty parsing
The LAC can be 16bit of size. the generation of the LAI, struct
gsm_subsriber and the BSC<->MSC was already using it as a
16bit (short) value.

Change struct gsm_bts to parse 16bit and change the vty configuration
parsing code to deal with a short too.
2009-09-30 05:49:26 +02:00
Holger Hans Peter Freyther 1e35cec031 Merge branch 'holger/merge-on-waves-msc' 2009-09-28 12:57:27 +02:00
Holger Hans Peter Freyther 927f056f34 [paging] Use paging_request_stop to stop all paging requests
This loop looks a lot like the one inside the paging code. Call
it instead and change the code in paging_request_stop to cope
with a NULL _bts.
2009-09-28 12:50:49 +02:00
Holger Hans Peter Freyther 45f9b3d3fc [paging] Use one of the two reserved LAC to page every BTS
For the on-waves.com MSC case we want to page every BTS reached
of the network. Our gsm_subscriber entry does not have a LAC
entry set and defaults to zero. Use the reserved 0x0000 to
indicate that we want to use every bts in the network.

This will influence the paging code to start and stop paging.
2009-09-28 12:50:49 +02:00
Holger Hans Peter Freyther 3ee5d3e8af [gsm0408] Move paging handling to gsm_04_08_utils.c
Add one method to extract the MI which will allow to load
the gsm_subscriber depending on the MSC/BSC setup and then
use gsm48_handle_paging_resp to finish the paging response
handling.
2009-09-28 12:50:49 +02:00
Holger Hans Peter Freyther adc1478a47 [gsm0408] Move send_siemens_mrpci to gsm_04_08_utils.c 2009-09-28 12:50:49 +02:00
Holger Hans Peter Freyther 9f16a869a5 [subscr] subscr_paging_cb is called for expire and success
Gracefully handle a case where success and expire could fire... I'm
only hitting this when doing something evil to simulate network code
but it seems appropriate to handle this gracefully.
2009-09-28 12:50:45 +02:00
Holger Hans Peter Freyther 049935b9cc [subscr] When paging fails to start, send an expired event 2009-09-28 06:04:40 +02:00
Holger Hans Peter Freyther c4a49e3e2d [bsc] Store the cell_identity in gsm_bts and set it on the SI3 and SI6
Transfering the cell_identity from BSC to MSC is required for the
on-waves.com support. Allow to set the cell_identity in the cfg
file and patch the system information tables to set it.
2009-09-28 06:04:40 +02:00
Holger Hans Peter Freyther 98dd1c85ab [paging] Kill old defines from paging.c 2009-09-28 06:04:40 +02:00
Holger Hans Peter Freyther b28285d8e7 [paging] Implement paging by IMSI.
Try to page by IMSI when the TMSI is not set. This will be required
to properly support the MSC/BSSMAP.
2009-09-28 05:14:25 +02:00
Holger Hans Peter Freyther 2223025e21 [tmsi] Make the tmsi a 4 octet number
tmsi is four octets long, there is no need to make it a string
and then jump through hoops to convert it to a number. Keep the database
using it as a string to benefit from the NULL handling of the db.

Introduce the reserved tmsi which has all bits set to 1 according
to GSM 03.03 §2.4 and start checking for it and make sure the db
code will never allocate such a tmsi.
2009-09-28 05:14:25 +02:00
Sylvain Munaut 6b0b103bdc [gsm_04_11] Free transaction on RX_RP_ACK for SMS
When only one SMS is sent, the freeing of the lchan will
automatically free all transactions on the lchan.

However, if there are several SMS sent at once, the call
to gsm411_send_sms_lchan will create a new transaction
with the same caracteristics as the previous one. If
the old one is not free'd, the next call to trans_find_by_id
(triggered by the next incoming RP-ACK) will not return the good
transaction and things go haywire.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2009-09-27 11:16:22 +02:00
Harald Welte 23b710fa4f Merge branch 'master' into encryption 2009-09-27 11:13:55 +02:00
Sylvain Munaut 82aa6843ba [abis_rsl] Fix rsl_encryption_cmd L3 length computation
msg->l3h doesn't have any coherent value at that point,
can't use that.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2009-09-27 11:13:18 +02:00
Sylvain Munaut 1dcfc00192 [gsm_04_08] Fix gsm48_send_rr_ciph_mode algorithm ID
The algorithm ID used in the GSM 04.08 RR message is
(x-1) for A5/x. In RSL it's (x+1) for A5/x so there is
a difference of 2.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2009-09-27 11:11:41 +02:00
Sylvain Munaut 849f554c87 [gsm_04_08] Fix gsm48_tx_mm_auth_req implementation
It was mainly missing the key_seq field, causing the
command to just be rejected by the ME.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2009-09-27 11:10:17 +02:00
Mike Haben 59d284e8cf non-call related SS (USSD) is not unknown, but unimplemented
also, if we write 0x in front of a number, it should be hex.
2009-09-26 19:00:03 +02:00
Harald Welte 55726d73d7 Use correct capitalization on SQL statements
otherwise, SQLite seems to return the wrong data types ?!?

Signed-off-by: Mike Haben <michael.haben@btinternet.com>
2009-09-26 18:54:59 +02:00
Harald Welte 4381cfe41b add VTY/configfile command for setting encryption (A5) level
This is just configuring the gsm_network property, nobody uses it yet
2009-08-30 15:47:06 +09:00
Harald Welte 08d91a5b26 A5 support for RSL and 04.08 (not used yet)
This just adds the 04.08 and RSL bits for A5, but not the logic
for performing authentication.

The caller would first set lchan->encr and then call
gsm48_send_rr_ciph_mode(lchan), which encapsulates the 04.08
CIPHERING MODE COMMAND into a RSL ENCRYPTION COMMAND and sends it
to the BTS for execution + forwarding.
2009-08-30 15:37:11 +09:00
Harald Welte 196d0528ff [abis_rsl] Set lchan->tch_mode properly when responding to CHAN_RQD
This fixes the 'only first call works' problem that some of us were
having with the nanoBTS.
(the field just happenned to be 0 == GSM48_CMODE_SIGN after startup)

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2009-08-28 23:28:28 +09:00
Harald Welte 2c700e4420 remove unused variable 2009-08-27 22:04:33 +09:00
Harald Welte c25b369839 add early version of a dissector for lucent/alcatel home-node-b protocol 2009-08-27 21:59:22 +09:00
Holger Hans Peter Freyther 9fe11d8c07 Merge branch 'holger/merge-msc-bsc-split' 2009-08-20 14:02:31 +02:00
Holger Hans Peter Freyther 5d0e56f722 [gsm48] Introduce a gsm48_generate_mid_from_imsi method
Prefix generate_mid_from_tmsi with a gsm48_, create a new method
to binary encode the imsi. Add a unit test for parsing and decoding.

The implementation can parse the data it generated and the
last octet seems to be filled with the end mark.
2009-08-20 13:59:14 +02:00
Holger Hans Peter Freyther d1862d7cf9 [gsm48] Move parsing of the MI from to gsm_04_08_utils.c
The parsing of the IMSI is needed for the MSC part as well. Move
it to the gsm_04_08_utils.c so it can be used.
2009-08-20 13:57:12 +02:00
Holger Hans Peter Freyther 081c00d885 [paging] Better use ';' for the command... 2009-08-20 13:57:12 +02:00
Holger Hans Peter Freyther e4e8bf4dd0 [subscr] Change the signature... the gsm_network is in the subscr
Remove the extra parameter from the method, the network can be
taken from the subscriber.
2009-08-20 13:56:45 +02:00
Holger Hans Peter Freyther 4a5cf5f23d [cleanup] Remove old and dead code from the telnet_interface.c 2009-08-20 13:56:45 +02:00