aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/abis_nm.c
AgeCommit message (Collapse)AuthorFilesLines
2011-03-03re-structure the OpenBSC directory layoutHarald Welte1-3126/+0
The new structure divides the code into a number of libraries for the BSC core functionality, MSC core functionality, Abis transport, TRAU and other bits. This doesn't introduce any functional code change but simply moves around files and alters Makefile.am accordingly. Next step would be to disentangle a lot of the inter-library dependencies and make the individual bits of code more independent.
2011-02-24oml: Parse probable cause and additional text in failure reportsDieter Spaar1-0/+14
2011-02-19Fix various compiler warnings all over the codeHarald Welte1-2/+1
2011-02-14OM2000: Route outgoing NM message depending on MOHarald Welte1-2/+2
Depending on the MO we adress, select the proper OML link
2011-02-11[BSC] Move the BTS-type specific code from bcs_init.c to bts_*.cHarald Welte1-9/+16
bsc_init.c was a big mess even only for two supported BTS models, so before adding more BTS types, this needs a cleanup. All the BTS specific code from bsc_init.c has now moved into bts_{siemens_bs11,ipaccess_nanobts}.c This has required that input_event() and nm_state_event() get both converted to proper libosmocore signals instead of referencing external symbols.
2011-01-01License change: We are now AGPLv3+ instead of GPLv2+Harald Welte1-6/+5
The reason for this is quite simple: We want to make sure anyone running a customized version of OpenBSC to operate a network will have to release all custom modifiations to the source code.
2010-12-21abis_nm: Band aid on OML initialisation by queuing messagesHolger Hans Peter Freyther1-8/+68
Instead of sending many messages we will queue the OML messages and wait for the ACK/NACK before sending the next message from the queue. We tag the msgb to remember if we need to wait for an ack or not. We keep the order of all messages, on ACKs and similiar occassions we will drown the queue until we reach a message that needs to be acked and then wait for that ack again. Possible breakage can appear when we send an OML (e.g. BS11 specific message) msg which does not need to be acked through the abis_nm_sendmsg call. The fix will be to use the _direct version of this method. Re-Enable as it might have fixed something... who knows. Conflicts: openbsc/include/openbsc/abis_nm.h openbsc/include/openbsc/gsm_data.h openbsc/src/abis_nm.c openbsc/src/gsm_data.c
2010-12-14bs11_config: show the BPORT0 / BPORT1 configuration in 'query'Harald Welte1-0/+14
This introduces abis_nm_bs11_get_bport_line_cfg() and a parser for the result.
2010-07-30network-listen: The BSIC flag is not set as expectedHarald Welte1-0/+3
2010-07-22[ipaccess-config] fix bugs in generating the PHYSICAL CONFIG attributeHarald Welte1-1/+2
... while asking the BTS to perform tests for us. The length of the ARFCN whitelist is the actual length in bytes, not the number of 16bit ARFCN numbers. Also, implement a limit, either by rxlevel or by number of ARFCN that should end up in the whitelist.
2010-07-22[abis_nm] fix 2 bugs in parsing IPA Test response messagesHarald Welte1-2/+2
2010-07-22ipaccess-config / network listen: ordered list of RxLevelsHarald Welte1-15/+9
Use libosmocore 'rxlev_stat' module to generate an ordered list of ARFCN's, sorted by RxLev while performing test nr. 64
2010-07-22move ip.access netowrk listen (NWL) to network_listen.cHarald Welte1-1/+1
Also, we now re-start the network listen test after it has finished, so if you run a test from ipaccess-find, the test will get re-started and re-started all the time.
2010-07-14abis_nm: Create a signal data structure for the NACK messageHolger Hans Peter Freyther1-1/+4
Provide the message type and the msgb of the NACK message.
2010-06-21abis_nm.c: Reading the in_addr can lead to unaligned memory accessHolger Hans Peter Freyther1-4/+7
The value of the in_addr might not be 32 bit aligned and reading it can generate an alignment error on ARM. Fix it by using memcpy to copy the data into a local variable. There are many more potential alignment issues that we will fix when we hit them.
2010-06-20[BSC] NM: Correct treatment of ARFCN_LIST for BS-11laforge1-1/+5
For Siemens BS-11, the 'length' value of the ARFCN_LIST IE is interpreted in violation of the spec. The spec says it is a length in octets, while Siemens treats it as 'count of 16bit ARFCN values'.
2010-06-20[BSC] Implement per-timeslot ARFCN lists for frequency hoppingHarald Welte1-3/+15
We now compute the Cell Channel Description for SI 1 by bit-wise OR of the ARFCN bitmask of each timeslot on all the TRX of the BTS. Also, support generating a GSM 04.08 Channel Description IE for the hopping case (with HSN/MAIO instead of ARFCN). What's still missing now: Sending the 04.08 Mobile Allocation IE
2010-06-20unfinished support for hopping channelsHarald Welte1-6/+5
2010-05-31OML: Introduce minimal VTY command set to interact with OML managed objectsHarald Welte1-19/+18
2010-05-13sw_load: Specify the trx_nr for the software loadHolger Hans Peter Freyther1-5/+7
For the multi TRX setup we will need to specify the right trx->nr to be able to flash the BTS. For the BS11 case we are ignoring the additional argument.
2010-05-13ipaccess: Send the reset to the BASEBAND_TRANSC and supply TRXHolger Hans Peter Freyther1-4/+11
Send the IPA Restart to a given BTS/TRX, change the signal callbacks to carry the trx instead of the BTS so we have an easy access to the right TRX and change the ipaccess-config to use that TRX. This is fixing the restart with a multi TRX setup. Even if we have the msg->trx, use the gsm_bts_trx_by_nr and get the TRX from the fom header. This is because the OpenBSC and the BTS numbering might not match for the multi TRX case.
2010-05-13abis: Pass the abis_om_obj_inst in the nm_state_event..Holger Hans Peter Freyther1-2/+2
2010-04-12abis_nm: Fix ACTIVATE SW parametersSylvain Munaut1-12/+49
The previous code only sent the FILE_ID tag data part, but according to the GSM 12.21 spec, section 8.3.6, the full SW Description 'object' must be sent so that includes the NM_ATT_SW_DESCR tag, the whole FILE_ID and the whole FILE_VERSION (including tags & length fields). Note that functionnaly on a nanoBTS 139 I couldn't see any difference ... whatever I send in there it works ... Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-03-29[misc] Remove whitespace from the end of the line.Holger Hans Peter Freyther1-13/+13
2010-03-25increase the use of 'struct value_string' in abis_nm and gsm_dataHarald Welte1-164/+131
2010-03-22Create new gprs-conf branch with the non-SGSN part of the gprs branchHarald Welte1-12/+10
This new gprs-conf branch is intended to contain everything needed to configure GPRS in the nanoBTS, but without implementing the SGSN/GGSN functionality. The SGSN/GGSN development will happen in a branch based on this branch called "gprs-sgsn"
2010-02-20split 'libosmocore' from openbsc codebaseHarald Welte1-3/+3
This library is intended to collect all generic/common funcitionality of all Osmocom.org projects, including OpenBSC but also OsmocomBB The library currently includes the following modules: bitvec, comp128, gsm_utils, msgb, select, signal, statistics, talloc, timer, tlv_parse, linuxlist msgb allocation error debugging had to be temporarily disabled as it depends on 'debug.c' functionality which at the moment remains in OpenBSC
2010-01-10[OML] parse attributes depending on BTS typeHarald Welte1-81/+12
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-07bis_nm_ipaccess_set_nvattr() executes on a TRX, not a BTSHarald Welte1-3/+3
2010-01-07[abis_nm] Add abis_nm_bs11_set_pll function to change the set/work valueDaniel Willmann1-0/+21
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[abis_nm] Add abis_nm_bs11_infield_logon to logon as user fieldDaniel Willmann1-0/+5
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[abis_nm] Add generic abis_nm_bs11_logon functionDaniel Willmann1-5/+8
Factoring out common logon functionality will allow us to logon as different user. abis_nm_bs11_factory_logon now uses this function.
2010-01-07abis_nm: Consider a STATE CHG without avail_status as an empty avail_statusSylvain Munaut1-1/+2
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-03abis_nm: Introduce & use a nm_is_running function to test gsm_nm_stateSylvain Munaut1-0/+7
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>
2009-12-31[misc] Utilize rf_locking by setting the nm_state.administrativeHolger Hans Peter Freyther1-3/+8
* 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-30[abis] Refactor sw descr generation to a new methodsHolger Hans Peter Freyther1-25/+18
* 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[abis] Dispatch a IPAC restart ACK/NACK signalHolger Hans Peter Freyther1-0/+6
* 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[ipaccess] Restart only after setting the OML IP, software loadHolger Hans Peter Freyther1-2/+7
* 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[abis] Add ACK signal and send it on SET NVATTR ACKHolger Hans Peter Freyther1-0/+3
* 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-28[ipaccess] Handle LoadAbort coming from the BTS.Holger Hans Peter Freyther1-0/+6
* Be bale to abort the load when the BTS is rejecting the file..
2009-12-28[abis] Set rc to 0 to avoid running into a warning about unknown statesHolger Hans Peter Freyther1-0/+1
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[ipacess] Implement sw_load_end for the nanoBTSHolger Hans Peter Freyther1-4/+12
* This should be shared with the sw_load_init routines as it is the about the same.
2009-12-28[ipaccess] Properly increment the segs_in_windowHolger Hans Peter Freyther1-0/+1
Somehow this should be done in the fill method..
2009-12-28[ipaccess] No need to use fdopen for the file (that was leaked too)Holger Hans Peter Freyther1-7/+4
2009-12-28[ipaccess] Implement the Load Segment messages...Holger Hans Peter Freyther1-0/+16
2009-12-28[abis] Warn if sw_load_segment is not implemented for the given bts typeHolger Hans Peter Freyther1-0/+1
2009-12-28[ipaccess] Send the correct Software Load Init for the ipaccess BTSHolger Hans Peter Freyther1-9/+38
* 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[ipaccess] Verify the SDP header before flashingHolger Hans Peter Freyther1-1/+49
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-24[logging] differentiate DEBUG, NOTICE and ERROR log levels in NM and RSLHarald Welte1-15/+13
2009-12-24use enum for operational stateHarald Welte1-3/+3