Commit Graph

1426 Commits

Author SHA1 Message Date
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 615e650fd4 [wireshark] Add config option to decide which flavor of OML to use
This option can currently toggle between BS11 and nanoBTS (in the
form of having BS11 default). The next step will be to make use of
this in the code.
2009-12-29 04:22:12 +01:00
Holger Hans Peter Freyther 304db15bd4 [wireshark] Decode NM_ATT_IPACC_FILE_DATA as TL16V
This can be decoded like the plain FILE_DATA and I don't
understand the need for a custom version.
2009-12-29 04:21:22 +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