Commit Graph

986 Commits

Author SHA1 Message Date
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
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 <>
Signed-off-by: Holger Hans Peter Freyther <>
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 <>
Tested-by: Holger Hans Peter Freyther <>
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 <>
Signed-off-by: Holger Hans Peter Freyther <>
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 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
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 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 <>
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 <>
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 <>
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 <>
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 <>
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
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 <>
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
Holger Hans Peter Freyther e78074eb07 [debug] Make the hexdump parameter const
This way it can be used from values coming TLVP_VAL.
2009-08-20 13:56:45 +02:00
Holger Hans Peter Freyther 5859de86de [misc] Create a gitignore to ignore files
Make git status more useful. Ignore autoconf files, compiled
artefacts, executables and test programs.
2009-08-20 13:56:45 +02:00
Harald Welte 878daf069c Merge commit 'origin/master' 2009-08-20 02:59:50 +09:00
Harald Welte 2a2c02b973 remove erroneously-committed C file from wireshark patch directory 2009-08-20 02:40:32 +09:00
Harald Welte 6a289e0b3c wireshark patch to connect RRLP parser to GSM DTAP 2009-08-20 02:33:14 +09:00
Harald Welte 74bdce8986 make wireshark decode RRLP inside GSM 08.58 2009-08-20 00:59:30 +09:00
Harald Welte 4e8c98a1ca sync wireshark patches with svn rev. 29453 2009-08-20 00:59:11 +09:00