Commit Graph

2072 Commits

Author SHA1 Message Date
Holger Hans Peter Freyther 7f573d5668 GPRS: Print the IP address to see the direction... 2010-06-07 21:37:43 +08:00
Holger Hans Peter Freyther bc10593314 GPRS: It is TLLI and not TTLI... 2010-06-07 19:17:30 +08:00
Holger Hans Peter Freyther f488121058 GPRS: Show the TLLI as hex value... 2010-06-07 19:16:31 +08:00
Holger Hans Peter Freyther 7d3b3d0e71 GPRS: Add script to track the N(U) on GPRS LLC messages..
tshark -q -X lua_script:gprs/gprs-verify-nu.lua -r trace.pcap

Output:
JUMP in N(U) on TLLI 3741437425 and SAPI: 9
	 last: 1 now: 3
JUMP in N(U) on TLLI 3741437425 and SAPI: 9
	 last: 10 now: 12
2010-06-07 19:08:57 +08:00
Holger Hans Peter Freyther 8acedec8c9 GPRS: Add wireshark lua script to split a trace by TLLI
This is currently only looking at one TLLI and is splitting
the trace by that TLLI...
2010-06-07 18:09:54 +08:00
Holger Hans Peter Freyther 98b15034b3 GPRS: Move test script into subdirectory.. 2010-06-07 17:05:54 +08:00
Holger Hans Peter Freyther bdcf45c9aa wireshark: Fix the Paging Configuration, fix the nanobts/bs11 setting
Introduce a TLV_TYPE_UNKNOWN to fallback to the right NM attributes
and mark paging configuration as fixed with the length of two.
2010-06-07 00:21:22 +08:00
Harald Welte 3a7074615f [GPRS] BSSGP: Fix formatting of BSSGP TX STATUS 2010-06-03 21:30:57 +02:00
Harald Welte ce22f92b6c [GPRS] SNDCP: Implement fragmentation of N-PDUs to SN-PDUs in downlink
Using the code of this commit, it was possible to provision GPRS
services and access a website from a G1 phone (Qualcomm MSM7k baseband chipset)
using a nanoBTS, Osmo-SGSN and OpenGGSN.

There is still no fragment re-assembly in the uplink path yet,
despite the (untested) code present in the gprs_sndcp.c file
2010-06-03 21:21:21 +02:00
Harald Welte db2c39f888 [GPRS] SNDCP: Check if SN-PDU is too large and reject it
... since we don't do fragmentation yet
2010-06-03 07:16:04 +02:00
Harald Welte 1d9d944310 [GPRS] LLC: Implement per-SAPI default values for LLC parameters 2010-06-03 07:11:04 +02:00
Harald Welte bb1c805718 [GPRS] implement GTP->SNDCP->LLC downlink user-data path
This only works for packets that are small enough to not need
fragmentation at the SNDCP layer (dns queries, ntp and the like).

It requires libgtp built from OpenGGSN dc3744fda045f9fca83de6881176987335a309a8
or later.  Plain 0.90 will NOT work.

Using this version, I could see bi-directional traffic from various
phones going all the way through BTS, OsmoSGSN, OpenGGSN and being routed
to and from the real internet.  Time to celebrate...
2010-06-03 06:38:38 +02:00
Harald Welte 96df60637a [GPRS] add comments to SGSN header file 2010-06-03 06:38:09 +02:00
Harald Welte 52421a0551 [GPRS] SGSN: specify the local bind address in the config file 2010-06-02 23:18:40 +02:00
Harald Welte 61ca7ce006 [GPRS] SGSN: use correct length+data for GSN_ADDRESS
We have to copy the sin_addr.s_addr, rather than the entire sin_addr.  The
latter results in the destination interpreting it as an IPv6 address, as
the only differentiator between IPv4 and IPv6 is the size of the payload
of this IE.
2010-06-02 23:17:33 +02:00
Harald Welte 5cc2bc37a7 [GPRS] SNDCP: Fix PCOMP and DCOMP header field length
They're both just one 4bit nibble, not 1 byte each.
2010-06-02 23:17:05 +02:00
Harald Welte e300d0021c [GPRS] SGSN: Allow vty-based configuration of local listen/bind IP for GTP 2010-06-02 12:41:34 +02:00
Harald Welte 6144452068 [GPRS] SNDCP: Add new SNDCP Entity to global list of entities
Also, don't reject SN-PDUs with positive packet length.
2010-06-02 12:40:48 +02:00
Harald Welte 858491821f [GPRS] Change SI13 to NMO_II, as some phones (like G1) dislike NMO_III
I still believe NMO_III is what we want, but as indiciated some phones
absolutely refuse to even connect to the GPRS network in this mode :(
2010-06-02 12:19:21 +02:00
Harald Welte 69996cb534 [GPRS] SNDCP use DSNDCP instead of DGPRS 2010-06-02 10:26:19 +02:00
Harald Welte 16836a37aa [GPRS] SNDCP: Fix header length (pcomp is part of common_hdr)
Also add some more debug statements
2010-06-02 10:25:40 +02:00
Harald Welte f11b6d2f30 [GPRS] SGSN: fix another segfault (and use-after-free) when GGSN is dead 2010-06-02 10:09:50 +02:00
Harald Welte ebabdea0a6 [GPRS] hand SNDCP N-PDUs to the GTP to the GGSN
This so far only works for UNIT-DATA and only if the N-PDU is not fragmented at
the SNDCP layer.
2010-06-01 18:28:10 +02:00
Harald Welte 84488245e6 We now need libosmocore-0.1.10 due to gprs_tmsi2tlli() 2010-06-01 12:04:03 +02:00
Harald Welte 807a5d8264 [GPRS] Major LLC / TLLI handling fixes
* separate the LLME and LLE state in the LLC layer
* introduce gprs_llgmm_assign() function for LLGMM-ASSIGN.req primitive
* change QoS profile to match 'real' SGSN
* Update the new TLLI when assigning a P-TMSI

The result now is that the LLC layer is notified of TLLI changes, which in turn
means it doesn't allocate a new LLE structure every TLLI change, which again
in turn means that the UI frame sequence number does not reset to zero.

As a result, MS should no longer ignore frames based on wrong UI sequence number.
2010-06-01 11:57:13 +02:00
Harald Welte 1371f7dd2f [GPRS] SGSN GTP: Fix segfault in case GGSN is down 2010-06-01 11:52:41 +02:00
Harald Welte f7b3a219f6 [GPRS] update SGSN config file example 2010-06-01 11:52:21 +02:00
Harald Welte dce1255d8f [GPRS] GMM: Set LLC 'C/R' bit when sending IDENTITY REQUEST
Commands initiatied by the SGSN have to set C/R = 1
2010-05-31 22:31:04 +02:00
Harald Welte 56a0145dd8 [GPRS] Include IMSI and DRX params in BSSGP DL-UD
When we send a downlink unit-data request via BSSGP, there is a lot
of information that needs to be copied from the mm context, such as
the IMSI, DRX parametes, MS radio access parameters, ...

This is a quite strange layering violation, since we now need to pass
a pointer to the MM ctx from GMM through LLC into BSSGP :(
2010-05-31 22:12:30 +02:00
Harald Welte c2e8cc4a10 [GPRS] Implement TMSI reallocation and timers 3350 + 3370
Our state transitions and timers now reflect 04.08 for GMM much
better than before.  Also, we allocate a new P-TMSI on every ATTACH
and RA UPDATE, as some phones seem to get confused if they don't
get a P-TMSI.
2010-05-31 20:23:38 +02:00
Harald Welte 3d379ba589 [GPRS] BSSGP: Fix way too long TLLI debug line 2010-05-31 20:18:35 +02:00
Harald Welte c91ce1a9d3 [GPRS] BSSGP: More verbose debug log / error reporting 2010-05-31 18:07:17 +02:00
Harald Welte 6463232b09 VTY: properly exit from OML_NODE 2010-05-31 17:17:29 +02:00
Harald Welte 72b4b20a2a [GPRS] BSSGP: When we receive a BLOCK, we should not respond with UNBLOCK-ACK 2010-05-31 17:16:36 +02:00
Harald Welte 81c9b9ca3e OML: Introduce minimal VTY command set to interact with OML managed objects 2010-05-31 16:40:40 +02:00
Harald Welte 14ce8a0fa4 VTY: libosmocore >= 0.1.9 doesn't define BSC specific VTY nodes anymore 2010-05-31 16:04:12 +02:00
Harald Welte f5b4ba367c ipaccess-config: More verbose help message 2010-05-31 15:57:29 +02:00
Holger Hans Peter Freyther 0c8aa73db7 [bsc_hack] Call handle_options before bootstrapping the network
Otherwise we can not specify which config file to use and -h will
not work when there is no openbsc.cfg in the cwd.
2010-05-31 21:42:53 +08:00
Holger Hans Peter Freyther 4b4dd100f8 [rsl] Introduce an error state for the lchan and set it on release
When we issue a RF Channel Release in case of a failure we receive
RLL release indications after the channel was tearn down and we
issue another RF Channel Release as a result. The channel allocator
might have already allocated this channel and we release the channel
again with another MS on it.

Make rsl_rf_chan_release take an error argument and make it set
a new state in case of an error and change the RF Channel Release
ack to not set the state back to none in case of an error but wait
for a timeout that is a bit higher than T3111.

I tested this with removing the battery during a phonecall and
waiting for the channel failure. With this test we only send the
release once.
2010-05-31 21:39:23 +08:00
Holger Hans Peter Freyther f30c0dca0d [rsl] Implement the T3111 timer to delay the RF Channel release 2010-05-31 21:33:15 +08:00
Holger Hans Peter Freyther d7fd30617f [rsl] Check the assumption that RF Channel Release is sent during release
We assume that the lchan_free will initiate the release and
that when we handle the RLL release indication or the release
request as part of the shutdown sequence.
2010-05-31 21:30:37 +08:00
Holger Hans Peter Freyther dbc5fae576 [rsl] Move rf channel release scheduling to a new method
The current channel release has a couple of issues we will
need to fix in a set of upcoming commits.

The issues include:
    1.) sending release twice
    2.) reassigning the channel inbetween the relase..
2010-05-31 21:30:16 +08:00
Harald Welte a4b16658d5 [GPRS] Make sure SI13 rest octets look like those of the ip.access BSC 2010-05-31 12:55:11 +02:00
Harald Welte a6932d2eae [GPRS] NS: Fix GRE keepalive response in FR-GRE encapsulation 2010-05-31 11:02:57 +02:00
Harald Welte 02ea86fa71 [GPRS] BSSGP: Acknowledge all SUSPEND and RESUME requests
This is of course not the correct way of dealing with it, but for
now it should make the Ericsson Mobile Plafrom based phones happy
(they insist to do a suspend/resume cycle before pdp ctx act)
2010-05-30 22:00:53 +02:00
Harald Welte 6bdee6ada3 [GPRS] LLC: Increment V(U) and N(U) 2010-05-30 22:00:42 +02:00
Harald Welte b12aa4b1ee [GPRS] GMM: Add some FIXME's to the code 2010-05-30 20:28:22 +02:00
Harald Welte d75d71e95c [GPRS] NS: correctly pass the NS payload length to the TLV parser 2010-05-30 17:19:38 +02:00
Harald Welte 0ede21f547 [GPRS] NS: Don't hand Frame Relay LMI packets into the NS code 2010-05-28 16:12:57 +02:00
Harald Welte cc540c4a0c [GPRS] NS: Respond to GRE keepalive messages
GRE has the strange notion of keepalive messages being encapsulated IPv4
packets adressed back to the sender.  Since we actually really only care
about frame relay, this is a bit strange.  However, we'll do some sanity
checks and send it back through our GRE socket...
2010-05-28 16:06:53 +02:00