Harald Welte
bf5e8df424
cosmetic fixes / more comments
2009-02-03 12:59:45 +00:00
Harald Welte
dc55db9d95
cosmetic fixes
2009-02-03 12:58:59 +00:00
Harald Welte
8f5e239388
cosmetic/coding style fixes
2009-02-03 12:57:37 +00:00
Harald Welte
6f14691c61
make bs11_config status lines shorter
2009-02-03 02:05:28 +00:00
Harald Welte
ea280446bb
add rudimentary code to debug-print the CCCH LOAD INDICATION
2009-02-02 22:29:56 +00:00
Harald Welte
5083b0b1f1
* fix warnings while compiling abis_nm.c
2009-02-02 19:20:52 +00:00
Harald Welte
5f6f149983
add limits.h for PATH_MAX
2009-02-02 14:50:29 +00:00
Harald Welte
7ed1a64d9d
* exit program if we cannot set up the serial port
...
* leave the program if ctrl+c is pressed three times even without logoff from BTS
2009-02-02 14:45:49 +00:00
Harald Welte
44227dd62f
typo
2009-02-01 22:25:58 +00:00
Harald Welte
3ffd1376b7
* add abis_nm_software_load_status() to header file
...
* new abis_nm_bs11_bsc_disconnect() function to disconnect BSC/BTS link
* add support for 'forced load' of BS-11 software to abis_nm.c and bs11_config
* remove lots of debug output
* print progress during software load
2009-02-01 22:15:49 +00:00
Harald Welte
c12d52bae4
* improve parsing of status/phase response from BTS
...
* split rs232 support into separate file (like misdn.c)
2009-02-01 21:39:06 +00:00
Harald Welte
268bb40b35
* add more detailed status printout to bs11_config
...
* add support for real LMT logon time
* add support for abis external time
* move 'create_trx1_objects' to separate function
2009-02-01 19:11:56 +00:00
Harald Welte
832822961d
Enable CCCH LOAD INDICATION always, from 0% upwards, and report it every second
2009-02-01 16:22:19 +00:00
Harald Welte
5e4d1b3663
* rename NM_MT_BS11_LOGOFF to NM_MT_BS11_LMT_LOGOFF
...
* add more BS11 specific attributes
* define all valid BS11 PA power classes
* add callback function to software load
* introduce SWL load function for BS-11 style SWL file lists
* separate activation of software from loading of software
* add function to obtain BS-11 serial number
2009-02-01 13:36:56 +00:00
Harald Welte
043d04a99a
* Use new NM_ATT_BS11 definitions instead of magic numbers
...
* rename FECTORY_LOGON into LMT_LOGON since it's not always factory level
2009-01-29 23:15:30 +00:00
Harald Welte
623d53185b
bs11_config:
...
* disable serial port POST processing
* default delay is 0
* make window size user-configurable (default: 8)
* add missing help line for the --delay option
* don't forget to create the CCLK object as part of minimal config
2009-01-29 21:14:05 +00:00
Harald Welte
1602ade492
Fix end-of-software_load detection (send segment with window number 0, wait for seg_ack)
2009-01-29 21:12:39 +00:00
Harald Welte
14f0934f0b
* use select loop based rx/tx processing in bs11_config
...
* improve parsing/generation of fake lapd header
2009-01-29 19:28:38 +00:00
Harald Welte
3b8ba215b9
* Fix BS11 software download routines in abis_nm.c
...
* Introduce user-configurable delay when sending serial msgs from bs11_config
2009-01-29 12:27:58 +00:00
Harald Welte
071f34d7c6
bs11_config:
...
* fix serial port initialization
* add bs11_state enum and work accordingly
2009-01-29 09:24:38 +00:00
Harald Welte
f186c46ff6
bs11_config: add setting of baud rate
2009-01-29 08:45:19 +00:00
Harald Welte
bb15131847
fix off-by-one error in BS11 factory logon command
2009-01-28 20:42:07 +00:00
Holger Freyther
97cce476a2
[paging] Slightly increase the timeout to not overload the BTS...
2009-01-27 23:49:40 +00:00
Holger Freyther
bf83481799
[paging] Discard paging requests after not completing them...
2009-01-27 23:46:19 +00:00
Holger Freyther
1525de0c8f
[paging] memset and improve error message
2009-01-27 23:38:27 +00:00
Holger Freyther
342a2c67de
[abis] Do not confuse me again....
2009-01-27 22:49:48 +00:00
Harald Welte
cfe6dce248
don't logon twice
2009-01-19 16:06:43 +00:00
Harald Welte
61e42ad7fd
add bs11_config as LMT alternative
2009-01-18 19:10:46 +00:00
Harald Welte
7837489a6e
abis_nm_reset_resource is a bs11 specific function
2009-01-18 19:09:22 +00:00
Harald Welte
4724f99d19
Implementation of GSM12.21 LOAD SOFTWARE (BS11 dialect thereof)
2009-01-18 18:01:49 +00:00
Harald Welte
978cb42911
add BTS TYPE field to facilitate future non-BS11 BTS support
2009-01-18 17:57:27 +00:00
Harald Welte
6f676a3541
abis_nm: use correct length in 08.59 OML header for all messages
2009-01-18 14:27:48 +00:00
Harald Welte
1bc0906436
abis_nm: more BS11 specific messages for configuration
2009-01-18 14:17:52 +00:00
Harald Welte
05188ee7a7
* prefix all BS11 specific OML functions with proper name
...
* add more BS11 specific OML commands (TRX power, logon, OML TEI, ...)
2009-01-18 11:39:08 +00:00
Harald Welte
adaf08bec8
add some more BS11 specific OML definitions
2009-01-18 11:08:10 +00:00
Harald Welte
d08de2f9e4
fix typo
2009-01-11 04:38:55 +00:00
Harald Welte
9bb7c70016
If there is already a subscriber and it does not equal to us -> moan
...
And unreference the gsm_subscriber object otherwise we would leak.
2009-01-10 03:21:41 +00:00
Harald Welte
4ed0e92464
Make mi_to_string parse the TMSI we generate, finish CM Service Request implementation
...
The TMSI encoding is up to us but generate_mid_from_tmsi and mi_to_string
did not agree on the encoding. Adjust mi_to_string to properly decode the
TMSI generated by generate_mid_from_tmsi. Check that the four bits are '1111'
and that the length is five. Memcpy the bytes to tmsi (to work with ARM or such)
and convert the number to host order...
Implement the CM Service Request. Try to get the subscriber from the TMSI and
assign it to the gsm_lchan. There is a small issue that will be fixed in the
next commit.
(done by z.)
2009-01-10 03:17:30 +00:00
Harald Welte
ba4cf164b0
Start working on CM Service Request
...
Be able to send Accept/Reject the Service Request. Use mi_string
instead of the the msgb buffer (even if it is memsetted and such)...
The TMSI allocation seems to be a bit problematic and needs some
further checking. The rough idea is that we try to find the subscriber
for a CM Service Request and then decide based on the subscriber
if we want to handle the call.
2009-01-10 01:49:35 +00:00
Harald Welte
c627afceaa
Reset the use_count to zero in chan_free
...
It is possible that the BTS is closing the channel even when
our upper layers are doing work. Reset the use_count add a fixme
to call cancellations for pending operations. Cancellation of the
call state (state machines in general) and such come into mind...
2009-01-09 21:39:17 +00:00
Harald Welte
498b0bbd9b
Use use_lchan/put_lchan for call handling to keep the channel up
...
Increase when the refcount of the lchan when we initiate a call,
get a SETUP message and put it when we want to release the call...
Once we have proper Q.931 support the use/put needs to be improved,
e.g. we currently do not allow to hangup from the network, and it
will ring until the end of time...
2009-01-09 21:27:43 +00:00
Harald Welte
626fe9c42b
Print the refcount of the lchan as well
2009-01-09 21:24:53 +00:00
Harald Welte
2f1311b90e
[paging] Page pagegroup one...
...
Currently we get OVERLOAD (8.6.3 of 08.58) and no CCCH LOAD INDICATION...
we will have to handle the OVERLOAD somehow...
2009-01-06 23:50:39 +00:00
Harald Welte
38c2f13098
Hook the paging code into bsc_hack.c and telnet_interface.c
...
Wrote and test code to add and remove paging requests... This
will be using the fact that the linux list is building a circle
on each tick we can send one/x paging requests and continue round
robin...
2009-01-06 23:10:57 +00:00
Harald Welte
b68899d3e3
Start creating a paging layer...
...
You can request to open a channel to a MS and the paging layer
will call you once the channel is allocated. Internally the CCCH
Load Indication will be handled and retry to page a terminal.
2009-01-06 21:47:18 +00:00
Harald Welte
69b2af293e
Handle TMSI reallocation complete by printing the subscriber
...
It looks like that certain phones that send their old TMSI from
a different network and we assign them a new one with LOCATION
UPDATING ACCEPT will send us a TMSI Reallocation Complete. Print out
the the imsi.
2009-01-06 19:47:00 +00:00
Harald Welte
9898188ca7
Allow to set a different ARFCN
...
Add the -f option to use a different channel. This is done
by patching the various tables before the OML and RSL is brought
up. It looks like it is working...
Patch by Harald, moving of the patch_tables invocation by zecke
2009-01-06 18:59:11 +00:00
Harald Welte
8965da4fde
Tabs no Spaces... at least here
2009-01-06 18:09:02 +00:00
Harald Welte
ce281c0772
add initializer function for subchan_demux
2009-01-05 20:14:14 +00:00
Harald Welte
418f5a4e25
* add function to change c-bits in TRAU frame from uplink to downlink
...
* add function to re-encode an exploded TRAU frame into a bit-per-byte stream
2009-01-05 20:12:47 +00:00
Harald Welte
38e04372e5
handle IDLE speech frames in trau_frame code
2009-01-05 19:42:46 +00:00
Harald Welte
196a366e30
make sure we build (even if not use) subchan_demux and trau_frame code
2009-01-05 19:01:56 +00:00
Harald Welte
2a8ee52ced
add (untested) TRAU frame decoder with support for FR/EFR and AMR
2009-01-05 19:01:01 +00:00
Harald Welte
54bd94d8b7
add (untested) 16kbit E1 sub-channel demux with TRAU frame sync
2009-01-05 19:00:01 +00:00
Holger Freyther
ca362a6028
Make gcc happy and remove a couple of warnings
...
Remove the callbacks from gsm_network for now. A set of different
callbacks will be back. E.g. when the paging is completed, when the
Q.931 like call handling is there...
Remove var's or move them into #if 0, remove unused stuff that looks
like we do not need it anytime soon or #if 0 them, move stuff around.
2009-01-04 21:05:01 +00:00
Holger Freyther
7448a53ddb
Be able to initiate paging from the telnet interface
...
The actual paging by subscriber needs to be implemented
2009-01-04 20:18:23 +00:00
Holger Freyther
4c8f114976
Fix warning
2009-01-04 20:17:07 +00:00
Holger Freyther
a553d098e7
Export the gsm0411 alloc and send function
2009-01-04 20:16:25 +00:00
Holger Freyther
5e76ce61ac
Some simple size check. We would not overflow but would send garbage
...
Check the size
2009-01-04 20:15:12 +00:00
Harald Welte
ca64da984b
make use of new functions to print string chreq reason and lchan type
2009-01-04 16:54:12 +00:00
Harald Welte
d4fc1b29ca
use get_[lp]chan_name() functions for telnet interface
2009-01-04 16:11:31 +00:00
Harald Welte
a72c98eb2f
functions to convert lchan/pchan type into human-readable string
2009-01-04 16:10:38 +00:00
Harald Welte
47d88aecaf
Add some functions to CREATE OBJECTs in the BS-11 internal database
2009-01-04 12:02:08 +00:00
Holger Freyther
868b8cdd58
Implement sending custm GSM 04.08 commands
...
First you would page the IMSI and then send GSM 04.08
commands to the MS. This should help when testing new
commands
2009-01-04 03:57:27 +00:00
Holger Freyther
3e2c32322e
Make gsm48_sendmsg public as well
2009-01-04 03:55:31 +00:00
Holger Freyther
819dd205a9
Make gsm48_msgb_alloc public and usable for the telnet_interface
2009-01-04 03:52:50 +00:00
Holger Freyther
3ae8fd2acb
Implement the call command...
...
Passing of an origin is missing this will need work in
gsm_04_08.
2009-01-04 03:50:40 +00:00
Holger Freyther
f87573dc4e
Implement put_channel/get_channel, save on which bts we currently operate
...
Allow to change the refcount for a given channel. Store which
bts is our primary bts. A command to switch the primary bts will
be added as well. This makes entering and parsing of commands more
easy.
2009-01-04 03:49:41 +00:00
Holger Freyther
d0e38c3cad
Add implementation to find a lchan by the struct gsm_subscriber
...
Really compare pointers to check if the one gsm_subscriber
is equal to the other... gsm_subscriber should be unique for
a given IMSI so comparing the pointers should be fine.
2009-01-04 03:48:30 +00:00
Holger Freyther
a471a41680
Define the gsm_subscriber getter functions in the header
2009-01-04 03:47:05 +00:00
Holger Freyther
ae61cae9b2
Add a show command to list the channel allocation
...
Example output
show
BTS #0 on link 0 LOC: 1 TRX: 1 CCCH0: arfcn:123,#0
TRX: 0 ARFCN: 123
TS: #0 pchan: 2 flags: 0
LCHAN: #0 type: 0 subscriber: na/na/na use: 0 loc: (nil)
LCHAN: #1 type: 0 subscriber: na/na/na use: 0 loc: (nil)
LCHAN: #2 type: 0 subscriber: na/na/na use: 0 loc: (nil)
LCHAN: #3 type: 0 subscriber: na/na/na use: 0 loc: (nil)
LCHAN: #4 type: 0 subscriber: na/na/na use: 0 loc: (nil)
LCHAN: #5 type: 0 subscriber: na/na/na use: 0 loc: (nil)
LCHAN: #6 type: 0 subscriber: na/na/na use: 0 loc: (nil)
LCHAN: #7 type: 0 subscriber: na/na/na use: 0 loc: (nil)
TS: #1 pchan: 0 flags: 0
LCHAN: #0 type: 0 subscriber: na/na/na use: 0 loc: (nil)
LCHAN: #1 type: 0 subscriber: na/na/na use: 0 loc: (nil)
LCHAN: #2 type: 0 subscriber: na/na/na use: 0 loc: (nil)
LCHAN: #3 type: 0 subscriber: na/na/na use: 0 loc: (nil)
LCHAN: #4 type: 0 subscriber: na/na/na use: 0 loc: (nil)
LCHAN: #5 type: 0 subscriber: na/na/na use: 0 loc: (nil)
LCHAN: #6 type: 0 subscriber: na/na/na use: 0 loc: (nil)
LCHAN: #7 type: 0 subscriber: na/na/na use: 0 loc: (nil)
TS: #2 pchan: 0 flags: 0
LCHAN: #0 type: 0 subscriber: na/na/na use: 0 loc: (nil)
LCHAN: #1 type: 0 subscriber: na/na/na use: 0 loc: (nil)
LCHAN: #2 type: 0 subscriber: na/na/na use: 0 loc: (nil)
LCHAN: #3 type: 0 subscriber: na/na/na use: 0 loc: (nil)
LCHAN: #4 type: 0 subscriber: na/na/na use: 0 loc: (nil)
LCHAN: #5 type: 0 subscriber: na/na/na use: 0 loc: (nil)
LCHAN: #6 type: 0 subscriber: na/na/na use: 0 loc: (nil)
LCHAN: #7 type: 0 subscriber: na/na/na use: 0 loc: (nil)
TS: #3 pchan: 0 flags: 0
LCHAN: #0 type: 0 subscriber: na/na/na use: 0 loc: (nil)
LCHAN: #1 type: 0 subscriber: na/na/na use: 0 loc: (nil)
LCHAN: #2 type: 0 subscriber: na/na/na use: 0 loc: (nil)
LCHAN: #3 type: 0 subscriber: na/na/na use: 0 loc: (nil)
LCHAN: #4 type: 0 subscriber: na/na/na use: 0 loc: (nil)
LCHAN: #5 type: 0 subscriber: na/na/na use: 0 loc: (nil)
LCHAN: #6 type: 0 subscriber: na/na/na use: 0 loc: (nil)
LCHAN: #7 type: 0 subscriber: na/na/na use: 0 loc: (nil)
TS: #4 pchan: 0 flags: 0
LCHAN: #0 type: 0 subscriber: na/na/na use: 0 loc: (nil)
LCHAN: #1 type: 0 subscriber: na/na/na use: 0 loc: (nil)
LCHAN: #2 type: 0 subscriber: na/na/na use: 0 loc: (nil)
LCHAN: #3 type: 0 subscriber: na/na/na use: 0 loc: (nil)
LCHAN: #4 type: 0 subscriber: na/na/na use: 0 loc: (nil)
LCHAN: #5 type: 0 subscriber: na/na/na use: 0 loc: (nil)
LCHAN: #6 type: 0 subscriber: na/na/na use: 0 loc: (nil)
LCHAN: #7 type: 0 subscriber: na/na/na use: 0 loc: (nil)
TS: #5 pchan: 0 flags: 0
LCHAN: #0 type: 0 subscriber: na/na/na use: 0 loc: (nil)
LCHAN: #1 type: 0 subscriber: na/na/na use: 0 loc: (nil)
LCHAN: #2 type: 0 subscriber: na/na/na use: 0 loc: (nil)
LCHAN: #3 type: 0 subscriber: na/na/na use: 0 loc: (nil)
LCHAN: #4 type: 0 subscriber: na/na/na use: 0 loc: (nil)
LCHAN: #5 type: 0 subscriber: na/na/na use: 0 loc: (nil)
LCHAN: #6 type: 0 subscriber: na/na/na use: 0 loc: (nil)
LCHAN: #7 type: 0 subscriber: na/na/na use: 0 loc: (nil)
TS: #6 pchan: 0 flags: 0
LCHAN: #0 type: 0 subscriber: na/na/na use: 0 loc: (nil)
LCHAN: #1 type: 0 subscriber: na/na/na use: 0 loc: (nil)
LCHAN: #2 type: 0 subscriber: na/na/na use: 0 loc: (nil)
LCHAN: #3 type: 0 subscriber: na/na/na use: 0 loc: (nil)
LCHAN: #4 type: 0 subscriber: na/na/na use: 0 loc: (nil)
LCHAN: #5 type: 0 subscriber: na/na/na use: 0 loc: (nil)
LCHAN: #6 type: 0 subscriber: na/na/na use: 0 loc: (nil)
LCHAN: #7 type: 0 subscriber: na/na/na use: 0 loc: (nil)
TS: #7 pchan: 0 flags: 0
LCHAN: #0 type: 0 subscriber: na/na/na use: 0 loc: (nil)
LCHAN: #1 type: 0 subscriber: na/na/na use: 0 loc: (nil)
LCHAN: #2 type: 0 subscriber: na/na/na use: 0 loc: (nil)
LCHAN: #3 type: 0 subscriber: na/na/na use: 0 loc: (nil)
LCHAN: #4 type: 0 subscriber: na/na/na use: 0 loc: (nil)
LCHAN: #5 type: 0 subscriber: na/na/na use: 0 loc: (nil)
LCHAN: #6 type: 0 subscriber: na/na/na use: 0 loc: (nil)
LCHAN: #7 type: 0 subscriber: na/na/na use: 0 loc: (nil)
2009-01-04 03:46:01 +00:00
Harald Welte
4668fdaa26
define and use enum values for BS11 (or Siemens?) specific OML message types
2009-01-03 08:19:29 +00:00
Harald Welte
227d4073fb
use NM_MT_* enum instead of hard-coded values
2009-01-03 08:16:25 +00:00
Holger Freyther
52aab5445d
Make wireshark happy.
...
Removing the P Bit from the fake LAPD frame will make wireshark
run the data through the GSM RSL dissector with the right SAPI
and LAPD preference setting.
2009-01-03 05:49:22 +00:00
Harald Welte
1272aab1cd
Go through del_timer otherwise in_list will not be reset leading to crashes...
2009-01-03 04:39:51 +00:00
Harald Welte
599639eaf9
Readd the dummy lapd header... this gives valid TEI/SAPI information
...
Besides that the header is spoofed, we lose the information about
the channel (we will have to add our own encap type)
2009-01-03 03:28:10 +00:00
Harald Welte
4e0d137a2c
Dump something that can be read by wireshark
...
We need to append the Linux LAPD header for wireshark. This means
that we currently can not support B Channels or such. Maybe we will
need to add another LAPD header.
2009-01-03 03:04:07 +00:00
Harald Welte
62a923d46a
Use the right network/link type, prepend the vISDN header...
...
Now only the LAPD header is invalid...
2009-01-03 01:32:00 +00:00
Harald Welte
ca6bf7815a
Write the pcap packet header first :)
2009-01-03 00:41:04 +00:00
Harald Welte
b8f04ea5a9
Add new management function to struct timer_list
...
Make sure that del_timer succeeds and removes an entry from the list. Currently
sending the LOCATION UPDATING REJECT from within the timer will not remove the
list element as ->active gets set to 0 in the timer updating before calling the
callback. Fix the segfault and allow the timer to be removed from within its
own callback.
2009-01-02 23:57:22 +00:00
Holger Freyther
219518d064
Add simplistic telnet control interface
...
This might turn into a complete wire protocol with special
client software. For now it will be a simple client interface
that you can use with telnet to do certain things.
This is using flex to implement the parsing. Implementation
and more commands will follow.
2009-01-02 22:04:43 +00:00
Holger Freyther
c6880a46ad
Use the _safe variant as a bsc_unregister_fd might be called from within the callback
2009-01-02 21:53:34 +00:00
Holger Freyther
52af7d4284
Write only actual data into the pcap file
...
The current LAPD control field for indication/disconnect/etc
is wrong and currently we are only interested in the actual
A-Bis data spoken between the BTS and BSC and not on the indication
of the physical line (connection, disconnect, release..)
2009-01-02 01:18:28 +00:00
Holger Freyther
2139b246a0
Attempt to put the time into the pcap packet record
2009-01-02 01:17:48 +00:00
Holger Freyther
9a3ee0ff1b
Add the option to write the communication on the D Channel to a pcap file
...
When using ISDN as network type and using a fake LAPD encapsulation
wireshark should be able to recognize some bits if dump.
Append a dummy LAPD header. It is not clear to me if the Control field
of the LAPD frame is part of the msg or if we need to add it as well.
TODO:
- Do the same for the B Channel
- Write out time
- Check if more of the LAPD frame needs to be prepended. The
information from the mISDNhead comes into mind. Maybe it makes
sense to start a custom wireshark mISDN dissector.
2009-01-02 00:40:15 +00:00
Holger Freyther
355701bcc0
Document where to find the how to determine the paging group
...
Point to the right location in the pile of spec
2009-01-01 18:02:29 +00:00
Holger Freyther
12aa50d5a2
Change the subscriber and database backend
...
gsm_subscriber is now refcounted, the db backend is leaking
a lot less, db_get_subscriber will allocate the subscr record
now, subscr_* will look up a subscriber in the list of currently
active subscribers and add an ref to this one.
The db test cases pass, more testing will be when next to the bts
2009-01-01 18:02:05 +00:00
Holger Freyther
67b4b9a017
Do not call rsl_chan_release directly but use the use_count of the lchan
...
Call use_lchan early in allocate_loc_updating_req, do not directly call
rsl_chan_release but go through channel alloc to take the use_count into
account.
2009-01-01 03:46:11 +00:00
Holger Freyther
3eaa792b21
Speculative fix for not sending LOCATION UPDATING REJECT
...
As reported by the operator the rejecting didn't work after the
first fix (wrong logic/missing negation). The hypothesis is that
that the lchan was released before the reject timeout was fired.
Fix it by getting a reference on the lchan when allocating a
logical operation and release the reference when the operation
is finished or timed out.
2009-01-01 02:59:03 +00:00
Harald Welte
d125250ae2
add signal handlers for clean shutdown of BTS via OML on shutdown of program
2009-01-01 01:50:32 +00:00
Harald Welte
e872cb1221
get rid of some more gcc warnings
2009-01-01 00:33:37 +00:00
Harald Welte
f85497c857
get rid of gcc warnings about function prototype
2009-01-01 00:33:20 +00:00
Harald Welte
404d816947
add missing string.h include
2009-01-01 00:33:02 +00:00
Harald Welte
21768818f0
don't return a value in a void function
2009-01-01 00:32:49 +00:00
Harald Welte
179f064cbe
* fix check for null-pointer in release_loc_updating_req()
...
* fix endianness of operator name
2008-12-31 23:59:18 +00:00
Holger Freyther
dbede4e414
Move the db_test.c to a specific test directory
2008-12-31 23:25:05 +00:00
Holger Freyther
73487a23da
Introduce logical updating request operation on the gsm_lchan
...
We are going to have logical operations like Phone Call, SMS,
Paging, Updating Request on a logical channel and for each of
these operations we might need to store state. For now pointers
in gsm_lchan look like the best way of doing this and we start
by introducing an operation for the location updating request.
The new flow of things are:
- We get the location updating request and update/create
the subscriber and maybe send the identity requests to
the mobile station
- We start the updating timer, if it times out we will
reject the mobile station.
- Once we get the Identity Responses we have asked for
and the reject timer did not fire yet we might accept
the user.
2008-12-31 18:53:57 +00:00
Holger Freyther
41ed300aab
We have freed the channel there is no subscriber associated anymore
...
FIXME: Introduce refcounting on the subscriber record. This looks like
a genuine memory leak to me.
2008-12-31 18:52:54 +00:00
Holger Freyther
e97f7fba97
Add an option to set the global reject cause
...
This will need to be moved into bsc_hack.c together with the
policy to accept/reject a UPDATING LOCATION REQUEST.
2008-12-31 18:52:11 +00:00
Holger Freyther
1bc7de50be
Fix the compile the timer got renamed
2008-12-31 18:50:58 +00:00
Holger Freyther
c6ea9dbeba
Recylce a gsm_lchan when the refcount drops to zero
...
When a channel is allocated, start a timeout, when a lchan_use
is used the timer will be restarted, when the timeout fires
we will try to recycle or restart the timer.
2008-12-30 19:18:21 +00:00
Holger Freyther
36cbeff164
Document where Channel release is coming from
2008-12-30 19:15:20 +00:00
Holger Freyther
ea889020e2
Fix indenting... use tabs here
2008-12-30 19:10:47 +00:00
Harald Welte
f5cbab7478
* add network name information to GSM network
...
* disable callbacks for now
2008-12-30 18:00:15 +00:00
Harald Welte
db253af1aa
* fix IMSI parsing of last two digits
...
* add MM INFO packet support and send it after LOCATION ACCEPT
* send 'ALL YOUR BASE ARE BELONG TO US'
2008-12-30 17:56:55 +00:00
Holger Freyther
89824fc466
Add an option to allow everyone to the network.
...
This should move out of gsm_04_08 and the accept, reject
policy should be controllable by the higher levels.
2008-12-30 16:18:18 +00:00
Holger Freyther
eab55416f8
Fix regression and send the accept message again
...
I removed gsm48_sendmsg(msg) when removing the send_sms from the
_acc method. This is obviously wrong. Fix the regression, spotted
while testing with LaF0rge. This regression was introduced in r120.
2008-12-30 16:18:15 +00:00
Holger Freyther
e6cabf0ba0
Channel opened not from a PAGING COMMAND... remove message
2008-12-30 16:18:14 +00:00
Harald Welte
8c2e36edff
use 'ALL YOUR PHONE ARE BELONG TO US' as SMS
2008-12-30 15:00:14 +00:00
Harald Welte
b0f4793f90
export debug_flags
2008-12-30 14:59:01 +00:00
Harald Welte
523200b11b
update the timestamp in the db
2008-12-30 14:58:44 +00:00
Harald Welte
6cc38d7f79
suppress hexdumps for better console readability
2008-12-30 14:58:19 +00:00
Harald Welte
817f3c8699
add missing return statement
2008-12-30 14:57:59 +00:00
Daniel Willmann
e2a728d44b
Nothing to see here, move along;
2008-12-30 14:03:09 +00:00
Daniel Willmann
3b3f001269
Change TPDU of welcome message
2008-12-30 13:56:46 +00:00
Holger Freyther
429e77612a
Fix documentation so one is finding it in GSM04.08
...
UPDATE => UPDATING
2008-12-30 13:28:30 +00:00
Holger Freyther
b7193e4e94
Introduce new callbacks, remember that we have LOC UPD REQ, reject things only once
...
gsm_data.h add new callbacks, add some parameters, update bsc_hack and
other call sites.
Remember that we need to ACCEPT/REJECT the LOCATION UPDATE REQUEST and
then send the ACCEPT or schedule the sending of the reject. Currently
it is possible that for a new subscriber that we do not have a !subscbr
yet, we will trigger an IDENTITY REQUEST and schedule the reject timer.
This may lead to rejecting AND accepting (a new subscriber). This issue
is triggered when allowing everyone to connect to the network.
2008-12-29 17:44:08 +00:00
Daniel Willmann
fad5d0db83
Regenerate a valid TPDU and send it at first registration
2008-12-29 16:04:14 +00:00
Daniel Willmann
a3e2984a4d
Send real SMSC no
2008-12-29 16:03:54 +00:00
Holger Freyther
2eafef599c
Up on call released release the channel and take the next item
...
Once a call is released, release the gsm_lchan and move to the
next item in pending_stations or wait for more work.
2008-12-29 06:42:17 +00:00
Holger Freyther
abade7af88
Initiate a call once we have a channel assigned
2008-12-29 06:42:15 +00:00
Daniel Willmann
4a1e87928c
Add RPDU length
2008-12-29 06:23:56 +00:00
Holger Freyther
88ea832ed7
Unite the acked/nacked handling in a common response...
2008-12-29 06:23:52 +00:00
Holger Freyther
24893de3cb
Inform the bsc about acked or nacked channels...
...
On channel allocation the bsc_hack added a cookie to the lchan on
ack and nack we will take a look and then assume it is the channel
we have allocated. This can be easily exploited by a MS sending fake
responses to paging commands. After the channel has been acked we would
have to ask for the tmsi or find the information on the channel
allocation. For now we will guess.
2008-12-29 06:23:51 +00:00
Holger Freyther
3186bf209a
Add callback for allocated lchannels
...
Currently it is not possible to know for which tmsi the channel
is going to be allocated. The bsc_hack will guess.. in the future
it might be forced to ask for the tmsi after the channel has been
opened...
2008-12-29 06:23:49 +00:00
Holger Freyther
86f1812105
Remove duplicate call... semantic should stay the same
2008-12-29 06:23:47 +00:00
Holger Freyther
07cc8d8bee
Improve page command handling in the bsc_hack
...
Add a callback to the gsm_network. When updating the location and
assigning a new tmsi callback into the bsc_hack.c and have a queue
of mobile stations to page, allocate a channel for and ultimately
dial.
2008-12-29 06:23:46 +00:00
Holger Freyther
ba4d28a36e
[gsm_04_08] Do not automatically initiate a call
...
Do not automatically dial but release the channel immediately. The
idea is that this was the paging command will be handled by the mobile
station.
2008-12-29 06:23:44 +00:00
Harald Welte
e27bb34223
fix big memory leak in E1 TS2 handling
2008-12-29 06:06:35 +00:00
Daniel Willmann
6fe997e9dd
Implement sending SMS and send one on network registration
2008-12-29 04:20:41 +00:00
Harald Welte
3b2ec4261f
Documentation update and where we found the information
2008-12-29 04:11:14 +00:00
Harald Welte
2cbe0924b6
Print channel requests coming from paging command, print the reason in every message
2008-12-29 04:09:31 +00:00
Harald Welte
e14a57cc0e
Create request channel reason to see channel requests originating from PAG
2008-12-29 04:08:28 +00:00
Harald Welte
d35b6a7b12
debug: Create a region for Paging Command
2008-12-29 04:06:41 +00:00
Daniel Willmann
bb16e8e39a
Print out info about CP-ERROR
2008-12-29 03:53:50 +00:00
Daniel Willmann
aecbbed5e4
RP-ACK needs to be sent in a CP-DATA
2008-12-29 03:45:50 +00:00
Daniel Willmann
9dfbf253c6
Send transaction index when sending an CP-ACK
2008-12-29 03:24:29 +00:00
Harald Welte
65e74ccb04
disable paging, send SETUP after LOCATION UPDATE ACCEPT
2008-12-29 01:55:35 +00:00
Daniel Willmann
471712b133
ACK sms-submit
2008-12-29 01:54:02 +00:00
Daniel Willmann
e0fbec823b
Parse sms-submit messages
2008-12-29 00:44:41 +00:00
Harald Welte
6f4b753000
turn gsm_cc_tx_simple into gsm_tx_simple
2008-12-29 00:39:37 +00:00
Harald Welte
b84e2f4f1b
* use 16bit for network and country code
...
* use aligned attribute for more data structures
* add command line arguments for operator/country code
2008-12-28 23:42:04 +00:00
Holger Freyther
bde361064a
make it optional where the hlr database is stored
...
Add --database to define where the database is stored. The default
was changed to not store the file in /tmp anymore.
2008-12-28 22:51:39 +00:00
Daniel Willmann
10d06f6f8c
Add coloring for SMS debug messages
2008-12-28 21:38:25 +00:00
Holger Freyther
33a6184a9e
Add the new options to the getopt_long call as well
...
This should allow to set the MCC and MNC now
2008-12-28 16:57:19 +00:00
Harald Welte
104604e10a
Fix compile, on rebase the static_assert change got lost...
...
at the beginning we had l2 pseudo length in type5 and type6
messages as well but that got removed.
2008-12-28 16:36:11 +00:00
Holger Freyther
b9ddfd09e8
[bsc_hack] Patch the tables before we setup the rsl
...
Currently we just patch the MCC, MNC and LAC. Allow to change
the siX packages by removing the const.
2008-12-28 16:32:45 +00:00
Holger Freyther
177466199f
[gsm0408] Make the generate_lai usable by other code
...
Prefix generate_lai with gsm0408 and update call sites. It will
be used from within bsc_hack.c
2008-12-28 16:32:44 +00:00
Holger Freyther
4d505470e8
[bsc_hack] Start to understand the SI packages we send
...
Add comments in front of the bytes to define where they
are coming from.
2008-12-28 16:32:42 +00:00
Holger Freyther
24287b6bb2
[bsc_hack] Make sure that the newly defined structs match the current packets
...
For System Information Type 5 and System Information Type 6 the L2 pseudo
length is not transmitted. This is why we substract the struct size with -1.
2008-12-28 16:32:41 +00:00
Holger Freyther
efde7fb1eb
bsc_hack: Add command line parameter to set the MCC and MNC
...
The patching of the system information type1-type4 messages
are still to be done.
2008-12-28 14:14:56 +00:00
Jan Luebbe
3444ddb85d
fix typo in debug message
2008-12-28 12:37:15 +00:00
Harald Welte
255539c742
working state up to location update and classmark inquiry
2008-12-28 02:26:27 +00:00
Daniel Willmann
fdd0a6c157
Add SMS (GSM 04.11) testing program
2008-12-28 01:51:14 +00:00
Daniel Willmann
8b3390effd
Start implementing GSM 04.11 (short message service)
2008-12-28 00:31:09 +00:00
Jan Luebbe
391d86e0d5
add extension field to subscriber struct and name column to db
2008-12-27 22:33:34 +00:00
Harald Welte
1a4121882e
fix TMSI length in Mobile Identity IE of LOCATION UPDATE ACCEPT
2008-12-27 22:13:43 +00:00
Harald Welte
bcae43fe1b
SMS stub
2008-12-27 21:45:37 +00:00
Harald Welte
75a983fab0
* add database handling
...
* fix IMSI handling
2008-12-27 21:34:06 +00:00
Harald Welte
10b487b1c0
* fix location update reject (actually reject, not accept)
2008-12-27 19:53:37 +00:00
Harald Welte
98243f8e48
* release channel after LOCATION UPDATE REJECT
2008-12-27 19:46:41 +00:00
Harald Welte
2d5b638bd3
* fix sending of wrong message discriminator for dedicated channel RSL msgs
...
* remove dead old code for TCH/SDCCH activation
* fix RF CHANNEL RELEASE logic + integration with lchan_alloc/free
* use Page Mode SAME and not NORMAL
2008-12-27 19:46:06 +00:00
Jan Luebbe
e30dbb3fa3
also track creation and update time for subscriber and equipment
2008-12-27 18:08:13 +00:00
Jan Luebbe
fac25fccbd
add a equipment table
2008-12-27 18:04:34 +00:00
Jan Luebbe
6e2e545fa1
add authorized state to subscribers in db
2008-12-27 16:47:55 +00:00
Harald Welte
e9a8261486
hack to write TS2 frames to a file
2008-12-27 16:45:29 +00:00
Harald Welte
4bc90a160a
add minimal MO call state transitions
2008-12-27 16:32:52 +00:00
Jan Luebbe
7eda3ab3c8
remove db debug output
2008-12-27 16:24:42 +00:00
Jan Luebbe
5c15c85be3
rewrite db backend
2008-12-27 15:59:25 +00:00
Holger Freyther
b332f61f0d
Use getopt in the bsc_hack to parse options
...
Current options include a draft of the help screen, an option
to disable the colors and to specify the debug categories to
show.
2008-12-27 12:46:51 +00:00
Holger Freyther
5ee72eeeb1
Prefix debug symbols with debug_ to reduce the namesapce pollution
2008-12-27 12:46:49 +00:00
Holger Freyther
7c03e4c57a
Assign colors to the different categories
...
Let there be colors. I have no idea if this will be appreciated. It can
be disabled by an option.
2008-12-27 12:46:48 +00:00
Holger Freyther
d546e31628
Add code to parse a debug category string
...
Use strdup to be able to use strtok on the category string and add
a test case. Also safe some more information to be able to use color
in the print statement.
2008-12-27 12:03:07 +00:00
Harald Welte
6125306e73
fix typo
2008-12-27 11:25:50 +00:00
Harald Welte
b275042cd0
reduce usleep time for RSL to 10ms
2008-12-27 11:24:23 +00:00
Harald Welte
231ad4f9c1
Send IDENTITY REQUEST after LOCATION UPDATE REQUEST
2008-12-27 11:15:38 +00:00
Harald Welte
9524e34ee4
* lchan_free() the channels that we RF_CHAN_RELEASE
2008-12-27 11:13:36 +00:00
Holger Freyther
32636e8910
Move the debug code to a separate debug.c
2008-12-27 11:07:15 +00:00
Harald Welte
14537e5f1d
* send RF CHANNEL RELEASE if we get CONNECTION FAIL INDICATION
2008-12-27 10:29:08 +00:00
Harald Welte
fc977a8b8b
* translate MOBILE IDENTITY into string
...
* add empty handler for GPRS SUSPENSION REQUEST
2008-12-27 10:19:37 +00:00
Harald Welte
0f7bf9ce4a
send RF CHANNEL RELEASE upon RELEASE INDICATION from BTS
2008-12-27 10:18:47 +00:00
Holger Freyther
5f75598c28
Introduce a simple timer API....
...
One can use add_timer or schedule_timer to add a timer. After
the timeout time has been reached the callback will be called.
One can call add_time/schedule_timer and del_timer from within
the callback.
2008-12-27 09:42:59 +00:00
Holger Freyther
5677ae35ba
misdn.h forward declare mi_setup
2008-12-27 09:41:03 +00:00
Holger Freyther
059c254487
Fix warning and return an error code
2008-12-27 09:39:48 +00:00
Holger Freyther
facfce925f
whcih -> which
2008-12-27 09:38:51 +00:00
Harald Welte
4b634544e6
now we get up to the SETUP of MO calls
2008-12-27 01:55:51 +00:00
Jan Luebbe
faaa49ca51
db: add GPL headers and integrate with autofoo
2008-12-27 01:07:07 +00:00
Jan Luebbe
7398eb9847
add first sketch of a DB backend
2008-12-27 00:45:41 +00:00
Harald Welte
702d8707a9
working state up to location update and classmark inquiry
2008-12-26 20:25:35 +00:00
Harald Welte
5d2f8eca60
Send OML messages to OML TEI/SAPI, not RSL :)
2008-12-26 10:46:24 +00:00
Harald Welte
ad38464728
this is the first version that actually talks to the BTS
...
* initialize OML and RSL based on TEI establish (ACTIVATE_IND) events
* fix abis_nm_raw_msg() to not overwrite the OML header with payload
* fix debug print statements
* fix msgb_dequeue: actually dequeue it from the list ;)
2008-12-26 10:20:07 +00:00
Harald Welte
f6b7a9054c
add debugp() function to fulfill link dependency and build executable
2008-12-26 00:05:11 +00:00
Harald Welte
4f4a3901df
free incoming msg after processing by RSL
2008-12-26 00:04:49 +00:00
Harald Welte
e571fb827b
free() the outgoing msg's after they've been sent to the kernel
2008-12-25 23:50:30 +00:00
Harald Welte
0e2a5f2bca
add channel allocator to makefile
2008-12-25 23:50:01 +00:00
Harald Welte
8470bf200d
no reasonable commit message possible. tons of changes of the last 2 days
2008-12-25 23:28:35 +00:00
Harald Welte
de729a139e
autoconf
2008-12-23 21:01:25 +00:00
Harald Welte
52b1f98889
initial commit of current OpenBSC state
2008-12-23 20:25:15 +00:00