Commit Graph

575 Commits

Author SHA1 Message Date
Andreas Eversberg 570c9716c2 Fix: Change T200 of LAPDm if SAPI 0 and SAPI 3 share bandwidth on SDCCH
We use 1 second on FACCH and 2 seconds on SACCH when SMS is transfered
during a call on TCH. There is no impact on bandwidth, because SAPIs use
differen channels.

In order to correctly transfer SMS during SDCCH, the T200 must be raised
from 1 (SAPI 0) to 2 (SAPI 0 and 3), so T200 will not timeout before
receiving acknowledge from BTS. This is because both SAPIs share the same
ressource on SDCCH. After release of SAPI 3, T200 is lowered back to 1.
2012-10-30 16:11:35 +01:00
Andreas Eversberg 07f8345646 Fixed decoding of hexadecimal LAI components
libosmocore has changed its LAI decoding from hex to decimal. This caused
wrong decoding of MCC and MNC. In order to provide required hex
transcoding, special hex encoding and decoding function are added to
mobile/sysinfo.c.
2012-10-30 10:26:20 +01:00
Paul Wise 8eb2f3d7a8 Drop unused imports from the python utilities. 2012-10-01 03:21:53 +02:00
Kevin Redon ca05975c8f Fix linking with GNU ld 2.22 and libgps
Error:
gcc -Wall -I/home/kevredon/osmocom-bb/src/shared/libosmocore/include -I/home/kevredon/osmocom-bb/src/shared/libosmocore/include -g -O2 -D_HAVE_GPSD  -lgps -o cell_log main.o app_cell_log.o cell_log.o geo.o ../common/liblayer23.a /home/kevredon/osmocom-bb/src/shared/libosmocore/build-host/src/.libs/libosmocore.a /home/kevredon/osmocom-bb/src/shared/libosmocore/build-host/src/gsm/.libs/libosmogsm.a /home/kevredon/osmocom-bb/src/shared/libosmocore/build-host/src/codec/.libs/libosmocodec.a -lm
../common/liblayer23.a(gps.o): In function `osmo_gpsd_cb':
/home/kevredon/osmocom-bb/src/host/layer23/src/common/gps.c:79: undefined reference to `gps_waiting'

Fix:
Holger told me to do so (he knows better then me about autoconf)
- set CFLAGS and LIBS for LIBGPS in layer23
- add libgps CFLAGS and LIBS in Makefile.am for common, misc, mobile
I would have done the following (which also works):
-AC_CHECK_LIB(gps, gps_waiting, CFLAGS+=" -D_HAVE_GPSD" LDFLAGS+=" -lgps",,)
+AC_CHECK_LIB(gps, gps_waiting, CFLAGS+=" -D_HAVE_GPSD" LDFLAGS+=" -lgps" LIBS+=" -lgps",,)
2012-09-17 08:40:44 +02:00
Harald Welte 6ce46e7a86 use msgb_pull() to get bytes from start of message, not msgb_get()
msgb_get() is for getting bytes from the end of a message, but it
was broken in libosmocore for a long time (until it was fixed today).
2012-09-08 22:45:30 +02:00
Harald Welte a8ce4ea469 layer23: gsm48_decode_lai() is now in libosmogsm 2012-09-08 22:43:50 +02:00
Andreas Eversberg 24df176826 layer23: Fixed size of power offset (SI 3 rest octets)
This is importaint on certan cells to finish BCCH scanning. If SI2ter
indication is falsely detected, BCCH reading will timeout, because no
expected SI2ter is received.
2012-07-12 15:54:06 +02:00
Sylvain Munaut ce60deff7b host/l1ctl: Make sure to initialize tn in neigh_pm_req
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2012-03-29 09:21:57 +02:00
Tim 43c588b6c6 l23: Add option for mobile-app to bind to other interfaces than localhost
Signed-off-by: Tim Ehlers <osmocom@ehlers.info>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2012-03-01 22:45:51 +01:00
Tim Ehlers b4a8badc45 mobile: Add vty option to force rekeying for every new channel
Written-by: Tim Ehlers	<osmocom@ehlers.info>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2012-02-14 23:54:25 +01:00
Steve Markgraf 90ab06ce5c host/osmocon: allow uploading of files > 64kb in romload-mode
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-02-08 21:43:29 +01:00
Christian Vogel 6efc1f395e Framebuffer: Script for font conversion.
bdf_to_c.py is a python script that converts a bdf-file into
the format expected by the osmocom-bb framebuffer (defined
in <fb/font.h>.
2012-02-04 00:12:18 +01:00
Kurtis Heimerl 987787f0cb Just a quick bug fix to gsm322.c.
Basically, there were two commands in an "else" block without brackets,
causing the

"end = 1023+299"

command to execute regardless of the state of index.

Signed-off-by: Andreas Eversberg <jolly@eversberg.eu>
2012-02-02 08:39:56 +01:00
Paul Wise 9dd1f00e83 host: Add support for the new gpsd API
Written-by: Paul Wise <pabs3@bonedaddy.net>
Acked-by: Peter Stuge <peter@stuge.se>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2012-01-17 08:11:07 +01:00
Andreas Eversberg c2b823faf0 layer23/mobile: Fixed cell re-selection after loosing signal
Test showed that loosing the signal in dedicated mode caused a complete
rescann of all cells. By keeping the cell selected, the process can use
the neighbour cell informations to do a quick search for the best cell
afterwards.
2012-01-02 02:21:19 +01:00
Andreas Eversberg 5e1765c332 layer23/mobile: Minor fix of debugging output 2012-01-02 02:15:26 +01:00
Andreas Eversberg 42004880e6 layer23/mobile: Fixed variable type, so home network is detected correctly 2012-01-02 02:10:54 +01:00
Andreas Eversberg 925322c634 layer23/mobile: Enable SIM reader by default
If there is no SIM card in the reader, the SIM process would
automatically proceed without SIM anyway.
2012-01-02 02:08:08 +01:00
Alexander Huemer 9bfb7d42b3 host/osmocon: correct parsing of -m
Written-by: Alexander Huemer <alexander.huemer@xx.vu>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-12-14 20:32:17 +01:00
Holger Hans Peter Freyther 950f7d15e8 layer23: Call talloc_free unconditionally
talloc_free will check for NULL and return -1.

_talloc_free(void *pyr)
{
        if (unlikely(ptr == NULL)) {
                return -1;
        }
...
2011-12-11 15:47:30 +01:00
Andreas Eversberg cb8998e33c Removed obsolete gsm48-andreas directory from "host" tree
It was part of early development of layer 3 protocols, but obsolete since
a long time ago.
2011-11-25 19:25:46 +01:00
Steve Markgraf 937005e247 layer23/ccch_scan: Replace fprintf() with LOGP() and print SI-id
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2011-11-22 18:34:58 +01:00
Steve Markgraf 50d58f9dd9 layer23/ccch_scan: Print Paging Requests of type 3
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2011-11-22 18:10:23 +01:00
Steve Markgraf 4300e89ba8 layer23/ccch_scan: Print channel type of correct TMSI for Paging Request Type 2
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2011-11-22 18:01:06 +01:00
Steve Markgraf ee7201b832 layer23/bcch_scan: bscan_sig_cb() should return something in all cases
Found with clang:
bcch_scan.c:277:5: error: non-void function 'bscan_sig_cb' should return a value

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2011-11-21 00:42:43 +01:00
Andreas Eversberg 52f2d586ae mobile/MM: Fixed handling of T3230 (MM connection timeout)
If network will not respond to (additional) service request, the timeout
will abort the pending MM connection and return to the state before the
MM connection was requested or wait for network command.
2011-11-17 21:01:38 +01:00
Andreas Eversberg 0730907840 mobile/MM: Fixed handling of T3220 (IMSI detach timeout)
If network will not terminate radio connection, the timeout will abort
the radio connection.
2011-11-17 21:01:26 +01:00
Andreas Eversberg c0c1195a57 host/mobile: Indicate unsupported TS 04.14 test messages in log
There is no support for TS 04.14. A logging message will inidcate this,
if a tester requests test functions. A STATUS message will be sent
as it is for for other usupported protocol types received.

Written-by: Andreas Eversberg <jolly@eversberg.eu>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-13 20:25:20 +01:00
Andreas Eversberg 3426063f56 host/mobile: Adding (partly implemented) supplementary service support
Use VTY to request your extension number form OpenBSC:

en
service 1 *100#

Written-by: Andreas Eversberg <jolly@eversberg.eu>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-13 20:25:20 +01:00
Andreas Eversberg fe2e57bc80 host/mobile: Mobile will use SMS Service Center Address from SIM
In case the SMS Service Center Address is not set in the config, the
Address from the SIM card is used. The mobile checks if either one is
defined, otherwise it will refuse sending SMS.

Since records of SIM are read, this patch includes fixes to talk
correctly with the SIM client.

Written-by: Andreas Eversberg <jolly@eversberg.eu>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-13 20:25:20 +01:00
Andreas Eversberg fb7be589e6 host/mobile/sms: Adding SMS support for osmocomBB/mobile
Both MO and MT SMS are supported.

Transmission an reception can be controlled via VTY:

en
sms 1 <destination> <text>

All received SMS are stored in "~/.osmocom/bb/sms.txt".

SMS transmission is performed on SAPI 3 datalink, using DCCH or ACCH.

Written-by: Andreas Eversberg <jolly@eversberg.eu>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-13 20:25:20 +01:00
Andreas Eversberg cf55219d45 host/mobile/sms: Adding SAPI 3 support to MM and RR layers
RR now handles SAPI 3 datalink.

MM connections now have and individual sapi, so MM can use right SAPI
for communication with other layers, as well as releasing the right
MM connections in case of link release.

Written-by: Andreas Eversberg <jolly@eversberg.eu>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-13 20:25:20 +01:00
Andreas Eversberg 928b224539 host/layer23: Flush L1CTL/SAP workqueues when exitting
Written-by: Andreas Eversberg <jolly@eversberg.eu>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-13 20:25:20 +01:00
Andreas Eversberg 4d13b401ae host/layer23: SIM client now supports reading records correctly
Written-by: Andreas Eversberg <jolly@eversberg.eu>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-13 20:25:19 +01:00
Sylvain Munaut 9311c0025f host/mobile: Whitespace fixes, no functional changes
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-13 20:25:19 +01:00
Andreas Eversberg 8f77cbecb4 host/layer23: Removed local copy of LAPDm, using libosmocore instad
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-11-13 20:25:19 +01:00
Andreas Eversberg e16e02acc0 host/mobile: Bring mncc.h in sync with OpenBSC and LCR
Written-by: Andreas Eversberg <jolly@eversberg.eu>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-13 20:25:19 +01:00
Andreas Eversberg 97f688a7af host/mobile: Fixed paging response with correct identity type
In case we got paged with IMSI, but even if we have a valid TMSI, we need to
respond with IMSI, because the network may not know our TMSI anymore.

Written-by: Andreas Eversberg <jolly@eversberg.eu>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-13 20:25:19 +01:00
Andreas Eversberg 1a2778e7d4 host/mobile: Prevent the MM layer from making calls when not attached
If location updating (attachment) fails, the mobile returnes into idle
state. Because the SIM may be valid in this location area, the mobile must
check if the SIM is already attached. If not it may not change to normal
service.

Written-by: Andreas Eversberg <jolly@eversberg.eu>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-13 20:25:19 +01:00
Andreas Eversberg 11b4028664 host/mobile: Fix indentation in gsm48_cc, no functional change
Written-by: Andreas Eversberg <jolly@eversberg.eu>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-13 20:25:19 +01:00
Andreas Eversberg 0be0680ab5 host/mobile: Adding memory leak debugging
When mobile exits, a list of allocated memory chunks are dumped to
stderr. This helps to find talloc_free / msgb_free leaks.

During process, a SIGUSR1 or SIGUSR2 can be used to dump currently
allocated memory chunks.

Written-by: Andreas Eversberg <jolly@eversberg.eu>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-13 20:25:19 +01:00
Andreas Eversberg 321e3ae2fb host/mobile: Adding telnet_exit to free telnet connection ressources
Written-by: Andreas Eversberg <jolly@eversberg.eu>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-13 20:25:19 +01:00
Holger Hans Peter Freyther a73c98a3ab osmocom: Address warning about aliasing
We alias the uint8_t buf[..] to a uint16_t* which is violating
the aliases rule of C. Use an explicit memcpy to copy the first
two byte of the buffer. GCC 4.6.2 (debian) is clever enough to
use a normal load does not generate a memcpy call.

osmocon.c: In function ‘un_tool_read’:
osmocon.c:1239:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
2011-11-06 22:10:42 +01:00
Holger Hans Peter Freyther 6d1f116338 misc: u_intX -> uintX in the host directory
Use C99 stdint.h for the inttypes.
2011-11-06 21:55:40 +01:00
Steve Markgraf 7bbd2ac411 host/osmocon: make auto-reload/reboot feature work in chainloading-mode
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2011-09-05 02:41:41 +02:00
Andreas Eversberg 4d077b0e4c [mobile] Adding option to run as daemon 2011-09-04 19:37:57 +02:00
Andreas Eversberg c9927c72ea [mobile] Using socket application interface with mobile application
Use "-m" with mobile app, to use it in conjunction with LCR or other
applications.
2011-09-04 10:02:43 +02:00
Andreas Eversberg 5c8b76e74e [mobile] Adding socket application interface code from OpenBSC. 2011-09-04 09:57:51 +02:00
Sylvain Munaut 01e64fceb2 host/osmocon: Make use of the libosmcore serial helpers
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-09-02 22:36:38 +02:00
Andreas Eversberg d84ba5616f [mobile] Disable SMS by default, because SMS is not supported 2011-08-13 09:40:09 +02:00