Commit Graph

64 Commits

Author SHA1 Message Date
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 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
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
Harald Welte 5b8ed4398e [logging] differentiate DEBUG, NOTICE and ERROR log levels in NM and RSL 2009-12-24 12:20:20 +01:00
Harald Welte d6847a940a use enum for operational state 2009-12-24 10:06:33 +01:00
Holger Hans Peter Freyther 66e8219f96 [sw_load] It turns out there is a header that needs to be read
The magic " SDP" is occuring twice in the file. The first time
seems to be the file header and the second time it is with the
payload. We will need to parse this somehow...
2009-12-23 08:06:31 +01:00
Holger Hans Peter Freyther e7ff91342e [sw_load] For the nanoBTS just open the firmware
* The two version strings are not in an easy to parse header
  and from my trace it appears like the whole file is sent
  to the BTS. So just open the firmware file..
2009-12-23 07:26:57 +01:00
Holger Hans Peter Freyther 306b7219ac [abis] Do not access an array with N elements at index N
Possible crash fixes by preventing accessing the
array out of bounds.
2009-12-21 17:06:07 +01:00
Holger Hans Peter Freyther 17c24c9057 [abis] Properly compare obj_inst->trx_nr to bts->num_trx
* Use >= in this case as we start counting the trx from 0
* This is fixing a problem with multi trx config
2009-12-21 17:00:46 +01:00
Harald Welte b1d4c8ed9d logging: introduce log levels at caller site
This introduces a new LOGP() macro together with LOGL_* definition to
support multiple log levels (severities) throughout the codebase.

Please note that the actual logging system does not use them yet,
in this patch we simply introduce the new macros at the caller site.
2009-12-17 23:10:46 +01:00
Harald Welte 7bcb893eb7 remove execute permission from abis_nm.c 2009-12-06 12:23:47 +05:30
Harald Welte d6575f9d29 ip.access: add nanoBTS channel combination constraints 2009-12-02 02:45:23 +05:30
Holger Hans Peter Freyther 2d501ea26a [vty] Add option to disable RF on a given TRX.
- Make sure that on runtime the Radio Carrier can be
  locked and unlocked. The vty code calls into the
  Abis NM to lock/unlock the channel and the state is
  stored there.

- Make sure that on start the Radio Carries remains
  offline and we are not starting it. On start the
  radio carrier is either locked or unlocked. This means
  the RSL will not connect until the RF is unlocked. It
  will connect then. To see RSL bringup failures one
  needs to parse the RSL nack message.

- When the TRX is locked on startup the RSL link will
  only be established after it will be unlocked.
2009-11-24 13:08:50 +01:00
Harald Welte d8cfc90e22 [abis_nm] avoid integer-to-pointer casting and associated gcc warnings 2009-11-17 06:09:56 +01:00
Harald Welte 654c9df3c8 [OML] don't hexdump bcch info 2009-11-13 14:42:52 +01:00
Harald Welte aff237d739 [OML] fix bugs in BCCH info parser for ip.access 2009-11-13 14:41:52 +01:00
Harald Welte 999549d9ae [OML] more verbose error reporting in case object instance unknown 2009-11-13 12:10:18 +01:00
Harald Welte b40a38ff46 [ip.access] Parse cell global ID as part of BCCH info 2009-11-13 11:56:05 +01:00
Harald Welte 0f255857d4 ip.access: Introduce parser function for BCCH Info test result 2009-11-12 14:48:42 +01:00
Holger Hans Peter Freyther 423bfe915c abis_nm.c: Remove duplicate entry from the table 2009-10-27 10:08:20 +01:00
Harald Welte a1499d00a5 [GPRS] introudce PDCH and PDCH/TCH physical channels
GPRS needs PDCH (Packet Data Channels), and we need support in
our data model as well as OML and RSL for it
2009-10-24 10:25:50 +02:00
Harald Welte daef521ea5 [OML] Add support for ip.access SET ATTRIBUTE message
Since TS 12.21 implements only SET ATTRIBUTE for some object classes,
ip.access had to extend it to be able to set attributes on arbitrary
objects.  We now introduce a function implementing that message.
2009-10-24 10:20:41 +02:00
Harald Welte 55dd443ac2 [GPRS] add data structures for OML of NSE,CELL,NSVCE
Supporting GPRS means we have a number of additional OML objects to
deal with.  We need to extend our gsm_bts structure to at least
include the nm_state for each of those objects.
2009-10-24 10:19:14 +02:00
Holger Hans Peter Freyther 2c481b27fc Fix compiler warning. 0 does not work on strings 2009-10-22 15:44:30 +02:00
Harald Welte a8bd6d4a34 [abis_nm] introduce debugp_foh() function for object class printing 2009-10-20 09:56:18 +02:00
Harald Welte 31a74906a3 [abis_nm] print ip.access TCP port in correct byte order 2009-10-19 22:50:30 +02:00
Harald Welte 35d447b022 [abis_nm] print ip.access stream_id in RSL connect ack 2009-10-19 22:49:33 +02:00
Harald Welte 746d6091d9 [abis_nm] introduce and use abis_nm_ipaccess_rsl_connect() 2009-10-19 22:11:11 +02:00
Harald Welte a62202be31 [abis_nm]: Print Object Class of ip.access messages 2009-10-19 21:46:54 +02:00
Harald Welte 4bd0a98a77 [abis_nm] print object class/instance for NACK 2009-10-08 20:49:51 +02:00
Harald Welte 15c44179c3 [abis_nm]: print ip.access SET ATTR [N]ACK 2009-10-08 20:49:44 +02:00
Mike Haben e2d8227499 [ipaccess] Add nanoBTS 1900 support
Add support for 1900 nanoBTS by using unified bts_type
GSM_BTS_TYPE_NANOBTS for 900, 1800 and 1900 versions.

Reduce the nanoBTS enum values to one and derive the
version from the user supplied band. In the future we
might want to do auto band detection.

The configuration file needs to be changed to refer
to nanobts instead of nanobts900/nanobts1800.

Signed-off-by: Mike Haben <michael.haben@btinternet.com>
Signed-off-by: Holger Hans Peter Freyther <zecke@selfish.org>
2009-10-05 12:12:54 +02:00
Mike Haben a03f97775b [ipaccess] Parse Software Activate parameters
Addresses a FIXME in abis_nm.c, parsing the parameters
passed by a Software Activate request.  I've tested this
on three different IpAccess BTSs (including one which
didn't work with the original code), would be good if
someone could check it on a BS11.

Signed-off-by: Mike Haben <michael.haben@btinternet.com>
Tested-by: Holger Hans Peter Freyther <zecke@selfish.org>
2009-10-01 14:58:30 +02:00
Harald Welte (local) d19e58b13c move talloc context creation out of on_dso / constructors
the various constructors get called in a non-obvious, linker determined
order, which makes certain objects disappear from the talloc report.

This change moves the talloc context creation into a new talloc_ctx.c file
2009-08-15 02:30:58 +02:00
Harald Welte 21bd3a52f1 move chcomb4pchan to public abis_nm_chcomb4pchan() function 2009-08-10 12:21:22 +02:00
Daniel Willmann 65f68fa961 Add {create, delete}-bport1 and bport0-{star, multidrop} to bs11-config
This adds the possibility to bs11-config to add the second bport and
change the line config to star or multidrop.
2009-08-10 11:49:36 +02:00
Harald Welte 39c7debc9c verify bs11 channel combination constraints 2009-08-09 21:49:48 +02:00
Harald Welte c7310385ca implement nanoBTS frequency error test
This helps us to detect the frequency error of BS-11 if it is located
next to the nanoBTS 900.

If 'ipaccess-config -l' is called, it will produce a report like
<0020> ipaccess-config.c:85 TEST REPORT: test_no=0x42 test_res=0
<0020> ipaccess-config.c:108 ==> ARFCN  220, Frequency Error     22
<0020> ipaccess-config.c:108 ==> ARFCN    1, Frequency Error    -37
<0020> ipaccess-config.c:108 ==> ARFCN   10, Frequency Error      0
<0020> ipaccess-config.c:108 ==> ARFCN   20, Frequency Error     11
<0020> ipaccess-config.c:108 ==> ARFCN   53, Frequency Error      5
<0020> ipaccess-config.c:108 ==> ARFCN   63, Frequency Error     -4
<0020> ipaccess-config.c:108 ==> ARFCN   84, Frequency Error     11
<0020> ipaccess-config.c:108 ==> ARFCN  101, Frequency Error      0
<0020> ipaccess-config.c:108 ==> ARFCN  123, Frequency Error    -52

where in this case the ARFCN 123 is the BS-11 with a frequency error
larger than all the other (regular) BTS in the vicinity.
2009-08-08 00:02:36 +02:00
Harald Welte 1989c089da add function for performing 'CONNECT MULTI-DROP LINK" as per GSM 12.21
don't be confused, BS-11 does not need this.  But since I wrote the code
before knowing that, I can just as well commit it.
2009-08-06 17:58:31 +02:00
Harald Welte 4fbfd3a43b add more ip.access attribute TLV definitions 2009-08-06 17:57:23 +02:00
Harald Welte ac606dcf92 use talloc_free() rather than free()
Fix two bugs in OML software download code where we allocate data structures
using talloc, but free() them using the system memory allocator.  Spotted by
dexter.
2009-08-06 15:44:18 +02:00
Harald Welte 7bfc267496 move allocation of talloc contexts into link-time constructor
This is much more optimal than checking if the context exists every
time we allocate the respective object.
2009-07-28 00:41:45 +02:00
Harald Welte e6c22d9db7 use the TSC that is configured in bts->tsc rather than hardcoded value 2009-07-21 22:13:22 +02:00