Commit Graph

463 Commits

Author SHA1 Message Date
Holger Freyther 49314f6080 [paging] Do not create a request when one is already pending...
This is removing a memleak, saving some mallocs and a crash
in the timer expired function that attempted to remove the
paging_request from a list it was not in....
2009-02-14 23:53:20 +00:00
Holger Freyther 2fa4cb5bc9 [paging] Assign the subscriber to the channel first...
Assign the GSM subscriber to the lchan and then inform
the paging layer and dispatch a signal. This makes sure
that lchan is updated with the right kind of information.
2009-02-14 23:53:15 +00:00
Holger Freyther 531c0deecb [paging] Fix crash, move_to_next can not be used....
move_to_next is using the last_request but we do not have
one... but we know the list is not empty so just pick the
first entry.
2009-02-14 23:35:09 +00:00
Holger Freyther 36b5d650b8 [signal] Fix misuse of llist_add_tail...
The to be added llist_head comes first.......
2009-02-14 23:35:06 +00:00
Holger Freyther 6b2d262888 [nm] Fix the ObjectClass for Set Channel Attribute
In r308 the enum for the object class was fixed and we
started to send the wrong (0x4) instead of the right (0x3)
object class. Fix that.
2009-02-14 23:16:59 +00:00
Holger Freyther 7aaf112ba7 [signal] Add consumer of the signal api, inform about paging
Use the new signaling API in the telnet interface to broadcast
a succeeded or failed paging request.
2009-02-14 22:51:13 +00:00
Holger Freyther e4b3fa3633 [signal] Move the area into the struct signal_data...
Remove the parameter and move the signal kind into the
signal struct. Make register/deregister fully symmetric.
2009-02-14 22:51:10 +00:00
Holger Freyther 053e09d102 [signal] dispatch the paging response...
Inform people about the successfull paging response and
provide access to the subscriber, lchan and bts...
2009-02-14 22:51:06 +00:00
Holger Freyther 4af2b48009 [signal] Dispatch the first signal... inform about paging timeout
When the paging request timed out, send a signal... lchan
is NULL in case of a failure.
2009-02-14 22:51:03 +00:00
Holger Freyther 2b2d2e350e [signal] Add generic signal registration and dispatch...
This will be used for generic registration and dispatching
of any kind of event. We will have different areas (like
with the debug interface) and each layer can define their
own struct for the event message... This is not tested yet
2009-02-14 22:51:00 +00:00
Harald Welte 09d38d3b61 add tlv_parser code to Makefile.am 2009-02-14 19:46:31 +00:00
Harald Welte 2fa79349aa implement type1TV or type 2 detection 2009-02-14 19:07:10 +00:00
Holger Freyther e36e15eb0a [paging] Send up to avaliable_slots paging requests...
Send up to available_slots paging requests but only
iterate over the list once. This was not tested on
a bts.
2009-02-14 18:05:03 +00:00
Holger Freyther 83e44b01e9 [paging] Initiliaze req in paging_T3113_expired 2009-02-14 18:04:59 +00:00
Harald Welte 22af0db588 * add comments for SET BTS ATTR and SET RADIO CARRIER ATTR
* use OPSTART on objects whose operational state is Disabled
2009-02-14 15:41:08 +00:00
Harald Welte 923a3bdbe5 add new program to use UDP broadcast packets to find ip.access BTS in the network 2009-02-14 12:51:36 +00:00
Harald Welte 5fd8a545c8 preliminary ip.access BTS support, as of now only OML singalling works 2009-02-13 02:43:36 +00:00
Harald Welte 34a9968baf * more extensive A-bis OML support 2009-02-13 02:41:40 +00:00
Harald Welte 7584aeac42 * add more GSM 04.08 IEIs
* implement function for CHANNEL MODE MODIFY
* don't use hard-coded SETUP message but construct it with tlv functions
2009-02-11 11:44:12 +00:00
Holger Freyther 334f236019 [paging] factor out list iteration... move to the next item 2009-02-11 03:00:20 +00:00
Holger Freyther b1ffbb62ee [paging] Send paging requests as response to the PAGING LOAD indicator
Kill the paging timer and send paging upon paging load notifications.
2009-02-11 01:49:15 +00:00
Holger Freyther ed2aea8ac1 [paging] Stop the timer when the paging was successful 2009-02-11 01:18:42 +00:00
Holger Freyther f6535bb444 [paging] Stop counting the requests... harald implemented sepc conform timer support
We do have a dispose timer, there is no need to discard the
paging request this way... remove the code.
2009-02-11 01:02:45 +00:00
Holger Freyther 3b91043cae [ccch load] Enable notifications for CCCH/PAGING LOAD again
Set the threshold to 0% for the load indication. The paging buffer
space will be used by the paging notifications and we will ignore
the racch usage notification for now.
2009-02-11 00:43:48 +00:00
Holger Freyther 5d7e5571d5 * make sure we start sending B channel data on channel activation 2009-02-10 18:40:45 +00:00
Harald Welte 8ffcfed9e0 mISDN doesn't support select-writefd's but rather sends PH_DATA_CNF
indications which should trigger us sending a new data packet on the
B channel
2009-02-10 18:18:50 +00:00
Harald Welte 51cce1e617 * decrease subscriber refcount when free()ing a paging request
* use a new timer that stops paging requests after some time, rather than
  sending them indefinitely
2009-02-10 17:35:04 +00:00
Harald Welte cd06bfbc9d * fill the e1_link member of every bts_trx_ts structure
* introduce new timer as part of every paging request
2009-02-10 17:33:56 +00:00
Harald Welte 39a1b7193c set up a static TRAU mux mapping between on-air TS1 and TS2 2009-02-10 17:17:09 +00:00
Holger Freyther 57dd7bf626 prettier debug prints in mISDN driver 2009-02-10 01:04:22 +00:00
Holger Freyther 392209cbb5 [paging] Introduce a variable containing the free paging slots
Start with a large number of available slots. It is guranteed
that we will - at some point - get a paging load and will properly
update the counter and keep it updated.
2009-02-10 00:06:19 +00:00
Holger Freyther 1fd34141c2 [paging] Cleanup page -> paging in function names 2009-02-09 23:42:03 +00:00
Holger Freyther 9c564b85e6 introduce lookup of subscribers based on their extension number 2009-02-09 23:39:20 +00:00
Holger Freyther cbc7b06534 some more primitive names for improved debug readability 2009-02-09 23:10:48 +00:00
Holger Freyther 59639e81e1 * always use bts->c0 as msg->trx for OML messages 2009-02-09 23:09:55 +00:00
Holger Freyther fb3f5190b4 * correctly initialize link->tei and link->sapi
* fix debug printf
2009-02-09 23:09:15 +00:00
Holger Freyther 3630eab572 fix segfault when trying to dequeue list head as list element 2009-02-09 21:05:56 +00:00
Harald Welte ce6efc295f remove old misdn driver; the code is now using e1_input.c in combination
with src/input/misdn.c
2009-02-09 18:14:24 +00:00
Harald Welte 1fa60c8ab0 * add trau_mux implementation to relay from one incoming TRAU
channel to another one (simple voice call switching)
* add a way more generic E1 input layer, abstracting out the misdn
  low-level interface. This also adds infrastructure for multiple TRX
  in one BTS, as well as multiple BTS on one E1 link
* add a E1 subchannel multiplexer for sending multiple 16kbit sub-channels
  one one 64kBps E1 channel
* add TRAU IDLE frame generation
* terminate bsc_hack in case there is a E1 / mISDN init error
* introduce 'e1_config.c' file with static configuration of our
  E1 setup (which TRX/BTS is configured for which TEI/SAPI/E1). This should
  later become a config file rather than a compiled C file.

WARNING: all this compiles but is not tested yet.  Expect fix-up committs over
the next hours or so
2009-02-09 18:13:26 +00:00
Harald Welte 0b4c34e3ca fix compiler warning about undeclared function by adding include file 2009-02-09 17:54:43 +00:00
Harald Welte 9383de3010 * remove excessive debug output during software load
* fix compiler warning about unused variable
2009-02-09 17:53:49 +00:00
Harald Welte e79769b926 make sure certain functions are per TRX, not per BTS, such as
* rsl_chan_activate()
* rsl_bcch_info()
* rsl_sacch_filling()
2009-02-07 00:48:17 +00:00
Holger Freyther 33ba752057 [paging] Move the code to send the command into a separate function
Mostly cosmetic and in preparation for proper page load indicator
handling.
2009-02-06 22:33:25 +00:00
Holger Freyther e64a7a3c3b [rr] Send a Channel Release before deactivating the channel
After auto releasing a channel the next paging request will
not be immediately answered. The hypothesis was that we do
not release the channel properly. Implementing Channel Release
of GSM 04.08 should have fixed it, but it didn't. According
to the wireshark dissectors the message is correct though.

- Add the RR cause values to gsm_04_08.
- Implement the Channel Release message
- Invoke the release channel function before deallocating
  the lchan.
2009-02-06 21:55:37 +00:00
Holger Freyther ceb59b72c2 [paging] Move the paging state into struct gsm_bts
There is a 1:1 relationship between gsm_bts and the paging
operation. Move the paging state into the gsm_bts which is
simplfying the code a lot. This was hinted by LaF0rge.

(I'm not happy with the names of the structs)
2009-02-06 18:54:00 +00:00
Holger Freyther 3d949240fe [paging] Use paging_request_remove to update last_request and free memory
Update the last_request when stopping the paging operation and also
free the associated memory of the request.
2009-02-06 18:08:18 +00:00
Holger Freyther 31338a16a5 [bs11-config] Really force the software upload
When we get a NM_MT_LOAD_END_NACK and we are supposed to
force the load we will just send data. This was already
done with NM_MT_LOAD_INIT_NACK.
2009-02-06 17:43:50 +00:00
Harald Welte 97ed1e7d43 * implement some simplistic OML EVENT STATE CHANGE REPORT parsing
* make sure we don't call a user_cb() function if it is NULL
2009-02-06 13:38:02 +00:00
Harald Welte 47150fbd20 stop paging a particular subscriber after we have received a PAGING RESPONSE 2009-02-06 12:52:47 +00:00
Harald Welte 763da00e97 add new routine to stop paging 2009-02-06 12:52:14 +00:00
Harald Welte 91b5b0d41d add some initial simplistic TLV parser 2009-02-06 12:51:39 +00:00
Harald Welte 0bbb8b2fd2 increase CCCH LOAD indication threshold to 50% to remove lots of noise 2009-02-06 12:49:11 +00:00
Harald Welte 6ddd1683b5 introduce new "DEBUGPC" macro for continuing on the same line without prefix of file/line/time 2009-02-06 12:38:29 +00:00
Harald Welte b60fa59276 add DMI and DMIB debug= commandline option parsing 2009-02-06 12:02:53 +00:00
Harald Welte 2d35ae6d3b implement parsing of PAGING RESPONSE 2009-02-06 12:02:13 +00:00
Harald Welte 1cbfaf508a * introduce a new '--restart' parameter to reboot BTS
* unconditionally create TRX1 objects
* wait for '3 Normal' before issuing disconnect
* MBCCU0/MBCCU1 state were accidentially switched
2009-02-05 19:30:22 +00:00
Harald Welte b8427970e2 introduce abis_nm_bs11_restart() function 2009-02-05 19:27:17 +00:00
Holger Freyther 152a14718a [paging] Use the number of different paging subchannels...
In our setup (1xCCCH combined, BS_AG_BLKS_RES=0,
BS_PA_MFRMS=0x3 -> 5) we have MAX(1,3-0) * 5 paging
sub-channels. Using this 15 I was able to successfully page
my phone/IMSI (934%15 -> 4).

My confusion is coming from the terms used for paging throughout
the documentation. GSM05.02 6.5.2 talks about "N = number of
paging blocks 'available' on one CCCH = (number of paging blocks
'available' in a 51-multiframe on one CCCH)xBS_PA_MFRMS" which
is already misguiding  and GSM04.08 is talking about number of
different paging subchannels on the CCCH and is providing a
formula.

I deduct that N == number of different paging subchannels on the CCCH
as of GSM04.08 and will simply test this with different IMSIs and
see if I can page them as well.
2009-02-04 13:38:26 +00:00
Holger Freyther 3aa8d6c46d [paging] This is paging my phone but it looks completely wrong...
- The paging block calculation is wrong but I have a hard time finding
  the right information. The table of 05.02 (Table 5 of 9) looks good
  but my phone is not happy with that group...
2009-02-04 02:14:45 +00:00
Holger Freyther 3b72a890c2 [paging] Implement the three Control Channel Descriptor methods...
This comes from GSM 05.02 and GSM 04.08
2009-02-04 00:31:39 +00:00
Holger Freyther 1adb4ff002 [paging] Keep a copy of the Control Channel Description in the bts struct
- Initialize Control Channel Description of SI3 
- Patch the table
- Setting ATT now is easy
- Paging can now extract all required information... to determine
  the right paging group.
2009-02-04 00:04:52 +00:00
Holger Freyther d4ec5287c2 [paging] some minor cleanups. put the current request into a temporary 2009-02-03 23:18:46 +00:00
Holger Freyther df892da697 [paging] Cosmetic changes on the timer handling and max requests 2009-02-03 21:05:49 +00:00
Holger Freyther f07768915d [telnet] use SO_REUSEADDR on the telnet socket 2009-02-03 20:49:51 +00:00
Holger Freyther 8c563cf4f9 [rsl] Decode RACH Load as well
Print the common field and ignore the Supplementary Information.
Initialize the fields to 0xffffffff in case the payload is malformed
2009-02-03 20:08:51 +00:00
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