summaryrefslogtreecommitdiffstats
path: root/src/host/layer23/src/common/l1ctl.c
AgeCommit message (Collapse)AuthorFilesLines
2014-09-06layer23: initialize l2h/l3h pointers in rx_l1_rach_confIgor Almeida1-0/+1
Signed-off-by: Igor Almeida <igor.contato@gmail.com> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-01-12layer23: Send SIM APDUs via GSMTAP, if enabledAndreas Eversberg1-1/+18
2013-01-08fix: Use only single CCCH block to determine path lossAndreas Eversberg1-0/+7
The downlink singalling failure counter DSC is decremented by 4 in case of unsuccessfull decoding of CCCH block and incremented by 1 in case of successfull decoding of CCCH block. The initial and maximum value of 90 requires to check the signal only once per 51 multiframe. If DRX would be supported, only a subset of 51 multiframes are received, so the initial / maximum value of 90 must be reduced accordingly.
2012-11-20Tell L1CTL_FBSB_REQ the expected received signal levelHarald Welte1-1/+2
As Dieter points out, this drastically improves the resiliance to high receive levels on the C155. We cannot blindly assume a received signal level of -85 dBm if the BTS is 2m away and we actually receive -40 dBm. This patch extends the L1CTL_FBSB_REQ data structure in layer 1 with the respective field, as well as the l1ctl_tx_fbsb_req() API function called from the various layer23 apps. "mobile" and "bcch_scan" already did a PM request and thus know the expected signal power. "ccch_scan" and "cbch_sniff" apparently don't do, so the -85 dBm constant is now hardcoded into the host-side source code there, and should probably be fixed in a follow-up patch.
2012-03-29host/l1ctl: Make sure to initialize tn in neigh_pm_reqSylvain Munaut1-1/+3
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-13host/layer23: Removed local copy of LAPDm, using libosmocore instadAndreas Eversberg1-1/+1
Since libosmocore already has LAPDm implementation, we don't need the local copy of LAPDm code anymore. Written-by: Andreas Eversberg <jolly@eversberg.eu> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-07-28layer23: Add mobile support for sending / receiving voice frame through MNCCAndreas.Eversberg1-6/+124
Support GSM FR codec only so far. Written-by: Andreas Eversberg <jolly@eversberg.eu> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-07-28l23/l1ctl: Add default values for audio_modeSylvain Munaut1-0/+3
Theses value should simulate the old behavior Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-07-17[layer23/mobile] Improvement and fixes of idle mode processAndreas Eversberg1-1/+4
This patch introduces cell re-relection. When camping on a cell, it scanns neighbour cells. If a 'better' cell is found, the cell is selected. If the cell is in a different location area, a location upating is performed under certain conditions. The 'better' cell depends on various informations that are broadcasted on the BCCH of a neihbour cell and of course the RX level. Most operators don't set these informations, so the 'better' cell depend on a better RX level for the same location area, or a much better RX level (6 dBm) at a different location area. There were many issues at the idle mode process that has been fixed. Expecially when moving, the state machines got stuck, so no more cell search was possible, or no further calls / location updating was possible. In order to see the process of cell selection, enter the VTY interface and enable the network monitor: enable monitor network 1 (where '1' is the instance of the MS) In order to see the current state of the processes, enter: show ms
2011-07-17[layer23] Adding neighbour cell measurement to L1CTL interface.Andreas Eversberg1-0/+43
2011-06-24L1CTL is sending PH-DATA.ind, not PH-DATA.req up to LAPDmHarald Welte1-1/+1
2011-06-23further decouple lapdm code from osmocom_ms and l1ctlHarald Welte1-10/+18
we introduce a new primitive layer betwen PH and DL, enabling the use of the LAPDm code in applications that are not based on L1CTL
2011-06-22remove l1ctl data structure form l2_ph_chan_conf()Harald Welte1-1/+1
This brings us one step closer to de-couple LAPDm from L1CTL
2011-06-22remove l1ctl data structure from l2_ph_data_ind()Harald Welte1-5/+2
2011-06-21layer23: make LAPDm code mostly independent of 'struct osmocom_ms'Harald Welte1-4/+4
This is one step in the direction of re-using the lapdm code in osmo-bts.
2011-05-22layer23: update to new GSMTAP API in libosmocore >= 0.3.1Harald Welte1-5/+7
2011-05-15src: use namespace prefix osmo_* for utilsPablo Neira Ayuso1-3/+3
Summary of changes: s/bcd2char/osmo_bcd2char/g s/char2bcd/osmo_char2bcd/g s/hexparse/osmo_hexparse/g s/hexdump/osmo_hexdump/g s/hexdump_nospc/osmo_hexdump_nospc/g s/ubit_dump/osmo_ubit_dump/g s/static_assert/osmo_static_assert/g
2011-05-15src: use namespace prefix osmo_signal*Pablo Neira Ayuso1-9/+9
Summary of changes: s/signal_cbfn/osmo_signal_cbfn/g s/register_signal_handler/osmo_signal_register_handler/g s/unregister_signal_handler/osmo_signal_unregister_handler/g s/dispatch_signal/osmo_signal_dispatch/g
2011-04-26src: use new libosmogsm and include/osmocom/[gsm|core] path to headersPablo Neira Ayuso1-10/+10
This patch changes include paths to get osmocom-bb working with the current libosmocore tree. Among all these renames, you can notice several tweaks that I added on purpose, and that require some explanation, they are: * hexdump() in osmocon.c and osmoload.c has been renamed to avoid clashing with hexdump() defined in libosmocore. * gsmmap now depends on libosmogsm. Actually I had to cleanup Makefile.am because I was experiencing weird linking problems, probably due to a bug in the autotools. With the change included in this patch, I got it compiled and linked here correctly. This patch has been tested with the phone Motorola C123 and the following images files: * firmware/board/compal_e88/hello_world.compalram.bin * firmware/board/compal_e88/layer1.compalram.bin Using the osmocon, bcch_scan and mobile tools. Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
2011-01-27[l1ctl] Adding missing msgb_free()Andreas.Eversberg1-0/+1
When a corrupt frame cannot be delivered, it is dropped. Also it must be freed.
2010-11-13[layer23] msgb_free() must in l1ctl.c must called after reading its headerAndreas.Eversberg1-1/+1
2010-10-30layer23: Use the new rach_req format in l1ctl and update l23 apps to use itAndreas.Eversberg1-5/+5
This removes an old hack Written-by: Andreas Eversberg <jolly@eversberg.eu> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-10-12[layer23] Implementation of signal loss criteria as defined in TS 05.08Andreas.Eversberg1-9/+45
There are two criterions for lossing a signal, idle mode and dedicated mode. A counter counts down when a frame is dropped, and counts up when a valid frame is received on certain channel. The loss criterion is reached, if the counter reaches 0. The values added to / removed from the counter and the limits depend on the process.
2010-10-05[layer23] Increase sync tollerance by increasing freq_err_thresh1Andreas.Eversberg1-1/+1
This is a quick workarround to make synchronizing to a cell more reliable. Without it, just a few cells will sync. When network search is restarted, no more sync happens. By increasing the freq_err_thresh1 to 10000, many cells sync, even after the first network search.
2010-09-28l1ctl: Add initial tch_mode value in DM_EST_REQSylvain Munaut1-2/+4
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-09-26[layer23] Cleanup of various 'printf' debuggingAndreas.Eversberg1-20/+20
2010-09-26[layer23] Added support for changing TCH mode via L1CTL messagesAndreas.Eversberg1-1/+46
2010-09-26[layer23] Adding application generated measurement reportAndreas.Eversberg1-1/+5
The cell provides SYSTEM INFORMATION 5* and 6. These are used to create a list of neighbor cells to monitor. Because there is no neighbor cell monitoring supported by layer1, the list has no valid results yet. Currently the average RX level of received frames are used to generate a new report every second. The report is transmitted to layer1 and used there whenever a measurement report has to be transmitted. The timing advance and the current transmit power (as requested by network), is included with every report.
2010-09-18[layer23] SIM client completionAndreas.Eversberg1-0/+36
The SIM client is now complete. Because it usefull for multiple applications, i moved it to the layer23/src/common directory. The SIM reader works together with mobile process. Fixes were made. Thanx to all for testing, finding bugs, and making it work as it is supposed to do. The current version uses special L1CTL messages to send and receive APDUs. This will change in the future, when BTSAP interface is completed. Please note that this client will not work until the layer1 SIM reader fixes and extensions are committed.
2010-09-14layer23/l1ctl: Add the RX power to the DATA_IND debug printSylvain Munaut1-1/+2
Useful to know if bad data is due to ciphering/bad sync or to no/marginal signal. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-09-14layer23/l1ctl: Remove useless printf debugSylvain Munaut1-1/+0
There is a proper LOGP statement, no need for a printf Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-09-11[layer23 / layer1] Added interface for changing crypto mode of DSPAndreas.Eversberg1-0/+22
The layer23 will now set crypto mode and key when CIPHERING MODE COMMAND is received. After crypto mode has been set, CIPHERING MODE COMPLETE is sent. NOTE: Layer1 implements only the interface, there is no functionality to it yet.
2010-08-21[layer23] L1CTL frequency change implementation in l1ctl.cAndreas.Eversberg1-0/+61
2010-08-14[layer23] Added (incomplete) ASSIGNMENT COMMAND handlingAndreas.Eversberg1-0/+2
This commit features handling of ASSIGNMENT COMMAND. Currently only channel descriptions "after time" are processed, which is mostly the case. The ASSIGNMENT COMMAND is essential, because public networks assign an SDCCH4/8 before actually assigning a TCH.
2010-07-27layer23: Unify the prefix of l1ctl TX functionsSylvain Munaut1-9/+10
Some had tx_ph_XX, others l1ctl_tx_XXX and some l1ctl_tx_ph_XXX Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-07-27include: Rename l1a_l23_interface.h to l1ctl_proto.hSylvain Munaut1-1/+1
The interface between l1 and upper layer is called by several name. IMHO l1ctl is shorted and sounds good so try to unify using that. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-07-27layer23: Use libosmocore rsl_chan_nr_str instead of local funcSylvain Munaut1-28/+1
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-07-27layer23: Split [2/2] -> The header filesSylvain Munaut1-5/+5
This split the headers and adapt the source. We use osmocom/bb as a prefix because libosomore also uses osmocom and generic names such as misc & common could conflict in the future. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-07-27layer23: Split [1/2] -> The source codeSylvain Munaut1-0/+608
We split into : - common: Everything that can be shared - mobile: The real spec compliant mobile phones - misc: Different test stuff Signed-off-by: Sylvain Munaut <tnt@246tNt.com>