Harald Welte
9f5c9e4a2a
apps/hello_world: cosmetic fix
2010-03-27 12:24:16 +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
66188c0bf0
Merge commit 'a3b844cf45dc4d6a6a3686e8ce6e2447643b878e'
2010-03-27 00:05:41 +08:00
Harald Welte
a3b844cf45
logging: only compile stderr target if we actualy have stderr
2010-03-27 00:04:40 +08:00
Harald Welte
42b794668e
Merge commit '01fd5cb3f0da802ca82d3b6aef46d2a3d8e6c15c'
2010-03-26 23:53:12 +08:00
Harald Welte
01fd5cb3f0
only include strings.h if it is actually preent
2010-03-26 23:51:31 +08:00
Harald Welte
c35e661758
Merge commit 'cc6313cc697f4c90cf0fc1c5b01cb1871a075f26'
2010-03-26 23:41:34 +08:00
Harald Welte
cc6313cc69
logging: fix default initialization of per-category loglevels
...
Before this patch, there was a bug in the code caused by a memcpy
from one data structure to another. unfortuantely the data structures
were not the same, so we have to explicitly iterate over the array
and assign the structure members manually.
2010-03-26 22:04:03 +08:00
Harald Welte
3ae2758fba
rename 'debug' interface to 'logging' interface
...
It's not really about debugging, but about generic logging...
2010-03-26 21:26:01 +08:00
Harald Welte
faadfe2b93
debug: remove unneeded 'number' member of 'struct debug_info_cat'
...
As the debug subsystem number is used as index into the debug_info_cat
array, there is no need to store the number explicitly inside the
structure again.
2010-03-26 21:26:01 +08:00
Harald Welte
d788f6688c
debug.c: fix no-color-printing in case .color = NULL
2010-03-26 21:26:01 +08:00
Harald Welte
4a2bb9e38b
Import 'debug' support from OpenBSC into libosmocore
2010-03-26 21:26:01 +08:00
Holger Hans Peter Freyther
99a263ff20
write_queue: Add a method to clear the queue.
2010-03-26 09:22:38 +01: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
692df15c81
Merge commit '52b4abdcb351830f5493a50c4181ef3947f3feab'
...
Conflicts:
src/shared/libosmocore/src/utils.c
2010-03-25 12:18:14 +08:00
Harald Welte
52b4abdcb3
replace rsl_rlm_cause_strs with rsl_rlm_cause_name()
2010-03-25 12:11:38 +08:00
Harald Welte
9eb6d88d64
replace gsm48_cc_msg_names[] with gsm48_cc_msg_name()
...
and implement the backend using value_string
2010-03-25 12:00:54 +08:00
Harald Welte
e9e190a8d8
use more value_string in gsm48 and rsl
2010-03-25 11:46:46 +08:00
Harald Welte
b59f9350f8
get_value_string(): return "unknown 0x..." instead of "unknown"
2010-03-25 11:46:46 +08:00
Harald Welte
3533cd39b1
Merge commit 'cbc8062ef8ba10690aa64b433d0efdccb46f496a'
2010-03-22 08:30:11 +08:00
Harald Welte
cbc8062ef8
fix compiler warnings (itsme <itsme@xs4all.nl>)
...
* added several 'const' for strings.
* added 'extern' to declarations of rsl_rlm_cause_strs
2010-03-22 08:28:44 +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
fbacd40930
calypsu UART: add additional debug output in UART RX error case
2010-03-21 23:46:35 +08:00
Harald Welte
5dee3dc42a
hello_world app: print L1CTL messages as hexdump to console
2010-03-21 23:45:27 +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
Harald Welte
7c8ed1a230
Merge remote branch 'origin/master'
2010-03-19 18:45:42 +08:00
Erik Ekman
fa59bb481e
Two more small patches
...
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>
2010-03-19 02:40:19 +01:00
Harald Welte
75b6fe2d84
remove 'l1s.task' value for local DSP task checking
...
As the check no longer works with our higher-levle schedulers,
we can remove this field from the l1s structure and all references
to it.
2010-03-17 19:21:46 +08:00
Andreas Eversberg
7f60fda60d
Work on Radio Ressource
2010-03-16 20:18:45 +01:00
Andreas Eversberg
e5a58a58eb
Work on Radio Ressource
...
- SI 5, 5bis, 5ter
2010-03-15 20:15:40 +01:00
Andreas Eversberg
79ed5824fb
Work on Radio Ressource.
...
- Decode of Mobile Allocation for frequency hopping list
2010-03-15 18:57:52 +01:00
Andreas Eversberg
c28cc5c07e
Classmark 3 encoding (Radio Ressource) now uses bit-vector API.
2010-03-14 20:51:55 +01:00
Andreas Eversberg
7fc17a2d6b
Work on Radio Ressource layer.
2010-03-14 19:23:45 +01:00
Andreas Eversberg
8efd08ef76
Merge branch 'master' of gitosis@git.osmocom.org:osmocom-bb
2010-03-14 18:10:46 +01:00
Andreas Eversberg
cb46d4a071
Work on Radio Ressource layer.
...
- SI 1-4 parsing
- decoding of all frequency list types
2010-03-14 18:08:16 +01:00
Ingo Albrecht
d960c73a94
firmware: fixed bootrom disabling
2010-03-15 00:15:22 +08:00
Ingo Albrecht
83109b58f5
firmware: watchdog-based system reset
2010-03-15 00:15:04 +08:00
Holger Hans Peter Freyther
f63cba07f3
Makefile.inc: Use the right $(AR) command for the target
...
Reported on the mailinglist, proposed by Sylvain Munaut.
2010-03-14 16:01:07 +01:00
Andreas Eversberg
ed9b34047c
Merge branch 'master' of gitosis@git.osmocom.org:osmocom-bb
2010-03-13 15:42:56 +01:00
Andreas Eversberg
c1267dc6d0
Work on Radio Ressource layer.
...
Added MS support structure for classmark messages.
2010-03-13 15:40:35 +01:00
Harald Welte
066222d441
Introduce LCD display_driver infrastructure
...
* introduce display_driver layer
* port st7558 and ssd1783 drivers to display_driver
* allow for run-time selection of display driver from board/init.c
* replace st7558_puts() calls with display_puts() calls
2010-03-12 12:18:17 +08:00
Steve Markgraf
a13a4fda92
uwire: add a chip-select for CS0, needed by the J100i display
...
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2010-03-12 10:54:56 +08:00
Harald Welte
5c89c35730
remove bogus source files in top level src directory
2010-03-12 07:18:23 +08:00
Harald Welte
d18e094098
apps/loader: remove #include reference to file that doesn't exist
2010-03-12 04:15:07 +08:00
Harald Welte
07446ab098
layer23: fill in signal level and dBm fields of gsmtap
2010-03-09 23:05:58 +01:00
Andreas Eversberg
98bfa2737e
some work on radio ressource
2010-03-09 19:31:30 +01:00
root
dc7d6268f5
Work on radio ressource: basics of channel assignment procedure
2010-03-08 20:27:31 +01:00
Holger Hans Peter Freyther
a49951fed7
write_queue: Make the bfd cb public so it can be used in a different context
...
* I'm doing a nonblocking connect and for this I need to select
on writable and the first thing I need to do is to check the
SOL_SOCKET SO_ERROR state. I realize this by setting a different
cb on the embedded bfd during setup and then go back to the real
implementation.
2010-03-08 14:32:39 +01:00
Holger Hans Peter Freyther
5da778184d
layer23: Use the write_queue instead of directly writing data to the socket
2010-03-08 12:23:09 +01:00
Holger Hans Peter Freyther
1461eb0e54
layer23: Remove inacucrate comment as this was addresses in osmocom
2010-03-08 12:23:09 +01:00
Harald Welte
62f900565c
disable TX by default again
2010-03-08 11:50:37 +01:00
Harald Welte
a28fea372f
readme update
2010-03-08 10:18:57 +01:00
Harald Welte
7218de8c0b
use gsm48_ie code which is now in libosmocore
2010-03-08 09:38:59 +01:00
Holger Hans Peter Freyther
9b2c0a5f1b
Make it compile on my toolchain...
...
Include stdlib.h to introduce NULL to the compiler.
2010-03-08 05:02:38 +01:00
Holger Hans Peter Freyther
2d1d0ce141
Fix some compiler warnings...
...
Some real issues are still left and we need to act on them.
2010-03-08 05:02:27 +01:00
Holger Hans Peter Freyther
500b6f4f28
stdint.h: Make it work with my GCC 4.3.3/GLIBC 2.9 toolchain
...
The compiler complains about seing two conflicting definitions
for int32_t and the compile will stop. One definitions comes from
here and the other is coming from sys/types.h.
One option would be to try to use unsigned int and signed int
instead of using a long and see if that is matching, the other
option is to include the real libc stdint.h header and see if
it has defined a uint32_t for us.
2010-03-08 04:36:36 +01:00
Harald Welte
1e9086684f
import GSM04.08 encode/decode functions and mncc.h from openbsc
2010-03-07 23:39:54 +01:00
Harald Welte
3b05942b63
import alpha3 code from andreas eversberg as of 2010-03-07
2010-03-07 22:48:52 +01:00
Harald Welte
de3b70dcce
fix framenumber byte-ordering
2010-03-07 21:17:24 +01:00
Harald Welte
bca27b2c31
add missing inet.h
2010-03-07 21:04:36 +01:00
Harald Welte
97c8b6f33b
start to use libosmocore within the firmware
...
* 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
2010-03-07 20:56:12 +01:00
Harald Welte
5f3ead2015
Merge commit 'f8b2ba7dc850396c5910e8c76875e75d37479d34'
2010-03-07 20:34:24 +01:00
Harald Welte
ef956d2ac4
Merge commit 'cbb29f7c94ad2a7cb0ebe7d43cbef5fb9d11d62e'
2010-03-07 20:24:53 +01:00
Harald Welte
cbb29f7c94
add --disable-talloc option to build without talloc support
2010-03-07 20:24:30 +01:00
Harald Welte
80f20962d3
remove __force macro references
2010-03-07 19:17:08 +01:00
Harald Welte
1e450d7a2d
Merge remote branch 'origin/master'
2010-03-07 19:05:54 +01:00
Harald Welte
ff6ffe5677
import byte-ordering defines/macros from linux
2010-03-07 19:05:13 +01:00
Harald Welte
8b8a7c25fb
Merge commit 'd3ff15fc818887be3720265b297ca7f1ec28c458'
2010-03-07 18:26:40 +01:00
Harald Welte
d3ff15fc81
use strtol instead of atoi
2010-03-07 18:23:47 +01:00
Harald Welte
e8451da581
Merge commit '622b718195d607d7cfc8b9ec96f943ea0ce2d1dd'
2010-03-07 17:51:35 +01:00
Harald Welte
622b718195
import some gsm band/arfcn/time related utilities from OsmocomBB
2010-03-07 17:50:21 +01:00
Ingo Albrecht
3e9d0ba838
firmware: changed dependency suffix to .p for better shell completion
2010-03-07 17:03:10 +01:00
Ingo Albrecht
5b12b25d5a
firmware: include board.h in board.c
2010-03-07 17:03:10 +01:00
Harald Welte
9f69841c19
layer1: allocate large enough msgb's for the payload we send over L1CTL
2010-03-07 16:57:09 +01:00
Harald Welte
da4d3f143c
add comment on why using cons_puts() from msgb.h
2010-03-07 16:36:30 +01:00
Harald Welte
f5cd361f8e
actually link against libosmocore for the target
2010-03-07 16:20:53 +01:00
Harald Welte
98cc91c44a
build libosmocore for the target with "-Os -ffunction-sections"
2010-03-07 16:19:12 +01:00
Ingo Albrecht
0949741245
firmware: Added an e99 board and fixed e99 init code build.
2010-03-07 15:07:17 +01:00
Ingo Albrecht
11d9b613b4
firmware: multi-board build support
2010-03-07 15:04:03 +01:00
Harald Welte
a4bb938b39
fix even more compiler warnings
2010-03-07 13:44:52 +01:00
Harald Welte
a24d658e26
fix compiler warnings
2010-03-07 13:37:52 +01:00
Harald Welte
014cc3e785
fix compiler warnings
2010-03-07 13:35:18 +01:00
Harald Welte
753885defa
remove unused variables
2010-03-07 13:33:56 +01:00
Harald Welte
ed1b30b2e8
fix stdint.h to remove bogus warnings of printf format strings
2010-03-07 13:32:43 +01:00
Harald Welte
2f1dc0c256
fix misc.h header file logic
2010-03-07 13:32:26 +01:00
Harald Welte
1704fc0132
add FIXME's to RFFE
2010-03-07 13:27:33 +01:00
Harald Welte
279cc2e3d8
fix compiler warnings
2010-03-07 13:27:25 +01:00
Harald Welte
d03f0a4ca5
linuxlist.h: use __unused
2010-03-07 13:22:05 +01:00
Harald Welte
6037588fec
layer1/sync: denote unused function arguments with __unused
2010-03-07 13:21:03 +01:00
Harald Welte
9a6f93ef52
add __unused #define to indicate unused function arguments
2010-03-07 13:20:36 +01:00
Harald Welte
fab52c296c
Added Solomon SSD1783 display driver for Motorola C155
...
Signed-off-by: Steve Markgraf <steve@steve-m.de>
Conflicts:
src/target/firmware/Makefile
2010-03-07 12:16:25 +01:00
Ingo Albrecht
1bef8f33da
Handle EAGAIN. Print errors properly.
2010-03-07 12:04:21 +01:00
Ingo Albrecht
a731ef5298
Fixed transmit path of osmocon in various ways.
2010-03-07 12:04:16 +01:00
Ingo Albrecht
7af3c99091
Loader communications support in osmocon. Generalized tool connections.
2010-03-07 12:04:05 +01:00
Ingo Albrecht
6573353f5e
Skeleton of bootloader.
2010-03-07 12:03:55 +01:00
Ingo Albrecht
ae4c1c8d45
Renamed layer2_connection -> tool_connection.
2010-03-07 12:03:38 +01:00
Ingo Albrecht
9a8ef37a06
Clean listings.
2010-03-07 12:03:02 +01:00
Ingo Albrecht
7082f7862a
Add a GIT_REVISION define for firmware code.
2010-03-07 11:47:11 +01:00
Ingo Albrecht
9de3167d8b
Normalize some var names.
2010-03-07 11:47:11 +01:00
Ingo Albrecht
308d67c343
Made dependency compiles silent.
2010-03-07 11:47:11 +01:00
Ingo Albrecht
a8c2ed42ee
Fixed firmware buildsys dependencies.
2010-03-07 11:47:10 +01:00
Ingo Albrecht
2ff5ca0458
Made cross-compile prefixes work normally.
2010-03-07 11:47:10 +01:00
Ingo Albrecht
907d7c135c
Dummy distclean for new firmware buildsys.
2010-03-07 11:47:10 +01:00
Ingo Albrecht
d737843440
Buffer formatting and scanning functions.
2010-03-07 11:47:10 +01:00
Ingo Albrecht
2fc7d9d001
Allow use of uart driver without interrupts.
2010-03-07 11:47:10 +01:00
Ingo Albrecht
842dbc31d1
Allow use of keypad driver without interrupts.
2010-03-07 11:47:09 +01:00
Ingo Albrecht
0a8d443e82
Some msgb formatting functions.
2010-03-07 11:47:09 +01:00
Ingo Albrecht
41abd7e500
New build system.
2010-03-07 11:47:09 +01:00
Harald Welte
60bbc89c30
Merge remote branch 'origin/master'
2010-03-07 11:43:07 +01:00
Ingo Albrecht
fb91307cc0
Some attribute macros, including placeholders for fast-memory attributes.
2010-03-07 10:18:15 +01:00
Harald Welte
8dba2a85c8
osmocon: drain the hdlc sercomm queue through select
2010-03-07 02:59:55 +01:00
Harald Welte
f216bb3024
add 'struct timer_list' timer code similar to linux + OpenBSC
...
We now support arbitrary timers by means of 'struct timer_list'.
Any part of the program can register such a callback by means
of schedule_timer() on a millisecond-granularity. However, there
is no guarantee on the timer precision. It will not execute before
the timer expires - but it might expire quite a bit later than we
have asked it for, depending on how busy the cpu is with other work.
The timer code is in the 'comm/' directory, as it is intended to be
migrated into libosmocore soon.
Furthermore, as we currently don't yet have a scheduler or tasks,
the main() routine explicitly has to call update_timers() to check
for any expired timers and run them.
2010-03-07 01:29:47 +01:00
Harald Welte
ba82248d33
osmocon: we don't want to write to serial FD after download completed
2010-03-07 01:17:11 +01:00
Harald Welte
0de8d3fca6
sercomm: prevent DLCI array overflow
2010-03-07 01:07:48 +01:00
Harald Welte
177ce424a6
don't include trailing \0 termination in cons_puts()
...
successive calls to cons_puts() writing to the same msgb resulted in
osmcoom printing null-characters while writing strings. We don't
really need that...
2010-03-07 00:54:23 +01:00
Harald Welte
c5bdf653b5
remove cons_memcpy(), as memcpy() is now fixed
2010-03-07 00:51:44 +01:00
Harald Welte
a5927b6503
pass the correct cross compiler path name from master Makefile to firmware
2010-03-07 00:49:30 +01:00
Harald Welte
24900ae5aa
fix assembler memcpy() for little endian
...
This makes our memcpy finally work in all cases, even unaligned
2010-03-06 14:54:10 +01:00
Harald Welte
63d3e396e7
introduce RxLev statistics module, an efficient way for power scan data
2010-03-06 11:34:27 +01:00
Harald Welte
d9abf01436
mark some occasions of bitvec as 'const' as appropriate
2010-03-06 11:28:49 +01:00
Harald Welte
c4d75b5804
add new ARFCN flag to indicate that we're dealing with uplink
2010-03-05 11:15:06 +01:00
Harald Welte
6d1b6f7f10
layer23: correct byte ordering of IP address
2010-03-05 11:14:33 +01:00
Holger Hans Peter Freyther
1ed231ba2b
layer1/init.c: Pass 0 as arcfn to fix the compilation.
2010-03-04 22:43:38 +01:00
Harald Welte
d3f6b678c3
update wireshakr gsmtap patch with the 2nd version submitted to wireshark
...
We now
* properly decode the L1 header of SACCH frames
* properly hand-off SACCH payload such as SI5/SI6
* display the summary of the GSMTAP and SACCH_L1 dissectors in the protocol tree
2010-03-04 21:44:41 +01:00
Harald Welte
86dced0b2d
ensure RF_ARFCN is part of l1ctl messages sent to host
2010-03-04 20:03:00 +01:00
Harald Welte
3b51bde8e8
update wireshark GSMTAP patch for GSMTAP protocol version 0x02
2010-03-04 15:44:17 +01:00
Harald Welte
582aec803c
layer23: GSMTAP update (gsmtap for uplink, DCCH and ACCH)
...
* 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)
2010-03-04 15:43:45 +01:00
Harald Welte
5a1d72cfc6
layer23: rsl_dec_chan_nr is now in libosmocore
2010-03-04 15:07:10 +01:00
Harald Welte
748cfb56d8
Merge commit '8c8caaa1acaf4d863a219332f6a07cd70b6b5981'
2010-03-04 15:03:13 +01:00
Harald Welte
dec5ab7c7b
Merge commit '6fec514d7bcf8e6fe469d31ccc13d5cd473058a4'
2010-03-04 14:58:44 +01:00
Harald Welte
6fec514d7b
fix CCCH parsing
2010-03-04 14:30:15 +01:00
Harald Welte
ecf9dd0d96
add new rsl_dec_chan_nr() function
2010-03-04 14:27:48 +01:00
Harald Welte
a5cdce1503
update to reflect libosmocore api change
2010-03-04 12:00:29 +01:00
Harald Welte
2507c4b142
Merge commit '61e2bfc5f44267a7a3b0b25ff3ab922fca2a199c'
2010-03-04 11:59:12 +01:00
Harald Welte
61e2bfc5f4
import gsm48 utility functions from OpenBSC
...
* gsm48_generate_lai() gsm48_generate_mid_from_tmsi() gsm48_generate_mid_from_imsi()
* gsm48_cc_msg_names[]
2010-03-04 10:53:03 +01:00
Harald Welte
a73e2f9acb
import bcd2char() and char2bcd() from OpenBSC
2010-03-04 10:50:32 +01:00
Harald Welte
aebe08c71f
import gsm_band_name() and gsm_band_parse() from OpenBSC
2010-03-04 10:39:17 +01:00
Harald Welte
eb8bf3915c
add 'transparent' argument to rsl_rll_push_l3() and rsl_rll_push_l3()
...
this is required to make those functions useful for OpenBSC, nut just
OsmocomBB
2010-03-04 10:32:09 +01:00
Harald Welte
098cd4b503
fix rsl_enc_chan_nr() for SDCCH4
2010-03-04 10:12:50 +01:00
Harald Welte
219c9d5a6e
fix master Makefile with layer23 rename
2010-03-03 14:41:16 +01:00
Harald Welte
b82aa8957c
layer23: add some FIXMEs to remind us about missing code
2010-03-03 14:37:31 +01:00
Harald Welte
2ea6a02bf5
add some notes about layer23 architecture
2010-03-03 14:37:21 +01:00
Harald Welte
d4e118a7a0
Rename 'layer2' program to 'layer23' program
2010-03-03 14:25:21 +01:00
Harald Welte
9c64d2869f
layer2: Rename layer2.[ch] to l1ctl.[ch] as they only remote-control L1
2010-03-03 14:22:04 +01:00
Harald Welte
3a4148d7b8
layer2: move dump_bcch() into layer3.c where it belongs
2010-03-03 14:11:46 +01:00
Harald Welte
e10d64a794
layer2/lapdm: various fixes
...
* fix U frame parsing
* pad all frames with 0x2B before sending them off to L1
* make sure msg->l2h is set correctly on tx frames
2010-03-03 14:01:36 +01:00
Harald Welte
63138703b7
layer2: more sanity checks, ensure msg->l1h is set correctly
2010-03-03 14:00:50 +01:00
Harald Welte
994daac979
layer2_main: Don't use LOGP API yet, and print error if msgb->data != msgb->l1h
2010-03-03 13:58:29 +01:00
Harald Welte
4cfa7739a0
make sure msg->l3h is set correctly
2010-03-03 13:57:54 +01:00
Harald Welte
8576565bb7
make sure LAPDM datalink starts in state IDLE not NULL
2010-03-03 13:57:13 +01:00
Harald Welte
ba18970f83
Layer1: various fixes + debugging aid
...
* print HDLC packets received from L2
* print Tx MAC block as it is written to DSP API RAM
* ensure we don't msgb_free() a message that we've enqueued for l1s
2010-03-03 13:55:51 +01:00
Harald Welte
8eb7bdcb91
declare l1s_dsp_abort() in header file
2010-03-03 11:26:28 +01:00
Harald Welte
2b7e61083c
fix Makefile dependencies to C files
2010-03-03 10:35:05 +01:00
Harald Welte
5757db4e65
sched_gsmtime uses const for 'struct tdma_sched_item *'
2010-03-03 10:28:47 +01:00
Harald Welte
177ffa3c5f
add missing layer3.c file
2010-03-02 23:37:12 +01:00
Harald Welte
4fb20757c6
import some GSM 04.08 utility code from OpenBSC
2010-03-02 23:17:33 +01:00
Harald Welte
911e0ff962
layer2: rename files to remove extra osmocom_ prefix
2010-03-02 23:05:49 +01:00
Harald Welte
3b32efb40a
layer2 program: Use new RSL utility routines, split code in more files
2010-03-02 23:02:16 +01:00
Harald Welte
8eedad77c7
Merge commit 'f08eabf2341de43993918246e89ce30c3651f378'
2010-03-02 22:00:21 +01:00
Harald Welte
f08eabf234
add two new RSL utility functions
2010-03-02 21:59:20 +01:00
Harald Welte
2004b13327
Layer1 CTL interface improvements: Don't hardcode SDCCH4/0
...
When receiving a L1CTL_DM_EST_REQ, compute the MF Task according
to the chan_nr of the EST REQ - rather than hardcoding SDCCH4/0
2010-03-02 21:45:04 +01:00
Harald Welte
6944437bf4
Introduce CONFIG_TX_ENABLE and disable Tx support by default
...
Tx support is considered experimental and potentially dangerous.
Thus, the default build of the firmware does not have Tx support
enabled.
If you want Tx support, compile with -DCONFIG_TX_ENABLE by uncommenting
the apropriate line in Makefile.inc
2010-03-02 20:42:39 +01:00
Harald Welte
d43fadf410
fix merge artefacts, make firmware build again
2010-03-02 20:25:02 +01:00
Harald Welte
cb29bdf0bd
Merge remote branch 'origin/uplink' into mater
2010-03-02 20:13:08 +01:00
Harald Welte
ccebef5909
Merge commit 'fdd0a700930bdd04bc8827ef88dc5039ecc5b6ce'
2010-03-02 20:00:41 +01:00
Harald Welte
092d57bef9
Inter-Layer intergration work
...
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.
2010-03-02 18:47:01 +01:00
Harald Welte
11c97f5eff
Major update: Start L2/L3 implementation on PC side
...
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
2010-03-01 23:54:32 +01:00
Harald Welte
43dd25c493
Include channel number and link identifier in L1 DL info
...
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
2010-03-01 23:48:45 +01:00
Harald Welte
2f60aee6d9
extend TDMA scheduler functions to use third parameter (p3)
...
The idea of the third parameter is that it can be specified on a
tdma_schedule_set() level. The multi-frame scheduler can thus use
it to pass some context information into the l1s_{cmd,resp}_*()
functions, such as the MF TASK and whether or not it is SDCCH or
SACCH.
2010-03-01 23:48:45 +01:00
Harald Welte
aa4225d2cb
add test mode mframe task: Send Normal Burst in every TDMA frame
2010-03-01 23:48:45 +01:00
Harald Welte
26810bd363
add missing async.h file (belongs to 0da792f2522eef475d0beb1690cd02c341415f82)
2010-03-01 23:48:45 +01:00
Harald Welte
f3685191f6
SERCOMM: make sure to disable IRQ/FIQ to avoid race conditions
2010-03-01 23:48:45 +01:00
Harald Welte
80409074d9
print error message if tailroom is insufficient during msgb_put()
2010-03-01 23:48:45 +01:00
Harald Welte
ec9de0be28
disable IRQ and FIQ when entering the ABORT handler
2010-03-01 23:48:45 +01:00
Harald Welte
146619933b
add an actual Layer1 asynchronous (L1A) API that can be called from higher layers
2010-03-01 23:48:45 +01:00
Harald Welte
3e7861e937
Add and use gsmtime scheduler to L1S
2010-03-01 23:48:44 +01:00
Harald Welte
ea718cc991
Add new one-shot gsmtime scheduler
...
Using sched_gsmtime, we can schedule a couple of one-shot items at
GSM frame numbers in the future. This is useful for e.g. scheduling
RACH bursts.
2010-03-01 23:48:44 +01:00
Harald Welte
023289de74
Layer1 Sync support for TX of Normal Burst and RACH burst
...
Using the new rach_sched_set_ul and nb_sched_set_ul TDMA scheduler
sets it is possible to transmit RACH bursts as well as sets of four
normal bursts, i.e. everything needed to get a SDCCH established
on a combined CCCH (with SDCCH/4).
Known Limitations:
* Uses constant transmit power (2 dBm)
* Only works on SDCCH/4 so far
* SACCH is received but cannot be transmitted yet
* TSC (traning sequence code) is hard-coded to '7'
2010-03-01 23:48:44 +01:00
Harald Welte
59b128a679
layer1/sync: Add msgb queues for transmit/uplink to l1s data structure
2010-03-01 23:48:44 +01:00
Harald Welte
330fe01d80
Uplink: Use TPU window driven model
...
This means we can even send and receive in the same TDMA frame,
provided we keep the usual 3 timeslot distance between DL and UL.
2010-03-01 23:48:44 +01:00
Harald Welte
5f446da36d
TRF6151: Add new trf6151_tx_window() function
...
This function takes care of starting a Tx (Uplink) window
2010-03-01 23:48:44 +01:00
Harald Welte
9b7afc615e
twl3025: fix typo
2010-03-01 23:48:44 +01:00
Harald Welte
cc02fa61b5
TWL3025: add default APC ramp
2010-03-01 23:48:44 +01:00
Harald Welte
81cd75e38c
move macros to where they belong
2010-03-01 23:48:44 +01:00
Harald Welte
d520c7e4cf
layer1/tpu_window.c support for Uplink/Tx
...
* introduce l1s_tx_win_ctrl() function
This only controls the ABB window, and not the TRF and RFFE window yet
2010-03-01 23:48:44 +01:00
Harald Welte
59265bcae1
Prepare DSP functions needed for Uplink (Tx)
...
* Tell DSP to properly initialize ABB(TWL3025) registers at first DSP interrupt
* Initialize the entire API RAM to zero on dsp_power_on()
* Tell DSP to initialize the APCRAM to all-zero to preven accidential Tx
* Set number of GUARD bits to 8
* Add function to configure TCH parameters: dsp_load_tch_param()
2010-03-01 23:48:43 +01:00
Harald Welte
dea01c5393
Compal RFFE suport for Upplink (PA enable)
2010-03-01 23:48:43 +01:00
Harald Welte
1327bbd6fd
TRF6151: add Uplink support
2010-03-01 23:48:43 +01:00
Harald Welte
32da71ef5c
TWL3025: Add uplink enable/disable function
2010-03-01 23:48:43 +01:00
Harald Welte
649793bf04
add msgb_l1() and msgb_l1len() inline functions
2010-03-01 23:44:23 +01:00
Harald Welte
5a1ef43618
Import value_string utilities and some RSL stuff from OpenBSC
2010-03-01 23:44:23 +01:00
Erik Ekman
61e34acf89
Fix three more warnings
2010-03-01 22:20:36 +01:00
Erik Ekman
a9d6fb6518
Fix some warnings in osmocon
2010-03-01 22:20:28 +01:00
Harald Welte
d284cd9f43
Import value_string utilities and some RSL stuff from OpenBSC
2010-03-01 21:58:31 +01:00
Holger Hans Peter Freyther
45f7a9aba2
[layer2] Remove symlink... it is now provided by libosmocore
2010-03-01 19:22:13 +01:00
Harald Welte
3108c7c408
add small script with command that can be used to update libosmocore
...
This uses git-subtree from http://github.com/apenwarr/git-subtree
2010-03-01 13:12:01 +01:00
Harald Welte
8c353991ed
Merge commit '00096acb8fbbf76b4fd8a223a2684df6c370d9f9'
2010-03-01 12:59:34 +01:00
Harald Welte
e03b8de3d4
ensure osmocom-bb builds with older gcc-3.x based toolchains
2010-02-28 20:01:47 +01:00
Harald Welte
60298c9141
ensure we always have 256bytes net data size, excluding 4 bytes headroom
2010-02-28 17:53:43 +01:00
Harald Welte
ca9f6eea61
Use new multiframe scheduler for scheduling of normal bursts
2010-02-28 10:15:35 +01:00
Harald Welte
b909a3b8a6
Add multiframe-level scheduler (mframe_sched.[ch])
...
This scheduler enables us to schedule repeating events that occur
every multiframe. It e.g. includes definitions for BCCH and CCCH
reading.
The mframe_sched is layered on top of the tdma_sched.
2010-02-28 10:12:14 +01:00
Harald Welte
89e05fd346
tdma_sched: Explicitly advance the bucket at end of l1_sync()
2010-02-28 10:06:19 +01:00
Harald Welte
c468741500
explicitly terminate the TDMA scheduler set with SCHED_END_SET()
...
This has the advantage that any caller or other reference does not
need to know the size of the set, which makes it simpler to use the
sched_set as a constant initializer in some other const/static data
structure.
2010-02-27 21:20:42 +01:00
Holger Hans Peter Freyther
8df932a7fd
[write_queue] Add a generic write queue class
...
The write queue can be a dropin replacement for the bsc_fd. It
is featuring two callbacks. One for ready read and one for ready
write. Whenever there is a message in the queue the write_queue
will set the BSC_FD_WRITE flag and then call the write callback.
It will make sure to delete the msgb after the write function
has been called. This class is intended to be be used in the
osmocom, layer2, bsc_msc_ip, bsc_hack and other applications.
2010-02-26 20:30:32 +01:00
Sylvain Munaut
17a5a28202
msgb.c: Style cleanup in initialization
...
Don't assign the same var twice & init all from the same source.
2010-02-24 22:57:46 +01:00
Sylvain Munaut
f6c0bba6dd
calypso: Add experimental driver for uWire
...
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-02-23 15:03:05 +01:00
Sylvain Munaut
6292304120
cfi_flash: Make the init message a debug output
...
Most likely console isn't even up so it doesn't print correctly
anyway.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-02-23 15:02:57 +01:00
Sylvain Munaut
eb5248fffe
calypso/dsp: Fix printf format string in dump
...
In commit 9a18ba40d940c9bf173504b941e10f9638032823 (old git), this
was changed to 'fix compiler warnings'.
But %ux is not a valid format specifier at all so that produces
wrong output !
%lx is the correct format AFAICT because uint32_t is typedef'd from
unsigned long in my toolchain (ARM GCC 4.3.3 - newlib 1.17.0). This
doesn't produce any warning here.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-02-23 15:02:49 +01:00
Sylvain Munaut
16aeb95d00
comm/msgb.c: Style cleanup in initialization
...
Don't assign the same var twice & init all from the same source.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-02-23 15:02:41 +01:00
Sylvain Munaut
2dba741e05
apps/compal_dsp_dump: Move board_init as first call
...
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-02-23 15:02:03 +01:00
Harald Welte
cd1c9d399c
add osmocon TPU debugger support
...
Receives TPU RAM from target and prints it to console
2010-02-23 01:44:59 +01:00
Harald Welte
1d271dea3f
Calypso TPU: Introduce TPU debug mode
...
Using #define TPU_DEBUG, we can now send the full TPU RAM contents
to the host PC (using a sercomm DLCI) at the time of tpu_enable()
which is very helpful for TPU debugging.
2010-02-23 01:44:46 +01:00
Harald Welte
3f3a84d516
Calypso TPU: initialize TPU RAM to zero at tpu_init() time
2010-02-23 01:44:37 +01:00
Harald Welte
c7224b79bd
Calyspo TPU: make add_mod5000() accept signed values
...
Sometimes we want to 'add' a negative value but still want the
result to be correct!
2010-02-23 01:44:28 +01:00
Harald Welte
6f14e4e969
Calypso TPU: fix address of TSP TX 3 register
2010-02-23 01:44:22 +01:00
Harald Welte
9fe66fdb0c
TRF6151: move PLL and AGC configuration to right sequence in time
2010-02-23 01:44:14 +01:00
Harald Welte
68817f6508
fix typo in comment
2010-02-23 01:44:09 +01:00
Harald Welte
bb263dcc70
TRF6151: close the Rx (Downlink) window after ABB is closed
...
There is no point in keeping the receiver running after we have
told the ABB to no longer receive anything.
2010-02-23 01:44:03 +01:00
Harald Welte
2dff711bc7
TWL3025: Ensure we don't perform downlink calibration too early
...
If we perform the downlink calibration too early, the TRF6151 might
not yet provide a stable signal and we'll not be able to receive
anything.
From the desired "BDLENA" time, we subtract all the delays and
latencies to determine the point in time at which the calibration
process should start.
2010-02-23 01:43:52 +01:00
Harald Welte
7b2f013566
use <gsm.h> instead of "gsm.h"
2010-02-23 01:43:31 +01:00
Harald Welte
c917fd4379
sercomm: busy-wait in case we cannot allocate a msgb right now
2010-02-21 18:36:22 +01:00
Harald Welte
30ed24b0a4
sercomm_cons: allocate 252 bytes net data size plus 4 bytes headroom
2010-02-21 18:33:56 +01:00
Harald Welte
8570a2ccd8
fix msgb_talroom() calculation
2010-02-21 18:33:14 +01:00
Harald Welte
e943638a92
sercomm_cons: Utilize msgb's better, don't always end at \n
...
In the sercomm_cons layer, ee used to enqueue a msgb for sending
every time there is an end-of-line. However, if we send a number
of very short lines, we easily run out of msgbs.
Now we check how much msgb backlog there is in the transmit queue,
and decide to skip the end-of-line flushing if needed.
This still doesn't solve all our problems, but its still a useful
mechanism.
2010-02-21 15:16:40 +01:00
Harald Welte
0c1881a417
update build instructions
2010-02-20 23:16:23 +01:00
Harald Welte
95de639664
remove bogus autotools-generated makefile
2010-02-20 23:16:05 +01:00
Harald Welte
e61df0c60e
add new master Makefile
...
using the Makefile in the 'src' directory, we nwo build everything
2010-02-20 23:13:25 +01:00
Harald Welte
50b5545d6e
convert osmocon to autotools
...
this needs to temporarily disable the version magic, as I don't
know how to integrate that into automake...
2010-02-20 23:12:29 +01:00
Harald Welte
41eddcb466
Merge commit '54844802115a1666496649cc43d3a01abd707bc0' into subtree-test1
2010-02-20 22:24:00 +01:00
Harald Welte
5484480211
fix select.c build (config.h)
2010-02-20 22:23:08 +01:00
Harald Welte
2afd5aa843
build of osmocon using libosmocore
2010-02-20 22:16:21 +01:00
Harald Welte
a036cc2b2a
add master 'build script' to build everything in one go
2010-02-20 22:16:04 +01:00
Harald Welte
fb29236bf4
Merge commit 'e94ad58e8e9515c4e5bddbb64f7333cacb26353e' into subtree-test1
2010-02-20 22:08:33 +01:00
Harald Welte
4eacd8cedb
Add 'src/shared/libosmocore/' from commit '3cae0398eaef6045de883849a236c38d1767cb41'
...
git-subtree-dir: src/shared/libosmocore
git-subtree-mainline: e54eb7c17c
git-subtree-split: 3cae0398ea
2010-02-20 21:09:43 +01:00
Harald Welte
3cae0398ea
add missing automake / autoconf files
2010-02-20 21:09:24 +01:00
Harald Welte
e54eb7c17c
start using libosmocore instead of local osmocom copy
2010-02-20 20:39:52 +01:00
Harald Welte
ec8b4501c7
intial checkin of the libosmocore project
2010-02-20 20:34:29 +01:00
Harald Welte
3e1ebe4190
migrate most osmocom code to new libosmocore
...
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
2010-02-20 18:58:12 +01:00
Harald Welte
055318a33d
fix typo in README (Timo Juhani Lindfors)
2010-02-20 17:33:24 +01:00
Harald Welte
89b1c361e3
Use ARFCN as specified from Layer2
...
with this commit, Layer2 can tell Layer1 to sync to a new CCCH on
a specified ARFCN.
2010-02-20 00:57:16 +01:00
Harald Welte
d5cbd0fe79
gsmtap patch cleanup
...
* remove commented-out code
* explain what GSMTAP is and reference projects that can generate it
* update copyright notice
I will submit this to wireshark mainline now.
2010-02-19 23:01:57 +01:00
Harald Welte
6aeab7beb2
add symlink for gsmtap header
2010-02-19 22:50:33 +01:00
Harald Welte
8428d7c531
add UDP PORT definition to gsmtap.h
2010-02-19 22:50:18 +01:00
Harald Welte
4625209bb9
finish GSMTAP output support (and enable it)
...
Layer2 now sends GSMTAP packets to a UDP port on localhost, where
wireshark can pick them up in realtime and display them.
2010-02-19 22:43:51 +01:00
Harald Welte
3a6ed97a23
import wireshark GSMTAP patch
2010-02-19 20:22:34 +01:00
Harald Welte
36c9d36cf6
add (incomplete) gsmtap integration for feeding frames in wireshark
2010-02-19 20:21:04 +01:00
Harald Welte
2df0b01363
frequency error is actually twice of what we thought.
...
The cause is really not clear. The formual using 2*Pi to convert
from radians to frequency is perfectly correct.
However, measurements with various test equipment (including Racal 6103)
have shown our frequency error estimate is always off by a power of two...
2010-02-18 19:32:07 +01:00
Harald Welte
18ab2998bb
add README on how to build the system
2010-02-18 19:28:49 +01:00
Harald Welte
15594a7c0e
add COPYING files to osmocon, firmware and layer2
2010-02-18 19:23:46 +01:00
Harald Welte
45a65c6fdd
add *.map files to .gitignore
2010-02-18 17:01:25 +01:00
Harald Welte
9cad18079c
Fix path names due to rename from hello_world to firmware
2010-02-18 16:52:10 +01:00
Harald Welte
fbe7b94c9c
Initial import of OsmocomBB into git repository
2010-02-18 16:46:36 +01:00