Commit Graph

209 Commits

Author SHA1 Message Date
Andreas.Eversberg 341b3cee2c Fixed descriptions of VTY interface commands. 2010-06-06 10:37:55 +00:00
Andreas.Eversberg 72a63e90ff Completed layer 2 process. (LAPDm)
Not actually complete but most of it. Location update works now!
2010-06-05 19:47:25 +00:00
Andreas.Eversberg 4f03a851f0 Fixed of bugs while testing layer 2. 2010-06-05 19:46:10 +00:00
Harald Welte f916fe0031 [mobile] Enable GSM-R / E-GSM900 and DCS1800 bands 2010-05-29 13:06:32 +02:00
Harald Welte fd2a426395 l1ctl: Drop frames where L1 indicates they have bit errors 2010-05-29 13:06:10 +02:00
Andreas.Eversberg 5d10a35819 Fixes on cell selection process. 2010-05-24 23:15:15 +00:00
Andreas.Eversberg 1294f37687 Fixes during testing of location update with.
The location update is now performed after the channel is assigned.
In dedicated mode the network receives the LOCATION UPDATING REQUEST.
The reply (IDENTITY REQUEST and LOCATION UPDATING REJECT) is received.
But subsequent message like the IDENTITY RESPONSE is not transmitted
by lapdm.c.
2010-05-24 14:46:11 +00:00
Andreas.Eversberg ab438fee54 Fixed header offset in lapdm.c. 2010-05-24 14:45:00 +00:00
Andreas.Eversberg 27bcbec8c9 Fixed output format of osmocom.cfg. 2010-05-24 14:43:49 +00:00
root 6404e12a90 Moved some spreaded settings of layer23 into settings.h.
The IMEI can now be set or generated randomly.
2010-05-24 18:15:21 +02:00
root 0f1ef214b6 Fixes on cell selection.
I hope that it fixes the crash issues. If a sysinfo was received when no cell is
selected, it was written to a NULL-pointer.

Also after selecting a cell (dedicated mode), it was not good to "continue"
an already stopped search process, if the sync fails.
2010-05-24 05:38:24 +02:00
Andreas.Eversberg ba59a8cb51 Added more commands to VTY, especially selecting test SIM and configure it.
The test card can now be configured, as if it is already registered to a
network. So it will directly select the strongest cell of last scan.
2010-05-23 20:53:32 +00:00
root bfc0285c7c Fixes of layer23 processes during tests of MNCC interface.
-> Emergency calls will now trigger channel request.
-> Normal calls will be rejected due to limited/no service.
2010-05-24 02:21:24 +02:00
Andreas.Eversberg 9359a91504 Moved layer 1 <-> layer 2 interface from main.c to a seperate file of
liblayer23. Other applications using liblayer23 don't need to re-implement it.

Messages from layer 1 are not freed in layer2_read() anymore. They will be
freed by the upper layers. The layers may also decide to queue or to forward
the messages. In general: A message is always discarded by the message handler
and not after calling the message handler.
2010-05-22 10:46:20 +00:00
Andreas.Eversberg 6ca03ff7e6 Fixing cell selection, so it works with the current layer 1 API. 2010-05-22 09:27:33 +00:00
Andreas.Eversberg 0d53134db5 Fixed list of maximum frequencies to scan for a range. 2010-05-22 08:37:42 +00:00
Andreas.Eversberg c970d4f791 Network selection results can now be shown explicitly by "network show" VTY command. When selecting the network, the selection is checked, if in list. 2010-05-21 15:54:42 +00:00
Andreas.Eversberg 0d1f453943 Summary list of scanned cells now contains LAC and cell ID, rather than (uninteresting) access classes. 2010-05-21 15:52:11 +00:00
Harald Welte 89c6b9510e correct endian conversion of arfcn in tx_ph_dm_ext_req() 2010-05-20 23:48:19 +02:00
Harald Welte cb71b972bd Make new L1CTL_FBSB_REQ work reliably
* port 'mobile' application to new l1ctl_tx_fbsb_req()
* make sure we have a proper downlinke header in front of l1ctl_fbsb_resp
* remove duplicate band_arfcn member of struct l1ctl_fbsb_resp
* reset the AFC to its default value when starting new FBSB task
* remove bogus l1s.sb.{synced.count} variables
* allocate msg and send l1ctl_fbsb_resp() only from process context, not FIQ
* properly report SNR and BSIC in fbsb_resp
* introduce arbitrary SNR thresholds for FB0->FB1 and FB1->SB switching
2010-05-20 23:26:42 +02:00
Harald Welte 8978ec571e layer1/l1ctl: Split L1CTL_NEW_CCCH_REQ in FBSB_REQ nad SYNC_REQ
We really want to have those two as distinct operations - and we
want proper state machines in L1 to quickly return if they've
managed to acquire a FB or SB or not.  Otherwise scanning will
take ages...

This code now introduces a new l1ctl_fbsb_req that is sent via
L1CTL to ask for a bitmask of FB0/FB1/SB operations.  The actual
FB0/FB1 detection now no longer runs for 500 TDMA interrupts
but completes as soon as we either know there is no FCCH,
or that our frequency error is smaller than a caller-specified
threshold.

FB0/FB1 are already working, SB is not yet, sorry.
2010-05-19 21:41:24 +02:00
Jan Luebbe bcf3badc5b osmocon: extend hexdump to show all printable characters 2010-05-19 20:29:55 +02:00
Steve Markgraf edcd880263 osmocon: change mtk load address for MT6223 romloader
The romloader of the MT6223 uses more of the internal SRAM
than the loader of the MT6227, thus we need to change the load
address.

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2010-05-19 18:02:44 +02:00
Steve Markgraf dd95bcec33 osmocon: Add experimental support for the MTK romloader
Currently the switch to a higher baudrate is missing, which has
to be done by a direct UART autobaud register write, plus sending
an autobaud sample.
As a result, the maximum download speed is currently 19.200 Baud.

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2010-05-17 19:51:28 +02:00
Steve Markgraf 6fd7f96172 osmocon: use a global load address
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2010-05-17 18:54:59 +02:00
Steve Markgraf 2e0c90cad2 osmocon: cosmetic cleanup
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2010-05-17 18:41:00 +02:00
Steve Markgraf a802b36894 osmocon: use osmocore timers, minor fixes
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2010-05-17 18:26:37 +02:00
Daniel Willmann 9030db46cc osmocon.c: Fix serial_set_baudrate function
We have to call tcgetattr prior to changing the baudrate and writing the
struct again.
2010-05-17 09:24:01 +02:00
Andreas.Eversberg 21cc7eecc5 Work on VTY interface:
- Load and save of config now works.
- Network search is displayed on VTY and the result can be selected there.
- Manual/auto mode can be selected via VTY and saved.
2010-05-13 12:51:22 +00:00
Andreas Eversberg 9e7a9bc7fa Bugfix in IMEI type selection. 2010-05-11 11:38:07 +02:00
Andreas.Eversberg 5128052dd1 Fixed broken sysinfo.c 2010-05-10 22:11:48 +00:00
Andreas.Eversberg bb08bbd1d7 Minor fixes and improvements to L3 and VTY. 2010-05-10 22:06:37 +00:00
Steve Markgraf ebe72af12b add MNC of DB Systel to network list
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2010-05-10 14:06:32 +02:00
Andreas.Eversberg b763a07c47 Added "show ba 1" to view BA lists via VTY interface. 2010-05-09 17:31:49 +00:00
Andreas.Eversberg 3928d757f0 Added vty interface (taken from OpenBSC project).
It is now possible to show informations about:
- mobile
- subscriber
- received cell informations

Later it can be used to do configurations (phone's menu)
and trigger events, like dialing a phone number.
2010-05-09 16:01:49 +00:00
Andreas.Eversberg acd570fff8 Added SI3 rest octets to RR layer. Now a cell can be qualified:
- Low prio
- High prio
- Barred
2010-05-09 09:40:41 +00:00
Andreas.Eversberg f76e2064a4 Added BCCH timeout timer for detecting loss of radio link (layer23). 2010-05-08 14:31:27 +00:00
Andreas.Eversberg 729abf56ea Minor condition fix in radio resource. 2010-05-07 23:07:30 +00:00
Andreas.Eversberg 2b5c2337ed Fixes for layer 3 processes:
- CCCH connection state variable
- The complete BAND is now searched prio selecting PLMN
2010-05-07 21:41:54 +00:00
Andreas.Eversberg 2b7d2ed446 - Fixes on MM, RR, cell selection, plmn search processes.
-> Cell selection now requires only one frequency to be scanned, if BA list
   of that PLMN is known.
2010-05-06 08:48:24 +00:00
Andreas.Eversberg 7c5b9ea288 Work on layer 3 processes:
- Fixes on PLMN search and cell selection process.
- Fixes on radio ressource.
- ^C will cause IMSI detach when pressed the first time.
  Pressing ^C again will cause termination of process at any time.
2010-05-05 08:40:10 +00:00
Andreas.Eversberg 7f009e41f9 Work on layer 3 processes:
- Fixed reference to system informations. (did crash when re-selecting).
- Fix in cell selection state machine. (any re-selection).
- MCC, MNC, LAC change of cell now triggers re-selection.
- Fixed some paging issues. Empty pagings are not displayed anymore. Also paging is now possible when 'camping on any cell'.
2010-05-04 09:48:51 +00:00
Andreas.Eversberg fe1dc19c6e More fixes on layer3.
The current code will scan frequencies, select a cell and camps on it.
No SIM is inserted. Paging requests and Immediate assginments can be seen.

When inserting a SIM card (uncomment it in app_mobile.c), location update
is triggered after selecting a cell. The RACH request is sent, an
Immediate assignment is received, the dedicated mode is requested.
Nothing happens then, because no confirm / abort of layer 2 is received.
2010-05-02 17:40:52 +00:00
Andreas.Eversberg 14974d3dba Many fixes in layer 3:
- Sysinfo storage
- Cell/Network selection process
- Channel request / Paging
2010-05-02 17:13:47 +00:00
Andreas.Eversberg 8e5f33b4d3 Fixed many issues in MM IDLE mode process. 2010-05-01 18:21:03 +00:00
Andreas.Eversberg 30b48d6212 Fixes, especially frequency list parsing. 2010-04-30 18:51:41 +00:00
Andreas Eversberg 516917e836 Fixes and improvements of layer23. 2010-04-29 20:46:11 +02:00
Andreas Eversberg 9ef7ac8b11 Added some debugging. / Minor condition fix. 2010-04-26 11:21:18 +02:00
Andreas Eversberg f1278ad9da Added new application "mobile" to layer23.
This is the current status of the layer 3 protocols. Everything compiles,
radio ressource layer is partly complete. Everything is untested, so don't
expect that it runs and does something usefull. The next step for me is
running and debugging it.

Here is the list of files that are added / modified:

	new file:   ../include/osmocom/gsm322.h
	new file:   ../include/osmocom/gsm48_cc.h
	new file:   ../include/osmocom/gsm48_mm.h
	new file:   ../include/osmocom/gsm48_rr.h
	modified:   ../include/osmocom/l23_app.h
	modified:   ../include/osmocom/logging.h
	new file:   ../include/osmocom/mncc.h
	modified:   ../include/osmocom/osmocom_data.h
	new file:   ../include/osmocom/subscriber.h
	new file:   ../include/osmocom/support.h
	new file:   ../include/osmocom/sysinfo.h
	new file:   ../include/osmocom/transaction.h
	modified:   Makefile.am
	new file:   app_mobile.c
	new file:   gsm322.c
	new file:   gsm48_cc.c
	new file:   gsm48_mm.c
	new file:   gsm48_rr.c
	modified:   main.c
	new file:   mnccms.c
	new file:   subscriber.c
	new file:   support.c
	new file:   sysinfo.c
	new file:   transaction.c
2010-04-25 18:28:24 +02:00
Andreas Eversberg f022dff179 Removed the code from gsm48-andreas. 2010-04-25 18:15:53 +02:00
Andreas Eversberg 0d93f1c917 Changes to layer23:
Added name to osmocom_ms structure.

l2_ctx is now named l23_ctx, because it is also used there.

A work-handler is usefull for applications that need to check queues.
2010-04-25 18:10:59 +02:00
Andreas Eversberg e91d8a934c l1ctl_tx_ccch_req() now uses arfcn as parameter.
The arfcn variable is renamed to test_arfcn.

I think that arfcn and other frequency parameters should be stored at
the process which sets it and using it when calling l1ctl_tx_ccch_req().
2010-04-25 17:31:35 +02:00
Andreas Eversberg 96e479645f Wrapper for file access.
If file access is used to store network informations and user settings in the
/etc/ directory. Later it can be used to store them in the EEPROM of the
target.
2010-04-25 17:11:47 +02:00
Sylvain Munaut 80ad05830d osmocom: Fix serial init (CSIZE field)
Since we clear the whole CSIZE, we need to set CS8 _after_ the clearing
or it'll just get erased ...

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-04-21 19:27:21 +02:00
Harald Welte cba99230be layer23: fix building against user-defined LIBOSMOCORE 2010-04-09 08:09:46 +02:00
Andreas Eversberg b9f5195b54 Added queue to messages from RSL to RR. 2010-04-07 19:34:45 +02:00
Steve Markgraf 55d9b8058a osmocon: fix c140xor, fix compiler warnings due to unhandled cases, cleanup
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2010-04-07 08:49:19 +02:00
Andreas Eversberg ca0692d718 Minor correction of issues.txt. I wrote the opposite of what I wanted to say... 2010-04-06 16:25:38 +02:00
Harald Welte f633cd6235 osmocon: use git-version-gen and PACKAGE_VERSION for 'osmocon -v' 2010-04-06 10:58:24 +08:00
Harald Welte 10b30c606f osmocon: cosmetic cleanup (mostly 80character line length) 2010-04-06 10:38:56 +08:00
Steve Markgraf f04871b55b osmocon: * introduce support for "non-secure" romloader inside Calypso/Calypso lite, "-m romload", tested on the BenQ Siemens A38
* automatically add the required 1003 magic for the C139, C140 and J100i "-m c140/c140xor", intended for loading loader.ramload.bin, and loading the application itself with "osmoload memload" on these targets
		* replace null-terminated string "ftmtool" with uint8_t (length was 8, so the ftmtool message was only recognized when the byte following to our allocated buffer memory was 0x00)
		* fix minor compiler warnings
		* add copyright message

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2010-04-06 10:17:23 +08:00
Harald Welte 58cede7c8a layer23: first version of a 'scan all BCCHs' application
bcch_scan first iterates over all GSM900/EGSM900/GSM1800 channels and
performs a power measurement.  Based on this, it tries to look for
BCCH data on those ARFCNs.  Currently, they are simply written to
the pcap file and not analyzed/processed in layer23 yet.
2010-04-05 22:39:13 +08:00
Harald Welte 13a0a05887 layer23: signal the L1CTL DONE flag at the end of a power measurement 2010-04-05 22:21:36 +08:00
Harald Welte 1fa7930eea layer23: Introduce signals to indicate PM RES and L1 RESET to app 2010-04-05 21:30:00 +08:00
Harald Welte db60b706cc layer23: split into liblayer23 and 'apps'
similar to the concept of having 'apps' in the firmware build process,
I'm now building the common code as liblayer23 and we have three apps
that use this library:
 layer23 - the old layer23 program
 bcch_scan - a passive bcch scanner under development
 echo_test - a test program sending large msgb's containing zero bytes
2010-04-05 21:30:00 +08:00
Andreas Eversberg fb8dfadc66 Work on Radio Ressource: RSL-SAP interface on L3 side. 2010-04-05 15:26:34 +02:00
Andreas Eversberg c77f52f65c RR:
- Whenever a RACH burst is sent or resent, a new random value is generated.
- STATUS message is sent, if an unsupported message is received.
2010-04-05 12:38:39 +02:00
Andreas Eversberg 3d79d9d9f6 Mobility Management: Corrected some issues about RR abort timer (T3240). 2010-04-04 22:26:58 +02:00
Andreas Eversberg 5118bb887a Work on layer 3: finished Call Control layer 2010-04-04 19:42:43 +02:00
Andreas Eversberg 6be5c597f9 Adopted transaction.c and transaction.h from OpenBSC.
Pointers and structure is modified for the mobile station environment. The transactions are required to handle calls and SMS.
2010-04-04 15:34:53 +02:00
Andreas Eversberg fcc494e3e9 Added minimal call application as required in GSM 04.08.
It represents the application ontop of layer 3 Call Control. It will reject any incomming call using appropiate cause value.

Since there is no real interface between call application and call control, I introduced MNCC for mobile side. (MNCCms) Applications can be:

- normal telephony application, implemented in the MS
- remote applications like PBX (MS as external line)
- "application-in-the-middle" (no comment ;-)
2010-04-04 14:15:23 +02:00
Andreas Eversberg 49e9ddf335 Work on layer 3, finished Mobility Management part. 2010-04-04 11:44:18 +02:00
Andreas Eversberg cdaa9ba0b5 Work on layer 3 process, finished Location updating procedure (including IMSI attach). 2010-04-03 10:48:50 +02:00
Andreas Eversberg e85eb25a72 Work on message handling of layer 3. 2010-04-02 08:28:08 +02:00
Andreas Eversberg 155e953e94 Work on message handling of layer 3. 2010-04-01 19:53:32 +02:00
Andreas Eversberg 1af7da8f15 Added README for informing about the current development process. 2010-03-31 20:47:41 +02:00
Andreas Eversberg 194a702517 Work on Mobility Management: MM information procedure 2010-03-31 20:42:38 +02:00
Andreas Eversberg 4495f10ee0 Work on Mobility Management: Abort process 2010-03-31 20:34:16 +02:00
Andreas Eversberg d95222b072 Work on Mobility Management: IMSI detach process 2010-03-30 18:58:45 +02:00
Harald Welte cde0f6475f osmocon: use serial port initialization code from openbsc/src/rs232.c
Both have the same goal: put the RS232 port into a completely raw,
binary-transparent mode.  So there's no point in keeping two completely
different functions for this.
2010-03-30 10:05:41 +08:00
Harald Welte ed9901d842 osmocon: calcluate unix domain socket length in a portable way
Let's hope this concept (as seen in Xorg sources) is portable enough
to calculate the length of the sockaddr_un properly on all
architectures.
2010-03-30 09:50:32 +08:00
Harald Welte ac7715a2d5 gsm48-andreas: fix typo utnt -> uint 2010-03-29 21:31:18 +08:00
Andreas Eversberg a9655f821f Work on various L3 processes. 2010-03-28 16:29:04 +02:00
Harald Welte 4ef2856473 gsm48-andreas: s/clamp/camp/g 2010-03-28 13:01:39 +08:00
Andreas Eversberg 05b12edee0 Work on Radio Ressource. 2010-03-27 17:23:32 +01:00
Harald Welte 1e4d22cb5f Implement L23-triggered L1 power measurement scan
Now layer23 can ask L1 to scan an entire range of ARFCN's and do power
measurements.  This is the first step in the cell (re)selection process.
2010-03-27 18:42:43 +08:00
Andreas Eversberg 413b10e33e Added process of link control in idle mode.
The process is described in GSM 05.08 and will search and select BCCH.
The process is partly complete.
2010-03-27 11:08:47 +01:00
Andreas Eversberg 51f1e4b8a2 Added process of selecting PLMN and serving cell.
The process is described in GSM 03.22.
The process is partly complete.
2010-03-27 11:08:47 +01:00
Andreas Eversberg 66bb75afc2 Added subscriber data. It is very uncomplete yet. 2010-03-27 11:08:47 +01:00
Andreas Eversberg accf13120d Work on Radio Ressource. 2010-03-27 11:08:47 +01:00
Harald Welte 937e5f64ab layer23: cosmetic fixes in log output 2010-03-27 12:51:45 +08:00
Harald Welte a98c0e9c44 layer23: convert main.c to use libosmocore/logging.c 2010-03-27 12:51:30 +08:00
Harald Welte 3393285e91 introduce (unused) code to regularly transmit L1CTL ECHO REQ to phone
this helped in debugging the strange NUL byte related data corruption
2010-03-27 12:34:29 +08:00
Harald Welte ace2b08244 add L1CTL ECHO REQUEST code 2010-03-27 12:32:32 +08:00
Harald Welte e8a7bbffd2 layer23: convert to libosmocore logging API 2010-03-27 08:56:05 +08:00
Harald Welte 7aac0b828d remove remaining bits of libosmocom. It's all in libosmocore now 2010-03-27 00:10:03 +08:00
Harald Welte 0841075df2 layer23: remove debug.c and thus last remnants of libosmocom 2010-03-27 00:07:46 +08:00
Harald Welte e461615654 gsm48-andreas: Use value_string wherever possible
The point of this is to not replicate functionality that already exists
in libosmocore (get_value_string()/get_string_value()).
2010-03-25 12:43:07 +08:00
Harald Welte c1cee898df misc compiler warning fixes
* added missing param in call to gsm48_rx_bcch
* added 'extern' to declarations of rsl_rlm_cause_strs and target_board
* added several 'const' for strings
* removed useless 'bufptr,' from hexdump
(From: itsme <itsme@xs4all.nl>)
2010-03-22 08:26:04 +08:00
Harald Welte bee63154c4 L1A/L23 interface (L1CTL) cleanup
* introduce a new 'l1ctl_hdr' structure common to all messages
  on this interface
* use struct l1ctl_hdr in both the firmware and layer23
* add a new L1CTL_PM_REQ request for performing layer23-initiated
  power measurements (firmware does not implement them yet)
2010-03-21 12:57:28 +08:00