aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/ipaccess
AgeCommit message (Collapse)AuthorFilesLines
2010-05-04misc: Use $(top_srcdir) for source, $(top_builddir) for libsHolger Hans Peter Freyther1-1/+2
We should not use ../ for adding sources or libraries as the user might have a srcdir != builddir setup.
2010-05-04move ipaccess tools into their own subdirectoryHarald Welte1-0/+12
They will now be built fully inside src/ipaccess, using their own Makefile.am
2010-03-30[ipaccess] Avoid bogus compiler warning about uninitialized varsHolger Hans Peter Freyther1-0/+1
2010-03-29[misc] Remove whitespace from the end of the line.Holger Hans Peter Freyther2-3/+3
2010-03-26move log/debug codebase to libosmocoreHarald Welte2-16/+16
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-24ipa: Make it possible to specify -w and -f in any orderHolger Hans Peter Freyther1-3/+9
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-22ipa-firmware: Fix the write out of the firmware partsHolger Hans Peter Freyther2-2/+2
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-22ipa-firmware: Write the firmware parts to a fileHolger Hans Peter Freyther2-5/+60
The first non working version to dump the content of the sdp to the terminal..
2010-03-22ipa-firmware: Add the entry first and then seekHolger Hans Peter Freyther1-3/+4
The sub entry might not be a SDP file so it is best to add the read entry, add it to the list and then attempt to recursively parse this one.
2010-03-22ipa-firmware: Lift the requirement of having a table_offset of zeroHolger Hans Peter Freyther1-8/+4
Make the code work/skip the other table and find the entries at the given offset. This appears to work.
2010-03-22ipa-firmware: Remove the part_length from the struct sdp_firmwareHolger Hans Peter Freyther1-5/+20
* The length of the table is not at a fixed position. We will need to read the offset, seek there, read the data, convert it to the host endianes. * Prepare the code to work with offsets of 0...
2010-03-22ipa-firmware: Look at the table offsetHolger Hans Peter Freyther1-0/+7
* The two dummy bytes appear to be an offset, check that they are zero and refuse to work when they are not.
2010-03-22ipa-firmware: Warn/Exit when the required ids can not be found.Holger Hans Peter Freyther1-5/+13
2010-03-22ipa-firmware: Remove dummy check...Holger Hans Peter Freyther1-3/+0
We have derefenced that way before and would have crashed already.
2010-03-22ipa-firmware: The more_more_magic is to indicate the payloadHolger Hans Peter Freyther1-4/+0
* Ignore the value of the field there is no sematnic change to the content of the file..
2010-02-20split 'libosmocore' from openbsc codebaseHarald Welte4-10/+11
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-10fix ipaccess-config, call missing nanobts initializationHarald Welte1-0/+1
FIXME: We really need to have some libbsc and libmsc initialization functions that clean up this mess.
2010-01-07bis_nm_ipaccess_set_nvattr() executes on a TRX, not a BTSHarald Welte1-4/+4
2009-12-30[ipaccess] Remove some code duplication in the recently added firmware flashing.Holger Hans Peter Freyther1-14/+17
Share the creation of the sw_load.
2009-12-30[abis] Dispatch a IPAC restart ACK/NACK signalHolger Hans Peter Freyther1-0/+8
* 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-8/+22
* 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[ipaccess] Make SW activation work by filling out sw_load1 and sw_load2Holger Hans Peter Freyther1-0/+55
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[ipaccess] Close the firmware file as wellHolger Hans Peter Freyther1-0/+4
2009-12-30[ipaccess] Move firmware analysis into the ipaccess-config utilityHolger Hans Peter Freyther2-74/+71
* This turns ipaccess-firmware.c into a plain helper, fix the ipaccess name...
2009-12-30[ipaccess] Document the software argument for firmware loadingHolger Hans Peter Freyther1-0/+1
2009-12-30[ipaccess] Start using talloc in the firmware codeHolger Hans Peter Freyther1-7/+14
* We are not leaking anything... *yeah*, talloc rocks
2009-12-30[ipaccess] Change the name to be slightly better..Holger Hans Peter Freyther1-2/+2
2009-12-30[ipaccess] Expose the sub header list as well..Holger Hans Peter Freyther1-15/+25
2009-12-30[ipaccess] Turn firmware parsing into a routine so it can be usedHolger Hans Peter Freyther1-71/+39
* 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[ipaccess] Add return values to the analyze_fileHolger Hans Peter Freyther1-12/+14
2009-12-30[ipaccess] There is only one second magic numberHolger Hans Peter Freyther1-36/+23
* 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[ipaccess] Allow to parse the second magic2 as wellHolger Hans Peter Freyther1-10/+42
* 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[ipaccess] Start the parser recursively...Holger Hans Peter Freyther1-7/+3
* Start parsing the sub SDPs with the same analyze method
2009-12-30[ipaccess] Read the " SDP" and version first and then the rest of the headerHolger Hans Peter Freyther1-7/+23
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[ipaccess] The firmware format is recursive...Holger Hans Peter Freyther1-15/+30
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[abis] Add ACK signal and send it on SET NVATTR ACKHolger Hans Peter Freyther1-0/+13
* 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[ipaccess] Use the right variable... *sigh*Holger Hans Peter Freyther1-1/+1
* I will refactor all this in the future..
2009-12-29ipaccess-config: re-enable DNM logging, add support for multi-TRXHarald Welte (local)1-0/+6
2009-12-29[ipaccess] Start reading the header entryHolger Hans Peter Freyther1-1/+25
* Read the entry and print it out
2009-12-29[ipaccess] Start figuring out what the header entry is meaning..Holger Hans Peter Freyther1-2/+17
2009-12-29[ipaccess] Use the u_intX_t types in the firmware toolHolger Hans Peter Freyther1-3/+3
2009-12-29[ipaccess] Attempt to read the header entries..Holger Hans Peter Freyther1-0/+13
2009-12-29[ipaccess] Do not pick in the wrong headers...Holger Hans Peter Freyther1-10/+5
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-28[ipaccess] Send a NVATTR to activate the new software after load endHolger Hans Peter Freyther1-8/+42
* 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[ipaccess] Handle LoadAbort coming from the BTS.Holger Hans Peter Freyther1-0/+4
* Be bale to abort the load when the BTS is rejecting the file..
2009-12-28[ipaccess] Start flashing once the BTS has started enough...Holger Hans Peter Freyther1-15/+16
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[ipaccess] Add firmware download option to ipaccess-configHolger Hans Peter Freyther1-1/+70
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-27[ipaccess] Verify the size part of the headerHolger Hans Peter Freyther1-0/+12
2009-12-24properly check for EAGAIN in recv() callsHarald Welte1-3/+3
If recv() has no more messages on a non-blocking socket, errno will be EAGAIN, not the return value!
2009-12-24if we recv() from an abis-ip socket, don't consider -EAGAIN an errorHarald Welte1-2/+4