- Table of contents
- OsmoPCU Debugging
OsmoPCU Debugging¶
In order to debug issues with OsmoPCU, it is important to have protocol traces from all related interfaces.
Fundamentally, this includes- the Gb interface (NS-over-IP from PCU to SGSN, showing NS/BSSGP/LLC and higher layer protocols)
- the Um interface (RLC/MAC between MS and PCU)
- Um frames transmitted/received via OsmoPCU (on PACCH, PTCCH, PDTCH)
- Um frames transmitted/received via OsmoBTS on behalf of OsmoPCU (on PCH and AGCH)
The instructions below will help you to set this up
Required configuration¶
NS-over-IP traffic¶
Simply set up tcpdump
to capture the UDP port you're using for the NS-VC. If you're using port 23000 (which is the default), the capture filter would include udp port 23000
.
Um frames of OsmoPCU via GSMTAP¶
You must call the specific OsmoPCU binary for your BTS hardware with the -i
option to enable GSMTAP and specify a remote IP address where to send it to1.
The IP address could be the localhost/loopback device, in case you want to capture packets locally.
For example, on a sysmoBTS device the normal command to start osmo-bts (by the systemd service) is:
/usr/bin/osmo-pcu -c /etc/osmocom/osmo-pcu.cfg
but we now need to start it as
/usr/bin/osmo-pcu -c /etc/osmocom/osmo-pcu.cfg -i 127.0.0.1
In OsmoPCU versions later than July 21, 2017 you have to specify which categories of PCU blocks you want to log via GSMTAP. Older versions will log all blocks, which includes all dummy blocks that make reading the capture files harder:
The osmo-pcu.cfg file will have to include a section like this:
pcu ... gsmtap-category dl-ctrl gsmtap-category dl-data-gprs gsmtap-category dl-data-egprs gsmtap-category ul-ctrl gsmtap-category ul-data-gprs gsmtap-category ul-data-egprs ...
The above will log all uplink and downlink control and traffic blocks. Depending on your needs, a sub-set may be sufficient.
Um frames of OsmoBTS via GSMTAP¶
You must call the specific OsmoBTS binary for your BTS hardware with the -i
option to enable GSMTAP and specify a remote IP address where to send it to.
The IP address could be the localhost/loopback device, in case you want to capture packets locally.
For example, on a sysmoBTS device the normal command to start osmo-bts (by the systemd service) is:
/usr/bin/osmo-bts-sysmo -s -c /etc/osmocom/osmo-bts.cfg -M
but we now need to start it as
/usr/bin/osmo-bts-sysmo -s -c /etc/osmocom/osmo-bts.cfg -M -i 127.0.0.1
In osmo-bts.cfg you need to enable the following gsmtap SAPIs:
bts 0 ... gsmtap-sapi ccch gsmtap-sapi rach gsmtap-sapi agch gsmtap-sapi pch ...
1 As of this writing, OsmoPCU actually will send GSMTAP automatically by default to 127.0.0.1 but this is scheduled to change. Explicitly specifying the GSMTAP via the command-line argument as described here will work with both older and future versions of OsmoPCU
Capturing¶
Manually on the BTS itself:¶
You can use tcpdump to write a pcap file that includes all related traffic using e.g.
tcpdump -ni any -s0 -w/tmp/my_gprs.pcap udp port 23000 or udp port 4729 or tcp port 3002 or tcp port 3003 or tcp port 5000
where
udp port 23000
refers to the Gb traffic (your port number might be different)udp port 4729
refers to the GSMTAP traffic generated by both OsmoPCU as well as OsmoBTStcp port 3002 or tcp port 3003
refers to the Abis/IP traffic between OsmoBTS and OsmoBTS or OsmoNITBtcp port 5000
refers to the A/SCCPlite traffic between OsmoBSC and the MSC (your port number might be different.
Using osmo-pcap-client
¶
FIXME
Updated by laforge almost 7 years ago · 2 revisions