Harald Welte [Wed, 28 Apr 2010 09:43:50 +0000 (11:43 +0200)]
Merge remote branch 'origin/sylvain/pending'
Harald Welte [Wed, 28 Apr 2010 09:43:37 +0000 (11:43 +0200)]
Sylvain Munaut [Tue, 27 Apr 2010 20:25:54 +0000 (22:25 +0200)]
layer1/mframe_sched: Make task update safer
We try to prevent switching task at a bad time. The algorithm
just tries to find the first fn at which it's safe to activate
a previously disabled task.
tasks -> Running tasks
tasks_tgt -> What we aim to run
Since tasks_tgt is still only read, it's safe for the l1a to
modify it without locking.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Sylvain Munaut [Mon, 26 Apr 2010 19:33:26 +0000 (21:33 +0200)]
fw/layer1: Encapsulate mframe scheduler function better
There was some code meddling with mf_tasks directly. This is
fine if it's just setting/clearing a bit but since we're
gonna need some 'cleverness' into when to activate what to prevent
conflict, it's better to abstract that logic.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Sylvain Munaut [Mon, 26 Apr 2010 18:45:59 +0000 (20:45 +0200)]
fw/layer1: Change the tdma_schedule_set return value to # frames spanned
Previously, it returned the number of item + number of frames spanned
by the set. But that value isn't that useful and wasn't used by anyone.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Sylvain Munaut [Tue, 27 Apr 2010 20:21:24 +0000 (22:21 +0200)]
Remove some gsm time keeping utils now in libosmocore
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Sylvain Munaut [Wed, 28 Apr 2010 08:15:05 +0000 (10:15 +0200)]
Sylvain Munaut [Mon, 26 Apr 2010 19:26:29 +0000 (21:26 +0200)]
fw/layer1: Fix a printf warning uint32_t is 'long unsigned'
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Sylvain Munaut [Sun, 25 Apr 2010 21:20:31 +0000 (23:20 +0200)]
target/layer1: Fix typo in l23 message reception debug
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Sylvain Munaut [Thu, 11 Mar 2010 21:25:50 +0000 (22:25 +0100)]
target_dsp/calypso: Add some pointers to get started in IDA
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Sylvain Munaut [Thu, 11 Mar 2010 20:06:47 +0000 (21:06 +0100)]
target_dsp/calypso: Add a script to convert dump output into usable COFF
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Sylvain Munaut [Wed, 28 Apr 2010 08:10:47 +0000 (10:10 +0200)]
Update .gitignore
m4/*.m4 -> autoreconf adds stuff there
tests -> Build product
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Sylvain Munaut [Wed, 28 Apr 2010 08:05:29 +0000 (10:05 +0200)]
gsm 08.08: Fix some u_int8_t -> uint8_t
This breaks the ARM build in osmocom-bb. Besides uint??_t seems to
be the preferred type in osmocore. (coming from stdint.h vs sys/types.h)
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Sylvain Munaut [Tue, 27 Apr 2010 19:48:40 +0000 (21:48 +0200)]
gsm_utils: Just add some constant and timekeeping utils
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Andreas Eversberg [Sun, 25 Apr 2010 16:28:24 +0000 (18:28 +0200)]
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
Andreas Eversberg [Sun, 25 Apr 2010 16:15:53 +0000 (18:15 +0200)]
Removed the code from gsm48-andreas.
Andreas Eversberg [Sun, 25 Apr 2010 16:10:59 +0000 (18:10 +0200)]
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.
Andreas Eversberg [Sun, 25 Apr 2010 16:01:32 +0000 (18:01 +0200)]
Added new IE definitions to gsm_04_08.h of libosmocore.
Also added RR and MM TLV tables to gsm48.c
Andreas Eversberg [Sun, 25 Apr 2010 15:53:16 +0000 (17:53 +0200)]
Added single octet TV (type + value) to libosmocore.
In case of a single octet, the upper nibble is the type, the lower nibble
carries the value.
Andreas Eversberg [Sun, 25 Apr 2010 15:31:35 +0000 (17:31 +0200)]
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().
Andreas Eversberg [Sun, 25 Apr 2010 15:11:47 +0000 (17:11 +0200)]
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.
Harald Welte [Sat, 24 Apr 2010 11:27:00 +0000 (13:27 +0200)]
Merge remote branch 'origin/prom/pending'
Ingo Albrecht [Tue, 13 Apr 2010 02:45:17 +0000 (04:45 +0200)]
sercomm: implemented a trivial echo dlci.
Sylvain Munaut [Wed, 21 Apr 2010 17:27:21 +0000 (19:27 +0200)]
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>
Holger Hans Peter Freyther [Sat, 17 Apr 2010 04:21:49 +0000 (06:21 +0200)]
gsm0808: Port asiggnment_complete msg creation to libosmocore.
Holger Hans Peter Freyther [Sat, 17 Apr 2010 04:16:35 +0000 (06:16 +0200)]
gsm0808: Port cipher_complete to be part of libosmocore.
Holger Hans Peter Freyther [Sat, 17 Apr 2010 03:14:36 +0000 (05:14 +0200)]
gsm0808: Add the TLV definition for some of the 0808 IEs
Holger Hans Peter Freyther [Thu, 15 Apr 2010 08:10:39 +0000 (10:10 +0200)]
Add GSM0808 utilities to Osmocore.
The code is coming from the on-waves/bsc-master branch.
Holger Hans Peter Freyther [Thu, 15 Apr 2010 08:01:39 +0000 (10:01 +0200)]
gsm_08_08.h: Remove OpenBSC include file from the header.
Holger Hans Peter Freyther [Thu, 15 Apr 2010 01:14:51 +0000 (03:14 +0200)]
Add GSM08.08 protocol header.
This header is copied from bssap.h of the on-waves/bsc-master
branch and only contains the protocol specific information.
Ingo Albrecht [Tue, 13 Apr 2010 02:45:17 +0000 (04:45 +0200)]
sercomm: implemented a trivial echo dlci.
Christian Vogel [Mon, 12 Apr 2010 10:29:00 +0000 (12:29 +0200)]
UART initialisation, serial port errors
Additional initialisations for the UART to make the data corruption
from the PC to the Phone go away.
I've seen a lot of systematic character swaps on the serial port,
especially in the vincinity of 0-bytes. As the XON/XOFF registers
are the only thing in the UART that look like they would consider
the actual data sent, I've added this initialisation to uart.c
This makes the problem go away completely on my C123.
To check for it I've added CRCs to the HDLC protocol and checked
for bad frames, and also compared them in a (patched) osmocon
that just sends random garbate in a special DLCI. The bad
frames I observed always looked like this (number in
parenthesis define number of omitted bytes, for brevity):
<------ good bytes ----------> <-recvd|sent-> <----- identical again
------>
d0 e0 00 00..(107)..f7 ce 17 c4 < 0c 00|00 0c > db 70 ba cb..(67)..d8 6d 3a 1f
31 e1 00 00..(47)..38 ca 2f e5 < 0c 00|00 0c > f8 a3 77 5f..(127)..5b 72 ff 4a
<-- good -> <--- bad -----> <---- good again ------------->
dc e1 00 00 < 0c 00|00 0c > 87 cb 24 83..(178)..2f 69 b3 51
ae e2 00 00..(167)..bd 18 6f a1 < 0c 00|00 0c > 2f 53 d2 b2..(7)..da c7 1b 63
dc e3 00 00..(131)..8e 2c b0 a8 < 0c 00|00 0c > 40 62 56 5f..(43)..f0 3a 47 f7
Formerly I was observing about 10 packets for every 2000 sent (with 192
bytes of payload each). Now, with the added initialisation, I see
(as the time of writing this email) 12000 packets with 192 bytes each
sent, with 0 bytes missing, corrupted, flipped).
Holger Hans Peter Freyther [Sun, 11 Apr 2010 15:33:19 +0000 (17:33 +0200)]
select.c: Make the ugly hacker uglier...
Right now I'm seeing crashes when removing a link and deleting
it and I need this hack to make it not crash. We will have to
understand if llist_for_each_entry_safe has a bug or if we are
doing something bad with the list (anchors not properly initialized).
Steve Markgraf [Sat, 10 Apr 2010 00:09:33 +0000 (02:09 +0200)]
fix disabling of the calypso bootrom on targets with nIBOOT tied to low:
* bit 8 always needs to be 1 when overriding the setting of the nIBOOT pin, so now we set both bits (9 and 8) to 1, and clear bit 9 if we want to enable the romloader
* to be sure, this was tested on a target with nIBOOT high (C155) and a Alcatel VLE5 pulled to low, and works fine
Signed-off-by: Steve Markgraf <steve@steve-m.de>
Harald Welte [Fri, 9 Apr 2010 19:32:56 +0000 (21:32 +0200)]
layer1: move FB and SB detection into prim_fbsb.c
Harald Welte [Fri, 9 Apr 2010 19:25:13 +0000 (21:25 +0200)]
layer1: move normal burst receive code to prim_rx_nb.c
Harald Welte [Fri, 9 Apr 2010 18:02:16 +0000 (20:02 +0200)]
layer1: move transmit normal burst routines to prim_tx_nb.c
Harald Welte [Fri, 9 Apr 2010 17:56:12 +0000 (19:56 +0200)]
layer1: reorganize code, introduce prim_{pm,rach}.c
The new plan for layer1 is to structure the source code not based on
whether it is part of l1s/l1a or other parts, but based on 'primitives'.
All code that relates to transmitting a RACH burst should be in one
file, same for all code related to power management. Those files are
called layer1/prim_*.c
Harald Welte [Fri, 9 Apr 2010 08:51:38 +0000 (10:51 +0200)]
layer1: fix off-by-one error when transmitting bursts in the uplink
Prior to this fix, only 3 out of 4 bursts of every mac block were
received by the BTS at all.
Thanks to Dieter Spaar for spending so much time to debug this issue!
Harald Welte [Fri, 9 Apr 2010 06:09:46 +0000 (08:09 +0200)]
layer23: fix building against user-defined LIBOSMOCORE
Harald Welte [Fri, 9 Apr 2010 05:58:44 +0000 (07:58 +0200)]
Harald Welte [Fri, 9 Apr 2010 05:57:40 +0000 (07:57 +0200)]
remove references to u_int*_t and use uint*_t instead
Harald Welte [Fri, 9 Apr 2010 05:54:34 +0000 (07:54 +0200)]
Harald Welte [Fri, 9 Apr 2010 05:53:23 +0000 (07:53 +0200)]
libosmocore: don't make local changes in this repository
All changes to libosmocore need to be committed to
git://git.osmocom.org/libosmocore.git first, and then imported by means
of git-subtree.
Andreas Eversberg [Fri, 9 Apr 2010 05:52:12 +0000 (07:52 +0200)]
gsm48: introduce MM_CONNECTION_PEND state
Harald Welte [Fri, 9 Apr 2010 05:50:18 +0000 (07:50 +0200)]
gsm48-ie.c: Fix year in copyright message
Holger Hans Peter Freyther [Thu, 8 Apr 2010 08:58:20 +0000 (10:58 +0200)]
write_queue: Add callback for exceptions as well.
Harald Welte [Thu, 8 Apr 2010 08:40:14 +0000 (10:40 +0200)]
firmware: whitespace fixes in calypso_uart.S
Ingo Albrecht [Wed, 24 Mar 2010 02:30:23 +0000 (03:30 +0100)]
firmware: proper namespace in manifest.
Ingo Albrecht [Wed, 24 Mar 2010 02:30:00 +0000 (03:30 +0100)]
firmware: simplified makefile a little, fixing a dependency bug on the way.
Ingo Albrecht [Wed, 24 Mar 2010 02:11:32 +0000 (03:11 +0100)]
firmware: Allow for selective board and environment builds.
Ingo Albrecht [Sat, 13 Mar 2010 22:01:23 +0000 (23:01 +0100)]
firmware: section symbols.
Ingo Albrecht [Sat, 13 Mar 2010 20:14:31 +0000 (21:14 +0100)]
firmware: correct linker scripts, more commonplace section naming, reorganized start code.
Ingo Albrecht [Thu, 11 Mar 2010 22:09:29 +0000 (23:09 +0100)]
firmware: linker script indentation and comments.
Ingo Albrecht [Tue, 9 Mar 2010 05:46:16 +0000 (06:46 +0100)]
firmware: make dependencies for linker scripts
Ingo Albrecht [Mon, 8 Mar 2010 22:28:45 +0000 (23:28 +0100)]
firmware: removed old board.c
Ingo Albrecht [Sun, 7 Mar 2010 18:02:07 +0000 (19:02 +0100)]
firmware: Fixed osmoload linker script so it works in some situations.
Ingo Albrecht [Sun, 7 Mar 2010 18:01:06 +0000 (19:01 +0100)]
firmware: Fixed ramload linker script to include additional rodata sections.
Ingo Albrecht [Sun, 7 Mar 2010 17:59:53 +0000 (18:59 +0100)]
firmware: Introduced a build manifest.
Ingo Albrecht [Sun, 7 Mar 2010 17:03:09 +0000 (18:03 +0100)]
firmware: Support for building for multiple target environments.
Andreas Eversberg [Wed, 7 Apr 2010 06:02:00 +0000 (08:02 +0200)]
Added queue to messages from RSL to RR.
Harald Welte [Wed, 7 Apr 2010 06:49:51 +0000 (08:49 +0200)]
layer1: bsic should be uint8_t, not uint32_t
Steve Markgraf [Tue, 6 Apr 2010 22:01:26 +0000 (00:01 +0200)]
osmocon: fix c140xor, fix compiler warnings due to unhandled cases, cleanup
Signed-off-by: Steve Markgraf <steve@steve-m.de>
Harald Welte [Wed, 7 Apr 2010 02:43:01 +0000 (10:43 +0800)]
layer1: add 'struct mon_state' argument to read_{fb,sb}_result()
rather than operating on a global variable.
Harald Welte [Wed, 7 Apr 2010 02:28:03 +0000 (10:28 +0800)]
layer1: coding style cleanup
I didn't touch the TX side, as it is still very fragile...
Harald Welte [Wed, 7 Apr 2010 02:16:54 +0000 (10:16 +0800)]
layer1: reset l1s.sb.count to 0 in l1s_rest()
When we reset layer1, the SB counter should be set to 0 again to
correctly perform multiple SB l1 tasks without rebooting.
Harald Welte [Wed, 7 Apr 2010 02:16:06 +0000 (10:16 +0800)]
layer1: remove sb_cnt and sb_once static global variables
and instead move them into the l1s data structure
Harald Welte [Wed, 7 Apr 2010 02:11:04 +0000 (10:11 +0800)]
layer1: remove static global variable last_task_fnr
Harald Welte [Wed, 7 Apr 2010 02:07:58 +0000 (10:07 +0800)]
layer1: cosmetic cleanup
Harald Welte [Wed, 7 Apr 2010 02:04:28 +0000 (10:04 +0800)]
layer1: replace fb_once with l1s.fb.mode
It's time to get rid of some of the old global static variables.
Andreas Eversberg [Tue, 6 Apr 2010 14:25:38 +0000 (16:25 +0200)]
Minor correction of issues.txt. I wrote the opposite of what I wanted to say...
Harald Welte [Tue, 6 Apr 2010 09:39:36 +0000 (17:39 +0800)]
layer1: add l1s_cell_info (sync info) for neighbor cells
We don't actually use this information array yet... but hopefully
we'll start filling it soon.
Harald Welte [Tue, 6 Apr 2010 09:37:08 +0000 (17:37 +0800)]
layer1: more comments about l1s data structure fields
also, change fn_offset from unsigned to signed.
Harald Welte [Tue, 6 Apr 2010 02:58:24 +0000 (10:58 +0800)]
osmocon: use git-version-gen and PACKAGE_VERSION for 'osmocon -v'
Harald Welte [Tue, 6 Apr 2010 02:38:56 +0000 (10:38 +0800)]
osmocon: cosmetic cleanup (mostly 80character line length)
Steve Markgraf [Mon, 5 Apr 2010 21:14:15 +0000 (23:14 +0200)]
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>
Harald Welte [Tue, 6 Apr 2010 02:00:16 +0000 (10:00 +0800)]
layer1: properly reset fb_once and sb_once when syncing to new cell
Harald Welte [Tue, 6 Apr 2010 01:52:23 +0000 (09:52 +0800)]
layer1: deactivate all mframe tasks at L1CTL_DM_EST_REQ time
When we process a L1CTL_DM_EST_REQ (try FCCH/SCH recognition),
we need to deactivate all scheduled multiframe tasks.
Harald Welte [Mon, 5 Apr 2010 14:39:13 +0000 (22:39 +0800)]
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.
Harald Welte [Mon, 5 Apr 2010 14:21:36 +0000 (22:21 +0800)]
layer23: signal the L1CTL DONE flag at the end of a power measurement
Harald Welte [Mon, 5 Apr 2010 14:19:49 +0000 (22:19 +0800)]
l1ctl protocol: Introduce multi-part message DONE flag
In case a single request from L2 triggers multiple response messages
from L1, we need a way to signal via L1CTL if the response is the
final or some intermediate response.
Harald Welte [Mon, 5 Apr 2010 13:28:59 +0000 (21:28 +0800)]
layer23: Introduce signals to indicate PM RES and L1 RESET to app
Harald Welte [Mon, 5 Apr 2010 11:26:09 +0000 (19:26 +0800)]
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
Andreas Eversberg [Mon, 5 Apr 2010 13:26:34 +0000 (15:26 +0200)]
Work on Radio Ressource: RSL-SAP interface on L3 side.
Andreas Eversberg [Mon, 5 Apr 2010 10:38:39 +0000 (12:38 +0200)]
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.
Andreas Eversberg [Sun, 4 Apr 2010 20:26:58 +0000 (22:26 +0200)]
Mobility Management: Corrected some issues about RR abort timer (T3240).
Andreas Eversberg [Sun, 4 Apr 2010 17:42:43 +0000 (19:42 +0200)]
Work on layer 3: finished Call Control layer
Andreas Eversberg [Sun, 4 Apr 2010 13:34:53 +0000 (15:34 +0200)]
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.
Andreas Eversberg [Sun, 4 Apr 2010 12:15:23 +0000 (14:15 +0200)]
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 ;-)
Andreas Eversberg [Sun, 4 Apr 2010 09:44:18 +0000 (11:44 +0200)]
Work on layer 3, finished Mobility Management part.
Andreas Eversberg [Sat, 3 Apr 2010 08:48:50 +0000 (10:48 +0200)]
Work on layer 3 process, finished Location updating procedure (including IMSI attach).
Andreas Eversberg [Fri, 2 Apr 2010 06:28:08 +0000 (08:28 +0200)]
Work on message handling of layer 3.
Andreas Eversberg [Thu, 1 Apr 2010 17:53:32 +0000 (19:53 +0200)]
Work on message handling of layer 3.
Andreas Eversberg [Wed, 31 Mar 2010 18:47:41 +0000 (20:47 +0200)]
Added README for informing about the current development process.
Andreas Eversberg [Wed, 31 Mar 2010 18:42:38 +0000 (20:42 +0200)]
Work on Mobility Management: MM information procedure
Andreas Eversberg [Wed, 31 Mar 2010 18:34:16 +0000 (20:34 +0200)]
Work on Mobility Management: Abort process
Andreas Eversberg [Tue, 30 Mar 2010 16:57:58 +0000 (18:57 +0200)]
Work on Mobility Management: IMSI detach process
Harald Welte [Tue, 30 Mar 2010 02:05:41 +0000 (10:05 +0800)]
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.
Harald Welte [Tue, 30 Mar 2010 01:50:32 +0000 (09:50 +0800)]
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.
Harald Welte [Sun, 28 Mar 2010 05:03:25 +0000 (13:03 +0800)]
gsm48-andreas: fix typo utnt -> uint