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