Commit Graph

1326 Commits

Author SHA1 Message Date
Holger Hans Peter Freyther 970dda6c73 [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 0a610e9b9b [ipaccess] Change the name to be slightly better.. 2009-12-30 06:42:16 +01:00
Holger Hans Peter Freyther f327f6fbfb [ipaccess] Expose the sub header list as well.. 2009-12-30 06:42:16 +01:00
Holger Hans Peter Freyther 4a00258363 [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 4019a982eb [ipaccess] Add return values to the analyze_file 2009-12-30 06:42:16 +01:00
Holger Hans Peter Freyther b14488691d [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 60f3027ab6 [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 9f3221fbbe [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 1fe0a169ef [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 a983542ec6 [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 257b8db940 [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 f81445e27d [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) 1949704969 ipaccess-config: re-enable DNM logging, add support for multi-TRX 2009-12-29 11:00:48 +01:00
Harald Welte (local) ab788cf774 rsl: add new 'gsm_trx_name()' function and use it 2009-12-29 11:00:41 +01:00
Harald Welte (local) 20bf3c677e ipaccess input: Print BTS number that has disappeared 2009-12-29 11:00:37 +01:00
Harald Welte (local) 42351bf8e3 rsl_sendmsg: Print message in case trx == NULL 2009-12-29 11:00:27 +01:00
Harald Welte (local) 43db2bf148 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 ab2534c773 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 c88a443a74 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 1bc845e72b [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 21c87d14aa [ipaccess] Start figuring out what the header entry is meaning.. 2009-12-29 08:38:12 +01:00
Holger Hans Peter Freyther 3614ac76e9 [ipaccess] Use the u_intX_t types in the firmware tool 2009-12-29 08:38:12 +01:00
Holger Hans Peter Freyther eb9766f247 [ipaccess] Attempt to read the header entries.. 2009-12-29 08:38:12 +01:00
Holger Hans Peter Freyther 0a4deca971 [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 f7b2f13126 [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 25cf287aba [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 0e15b93b64 [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 61f814de3c [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) d2a818946e vty: replace'logging level' numeric value with human readable string 2009-12-28 13:42:55 +01:00
Harald Welte (local) b709bfebc6 set the TRX nominal power by default and/or VTY 2009-12-28 13:42:47 +01:00
Harald Welte (local) c4e9c9cd15 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) bd76cce0e8 RLL: print human-readable value of RLM CAUSE in ERROR IND 2009-12-28 13:42:03 +01:00
Harald Welte (local) c3be50c1f8 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) 02204d0fe6 rename gsm_lchan_name() to gsm_lchant_name() 2009-12-28 13:41:06 +01:00
Harald Welte (local) e0bb5fa06a fix segfault in CHAN RQD log message 2009-12-28 13:40:39 +01:00
Harald Welte (local) ed6d762a1f correctly print chan act nack error 2009-12-28 13:40:32 +01:00
Harald Welte (local) 9ff12376d4 print TS name when out of resources during CHAN RQD 2009-12-28 13:40:12 +01:00
Harald Welte (local) 3a21239082 correction of RTP timestamps is a NOTICE event, not debug 2009-12-28 13:38:23 +01:00
Harald Welte (local) 664b2222c3 include BTS and TRX number in TRX overload message report 2009-12-28 13:38:18 +01:00
Holger Hans Peter Freyther 9930072437 [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 173f6bfb45 [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 679a2eb1f9 [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 876a06bd34 [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 b5f544837c [ipaccess] Implement the Load Segment messages... 2009-12-28 10:04:26 +01:00
Holger Hans Peter Freyther f8ea6170c5 [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 3890700783 [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 a3ae06bad5 [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 f6dbf7f213 [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 4b51338afe [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 b7f5313660 [ipaccess] Verify the size part of the header 2009-12-27 14:07:40 +01:00