Commit Graph

936 Commits

Author SHA1 Message Date
Holger Hans Peter Freyther 6ae657228c [sccp] Refer to the right Company in the Copyright/Copyleft line
Use On-Waves instead of the name I made up from the domain name.
2010-02-03 18:17:49 +01:00
Holger Hans Peter Freyther 67f5003caa Merge branch 'master' into on-waves/sccp 2010-02-03 18:15:05 +01:00
Holger Hans Peter Freyther 92026f1cef [mgcp] Refer to the right Company in the Copyright/Copyleft line
Use On-Waves instead of the name I made up from the domain name.
2010-02-03 18:10:07 +01:00
Holger Hans Peter Freyther 62e836c533 [mgcp] Make the mgcp_protocol generate a struct msgb*
Do not directly send data from inside the mgcp_protocol.c
implementation. Instead allocate and return a struct msgb*. The
caller can then either wrap that into the IPA protcol or directly
send it over the UDP socket.
2010-02-03 11:03:45 +01:00
Holger Hans Peter Freyther 77f7afe08e [mgcp] Prepare the in process MGCP handling by adding callbacks
* Call a callback when the endpoint was created, modified or deleted. This
  can be used by the BSC MUX to send a MGCP packet over TCP to the right
  the BSC to allocate the endpoint there with the right data, or it can be
  used in the BSC to send the right commands to the BTS.
2010-02-03 09:54:43 +01:00
Holger Hans Peter Freyther 2ada71de64 [mgcp] Replace DEBUGP with the LOGP statement
* Classify messages as LOGL_INFO or LOGL_ERROR
2010-02-03 09:13:10 +01:00
Holger Hans Peter Freyther e0955029a1 [mgcp] Prepare to do MGCP over TCP and inside the bsc_msc_ip process
* Separate main process and protocol handling into two parts.
* Change the protocol handling to work with UDP and TCP connection
* This will allow to speak MGCP over TCP between the BSC MUX and
  the real BSC.
2010-02-03 08:50:33 +01:00
Holger Hans Peter Freyther 89f3cb8606 [mgcp] Rename the source to mgcp_main.c 2010-02-02 12:07:21 +01:00
Holger Hans Peter Freyther a18445d262 [mgcp] Move the MGCP procoess into a sub directory 2010-02-01 14:00:07 +01:00
Holger Hans Peter Freyther e01ee97cd3 [mgcp] In forward mode we need to rediscover the BTS more often
In plain forward mode we don't have DLCX which will clean
and reset the configuration. We will need to remember the
last GSM BTS port and send data to it.
2010-02-01 13:17:04 +01:00
Holger Hans Peter Freyther 9100e1dea4 [mgcp] Handle BTS and NET being on the same host
* Do not only check the IP but also the port to figure out
  where to send the data
* Do not memset the endp->remote inside the bind_rtp but from
  inside the crcx as this will be modified by the MDCX
2010-02-01 13:16:53 +01:00
Holger Hans Peter Freyther 9b28fc8be2 [mgcp] Warn about unknown messages... 2010-02-01 13:16:44 +01:00
Holger Hans Peter Freyther bd5130d3c1 [mgcp] Allow to forward to a different port 2010-02-01 13:13:31 +01:00
Holger Hans Peter Freyther 6c79646089 [mgcp] Rename rtp and rtcp variables to net_rtp and net_rtcp
Rename the variables to refer to the fact that they are
the ports of the remote.

So we have:
    rtp_port as the local address we are binding to
    net_rtp  for the network rtp
    bsc_rtp  for the bsc rtp
2010-02-01 13:13:21 +01:00
Holger Hans Peter Freyther 601a67e274 [mgcp] Make it possible to not specify a bts ip
This way the mgcp will allow anyone to be the BTS..
in the future we might need to communicate things
properly between BSC and MGCP.
2010-02-01 13:13:11 +01:00
Holger Hans Peter Freyther caf49b4c14 [sccp] Implement sccp_parse_header to be used by the NAT code. 2010-01-29 04:36:48 +01:00
Holger Hans Peter Freyther ef84539fb7 [sccp] Split Connection DT1 into two parts
This is the last of supported messages to be split into a parse
and handle routine. Now all parse routines can be used by the NAT.
2010-01-29 04:36:38 +01:00
Holger Hans Peter Freyther 18c5cadc46 [sccp] Split Connection Release Complete into two parts 2010-01-29 04:36:29 +01:00
Holger Hans Peter Freyther ca1d1d1493 [sccp] Split Connection Confirm handling into two parts 2010-01-29 04:36:20 +01:00
Holger Hans Peter Freyther fe5de4e524 [sccp] Split Connection Refused into two parts 2010-01-29 04:36:12 +01:00
Holger Hans Peter Freyther 88fe6eec76 [sccp] Split Connection Released into two parts
Split the Connection Released into header parsing and into
acting on the parsed result. This is part of the NAT work.
2010-01-29 04:36:03 +01:00
Holger Hans Peter Freyther a8cd2e6b0e [sccp] Separate connection parsing and policy for connection request
The same concept as with the previous patch, make the reject method
work on the source local reference instead of passing it the header.
2010-01-29 04:35:50 +01:00
Holger Hans Peter Freyther efca5419b7 [sccp] Move the UDT parsing to a new method
Separate SCCP UDT parsing and handling into two methods. This
way the parsing can be reused by the BSC NAT.
2010-01-29 04:35:42 +01:00
Holger Hans Peter Freyther 82da7fcf62 [sccp] Invent new API to be used by the BSC NAT
I want to reuse the SCCP code for header parsing in the BSC
NAT to identify data and patch the source local reference. To do
this the current handle_* methods will be changed into two parts
one is strictly parsing the other is handling the parsed data.
2010-01-29 04:35:34 +01:00
Holger Hans Peter Freyther a692fbcff5 [sccp] Add a utility for the nat..
Add a small helper to determine the type of a message
2010-01-29 04:35:18 +01:00
Holger Hans Peter Freyther 1b891fd7ba [gsm48] Use optional Chan Mode 1 for the assignment command
Specify how we intend to use the assigned channel. This is
needed to make CC with early assignment work properly.
2010-01-28 12:46:04 +01:00
Holger Hans Peter Freyther 550197fd8c [gsm48] Allow to send the assignment command on a different lchan
Change the signature to take the lchan were the message is supposed
to be sent and the lchan which is supposed to be assigned.
2010-01-28 12:45:57 +01:00
Holger Hans Peter Freyther 93b6c6555c [rsl] Send the MultiRateConfig in the RSL Channel Activate msg
If the lchan has AMR as speech codec we also need to send the
multirate config IE in the channel activation. This is already
done for the RSL Channel Modify message.
2010-01-28 10:23:34 +01:00
Andreas Eversberg 1e1c6aa5a3 Make sure select() callbacks are not called multiple times
the unix select function returns a set of file descriptors to be
handled. the result-loop (the loop after the select()) is called again,
if more than one descriptor is removed by the callback funtion. this may
lead to a another call to the callback function, because the bits of the
FD_SETs do not change and still set.

i think we must clear these bits, if they are handled, so the handler
will not be called twice in case of a "restart" of that loop.
2010-01-23 10:52:38 +01:00
Daniel Willmann 604d851b89 Register GSM_BTS_TYPE_UNKNOWN in bsc_hack.c
The way the VTY configuration sytem works is that it first registers a
BTS of type GSM_BTS_TYPE_UNKNOWN and then sets the type correctly (after
encountering the type statement). This makes sure that registering a BTS
of type UNKNOWN succeeds.
2010-01-14 21:52:34 +01:00
Daniel Willmann f15c276382 [vty_interface.c]: Warn if no BTS could be allocated 2010-01-14 21:52:26 +01:00
Harald Welte 0677061757 update copyright statements
* include 2010
* add Andreas Eversberg and Sylvain
2010-01-12 10:46:27 +01:00
Harald Welte 714e1a29cc Merge remote branch 'goeller/master' 2010-01-12 10:46:03 +01:00
laforge 6af56d1501 Fix allocation of BTS from VTY
In 39315c4798 we introduced
per-bts OML attribute parser definitions and disallowed
a BTS of type unknown.

However, the VTY code first allocates a BTS with unknown type.
2010-01-12 10:46:27 +01:00
Holger Hans Peter Freyther 620961983c [bsc_mgcp] Set the right remote rtp and rtcp port
* It is the same as local endpoint port
2010-01-11 16:58:08 +01:00
Holger Hans Peter Freyther 2c492ed276 [bsc_mgcp] Fix writing of the config file...
* Add the new forward audio option
2010-01-11 16:57:58 +01:00
Holger Hans Peter Freyther f986cfc508 [bsc_mgcp] Print a message which mode is configured 2010-01-11 16:57:51 +01:00
Holger Hans Peter Freyther 14083bef0f [bsc_mgcp] Add a new forward only mode to the bsc_mgcp
With forward IP in the config and early bind on we will
simply forward RTP data on the endpoints from BTS to the
forward IP address.

This is implemented by disabling MGCP functionality when
a forward IP address was specified, setting the forward IP
in the endp->remote and assigning a ci != CI_UNUSED.

Early bind will make sure the sockets are created, the BSC FD's
are registered and then the normal dispatch code will
do the forwarding.
2010-01-11 16:57:40 +01:00
Holger Hans Peter Freyther 98657d5dee misc: Fix compilation of the test cases. 2010-01-11 16:42:07 +01:00
Harald Welte a855d1f846 fix ipaccess-config, call missing nanobts initialization
FIXME: We really need to have some libbsc and libmsc initialization
functions that clean up this mess.
2010-01-10 18:37:38 +01:00
Harald Welte 202259c31e add sylvain and andreas as authors 2010-01-10 18:21:33 +01:00
Harald Welte 39315c4798 [OML] parse attributes depending on BTS type
Some NM attributes are defined differently depending on
the BTS type.  Having one big nm_att_tlvdef[] table for
all BTS types is no longer sufficient.  This patch

* introduces 'struct gsm_bts_model' to describe a BTS model
* adds definitions of gsm_bts_model for BS-11 and nanoBTS
* changes the abis_nm_tlv_parse() function: include a bts pointer
2010-01-10 18:01:52 +01:00
Harald Welte 5078148829 TLV: add function to patch a tlv definition table 2010-01-10 17:45:23 +01:00
Harald Welte 6e670aab5a introduce new gsm_bts_trx_by_nr() function 2010-01-07 20:45:42 +01:00
Harald Welte 2ef156db43 bis_nm_ipaccess_set_nvattr() executes on a TRX, not a BTS 2010-01-07 20:45:41 +01:00
Holger Hans Peter Freyther cbcfe24fee [vty] In case of handover only warn about the proxy mode when it is enabled
Do not warn if the user has put "handover 0" in his configuration
as this will not enable handover, only warn if it is going to be
enabled.
2010-01-07 16:14:38 +01:00
Holger Hans Peter Freyther d0c540210a Initialize reject_cause to a valid number
Currently starting with the opencfg.cfg.nanobts and writing it out
and then trying to start again will not work. The network reject_cause
is initialized to 0 which is not a valid reject reason and when writing
this to the config file and trying to parse it will fail.

Pick roaming not allowed as a harmless option to those phones
accidently trying to connect to the BTS.
2010-01-07 16:08:42 +01:00
Holger Hans Peter Freyther 17d81e2f95 [system_information] Initialize the buffer before moving it
In the case of ipaccess we are doing a ++output but then still
try to write 23 bytes into it and on my system this is leading
to a stack corruption.
2010-01-07 15:48:28 +01:00
Holger Hans Peter Freyther 7ec448d031 [system_information] Return how much byte were written into output 2010-01-07 15:48:28 +01:00
Holger Hans Peter Freyther caa14869c0 [rest_octets] Return bv.data_len to indicate how was written
Return the used data_len for the bitvector. This indicates
how much data might have been written.
2010-01-07 15:48:28 +01:00
Holger Hans Peter Freyther 4cffc45cbc [rest_octets] Change data_len to the sizes of the spec
Is that right?
2010-01-07 15:48:27 +01:00
Daniel Willmann 6a9fa7308d [bs11_config] Add pll-setvalue and pll-workvalue commands
These commands let you change the PLL set and work values. Many thanks
to Dieter Spaar for figuring out how to do this!
Now you can just reset your PLL work value if it drifts away due to your
E1 card.
Use it like this: bs11_config pll-workvalue 1000
2010-01-07 14:03:22 +01:00
Daniel Willmann f904fa80ee [bs11_config] Whitespace changes so the help text looks nice 2010-01-07 14:03:22 +01:00
Daniel Willmann 7b1dd748ea [abis_nm] Add abis_nm_bs11_set_pll function to change the set/work value
Whether this function changes the set or the work value depends on your
type of login. In FACTORY login it changes the set value, in FIELD login
it changes the work value (which is what is used by the BS11 to tune the
frequency).
2010-01-07 14:03:22 +01:00
Daniel Willmann 4b054c8788 [abis_nm] Add abis_nm_bs11_infield_logon to logon as user field
As this user you are able to set the PLL work value which is especially
useful if your BS11 got detuned by an inaccurate oscillator in your E1
card.
2010-01-07 14:03:22 +01:00
Daniel Willmann 493db4ee3d [abis_nm] Add generic abis_nm_bs11_logon function
Factoring out common logon functionality will allow us to logon as
different user. abis_nm_bs11_factory_logon now uses this function.
2010-01-07 14:03:21 +01:00
Sylvain Munaut ef24dff2a2 [signal] Differentiate paging success from expiration in SS_PAGING
This is useful information to know and actually fixes a segfault
in rllp.c where lchan is accessed even tough it could be NULL in
case of failure.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-01-07 10:37:40 +01:00
Sylvain Munaut 65542c7f59 abis_nm: Consider a STATE CHG without avail_status as an empty avail_status
At least some nanoBTS 139 send the last even (going online) as
'enabled' 'unlocked' but no avail status IE (which I guess mean an empty
set, the doc 12.21 isn't that clear about that).

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-01-07 10:36:24 +01:00
Holger Hans Peter Freyther b3fc1eb53c [vty] Move db usage out of the libbsc (fork dumping of subscr) (2nd part)
Follow up on 424c4f0e29. As pointed out
by Sylvain on the mailinglist I need to remove this here as well.

Do not call db.c code from code that is located in libbsc.a
2010-01-06 09:44:09 +01:00
Holger Hans Peter Freyther b91a106932 [si] Go through the system_information structs and add static_asserts
The structs are correct, the problem is coming from the rest octets
2010-01-06 06:38:14 +01:00
Holger Hans Peter Freyther 424c4f0e29 [vty] Move db usage out of the libbsc (fork dumping of subscr)
vty_interface.c is part of libbsc.a but it started to use code
which is found in db.c recently. Fork the subscriber dumping and
provide more information on the layer3+ (MSC) commands. This
is restoring the separation again.
2010-01-06 06:00:40 +01:00
Harald Welte (local) 0b11414f38 print full lchan name when recycling it 2010-01-03 11:02:54 +01:00
Sylvain Munaut 4719307f50 gsm_data: Move auth related structure earlier
This is gonna be needed by the next commit ...

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-01-03 10:54:30 +01:00
Sylvain Munaut d7c9e5cad8 encryption: Import a GPL comp128 implementation
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-01-03 10:54:07 +01:00
Sylvain Munaut 8608e7c133 gsm_04_08: Add RAND debug output in gsm48_tx_mm_auth_req
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-01-03 10:53:39 +01:00
Sylvain Munaut bd55a6dd31 gsm_04_08: Specify key_seq when calling gsm48_tx_mm_auth_req
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-01-03 10:53:22 +01:00
Sylvain Munaut 99792900e8 vty: Add command to set auth algo & Ki for a subscriber
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-01-03 10:51:55 +01:00
Sylvain Munaut af29264039 vty: dump subscriber authentication (a3/a8) infos if available
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-01-03 10:51:03 +01:00
Sylvain Munaut 062d5efc5c db: Add methods to set auth{info,tuple} for a subscriber
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-01-03 10:50:34 +01:00
Sylvain Munaut c5f488b6bc db: Add declaration for get_auth{info,tuple_for_subscriber
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-01-03 10:50:03 +01:00
Sylvain Munaut e1cb4debb0 db: Fix bad size comparison when retrieving Ki
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-01-03 10:48:42 +01:00
Sylvain Munaut c863cbb171 gsm_data: Fix sres to be 4 bytes
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-01-03 10:48:23 +01:00
Sylvain Munaut 70881b7e8a db: Add issued/use_count/key_seq fields to AuthTuples
Theses will be useful to know if we can reuse the tuples or if
we should renew. The 'issued' is currently purely informative.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-01-03 10:17:35 +01:00
Sylvain Munaut 77d334ac4d db: Fix type of algorithm_id (NUMERIC -> INTEGER)
This fixes a DB warning and no need for NUMERIC here.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-01-03 10:16:15 +01:00
Sylvain Munaut deebb113ac db: Fix missing commas in AuthTuples table creation
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-01-03 10:13:14 +01:00
Sylvain Munaut 1f6c11fda8 abis_nm: Introduce & use a nm_is_running function to test gsm_nm_state
This returns true if the gsm_nm_state can be considered 'running'.
Note that we also accept availability==0xff (which is a code for
no value) because according to 12.21 it is perfectly valid.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-01-03 10:11:24 +01:00
Sylvain Munaut 15e1024e49 update .gitignore
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-01-03 10:11:07 +01:00
Sylvain Munaut 504807001d silent_call: Add option to choose channel type
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-01-03 10:10:47 +01:00
Sylvain Munaut b6c273e9e3 vty: Register logging_set_log_level_cmd
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-01-03 10:10:00 +01:00
Sylvain Munaut 7de67960e7 [bsc_init] Send OPSTART if SITE_MANAGER reports off-line
The exact sequence the states the BTS goes through is slightly
different for one of the nanoBTS 139 I have and it needs this
to start.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-01-03 10:07:11 +01:00
Harald Welte 730bc653d1 hlrstat: Print numeric MCC/MNC in case no name is available 2010-01-01 15:08:38 +01:00
Harald Welte 510087752e introduce and implement silent_call_reroute() and silent_call_rx()
Thise two functions are interfacing with the 04.08 layer 3 to
determine if a particular message should be handled inside
the OpenBSC layer 3, or if it should be handled in the silent call
handler.
2010-01-01 10:59:20 +01:00
Harald Welte 83579ca8ff keep 'silent call' state in struct lchan
This enables us to reliably detect if a lchan is part of a silent
call or not.
2010-01-01 10:59:19 +01:00
Holger Hans Peter Freyther f31e4745bb [misc] Utilize rf_locking by setting the nm_state.administrative
* On start the vty code will call the abis_nm method and this
  will set the administrative state to unlock/lock
* During startup the BTS will report its state as well and would
  possible overwrite the set administrative. We are only going
  to update the administrative if it was 0 before. This appears
  to work on all of my tests. In case this will not be the case
  for others we will have to split the administrative into two
  sets one for the BTS and one for the BSC.
2009-12-31 03:05:52 +01:00
Holger Hans Peter Freyther f7dbd589ab [ipaccess] Remove some code duplication in the recently added firmware flashing.
Share the creation of the sw_load.
2009-12-30 09:32:05 +01:00
Holger Hans Peter Freyther 7992867f4b [abis] Refactor sw descr generation to a new methods
* This is used in sw_load_init and sw_load_end and both needs
  to be touche for every BTS. Move it into a common method.
* This was only verified on the nanoBTS.
2009-12-30 09:25:30 +01:00
Holger Hans Peter Freyther 1356c08cc8 [abis] Dispatch a IPAC restart ACK/NACK signal
* Add the NACK version to the list
* Dispatch the signal when we receive the message
* Handle it in ipaccess-config by exiting the application
2009-12-30 09:00:01 +01:00
Holger Hans Peter Freyther 2e83782b1c [ipaccess] Restart only after setting the OML IP, software load
* Do not issue the restart right aways if we have OML IP or
  software load in the queue (hint, we need a real queue of operations
  to carry out... with one big state machine)
* Change the signal_data of ipacc ACK/NACK to contain the msg type
  and the bts pointer.
* Issue a restart for software load and OML and use the BTS pointer
  we got out of the new signal data.
2009-12-30 08:38:43 +01:00
Holger Hans Peter Freyther f9811defe2 [ipaccess] Make SW activation work by filling out sw_load1 and sw_load2
We are filling sw_load1 with the information found with type
0x1000 and sw_load2 with type 0x2001. It appears from the protocol
traces that these information is not extracted from them. We also
need to include the \0 from the string.

With this firmware flashing seems to work.
2009-12-30 08:11:18 +01:00
Holger Hans Peter Freyther 322127413e [ipaccess] Close the firmware file as well 2009-12-30 07:33:23 +01:00
Holger Hans Peter Freyther dade8980e3 [ipaccess] Move firmware analysis into the ipaccess-config utility
* This turns ipaccess-firmware.c into a plain helper, fix the
  ipaccess name...
2009-12-30 07:08:39 +01:00
Holger Hans Peter Freyther 1f71d9c4c0 [ipaccess] Document the software argument for firmware loading 2009-12-30 06:55:38 +01:00
Holger Hans Peter Freyther af351a21f2 [ipaccess] Start using talloc in the firmware code
* We are not leaking anything... *yeah*, talloc rocks
2009-12-30 06:42:17 +01:00
Holger Hans Peter Freyther 0183edd18c [ipaccess] Change the name to be slightly better.. 2009-12-30 06:42:16 +01:00
Holger Hans Peter Freyther c9f8a6dca3 [ipaccess] Expose the sub header list as well.. 2009-12-30 06:42:16 +01:00
Holger Hans Peter Freyther 4a98cad85e [ipaccess] Turn firmware parsing into a routine so it can be used
* text3 seems to be a version as the text content starts
  with a 'v'
* move the sdp_firmware into the ipaccess.h and declare
  the function. The headers are returned through a list.
2009-12-30 06:42:16 +01:00
Holger Hans Peter Freyther 8f99562474 [ipaccess] Add return values to the analyze_file 2009-12-30 06:42:16 +01:00
Holger Hans Peter Freyther 67b05d590b [ipaccess] There is only one second magic number
* The second magic number is only a short and it is
  the same for all of my cases
* This also means that the first and second header
  are the same which means the unknown 8 byte are
  header and file size... and the 122 bytes are
  actually multiple strings (just all empty on the
  outermost SDP). Adding the strings left us with 120
  bytes so we have two bytes of unknown usage..
* This is now capable of parsing outer and inner SDP
  files and print their header.
2009-12-30 04:40:52 +01:00
Holger Hans Peter Freyther 1684e79365 [ipaccess] Allow to parse the second magic2 as well
* The internal SDP appears to have a different magic number
  than the first entry and a slightly different packet format
* There are 8 byte of binary for at the beginning and the header
  ends with a table pointing to some strings and then the actual
  firmware follows.
* We currently only parse the strings of that header.
2009-12-30 04:40:52 +01:00
Holger Hans Peter Freyther b1414d99c4 [ipaccess] Start the parser recursively...
* Start parsing the sub SDPs with the same analyze method
2009-12-30 04:40:52 +01:00
Holger Hans Peter Freyther 1029f84435 [ipaccess] Read the " SDP" and version first and then the rest of the header
Read everything we need to determine the version first and then
the rest. This will allow to be able to poke into the other SDP
bits.
2009-12-30 04:40:51 +01:00
Holger Hans Peter Freyther e29be15ac5 [ipaccess] The firmware format is recursive...
The something3 points to the next start of the SDP
entry. The four bytes in front of the " SDP" are not
known and just discarded. Prepare to be able to
recursively parse the SDP header...
2009-12-30 04:40:51 +01:00
Holger Hans Peter Freyther 086ffa51b4 [abis] Add ACK signal and send it on SET NVATTR ACK
* Add the signal definition to signal.h
* Dispatch the signal from abis_nm.c
* Handle it in ipaccess-config.c and say we are done with work
2009-12-30 04:40:50 +01:00
Holger Hans Peter Freyther e5198967a6 [ipaccess] Use the right variable... *sigh*
* I will refactor all this in the future..
2009-12-30 04:40:49 +01:00
Harald Welte (local) 93f4207ce6 ipaccess-config: re-enable DNM logging, add support for multi-TRX 2009-12-29 11:00:48 +01:00
Harald Welte (local) d48f4ebb24 rsl: add new 'gsm_trx_name()' function and use it 2009-12-29 11:00:41 +01:00
Harald Welte (local) 7971d3d281 ipaccess input: Print BTS number that has disappeared 2009-12-29 11:00:37 +01:00
Harald Welte (local) 5fe33189a9 rsl_sendmsg: Print message in case trx == NULL 2009-12-29 11:00:27 +01:00
Harald Welte (local) 82ff397e31 export the 'trx_is_usable() function and use it from paging
this ensures we don't send paging requests to currently inactive transceivers.
2009-12-29 11:00:18 +01:00
Harald Welte 1887f9d153 Introduce gsm_lchans_name() for human readable lchan state name
Also, use this new function to dump lchan state on VTY and to
improve readability of RSL log messages.
2009-12-29 10:53:25 +01:00
Harald Welte 8e93b7908f RSL: Introduce LCHAN_S_REL_REQ state
This state will help us to differentiate between channels where we have
requested the release, and channels that are actually released.
2009-12-29 10:53:25 +01:00
Holger Hans Peter Freyther ebdcee27b8 [ipaccess] Start reading the header entry
* Read the entry and print it out
2009-12-29 08:38:12 +01:00
Holger Hans Peter Freyther 07a4026b38 [ipaccess] Start figuring out what the header entry is meaning.. 2009-12-29 08:38:12 +01:00
Holger Hans Peter Freyther c823c89c76 [ipaccess] Use the u_intX_t types in the firmware tool 2009-12-29 08:38:12 +01:00
Holger Hans Peter Freyther 567b3261d9 [ipaccess] Attempt to read the header entries.. 2009-12-29 08:38:12 +01:00
Holger Hans Peter Freyther 46a920c36c [ipaccess] Do not pick in the wrong headers...
I must have picked in the wrong section of these
files... There are some kind of header entries
that are all 138 byte long and this is the total
length...
2009-12-29 08:38:12 +01:00
Holger Hans Peter Freyther 0b864db429 [ipaccess] Send a NVATTR to activate the new software after load end
* The struct is similiar to the one in abis_nm..
* The generation of the data is similiar to sw_end_load and sw_init_load
  and we should unite this..
2009-12-28 16:40:44 +01:00
Holger Hans Peter Freyther c7aabcad1b [ipaccess] Handle LoadAbort coming from the BTS.
* Be bale to abort the load when the BTS is rejecting the file..
2009-12-28 16:40:44 +01:00
Harald Welte (local) 66169152f6 vty: replace'logging level' numeric value with human readable string 2009-12-28 13:42:55 +01:00
Harald Welte (local) 7b37d9710d set the TRX nominal power by default and/or VTY 2009-12-28 13:42:47 +01:00
Harald Welte (local) 19ef62a0a5 Introduce and use gsm_lchan_name() in addition to gsm_ts_name()
In many cases we actually want a name / unique ID for the lchan,
not just for the on-air timeslot... especially in SDCCH/8 case,
where 8 SDCCHs share one timeslot...
2009-12-28 13:42:33 +01:00
Harald Welte (local) 9538efc8a7 RLL: print human-readable value of RLM CAUSE in ERROR IND 2009-12-28 13:42:03 +01:00
Harald Welte (local) 3e46031f52 Introduce new ACT_REQ state to prevent race condition during channel allocation
When we allocate a channel, we send the RSL CHAN ACT REQ and wait until we get
a CHAN ACT ACK.  Only the ACK will change the state, so there is a race where
we allocate that same channel to a different channel request before we get
the ACT ACK.

Introducing a new ACT_REQ state resolves this issue.
2009-12-28 13:41:16 +01:00
Harald Welte (local) ccd8845449 rename gsm_lchan_name() to gsm_lchant_name() 2009-12-28 13:41:06 +01:00
Harald Welte (local) 2f5df85c26 fix segfault in CHAN RQD log message 2009-12-28 13:40:39 +01:00
Harald Welte (local) 91b603db57 correctly print chan act nack error 2009-12-28 13:40:32 +01:00
Harald Welte (local) 28f1d37380 print TS name when out of resources during CHAN RQD 2009-12-28 13:40:12 +01:00
Harald Welte (local) 9fcf6d78b7 correction of RTP timestamps is a NOTICE event, not debug 2009-12-28 13:38:23 +01:00
Harald Welte (local) b29b57a198 include BTS and TRX number in TRX overload message report 2009-12-28 13:38:18 +01:00
Holger Hans Peter Freyther 8f31a8fdae [abis] Set rc to 0 to avoid running into a warning about unknown states
When we have received the End Ack we are just doing nothing as we
are done. This means rc remains -1 and we will print a warning but
there is no need to have a warning...
2009-12-28 11:48:12 +01:00
Holger Hans Peter Freyther 326a632c46 [ipacess] Implement sw_load_end for the nanoBTS
* This should be shared with the sw_load_init routines
  as it is the about the same.
2009-12-28 11:45:43 +01:00
Holger Hans Peter Freyther c5dc0f7ac7 [ipaccess] Properly increment the segs_in_window
Somehow this should be done in the fill method..
2009-12-28 11:28:51 +01:00
Holger Hans Peter Freyther 5a2291e96a [ipaccess] No need to use fdopen for the file (that was leaked too) 2009-12-28 10:23:56 +01:00
Holger Hans Peter Freyther 71bc11e757 [ipaccess] Implement the Load Segment messages... 2009-12-28 10:04:26 +01:00
Holger Hans Peter Freyther 64d9ddde5d [abis] Warn if sw_load_segment is not implemented for the given bts type 2009-12-28 09:21:18 +01:00
Holger Hans Peter Freyther cf269a7f85 [ipaccess] Send the correct Software Load Init for the ipaccess BTS
* The FOM header needs to be different. We need to address the
  base station transceiver, bts, trx set to 0 and ts to 255
* We need to transfer the the \0 of 'id' and 'version'
* We need to issue a NM_ATT_SW_DESCR (just the value)
* We need to use 16bit length for the other two ids..
* After this our Software Load Init is getting an Ack.
2009-12-28 09:05:16 +01:00
Holger Hans Peter Freyther a6faea83e0 [ipaccess] Verify the SDP header before flashing
Print a big fat warning that we do not carefully check the
firmware as the format is not known and that flashing could
be dangerous..
2009-12-28 09:05:16 +01:00
Holger Hans Peter Freyther ab2c8b109d [ipaccess] Start flashing once the BTS has started enough...
Strictly speaking we would only need to start the Site Manager
and could probably start flashing afterwards but it is more easy
to have one config path...
2009-12-28 09:05:16 +01:00
Holger Hans Peter Freyther f413a0811a [ipaccess] Add firmware download option to ipaccess-config
This will mostly work like the downloading in bs11_config
and is based on the bs11_config state machine as well. Once
it is working we can see how to unite both implementations.
2009-12-28 09:05:15 +01:00
Holger Hans Peter Freyther 30b9ecda33 [ipaccess] Verify the size part of the header 2009-12-27 14:07:40 +01:00
Holger Hans Peter Freyther a25b20c174 [ipaccess] Call it ipaccess-firmware 2009-12-27 14:07:40 +01:00
Harald Welte f6f2ef9d24 move get_string_value() und get_value_string() into debug.c
this makes bsc_mgcp and ipaccess-proxy compile again
2009-12-27 11:24:55 +01:00
Sylvain Munaut 258e2f9a9c gsm_04_11: Support for implicit CP-ACK in case of multi-SMS
See GSM 04.11 Chapter 5.4 for details. The idea is that when
multi-SMS are mobile originated, it's possible the CP-ACK of
the previous transaction to be lost and the reception of a
new CP-DATA for a new transaction should close previous transaction
"as-if" we had received the CP-ACK ...

Note that testing is hard since it's an exceptional condition that's
hard to create. I tested by temporarly disabling CP-ACK processing
and checked it worked as expected.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2009-12-27 01:09:41 +01:00
Harald Welte (local) 73b82bbf92 print TS name in RLL ERR IND 2009-12-26 22:48:25 +01:00
Harald Welte (local) fc05750cd8 [rsl] correctly print handover detect and connection fail 2009-12-26 22:48:21 +01:00
Harald Welte (local) 198d5ad6f4 print LAC and BTS number when showing location update reject 2009-12-26 22:48:16 +01:00
Harald Welte (local) 93c6284772 fix missing space in log message 2009-12-26 22:48:12 +01:00
Harald Welte (local) b79bdd99e5 [debug] add new 'logging level' command to set loglevel more user friendly 2009-12-26 22:48:09 +01:00
Harald Welte (local) 47df39931c generate INFO events for CC SETUP and LOC UPD REJ 2009-12-26 22:48:00 +01:00
Harald Welte (local) 240ce88185 add 'get_string_value()' as inverse function of 'get_value_string()' 2009-12-26 22:47:55 +01:00