Commit Graph

551 Commits

Author SHA1 Message Date
Harald Welte a994a48635 remove misleading debug messages 2009-05-01 15:54:23 +00:00
Harald Welte cf55978e48 make sure we terminate bsc_hack if the OML/RSL listening sockets cannot be created 2009-05-01 15:43:49 +00:00
Harald Welte b463060db9 Fix long-standing bug: nanoBTS now even works after cold boot (first time after power up).
The problem in the old logic was that we started talking to a given object
(e.g. radio carrier) one we received an administrative state change report.  It
turns out we have to wait for the software activation report instead - and
everything suddenly works.
2009-05-01 15:43:22 +00:00
Harald Welte 6dafb7ba37 bs11_config build fix 2009-05-01 15:40:14 +00:00
Harald Welte f9a8cc3cba send a signal for every software activation or failure event report 2009-05-01 15:39:49 +00:00
Harald Welte 4cc34228d2 add VTY command to set BTS unit ID 2009-05-01 15:12:31 +00:00
Harald Welte 879c85a89c no need to make gsmnet structure non-static (fix from last commit) 2009-05-01 15:00:20 +00:00
Harald Welte edb3778542 * Add support for multiple ip.access nanoBTS at one BSC
* keep track of site_id/bts_id in struct gsm_bts
 * dynamically match incoming OML/RSL over TCP connections by BTS Unit ID
 * introduce new debug category DINP (separate from DMI for hexdumps)
 * remove ia_config() as it is no longer needed
 * 
* ensure that signalling links / E1 line information is correctly printed
* when bootstrapping RSL or OML, tell us for which BTS it is being doen
* separate bootstrap_bts() out from bootstrap_network()
* statically configure two ip.access BTS, one with unit id's 1800/0/0 and 1801/0/0
2009-05-01 14:59:07 +00:00
Harald Welte 4593ff3ace ensure the tag parsing function is the same as used in input/ipaccess.c
FIXME: remove this copy of the code
2009-05-01 14:53:36 +00:00
Harald Welte 23897662c7 make sure all REPORT type messages have debug statements printing object class and instance 2009-05-01 14:52:51 +00:00
Harald Welte 191280d04b abis_nm wants to use bts->bts_nr (the number of the BTS in the OML link) rather
than bts->nr (the number of the BTS in the BSC).
2009-05-01 13:20:04 +00:00
Harald Welte aeedeb41dd fix compiler warnings in abis_nm.c 2009-05-01 13:08:14 +00:00
Harald Welte 6c96ba5e4f abis_nm: print the NACK cause in human readable form 2009-05-01 13:03:40 +00:00
Holger Freyther acb688bc9b [misc] Sanity check and error messages in misdn.c
Add some sanity checks, add some error checks, print
the __func__ in the error message too.

Patch from Andreas Eversberg
2009-05-01 04:59:55 +00:00
Harald Welte 4802b88890 fix printing of OML IP 2009-04-30 16:23:45 +00:00
Harald Welte 9de2bf884b fix missing \n at end of debug statement 2009-04-30 15:59:55 +00:00
Harald Welte 25de99170f add new 'ipaccess-config' program to set Unit ID and primary OML NVRAM parameters of ip.access BTS 2009-04-30 15:53:07 +00:00
Harald Welte 193fefc683 functionality to set nanoBTS NVRAM attributes and to restart BTS 2009-04-30 15:16:27 +00:00
Harald Welte 3788196026 more pretty-printing of ipaccess-find output 2009-04-30 15:15:37 +00:00
Harald Welte 3bfbb84021 Add some more ip.access specific OML attributes/messages. In this case it is
about configuring the primary OML link IP address in the NVRAM of the device.
2009-04-29 22:58:38 +00:00
Harald Welte a7cfa03cb2 bs11_config: print PLL 'work' and 'set' values during query 2009-04-29 22:33:02 +00:00
Harald Welte c50ea84804 add missing newline in debug statement for RS232 TX 2009-04-29 22:32:10 +00:00
Harald Welte d47a4beff8 activate subchannel muxer/demuxer on E1 TS 3 2009-04-29 16:21:34 +00:00
Harald Welte 360f06cba3 Fix order of subchannel bits (Andreas Eversberg) 2009-04-29 16:21:18 +00:00
Harald Welte 70128d03df remove extra whitespace in output of 'query' command 2009-04-29 13:27:56 +00:00
Harald Welte aaf02d9e01 read the PLL config as part of the bs11_config 'query' command 2009-04-29 13:25:57 +00:00
Harald Welte a432cd3930 make "PLL mode" setting actually work rather than segfault 2009-04-29 13:01:50 +00:00
Harald Welte e69f5fb411 Add bs11_config commands to set the PLL mode from E1_LOCKED to STANDALONE
and vice-versa.  This has not yet been tested yet.
2009-04-28 16:31:38 +00:00
Holger Freyther b5c00f5587 [misdn] Add option to automatically release layer2 on exit
Patch by Andreas Eversberg to automatically release
layer2 on exit of the application. Made the naming of
the variables consistent (only release_l2 and not both
release_l2 and l2_release).
2009-04-22 22:08:07 +00:00
Holger Freyther dda22c18b5 [bsc_hack] Allow to select the cardnr defaulting to number 0
Patch from Andreas Eversberg to allow to select the ISDN
card number. The default remains the same.
2009-04-22 22:07:31 +00:00
Holger Freyther 0a173bfe28 [bsc_hack] Allow to set the location area code
Patch by Andreas Eversberg to allow to set the
location area code from the command line.
2009-04-22 22:07:07 +00:00
Holger Freyther bcdebbfcab [bsc_hack] House keeping, remove dead code
This callback is not used from within the paging layer. We do
have a different set of callbacks in place. Remove it here.
2009-04-19 06:39:29 +00:00
Holger Freyther c2995ea741 [db] Introduce a VLR database here
This is not a proper VLR yet, specially the (subscriber_)id
used might not be the proper one in a real network.
2009-04-19 06:35:23 +00:00
Holger Freyther 1d506c8a54 [db] Make the db connection static 2009-04-19 06:35:20 +00:00
Holger Freyther 36650b872f [db] Keep track of the current gsm_network 2009-04-19 06:35:16 +00:00
Holger Freyther ef7f7ce452 [bsc_hack] Initialize db as part of the network
Let us establish the rule that there is one DB
per network. This will allow to assign a BTS of
the network to a subscriber that is loaded from
the db across restarts.
2009-04-19 06:35:12 +00:00
Holger Freyther d4cb79f90d [db] Remove FIXME as it is fixed... 2009-04-19 06:35:05 +00:00
Holger Freyther a1f92f0a43 [subscriber] Introduce subscr_put_channel
Introduce subscr_put_channel to release a channel and to
allow gsm_subscriber.c to hand this channel to any suitable
pending requests.
2009-04-12 05:37:52 +00:00
Holger Freyther 4a49e77ff4 [subscriber] Update the current_bts field on imsi detach and LOC accept
When sending LOCATION UPDATING REQUEST Accept or when getting
a IMSI Detach update the gsm_bts of the gsm_subscriber.
2009-04-12 05:37:29 +00:00
Holger Freyther 3190a89e38 [calls] Remove a tautology from gsm48_cc_rx_disconnect
We directly assign the call->state and then check for something
that will never be true, and then immediately put the lchan and
schedule it's disconnect... and then directly after having closed
it down we send a message...

Change this to uncondtionally put down the lchan after having
changed the last(?) command.
2009-04-12 04:36:16 +00:00
Holger Freyther 0469cf608b [e1] Enable dumping of LAPD frames again
Kill mi_set_pcap_fd from the header, introduce e1_set_pcap_fd
and call it from bsc_hack.c. Hook into abis_rsl_sendmsg and
_abis_nm_sendmsg for sending and e1inp_rx_ts for reading. It compiles
and should not cause a regression.
2009-03-31 12:14:16 +00:00
Holger Freyther 66e092bbd6 [e1input] Do not redefine PF_ISDN if it is already defined
Fix compile warning in e1_input.c
2009-03-31 12:13:50 +00:00
Harald Welte 7e310b12ff Store incoming SMS into SQL database
* gsm_util now uses caller-allocated data (rather than callee-allocated)
* correctly parse destination address
* parse (but not transcode) non-default encodings of SMS
* reject SMS to unknown destination number
* resolve target subscriber id and store incoming SMS (without header) in 'sms' table

What we're now missing is the sending part, i.e. a regular task iterating over
all pending SMS and trying to deliver them.  Also, check for pending SMS once
we get a LOCATION UPDATE.
2009-03-30 20:56:32 +00:00
Harald Welte 93d9303331 check for malloc fails 2009-03-30 09:11:45 +00:00
Harald Welte 5258fc4974 add stubs for enable/configure terminal/bts/trx/ts commands in VTY interface 2009-03-28 19:07:53 +00:00
Harald Welte f5025b6bae add 'show paging' for BTS to telnet interface 2009-03-28 16:55:11 +00:00
Harald Welte 273feca77f Fix 'delete-trx1' command of bs11_config (we can now delete TRX1) 2009-03-28 16:53:25 +00:00
Holger Freyther 1047940dce [misc] Make distcheck work again 2009-03-11 03:29:43 +00:00
Harald Welte 1bc7735ad5 * more human-readable strings instead of values
* vty printout of e1 driver/line/timeslot items
2009-03-10 19:47:51 +00:00
Harald Welte c63e51daac * correctly handle VTY_READ/VTY_WRITE events and select loop integration of VTY 2009-03-10 19:46:16 +00:00
Harald Welte d256d4f19c * make sure we can obtain signalling type and timslot type names
* make sure every e1 timeslot has a valid backpointer to its line
2009-03-10 19:44:48 +00:00
Harald Welte 4d87f24e6f export nm_*_name() functions to get operational and availability state to strings 2009-03-10 19:43:44 +00:00
Harald Welte 44d542eba5 export list of e1 drivers and e1 lines 2009-03-10 18:24:35 +00:00
Harald Welte ef235b547b * don't print lchan's of type NONE
* better formating of VTY printing of some objects
2009-03-10 12:34:02 +00:00
Harald Welte 404cdd8951 make telnet interface use VTY code 2009-03-10 12:21:45 +00:00
Harald Welte 68628e8479 add VTY dumping functions for OpenBSC 2009-03-10 12:17:57 +00:00
Harald Welte 955049f191 import VTY code from zebra/quagga (from my cardshell project) 2009-03-10 12:16:51 +00:00
Harald Welte 32201c1aea move is_ipaccess_bts() and parse_btstype9) to gsm_data.c 2009-03-10 12:15:10 +00:00
Harald Welte a30b1cad9f more verbose attribute ack/nack 2009-03-10 11:46:02 +00:00
Holger Freyther ff9592fa10 [misc] Fix compile warnings... 2009-03-09 16:17:14 +00:00
Harald Welte 015b9ad9db actually request the IMEI not IMEISV, since Phase 1 doesn't have IMEISV 2009-02-28 18:22:03 +00:00
Harald Welte ddab3c78c5 introduce new 'mode' parameter to RSL ACTIVATE CHANNEL 2009-02-28 13:19:15 +00:00
Harald Welte 4a543e81cf * more RSL and 04.08 constant defines
* initialize some data structures before using them in RSL
* DATA_REQ is a transparent message
* more elaborate DEBUGP statements here and there
* don't call 04.08 with zero-length RSL DATA INDICATION
* reject 04.08 CC HOLD and RETRIEVE, as we don't support them yet
2009-02-28 13:17:55 +00:00
Harald Welte 02b0e093a1 make sure all channels in one BTS use the same TSC (training sequence code) 2009-02-28 13:11:07 +00:00
Harald Welte 3cc4bf517f make hexdump return a 'char *' rather than printing by itself 2009-02-28 13:08:01 +00:00
Harald Welte 51f38457e5 add missing header include 2009-02-24 22:36:40 +00:00
Harald Welte 65ccf88feb fix non-randomness of TMSI by seeding the PRNG. Later we should use openssl 2009-02-24 22:36:20 +00:00
Harald Welte 41fbf443a0 enable IMSI ATTACH/DETACH
* this tells us whenever a MS is switched off
* also ensures that we get LOCATION UPDATe every time MS is switched on, even if it already has TMSI
2009-02-24 22:34:22 +00:00
Holger Freyther 0d4df32044 [sms] Fix the length of the of the outgoing data...
The returned length should be right now. The test case
is passing.
2009-02-23 04:03:33 +00:00
Holger Freyther 77217de8a5 [sms] Fix memory leak 2009-02-23 04:03:27 +00:00
Holger Freyther 3b1f3d0798 [sms] Fix two bugs regarding 7 bit coding...
- Fix the length (almost)
    - Move the second part by 8 - b_off
      e.g. with (ba) 0x62 0x61 the first bit of
      0x61 goes to the highest on the first byte and
      the second word contains 0x110000...

    - The simple test case is almost passed... just a missing
      character at the end.
2009-02-23 01:47:15 +00:00
Holger Freyther 59da07bd0e [sms] Add test case for the 7-bit coding/decoding...
we don't pass it yet.
2009-02-23 00:50:38 +00:00
Holger Freyther b4064bca6e [db] Introduce a table for SMS
- created for the creation of the SMS
    - sent the time the message was submitted
    - sender_id the subscriber for the return path/report
    - receiver_id the subscriber
    - header the (optional) SMS PDU header
    - payload the payload (utf8), raw data
2009-02-23 00:50:31 +00:00
Harald Welte ba59bafc8e remove subchan_demux debug statements, add DMUX commandline parsing 2009-02-23 00:04:04 +00:00
Harald Welte 7f93ceafef Ignore CONNECTION FAIL INDICATION cause 0x18 to make sure our phone calls survive on BS11.
Apparently the BS-11 sends soem undocumented cause 0x18 as part of a CONN FAIL IND message
shortly after we establish the call.  If we close the channel, the voice call
is aborted. If we ignore the message, everything just continues to work.
2009-02-23 00:02:59 +00:00
Harald Welte b49fe96ad6 reduce lag in voice calls by reducing the subchannel muxer tx queue depth to
effectively three entries.  In the future we should probably think of only
having a one-frame deep queue.
2009-02-22 22:28:19 +00:00
Harald Welte ee670478e5 Add LMT event parsing 2009-02-22 21:58:49 +00:00
Harald Welte 6154898753 fix paging response parsing for phase1 phones (classmar2 can be less than 4 bytes in length) 2009-02-22 21:26:29 +00:00
Harald Welte 2a1393758d add parsing of IMSI DETACH 2009-02-22 21:14:55 +00:00
Harald Welte fe18d8fd89 PAGING RESPONSE could contain non-TMSI mobile identity such as IMSI 2009-02-22 21:14:24 +00:00
Harald Welte 5a065dfe2d don't allow calls of a subscriber to himself 2009-02-22 21:13:18 +00:00
Holger Freyther 1ef983b076 [db] Print the type and id of the not found provider 2009-02-22 20:33:09 +00:00
Harald Welte c1697105cf use RSL debug prefix in RSL code 2009-02-22 18:18:12 +00:00
Harald Welte 074d873df9 correct E1 timeslot / TEI attribute parsing 2009-02-21 20:41:12 +00:00
Harald Welte 0558f547c7 only perform oml-tei once 2009-02-21 20:17:12 +00:00
Harald Welte b6c92ae782 * set OML TEI and E1 timeslot in one command
* introduce new 'oml-tei' command of bs11_config
2009-02-21 20:15:32 +00:00
Harald Welte fd2fb458ac 25C3 is over, so call our network OpenBSC 2009-02-21 13:00:57 +00:00
Harald Welte 099d6100e6 fix various compiler warnings while building bs11_config 2009-02-21 12:59:58 +00:00
Harald Welte 7bc4cbc45c tlv_parser now operates on 'const' input buffer 2009-02-21 12:59:22 +00:00
Holger Freyther 3281f6e233 [build] Create a libbsc.a as noinst_LIBRARY, link bsc_hack and tests against it
Link the tests against the libbsc.a to avoid most of the breakage
when creating new symbols.
2009-02-20 18:33:00 +00:00
Harald Welte 11fa29c169 implement dynamic TRAU frame mapping 2009-02-19 17:24:39 +00:00
Harald Welte f325eb4e9f use new gsm_ts_name() funciton from debug statemens everywhere 2009-02-19 17:07:39 +00:00
Harald Welte dbd2ea8708 add debug statement when setting up trau mapping 2009-02-19 17:07:01 +00:00
Harald Welte 23a686347d add gst_ts_name() function to obtain human-readable channel name 2009-02-19 17:06:42 +00:00
Harald Welte f1e6f96654 don't pass subchannel data to the TRAU decoder if we're not synchronized yet 2009-02-19 17:05:13 +00:00
Harald Welte 26aa6a1166 trau mux updates
* add function to map two lchans to each other
* make sure to evic old trau mux mappings before creating a new one
2009-02-19 15:14:23 +00:00
Harald Welte ad2a12a4c3 we need tlv_parse.c in bs11_config now 2009-02-19 03:11:48 +00:00
Harald Welte f80b7d347c bs11_config: makes sure we disconnect properly before exiting 2009-02-19 03:11:13 +00:00
Harald Welte fb81ae9da2 restructure and enhance bs11_config
* add the concept of commands in addition to options
* add commands for querying essential configuration
* add command for explicit create/delete of TRX1
* software download is now an explicit operation
2009-02-19 02:59:17 +00:00
Harald Welte 78fc0d40a6 add various BS11 management related abis_nm functions 2009-02-19 02:50:57 +00:00
Harald Welte 0313394a88 * support BS11 specific IE types in abis_nm
* make bs11_config compile again 
* now that we have a proper TLV parser, use it to parse the status response on the serial port
2009-02-18 19:51:53 +00:00
Harald Welte 2c38aa8dcd * make sure we use the correct GSM48 encoding type
* modify the RSL channel mode (BTS) side) after the 04.08 (MS side) has acked MODIFY
2009-02-18 03:44:24 +00:00
Harald Welte 0b8348d397 fix the parsing of the 'normal' availability status 2009-02-18 03:43:01 +00:00
Harald Welte b110cee0a0 CONNECT TERRESTRIAL TRAFFIC needs to be in the CHANNEL object class in order to work 2009-02-18 03:42:35 +00:00
Harald Welte 7eb1f621e0 "the big fix", of the E1 subchannel [de]multiplexer. I don't even remember how
many bugs I fixed during the last couple of hours.  It was never working at
any time before.
2009-02-18 03:40:58 +00:00
Harald Welte f9227c7562 write 160byte to one E1 TS at any given time, since that is one TRAU Frame (40 bytes) per sub-channel 2009-02-18 03:39:00 +00:00
Harald Welte 23887b607f use official TCH/F for initial channel modes rather than BS-11 specific 0x09 2009-02-18 03:37:20 +00:00
Harald Welte 41e166884e if TRAU frame decoding doesn't work, we don't need to even try to re-encode and just send an idle frame instead 2009-02-18 03:34:55 +00:00
Harald Welte da78376396 * ensure TCH/F are activated signalling-only
* add function for RSL CHANNEL MODIFY REQUEST
* add missing channel activation function to header file
2009-02-18 03:29:53 +00:00
Harald Welte 93d3f37f6c * disable TS3 TRAU frame handling for now
* statically activate two sub-slots in TS2 (need to do this dynamic later)
2009-02-18 03:27:14 +00:00
Harald Welte bb8c4061eb * use DEBUGP in TRAU frame code
* make sure we actually set 'spare' bits to 1
2009-02-18 03:24:58 +00:00
Holger Freyther ce66896d1d [utils] Commit not working 7bit encoder...
No one is using it so far, so no one gets hurt...
2009-02-17 23:42:45 +00:00
Holger Freyther 62f47773ae [utils] Style change.. 2009-02-17 20:31:35 +00:00
Holger Freyther 76c9569021 [utils] Create gsm_utils for 7bit encoding and decoding... 2009-02-17 20:31:30 +00:00
Harald Welte 9e783318b0 strip mISDN hardware header before putting B-channel data into subchannel demuxer 2009-02-17 19:02:29 +00:00
Harald Welte 311d0cf245 don't reduce power quite as much to make sure we still get a singal (bs-11) and nanoBTS doesn't refuse the attribute at all 2009-02-17 17:45:59 +00:00
Harald Welte bfaf097905 in case pagign of the 'B-end' during call setup fails, transmit message to
correct lchan rather than crashing
2009-02-17 17:43:33 +00:00
Harald Welte 49dfa353e3 correctly print IPAC_CONNECT_ACK debug statement 2009-02-17 15:29:58 +00:00
Harald Welte 49f48b8b77 various CC updates:
* correctly lchan_put the second lchan of a call at teardown
* map the RTP streams of ip.access onto each other
* fix bug that prevented a CONNECt message to ever reach the 'B' side
2009-02-17 15:29:33 +00:00
Harald Welte 167df88aae * increased debug verbosity for ip.access BIDND_ACK processing
* emit a signel when the BIND is acknowledged
2009-02-17 14:35:45 +00:00
Harald Welte 4b45815b9d CC: send correct messages (too much copy+paste) and better debug printout 2009-02-17 13:23:06 +00:00
Harald Welte 677c21f4ab add parsing for ip.access vendor specific NM messages 2009-02-17 13:22:23 +00:00
Harald Welte 7ccf77810b slightly more complete GSM 04.08 CC, we can now
* initiate phone calls from one MS
* look-up the subscriber based on dialled extension
* page the called subscriber
* send the SETUP to the called subscriber, including CLIP/CLIR
* get ALERTING notification back to caller
* relay DISCONNECT from either side to the other
This is still far from being complete, but it at least works for the most common case
2009-02-17 01:43:01 +00:00
Harald Welte 75a1fa834c switch paging code to use a timer again, since not all BTS send reliable CCCH load indications 2009-02-17 01:39:41 +00:00
Harald Welte 09e38afbcc * introduce a callback function when paging completes (I know this is somewhat of an overlap
with the signals, but I think paging always has one reason and thus one caller wants to
  get notified about completion, including a caller-specific context, etc)
* introduce TLV parser definitions for GSM 04.08
* parse and generate BCD number IE's for 04.08 call control
2009-02-16 22:52:23 +00:00
Harald Welte 595ad7b762 modify the signal handler/dispatch code (sorry zecke, no offense, I just had some different ideas)
* introduce new notion of subsystem in addition to signal number
* no need for bitmasks of 'areas' (aka subsystems)
* pass subsystem/signal_nr/... per argument rather than by data structure
2009-02-16 22:05:44 +00:00
Harald Welte 7509926614 * introduce TLV parser definitions for RSL IE's
* introduce functions for ip.access specific RSL commands
2009-02-16 21:12:08 +00:00
Holger Freyther 9b177760bb [sms] Send a notification on incoming SMS
Further tests of the signal class. Send a notification
on incoming SMS.
2009-02-16 19:07:18 +00:00
Harald Welte d4c9bf3c5a * add bs_power and ms_power attributes to each channel and use them in channel activation 2009-02-15 16:56:18 +00:00
Harald Welte cd99387bd2 * use more constants to name the various BTS/TRX/... attributes
* set BS power reduction up to 30dB reduction.  we want to be quiet!
2009-02-15 16:16:28 +00:00
Harald Welte 940093296e support non-123 ARFCN on nonoBTS 2009-02-15 15:38:42 +00:00
Harald Welte 4f361fcb68 * add commond header file for ipaccess protocol
* query for more attributes during ipaccess-find
2009-02-15 15:32:53 +00:00
Harald Welte e1bd2412c2 * use the correct BCCH channel type for nanoBTS
* remove old code
* ensure that the default BTS type really is BS-11
* document the '-t' commandline argument in the --help message

With this commit, I can get the nanoBTS 900 working with OML and RSL, register
to the network from phones.  Paging is not tested yet, and voice traffic handling
is completely missing..
2009-02-15 14:40:09 +00:00
Harald Welte 362322ed81 For Phase2 and higher BTS, use the FULL IMMEDIATE ASSIGN INFO attribute, rather than IMMEDIATE ASSIGN INFO 2009-02-15 14:36:38 +00:00
Harald Welte 5c1e458376 Add support for ip.access RSL link on port 3003 2009-02-15 11:57:29 +00:00
Harald Welte 7782c14295 * generate virtual E1 TEI up/down events
* make debug printout a little less verbose
* introduce usleep to make things a bit slower for debugging
2009-02-15 03:39:51 +00:00
Harald Welte 8c1d0e41a7 * add bsc_hack commandline argument to select BTS type
* add event-based OML bring-up for nanoBTS
2009-02-15 03:38:12 +00:00
Harald Welte e0590df524 * extend TLV parser to use a list of TLV type descriptions
* implement TLV type descriptions for NM
* add operational/administrative/availability state keeping logic to abis_nm
* explicitly print all NACK's in abis_nm
* make sure we produce [not just for BS-11] valid channel attributes
2009-02-15 03:34:15 +00:00
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