Commit Graph

54 Commits

Author SHA1 Message Date
Holger Hans Peter Freyther c42ad8b686 misc: Move from u_int to uint types of stdint.h
This was done with sed on the files.
2011-04-18 17:31:39 +02:00
Holger Hans Peter Freyther 0e8facca42 ipaccess-config: Allow to invoke tests by names.
Allow to invoke tests by name.
2011-04-11 20:39:16 +02:00
Holger Hans Peter Freyther 390ba3faa0 ipaccess-config: Add option to list possible NVRAM settings
We can handle NVRAM settings via names but there is no way
to discover these names. This commits adds the unusual -H
option to show these values.
2011-04-11 20:39:16 +02:00
Holger Hans Peter Freyther cfccedd74a ipaccess-config: Allow to automatically loop a test
This makes the commented out code an option that might
or might not work reliable.
2011-04-11 20:39:12 +02:00
Pablo Neira Ayuso 136f453dd2 src: use new library libosmogsm and new path to headers in libosmocore
libosmogsm is a new library that is distributed in the libosmocore.
Now, openbsc depends on it. This patch gets openbsc with this
change.

This patch also rewrites all include path to the new
osmocom/[gsm|core]

Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
2011-03-23 18:17:56 +01:00
Harald Welte f338a03b0c [BSC] Move the BTS-type specific code from bcs_init.c to bts_*.c
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-02-11 16:26:31 +01:00
Harald Welte 9af6ddfcec License change: We are now AGPLv3+ instead of GPLv2+
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.
2011-01-01 15:39:34 +01:00
Holger Hans Peter Freyther d85642a1a7 ts Make the e1inp_ts delay configurable
Currently the nanoBTS bootstrap code requires a high delay
otherwise we are not bringing the device up properly. Changing
the init code turns out harder than it seems like. So this is
a workaround for that to allow a high speed RSL/OML connection
after the bringup.

The line driver can have a default TS delay. It is set to the
current default for the nanoBTS and the BS11. For the ipaccess
case we will set the delay lower for the RSL connection and
inside the ipaccess-config we can set it low right away to
have fast firmware flashing and such.
2010-12-21 13:53:41 +01:00
Holger Hans Peter Freyther 85531cc60d misc: Once again go from "On Waves" to "On-Waves"..
Try to get the company name of our sponsor right...
2010-10-06 20:38:36 +08:00
Harald Welte e1d1f45034 ipaccess-config: Don't dump the Rxlevel statistics 2010-07-30 22:35:31 +02:00
Harald Welte 59509630df ipaccess-config: Terminate program after running BCCH INFO test 2010-07-30 22:35:30 +02:00
Harald Welte 1ef7ce4fe8 ipaccess-config: Add option to disable color in log output 2010-07-30 22:35:30 +02:00
Harald Welte c95cf10d08 [ipaccess-config] fix bugs in generating the PHYSICAL CONFIG attribute
... 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 21:54:19 +02:00
Harald Welte e39a5912f1 [ipaccess-config] make sure the ARFCN Whitelist EIE is built correctly 2010-07-22 21:54:19 +02:00
Harald Welte a0b0f36ff0 ipaccess-config/network-listen update
* transition through cycles of NWL tests
2010-07-22 21:54:19 +02:00
Harald Welte 887deabe38 ipaccess-config / network listen: ordered list of RxLevels
Use libosmocore 'rxlev_stat' module to generate an ordered list
of ARFCN's, sorted by RxLev while performing test nr. 64
2010-07-22 21:54:19 +02:00
Harald Welte 549faada21 move ip.access netowrk listen (NWL) to network_listen.c
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-22 21:54:19 +02:00
Harald Welte 0f43dbcfc6 [ipaccess-config] Better way to set/unset NVRAM attributes
there are now human-readable names so you can do something like

ipaccess-config -U dhcp-enabled -S static-ip -S static-gw 192.168.100.120

to unset DHCP and to set static IP and gateway attributes.
2010-06-28 15:52:56 +02:00
Harald Welte 0aef73efc4 [ipaccess-config] Enable setting of static IP address / netmask / gateway
However, the 'static IP address' NVRAM flags are not yet set correctly
2010-06-28 15:18:17 +02:00
Harald Welte 8c21c07a65 [ipaccess-config] use msgb to make use of various tlv put functions
This looks so much better than the *cur++ type code.

Also, we now terminate ipaccess-config once the NV flags or Unit ID have
been set, not just for the OML IP address.
2010-06-28 14:41:09 +02:00
Harald Welte f5b4ba367c ipaccess-config: More verbose help message 2010-05-31 15:57:29 +02:00
Holger Hans Peter Freyther e15ad48a82 ipaccess-config: Silence compiler warning. 2010-05-14 02:54:40 +08:00
Holger Hans Peter Freyther d6adf5e098 ipaccess: Make sure flashing of the secondary BTS is working
Use the TRX throughout the flash process.
2010-05-13 00:42:02 +08:00
Holger Hans Peter Freyther 64278ede35 sw_load: Specify the trx_nr for the software load
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-13 00:41:48 +08:00
Holger Hans Peter Freyther 52fd4e4395 ipaccess: Send the reset to the BASEBAND_TRANSC and supply TRX
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-13 00:41:30 +08:00
Holger Hans Peter Freyther ebead597ff ipaccess: Refactor... unite some code 2010-05-13 00:40:40 +08:00
Holger Hans Peter Freyther 9958f477b4 ipaccess: Use the right trx when performing the test 2010-05-13 00:39:30 +08:00
Holger Hans Peter Freyther 505f20d7c4 ipaccess: Use the current TRX to set the OML address. 2010-05-13 00:39:18 +08:00
Holger Hans Peter Freyther 5fbf5f4f8d ipaccess: Wait for the BASEBAND_TRANSCEIVER and then bootstrap OML
Currently we are connecting to the BTS and once the OML is established
we are bootstrapping the OML. This does not work for a multi TRX setup
as we will need to use a trx_nr != 0 for it.

Change the code to wait for a message (in this case NM OC_BASEBAND_TRANSC)
to detect the trx_nr used by the BTS and then use that TRX to bootstrap
the network.

I have tested setting the unit id on a single and multi trx system for
the first and second trx.
2010-05-13 00:38:49 +08:00
Holger Hans Peter Freyther aa0db809e2 abis: Pass the abis_om_obj_inst in the nm_state_event.. 2010-05-13 00:37:48 +08:00
Holger Hans Peter Freyther 7d45ea41f4 [ipaccess] Attempt to fix setting unit ids with a multi trx setup
Add a --trx/-t NR option to set the TRX nr to be used when calling
set unit id and NVRAM. This was not tested and might or might not
work.
2010-05-12 15:58:24 +08:00
Harald Welte dc5062b185 move log/debug codebase to libosmocore
The logging/debugging code is generic enough to move it into libosmocore
while keeping OpenBSC specific definitions in openbsc itself.

This commit uses the logging support present in libosmocore-0.1.2,
you will have to update your library to this version.
2010-03-26 21:31:43 +08:00
Holger Hans Peter Freyther ff9d8b42e6 ipa: Make it possible to specify -w and -f in any order
Currently one has to put -w in front of -f to really write the
firmware file to disk. Change the config handling to first take
all parameters and then execute on them. This means -f can now
be used with any other parameter.
2010-03-24 05:27:58 +01:00
Holger Hans Peter Freyther d859a24f7d ipa-firmware: Fix the write out of the firmware parts
Use the start address inside the header entry, the start is relative
to the surrounding SDP record which is located in our base offset, when
writing it out also ignore four bytes of something (crc?).
2010-03-22 11:50:30 +01:00
Holger Hans Peter Freyther 38722cca48 ipa-firmware: Write the firmware parts to a file
The first non working version to dump the content of the sdp
to the terminal..
2010-03-22 11:22:54 +01:00
Holger Hans Peter Freyther 6e79b54d7b ipa-firmware: Warn/Exit when the required ids can not be found. 2010-03-22 09:50:56 +01:00
Harald Welte dfe6c7d910 split 'libosmocore' from openbsc codebase
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-02-20 16:27:23 +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 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 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 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 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
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