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.
* 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
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.
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>
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>
- 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.
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.
- 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.
- 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'.
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.
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
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.
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().
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.
* 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>
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.
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
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 ;-)
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.
* 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>)
* 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)
Hi
Found a spelling error while testing my C139, and also fixed the
warning discussed in my earlier patch.
/Erik
From 9d8a7454367f3d095e6d4c046e84a22126ff887a Mon Sep 17 00:00:00 2001
From: Erik Ekman <yarrick@kryo.se>
Date: Wed, 17 Mar 2010 22:48:57 +0100
Subject: [PATCH 1/2] Remove operand which has no effect
Signed-off-by: Ingo Albrecht <prom@berlin.ccc.de>
* remove linuxlist.h copy and use osmocore
* don't put 'struct gsm_time' into l1ctl packets
* include rx_level and snr for each burst in l1ctl
* properly build libosmocore.a for target
* move gsmtime functions into libosmocore
* move ctype.h to standard location
* use GSMTAP for uplink frames (generated by layer23; sent to L1)
* only use GSMTAP if the user specifies the '-i dstip' arguments
* properly encode the GSMTAP channel type
* requires GSMTAP protocol version 0x02 (see next commit for wireshark patch)
L1 and L2 now pass UI frames like BCCH and CCCH downlink up into
L3, which detects an IMMediate ASSignment command and instructs
the L1 to switch to SDCCH/4.
From this point on, SDCCH/4 and SACCH4/C messages end up in our
L2 LAPDm implementation and are forwarded to L3.
Using the following changes, it is now possible to receive the PCH and AGCH
messages in the PC-side layer3, as well as trigger RACH sending inside the phone
from the PC:
* merge l1_dedic_mode_data_ind, l1_dedic_mode_data_req and l1_ccch_info_ind into l1_data_ind
* add partial LAPDm implementation (layer2/src/lapdm.c)
* introduce RSLms between LAPDm and L3 (layer2/src/osmocom_rslms.c)
* use new layer1 header field of msgb
* tx_ph_rach_req() and tx_ph_data_req() to send data from PC to target
* implement DEDIC_MODE_DATA_REQ on firmware side
This enables the layer2 to identify on which channel
(BCCH/CCCH/SDCCH/TCH/...) the respective message was received.
* Encode MFrame Task Number + SACCH info in 'p3' parameter
* Generate channel number and link identifier
* Decode channel number in layer2 program
libosmocore is a new library that has been created out of OpenBSC,
and it provides almost everything we've tried here with libosmocom.
The only remaining part is the 'debug' part