Commit Graph

315 Commits

Author SHA1 Message Date
Harald Welte 268c7f02fd sysmobts l1: make sure to read messages of arbitrary size
... and warn if the size is not what we expect.

This is required to work with sysmobts-v2 firmware >= v2.1, as the
SuperFemto_Prim_t is now larger than the GsmL1_Prim_t.
2012-05-13 15:25:27 +02:00
Harald Welte 388b9d0a35 Adapt to L1 firmware/API version 2.1 2012-05-13 14:16:28 +02:00
Holger Hans Peter Freyther 9de1e9f914 sysmobts: Document the values of the clock-source in the vty command
We need to have a documentation for each possible value, add some simple
ones for the available clock sources.
2012-05-12 08:49:35 +02:00
Holger Hans Peter Freyther 7fe0838588 sysmobts: Save the clock-source to the config file
Make the clock names lower case to match with the vty command.
2012-05-12 08:49:35 +02:00
Holger Hans Peter Freyther 3af5426d71 sysmobts: Add Network Listen as clock source for the bts 2012-05-12 08:49:35 +02:00
Holger Hans Peter Freyther f7fd2e4798 sysmo-bts: Use HW_SYSMOBTS_V1 to select the development hardware 2012-04-28 17:05:03 +02:00
Holger Hans Peter Freyther 36a3b0d85b sysmo-bts: Move the payload setting into a new method
Make this code a bit easier to read by moving the payload setting
into a new method.
2012-04-28 17:04:56 +02:00
Harald Welte 36179bbcdf RSL / SI: Make sure to have correct LAPDm header in SI5/SI6 on SACCH
SI5/SI6 and other messages on SACCH need the C/R and the EA bit set in
the LAPDm header.  Most devices accept a broken header, but especially
the Wavecom Q2686 responds with tons of RR STATUS messages if there is
any invalid bit.
2012-04-27 15:12:46 +02:00
Harald Welte 227c57728a fix the idle filling to comply with 04.06 5.4.2.3 (UI frame 0 byte len)
We used to send some crap before, which most phones happily accepted but
some (particularly the Wavecom Q2686) didn't really like at all.
2012-04-26 21:00:18 +02:00
Holger Hans Peter Freyther baa88d542c lchan: I forgot to handle TchH in my recent lchan fixes, add it to another place
Harald fixed the issue for the activation by adding TchH, but this
needs to be added for de-activation as well.
2012-04-20 10:44:43 +02:00
Harald Welte d28b9940b9 sach_deact -> sacch_deact (follow spelling fix in openbsc) 2012-04-19 23:51:50 +02:00
Harald Welte 2b7aace0b5 add vty-configurable loopback mode
this allows the BTS to loop-back any incoming data on a TCH
2012-04-19 22:29:07 +02:00
Harald Welte b1644b22d0 Fix TCH/H channel activation after zecke's recent lchan fixes 2012-04-19 22:27:55 +02:00
Harald Welte bcd08888f9 add VTY command to manually alter transmit power
this allows for quick manual tx power changes from the VTY, particularly
useful in type approval or other measurements.
2012-04-19 20:19:21 +02:00
Harald Welte 9aa6d9496b l1_if: allow for l1prim or sysprim without a completion callback 2012-04-19 20:18:53 +02:00
Harald Welte ff9e904926 fix VTY help strings related to TRX 2012-04-19 19:47:55 +02:00
Harald Welte f19ee66096 add a VTY command for activating PDCH channels (in EGPRS mode)
This allows us to do RF measurements (EDGE EVM and the like) even
without having any PCU/RLC/MAC code as of now.

To use it, configure PDCH type timeslots (e.g. TS 7) in the BSC and then
use "trx 0 7 activate 0" to manually activate the PDTCH lchan on top
of that timeslot.  The BTS will now happily transmit EDGE/8PSK data.
2012-04-19 19:22:53 +02:00
Harald Welte 4301b09137 delete dead code 2012-04-19 17:22:38 +02:00
Harald Welte f5a0a439e9 ciphering: Make sure to initialize lchan to no ciphering when activating
The ciphering parameters in L1 are persistent accross MPH
deactivate/activate, so we need to make sure to always initialize them
cleanly at RSL CHAN ACT time.  This has the added benefit that we can
also activate channels that have encryption enabled from the very
beginning (required for encrypted handover).
2012-04-19 10:06:00 +02:00
Harald Welte bf91f06eca Improve logging of L1 MPH request by printing the direction
where previously we would only see
<0006> oml.c:931 (bts=0,trx=0,ts=1,ss=0) MPH-DEACTIVATE.req (FACCH/F)
we now get
<0006> oml.c:931 (bts=0,trx=0,ts=1,ss=0) MPH-DEACTIVATE.req (FACCH/F RxUL)

to notice it is modifying the receive path in the uplink direction.
2012-04-19 09:50:02 +02:00
Holger Hans Peter Freyther b0150b7ad4 lchan: Refuse to activate a non-idle lchan. 2012-04-19 09:39:54 +02:00
Holger Hans Peter Freyther d7718280c9 lchan: Send the ACT ACK/NACK after the Layer1 has handled act/deact
Send the RSL ACT ACK/NACK after the Layer1 firmware has acked the
activation/deactivation. In case the channel can not be activated
we will send a NACK. In case the channel can not be deactivated we
will send an ACK and the next time the channel is activated we will
send a NACK. The release ack will be sent once the TxDownlink of the
TCH/SDCCH is closed.

Change the rsl_tx_chan_nack method to create a new msgb to be used
by the hardware layer, change the return value to ask the caller to
delete the msgb.
2012-04-19 09:39:54 +02:00
Holger Hans Peter Freyther 1e2b3259b9 lchan: Separate the Uplink/Downlink in activate/deactivate 2012-04-19 09:39:53 +02:00
Holger Hans Peter Freyther 29e1fdd994 lchan: Deactivate the SACCH only once, use the sach_deact flag for that
Use the deact_sach (renamed to deact_sacch in master) to remember if the
SACCH has been disabled. This should fix the case of lchan errors due releasing
the lchan twice.
2012-04-19 09:39:52 +02:00
Holger Hans Peter Freyther af02387183 lchan: rsl_tx_chan_nack will re-use the msgb, do not msgb_free
Do not msgb_free the msg as it will be re-used inside the nack
method and return 1 so the caller does not free the msgb. This
ownership model needs some consideration but the usage of ref
counts will not yield good results.
2012-04-19 09:39:52 +02:00
Holger Hans Peter Freyther f78f35880f lchan: Fix crashes when the specified lchan can not be found
gsm_lchan_name will crash if the lchan is NULL. Introduce an error_report
method that will do the right thing in the future and report the error.
2012-04-19 09:39:51 +02:00
Holger Hans Peter Freyther eac221b4ea lchan: Fix the state transition in the deactivate handler
If the deactivation is failing the channel needs to be moved into
and error state, if the deactivation completed the channel needs to
be set to the none state and set the state to release reqeust on
the deactivation.
2012-04-19 09:39:51 +02:00
Holger Hans Peter Freyther f4f69ee6fc lchan: Similar to OpenBSC use a set method to change the state
By making all modifications through lchan_set_state we can easily
add code to verify the state transition.
2012-04-19 09:39:15 +02:00
Holger Hans Peter Freyther f1052b812d sysmobts: Add an option to query the hardware version. 2012-04-19 09:38:30 +02:00
Holger Hans Peter Freyther 0be33e3add common: Add the copyright text to the vty_app_info
This will make app -V print the copyright information like the other
applications of our universe. An BTS integration that want to list
additionaly copyright holders needs to access the vty_app_info and create
a new copyright string.
2012-04-19 09:38:30 +02:00
Harald Welte b03f8ae4f0 ciphering: Better state tracking and HACK around L1 race condition
We now check if the received message is an LAPDm I frame in order to
determine if we have received the first valid encrypted message on the
radio link.  This relates to the fact that we often see 'old' UI frames
coming up from L1, even after it has confirmed decryption has been
enabled.
2012-04-19 09:35:03 +02:00
Harald Welte d9ab45d1aa Support for ciphering
When the RR CIPH MODE CMD is transmitted to the MS, we need to tell the
L1 to enable decryption on RX.  After the first received frame has been
decrypted successfully, we will enable encryption also on transmit.

This has been tested with A5/1 so far, but A5/2 and A5/3 should work
exactly identical.
2012-04-19 08:22:29 +02:00
Harald Welte 51f9693ba6 make HR channels work for voice, not only signalling
without this, we would set a FR_V1 codec on a TCH/H channel, which
the L1 is obviously not happy with.
2012-04-19 08:21:41 +02:00
Harald Welte b34faf6f8c TCH: Add support for the L1 RTP mode
In L1 RTP mode, the L1 already does all the bit-shifting and re-ordering
required for the RTP formats (which have different bit/nibble order than
the ETSI/3GPP encodings, for some odd reason).

We don't enable it by default yet, as only HR/FR/EFR work with it, but
AMR has some yet to be debugged problem.

Enabling USE_L1_RTP_MODE would save some CPU cycles on the ARM side.
2012-04-18 20:03:18 +02:00
Holger Hans Peter Freyther bc74b7f432 femtobts: The separate pdch/tch queues are not available in the old firmware
The old firmware does not expose separate queues for PDCH and TCH. The change
appears to be too intrusive and I will try to find a more elegant solution.
2012-04-14 14:56:58 +02:00
Holger Hans Peter Freyther f4a5bd2dd2 sysmobts: Handle options before allocating the bts
This way -h/--version will always work, even when the underlying
hardware is not available.
2012-04-14 14:36:23 +02:00
Holger Hans Peter Freyther 58f419c7ce misc: Use sizeof(uint32_t) instead of simply using 32 bit
This code would break in case we shrink the bitmap, use sizeof instead.
2012-04-14 01:03:28 +02:00
Holger Hans Peter Freyther 11a787df24 femtobts: Use HW_FEMTOBTS instead of HW_VERSION_1 to select femtobts
Our header files use HW_FEMTOBTS guards to select the older femtobts
design. Use the same macro in the bts code.
2012-04-14 00:54:40 +02:00
Holger Hans Peter Freyther caaa7e9d7b misc: Address a compiler warning and add an assert to a branch
The compiler can not know that the "int priv_nr" will hold the
enum values of the write queue, add a default branch and add a
warning and an assert there.

l1_transp_hw.c:108:1: warning: control reaches end of non-void function [-Wreturn-type]
2012-04-12 22:31:06 +02:00
Holger Hans Peter Freyther 666fec7ff2 misc: Fix compiler warning about printing a ptrdiff
Use 't' modifier for pointer diff in the printf statement.

oml.c: In function ‘oml_rx_set_bts_attr’:
oml.c:403:3: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 9 has type ‘int’ [-Wformat]
2012-04-12 21:54:48 +02:00
Holger Hans Peter Freyther 76aa95453f misc: Fix compiler warning of the femtobts_clksrc_names
femtobts.c:249:2: warning: excess elements in array initializer [enabled by default]
femtobts.c:249:2: warning: (near initialization for ‘femtobts_clksrc_names’) [enabled by default]
2012-04-12 21:52:22 +02:00
Harald Welte c623c4e589 oml: temporary debug hack 2012-04-05 02:48:16 +02:00
Harald Welte 2ed209c758 Increase head-room in IPA messages received
Without that headroom, I ran into an abort due to insufficient headroom
in the LAPDm code.
2012-04-05 01:16:46 +02:00
Harald Welte a0970249bf osmo-bts-sysmo: Add gsmtap for uplink 2012-04-05 00:41:35 +02:00
Harald Welte f4d14b3f2e set the default log mask for the L1 a bit more reasonable 2012-03-18 23:27:27 +01:00
Harald Welte d25b6a752b osmo-bts-sysmo: Add GSMTAP support for transmit (DL) path
there are VTY commands that can be used to filter which particular
L1 sapis (channel types) should be sent in GSMTAP.
2012-03-18 23:24:12 +01:00
Harald Welte 3cf942792a correctly print SAPI in log file on MPH-ACTIVATE.req 2012-03-18 21:46:44 +01:00
Harald Welte 21724bbaed Fix debug print of MPH-CONFIG.req 2012-03-18 21:35:15 +01:00
Harald Welte 12b95405ff print human-readable SAPI name on MPH-[DE]ACT.{req,conf} 2012-03-18 21:34:05 +01:00
Harald Welte 452112e823 Ensure that ADM_STATE IE is presnent when sending NM_MT_CHG_ADM_STATE_ACK 2012-03-18 21:25:45 +01:00
Harald Welte d0e6749327 Issue MPH-CLOSE.req during shutdown
If we don't do this on recent L1, the L1 will refuse the open after
re-starting osmo-bts.

There still is an issue in case osmo-bts crashes.  We should have a
respawn loop that re-loads the DSP firmware before re-starting osmo-bts,
just to make sure...
2012-03-17 14:25:34 +01:00
Harald Welte b81c5d4699 introduce a command that permits setting the clock source via vty
the default source is the OCXO
2012-03-17 14:08:51 +01:00
Harald Welte fe0c13f8bd OML: when allocating merged tlvp arrays for MO, use bts context
'ts' is not a talloc-managed pointer but an offset into the bts
structure.  As such, we cannot pass it to talloc as context!
2012-03-15 23:39:53 +01:00
Harald Welte 3525f2c038 we currently run the board alwasy in clock master mode 2012-03-15 23:39:37 +01:00
Harald Welte 20d73555a2 update to new "superfemto.h" header file naming 2012-03-15 21:27:21 +01:00
Harald Welte 47589f10a4 Introduce a HW_VERSION_1 #define
This #define helps us to distinguish the subtle API differences between
the earlier v1 (2011) hardware and the later v2 (2012) model.
2012-03-07 18:05:57 +01:00
Harald Welte f1cbd81984 prepare for splitting L1 queue into signalling/tch/pdtch
We don't use multiple queues yet, but we very well might end up using
them soon.
2012-03-07 18:05:18 +01:00
Holger Hans Peter Freyther 6dd7c4fb57 misc: Check return value of msgb _alloc functions
Attempt to catch all functions that allocate a msgb and didn't
check the return value of the allocation.
2012-01-23 10:22:09 +01:00
Holger Hans Peter Freyther bb9647f651 ipa: Send the DLCX Indication with the right message discriminator
The IPA messages for RTP should use the IPA vendor as message
discriminator.
2012-01-15 18:09:40 +01:00
Holger Hans Peter Freyther 2e677958d2 efr: Add efr to the femtobts_tch_pl_names array
Parts of the code check if GsmL1_TchPlType_Efr is defined, others
parts don't. Follow the easy route and assume it is defined.
2012-01-14 21:47:59 +01:00
Holger Hans Peter Freyther 771e77dff0 oml: Use talloc_free(ptr) instead of talloc_free(ptr_to_ptr)
tp_merged points to memory allocated by talloc_zero, no need to
hand the address of that to talloc itself.
2012-01-14 21:47:49 +01:00
Holger Hans Peter Freyther 62579c7a34 oml: Mention the SAPI that is activated in the log message
I was wondering why the channel was activated twice but it needs
to be activated for each SAPI.
2012-01-14 21:47:41 +01:00
Holger Hans Peter Freyther 4cd68dc4d7 bts: Use msgb_dequeue and msgb_enqueue for the AGCH queue
The TODO item still applies to somehow limit the queue of incoming
messages and drop older ones first. A sane limit would be the number
of channels (+ or * 2).
2012-01-14 21:47:30 +01:00
Holger Hans Peter Freyther eab71534ef sysmo: handle_ph_data_ind has paths rc is not initialized
rc might not be initialized when going through the default
statement but also hitting a break inside the switch case
statement for GsmL1_Sapi_Sacch.

l1_if.c:530:2: warning: Undefined or garbage value returned to caller
        return rc;
2012-01-14 21:47:19 +01:00
Harald Welte 6e121417a5 RSL: fix typo in comment 2012-01-14 12:35:40 +01:00
Harald Welte 7a44e47ed6 OML SET CHAN ATTR: merge TS attributes (not BTS) and fix mem leak
We have to
 * merge the new attributes with the exiting TS (not BTS) attributes
 * in case of success, attach the new merged attributes to our state
 * in case of success, free the old attributes

Thanks to Holger for pointing this out.
2012-01-14 12:28:17 +01:00
Holger Hans Peter Freyther 6aa2a574fb sysmo-bts: The code is not used (and built), remove it.
The BTS is using the LAPDm code in polling mode, there will be no
callbacks (e.g. a BTS does not transmit RACH bursts). Remove the code.
2012-01-11 19:27:54 +01:00
Holger Hans Peter Freyther 467e149763 paging: Provide functions to check the internal state of the paging system 2011-12-01 09:09:18 +01:00
Holger Hans Peter Freyther 127ec05b4e paging: Do not crash if we get called for the wrong frame/t1/t2/t3
If someone wants to have paging for a wrong frame, gracefully return
and do not fill the output buffer. Because we are on the wrong frame
I think it is best to not fill the frame, this is why I did not add a
check to l1_if.c to generate an empty frame.
2011-12-01 08:47:53 +01:00
Holger Hans Peter Freyther 79da6f3283 misc: Move the cmr_index into the #if 0 block as it is only used there 2011-11-29 21:55:12 +01:00
Harald Welte 143bb812dc LAPDm: Use lapdm_channel_exit() and avoid copy+paste bug
We have to either lapdm_exit() both DCCH and ACCH (not 2x ACCH) or
rather call lapdm_channel_exit() which does that for us.

Thanks to Holger Freyther for spotting this bug.
2011-11-29 12:15:16 +01:00
Harald Welte fe4893e625 RSL: Actually check if BSC-requested cipher is supported 2011-11-24 17:46:22 +01:00
Holger Hans Peter Freyther 2660812084 audio: Make bts_model_rtp_rx_cb compatible with the prototype 2011-11-07 14:26:48 +01:00
Holger Hans Peter Freyther 5cdcf8a837 sysmo-bts: Include bts.h for bts_shutdown, remove unused variable 2011-11-07 14:13:29 +01:00
Holger Hans Peter Freyther efdb45d5d0 common: Include bts.h for bts_shutdown 2011-11-07 14:09:53 +01:00
Holger Hans Peter Freyther 477f35e78c sysmo-bts: Use the z modifier to print the result of sizeof 2011-11-07 14:08:46 +01:00
Holger Hans Peter Freyther 187871e2ca sysmobts-vty: Fix compiler warnings about the clock value
The first one just sets the val to 0xffff, the second converted
the value to integer twice.

sysmobts_vty.c: In function ‘cfg_trx_clkcal_def’:
sysmobts_vty.c:109:15: warning: unused variable ‘clkcal’ [-Wunused-variable]
sysmobts_vty.c: In function ‘cfg_trx_clkcal’:
sysmobts_vty.c:122:15: warning: unused variable ‘clkcal’ [-Wunused-variable]
2011-11-07 14:02:02 +01:00
Harald Welte 9582883235 add VTY based way to set clock calibration of sysmobts L1 2011-10-12 13:36:22 +02:00
Harald Welte c373448e03 fix various compiler warnings across the code
this deals with unused cocde, unused variables and undeclared symbols in
various places.
2011-09-19 20:46:51 +02:00
Harald Welte 7899dc5fcf sysmobts: fix initial codec mode computation
There is no off-by-one between osmocom and L1 definitions...
2011-09-09 23:55:39 +02:00
Harald Welte 215d9eecdd sysmobts: channel activation changes for v2.4 L1 DSP firmware
We now have to explicitly indicate the tchPlType at channel activation
type, so L1 knows which channel decoder to use (FR, EFR, AMR, ...)

Also, we properly implement the initial codec mode selection as per TS
05.09
2011-09-09 23:30:46 +02:00
Harald Welte 06636b6155 AMR: change definition of amr_get_initial_mode() return value
AMR: return AMR_CODEC_MODE (0..3) instead of full range
2011-09-09 23:29:27 +02:00
Harald Welte 9508fb80a4 Introduce new amr.[ch] for AMR related functions 2011-09-09 22:32:45 +02:00
Harald Welte 4ccca1ce36 OML: make sure max_power_red is scaled by 2 to convert from 12.21 to dBm 2011-09-09 22:04:09 +02:00
Harald Welte a4a3574b1d update osmo-bts to conform to L1 v2.4 API changes 2011-09-09 15:12:52 +02:00
Harald Welte 2c40d02f27 Inquire DSP/FPGA version at BTS boot and check band compatibility 2011-09-09 14:10:57 +02:00
Harald Welte 16c0ab92c1 add commands to configure RTP jitter buffer
there's one global setting for the BTS default value, plus an
interactive command to change the buffer of an active lchan on the fly
2011-09-08 15:21:39 +02:00
Harald Welte 72b6989ec9 make sure 'band' will correctly parse the crap that libosmocore generates 2011-09-07 20:49:25 +02:00
Harald Welte f49e3dd3af store the last SID frame of a given LCHAN so we can repeat it
repeating the last SID frame is required during 20ms intervals where we
don't get a new SID update (SID RTP frames are valid up to 160ms)
2011-09-07 12:42:15 +02:00
Harald Welte 5355ead9d9 use osmo_ortp in POLLING mode instead of select loop integration
This solves a lot of the problems we've been seeing in the context
of large jitter (uRTP) or classic RTP with SID frames
2011-09-07 11:55:08 +02:00
Harald Welte 42f80bc7af add RTP logging 2011-09-07 11:54:23 +02:00
Harald Welte 82c4d8685c user DRTP where appropriate, not DL1C 2011-09-06 22:24:31 +02:00
Harald Welte 5fa9d9c18f RSL: get rid of some compiler warnings 2011-09-06 22:20:51 +02:00
Harald Welte 24713348c4 More comprehensive AMR handling
* parse AMR multirate config form 04.08 IE into easier format
* CMR, CMC and CMI on the L1 side are an _index_ into the current
  mode array
* Fix conversion of AMR SID frames from RTP -> L1
2011-09-06 22:19:40 +02:00
Harald Welte 6d7b78bde1 add minimal configuration file support
this config file allows configuration of unit id, oml ip,
and local rtp bind IP.
2011-09-04 22:47:25 +02:00
Harald Welte f41f2a7f92 AMR: double-check CMI/CMR/CMC values
We have to make sure that a phone cannot request codec modes which are
not part of the active set...
2011-09-04 17:21:39 +02:00
Harald Welte 099fb3b17c Sysmobts L1: Implement HR codec support
We don't really know if the HR encoding is compatible with other
equipment, but it _should_ follow Chapter 5.2 of ETSI TS 101 318.

Please note that RFC5993 also specifies a way to encode GSM-HR into RTP,
we do not try to be compatible with that.  The only difference seems to
be one additional TOC octet at the beginning of the payload field.
2011-09-03 18:10:26 +02:00
Harald Welte 716dded773 Fix MODE MODIFY for multirate configuration on TCH/H
using this configuration we can have successful AMR/HR (5.9) calls
2011-09-03 16:01:23 +02:00
Harald Welte 526b0c62cf Add new ORTP based libosmo-trau based voice support
Using osmo-bts-sysmo and this code, it is now possible to do FR and AMR
based voice calls on TCH/F.

A lot of CPU is wasted in the conversion between the RTP formats and the
L1 specific formats for the codec frames.  All data needs to be shifted
by four bits, and the order of bits needs to be reversed in every byte.
2011-09-03 15:41:12 +02:00
Harald Welte b7bec6d488 remove dead code / dead fule common/voice.c 2011-09-03 15:40:50 +02:00
Harald Welte ea844d62fa abis.c: Remove dead code 2011-09-01 11:52:24 +02:00
Harald Welte 13df9c8a72 sysmobts: add a skeleton for codec frame processing 2011-07-24 02:52:20 +02:00
Harald Welte 97d4c44db2 RSL: send CRCX/MDCX related messages as msg discriminator ip.access 2011-07-24 00:01:46 +02:00
Harald Welte 9d4736a5be Use libosmotrau for RTP support
This only implements creating, binding, connecting and free'ing RTP
sockets, not yet anything regarding receiving or transmitting codec
frames on them.

You will need the rtp branch of libosmocore for libosmotrau
2011-07-21 20:36:24 +02:00
Harald Welte 8583c31811 remove old RTP code from osmocom-bb/jolly/bts branch
Instead, I will base on the existing RTP code in openbsc
2011-07-21 16:48:07 +02:00
Harald Welte 6b62748da6 RSL: fix transmission of RR ciphering mode command via LAPDm
We didn't correctly format the RSLms message that went into LAPDm,
causing LAPDm to drop the message.

Also, disable the fake CIPH MODE COMPLETE generation hack for now
2011-07-13 00:52:41 +02:00
Harald Welte 168238f9de update the HACK to delay the fake CIPHERING MODE COMPLETE
When seinding the fake CIPH MOD COMPL, we should wait a bit, as otherwise it
will reach the MSC _before_ we ever get the (still unencrypted) CLASSMARK
update from the MS.
2011-07-12 00:23:32 +02:00
Harald Welte 0285067b63 RSL: include fake IMEISV if we send fake CIPH MODE COMPL
If the MSC requests us to include the IMEISV in the ciph mode complete, we
respond with a fake IMEISV
2011-07-07 23:44:41 +02:00
Harald Welte e4035a86cf RSL: ciphering IE length can be '1' in case of 'no ciphering' 2011-07-07 21:35:46 +02:00
Harald Welte ed607f475f increae the RACH quality threshold to 5dB C/I 2011-07-07 18:17:31 +02:00
Harald Welte be598e3afd RSL: Send fake CIPHERING MODE COMPLETE
we do this as a hack as long as the MSC assumes the BTS supports
A5, but the L1 really doesn't support it yet.
2011-07-07 18:16:35 +02:00
Harald Welte 540410c123 RSL: implement RSL ENCR CMD, feed L3_INFO to LAPDm
This is not full encrpytion support, the bts-model part still
needs to detect the ENCR CMD when de-queueing from LAPDm and enable
the de-ciphering, detect the arrival of the first encrypted frame,
etc, enable en-ciphering, ...
2011-07-07 11:50:45 +02:00
Harald Welte 39eadbbb17 sysmbts L1 if: implement 'dead DSP L1 detection'
when we activate the SCH in the DSP, we start a 5-second timer.  If
we ever do not receive any MPH-TIME.ind primitives from L1 within
that time frame, we stop the process (and will be re-spawned)
2011-07-05 16:59:27 +02:00
Harald Welte 547b1d1916 l1_if: send EMPTY-FRAME.req instead of fill frame on TCH/F + FACCH 2011-07-05 16:15:26 +02:00
Harald Welte 1920738840 L1/OML: De-activate L1 SAPIs in opposite order of activation
L1 wants TCH to be activated before FACCH, and it wants FACCH
to be de-activated before TCH.  By iterating the array in iverse
order, we ensure this.
2011-07-05 14:27:30 +02:00
Harald Welte 79cf0bb1e6 increase RACH threshold to 1 dB C/I 2011-07-05 14:13:52 +02:00
Harald Welte 977fcbc2db add some missing #include directives 2011-07-05 13:52:29 +02:00
Harald Welte 7ab9b777c6 add command line option '-p' to specify DSP trace flags as hex mask 2011-07-05 13:47:42 +02:00
Harald Welte 017300623b Fix compilation of paging.c
Sometimes I really feel stupid...
2011-07-05 13:38:15 +02:00
Harald Welte f78927a9a8 paging: Fix 'empty paging' message contents
Thanks to Dieter Spaar for spotting this bug
2011-07-05 13:36:26 +02:00
Harald Welte 5df3cf9db2 paging: correct contents of L2 Pseudo-Length
thanks to Dieter Spaar for spotting this one
2011-07-05 13:35:28 +02:00
Harald Welte 12b647998c add VTY commands for setting and showing DSP trace flags 2011-07-05 12:21:27 +02:00
Harald Welte ead4863de1 sysmobts: add value_string for dsp trace flags 2011-07-05 00:43:50 +02:00
Harald Welte 260fcfc8d0 logging: Add DSP log subsystem 2011-07-05 00:43:33 +02:00
Harald Welte b17a47e6e1 measurement: fix missing \n at end of log output 2011-07-02 22:44:27 +02:00
Harald Welte 2b384c3ee1 remove FIXME that has long been fixed 2011-07-02 21:07:05 +02:00
Harald Welte 43b669a9f3 untested code to dynamically set L1 band based on ARFCN number 2011-07-02 00:20:49 +02:00
Harald Welte 18d0818710 make it clear why we terminate 2011-07-01 19:03:30 +02:00
Harald Welte 288d0c04c8 logging sanitization (use proper log levels, etc.) 2011-07-01 18:54:10 +02:00
Harald Welte f788d79411 sysmobts-remote: Remove hard-coded BTS IP address
The BTS IP address can now be specified by the L1FWD_BTS_HOST env
variable.

Option parsing would not have been that easy to integrate without
touching the main program...
2011-07-01 18:25:22 +02:00
Harald Welte f15cef94f7 fix various compiler warnings 2011-07-01 18:22:01 +02:00
Harald Welte 9fa0cce100 fix BTS initialization order
The sequence is as follows:

0) start osmo-bts
1) start connection attempts to BTS
2) issue L1-RESET.req
3) receive L1-RESET.conf
4) issue RF-ACTIVATE.req
5) receive RF-ACTIVATE.conf
6) receive attributes for TRX
7) receive opstart for TRX
8) issue MPH-INIT.req
[...]

The important point here is: We don't want the BSC to set TRX attributes or do
TRX opstart before our RF related hardware is initialized.
2011-07-01 18:09:34 +02:00
Harald Welte 0f827275d7 sysmo-bts: Ignore OPSTART on the TRX until we have seen SET ATTR 2011-07-01 16:02:19 +02:00
Harald Welte 4450a1530c sysmo-bts: properly initialize the nominal power, print it at startup 2011-07-01 11:27:41 +02:00
Harald Welte 062d96e38b measurements: avoid division by zero 2011-06-30 17:31:54 +02:00
Harald Welte b849684181 deactivate RF + exit when the Abis link is gone
The idea is that the BTS process is re-spawned from init/upstart/systemd
2011-06-29 20:42:14 +02:00
Harald Welte 1eb4d4893c add logging related vty commands 2011-06-29 20:20:11 +02:00
Harald Welte 2bc0e10fa1 RSL/LAPDM: make sure we do lapdm_channel_reset()
this will free / flush any of the queued messages and give us a
clean start for the next user of the same lapdm channel.
2011-06-29 19:14:58 +02:00
Harald Welte 3b7480d5c3 RSL: clarify msgb free scheme in rsl 2011-06-29 19:14:44 +02:00
Harald Welte 40e820d882 OML: fix memory leaks by centralized msgb_free() for rx msgs 2011-06-29 18:57:58 +02:00
Harald Welte ae5dfdc416 Fix memory leak in abis code: Free msgb after tx'ing it 2011-06-29 18:55:03 +02:00
Harald Welte 5a7877457b set talloc ctx for msgb's to make sure we see them in talloc report 2011-06-29 18:46:28 +02:00
Harald Welte b9919bd2a6 Fix support of SDCCH4
In SDCCH4, we use lchan number 0...3 for the SDCCH/SACCH, and
we statically use lchan[4] as the dummy for activating the CCCH
L1 SAPIs.

In order to make combined and non-combined CCCH orthogonal, we simply
also use lchan[4] in that case.  On a 'pure' CCCH, therefore lchan
0..3 are unused and 4 is the actual CCCH.
2011-06-29 18:35:38 +02:00
Harald Welte 8188e1949b sysmo-bts: Bring TCH (FACCH) into a working state 2011-06-29 17:51:16 +02:00
Harald Welte 45b767c7be RSL: Log all RLL messages from A-bis to LAPDm 2011-06-29 17:49:52 +02:00
Harald Welte 1904e50f87 sysmo-bts: Fix TCH/F activation 2011-06-29 15:25:31 +02:00
Harald Welte 9852328aae don't print ((....)) in RSL debug output 2011-06-29 15:05:49 +02:00
Harald Welte 35030111f4 Sysmocom l1if: Don't print hex-dumps of AGCH/SACCH messages anymore 2011-06-29 14:12:36 +02:00
Harald Welte a7d6261108 sysmocom L1: raise the threshold for ignored RACH bursts
the RACH burst detection in the physical layer is appranetly providing many
false positives, and we need to raise the bar a bit in order to not allocate
channels in a useless way...
2011-06-29 14:09:59 +02:00
Harald Welte ee3d0fcb77 make sure we forward EXTENDED MEAS REP to the BSC 2011-06-29 14:09:15 +02:00
Harald Welte 24f22dff1e remove debugging printf in sysinfo code 2011-06-29 13:25:26 +02:00
Harald Welte 5830bfe411 rsl / meas rep: properly check if UNIT DATA IND is really a 04.08 meas rep 2011-06-29 12:43:09 +02:00
Harald Welte 6818881d72 implement baseic uplink measurement processing + reporting
* gather measurements from each PH-DATA.ind
* check every TDMA frame about meas period expiration
* compute averages after period expired
* put MS DL MEAS REP into RSL MEAS RES messages, include UL meas

bugs:
* L3 INFO content seems to have some offset
* is_sub is not set anywhere
* measurement periods might have up/downlink offset
2011-06-29 10:36:07 +02:00
Harald Welte c5e01c8bd4 implement RSL DEACTIVATE SACCH 2011-06-28 12:11:51 +02:00
Harald Welte d04d43098d paging: add paging_reset() function 2011-06-27 23:51:02 +02:00
Harald Welte 656c8236a5 l1_if: We do not need to supply any SAPI on L1->L2 primitives 2011-06-27 23:34:20 +02:00
Harald Welte d9f981cf56 only build sysmocom-femtobts conditionally 2011-06-27 11:45:15 +02:00
Harald Welte c6b4c87e5d re-work original osmo-bts with support for sysmocom femtobts
This code re-works osmo-bts to add support for the upcoming sysmocom BTS.

It also tries to add some level of abstraction between the generic
part of a BTS (A-bis, RSL, OML, data structures, paging scheduling,
BCCH/AGCH scheduling, etc.) and the actual hardware-specific bits.

The hardware-specific bits are currently only implemented for the sysmocom
femtobts, but should be (re-)added for osmocom-bb, as well as a virtual
BTS for simulation purpose later.

The sysmocom bts specific parts require hardware-specific header files
which are (at least currently) not publicly distributed.
2011-06-27 11:25:35 +02:00
Harald Welte 8e47fb89bf oml: re-use common definitions that are now in libosmocore 2011-05-22 22:46:07 +02:00
Harald Welte cbda62ee76 abis: use ipaccess protocol header from libosmogsm 2011-05-22 22:00:45 +02:00
Harald Welte 8a183fb423 [partial] port to new libosmocore-0.3 APIs 2011-05-22 20:26:58 +02:00
Harald Welte 33e2041b28 Fix include paths and start to make code compile
(still lots of missing references into osmocom-bb code)
2011-03-04 14:18:23 +01:00
Harald Welte 7241d22867 Add autotools skeleton code 2011-03-04 14:18:10 +01:00
Harald Welte 6836bfeca9 move l1ctl.c to osmo-bts-bb, as it is specific to OsmocomBB 2011-03-04 14:08:36 +01:00
Harald Welte 4b45ae1636 Import all C and Header files from jolly/bts branch of osmocom-bb.git
The BTS code shall reside in a separate git repository, thus I'm
importing the C and H files here.
2011-03-04 14:05:20 +01:00