blob: c8d9987825bde1419763041b313f6098100693ca [file] [log] [blame]
Holger Hans Peter Freyther1d535442016-12-26 16:04:02 +01001Utility to configure Qualcomm DIAG, read, decode and display the
2DIAG messages. It can enable logging and format/print the log
3messages generated by the various subsystems of the baseband.
4
5To build this software a copy of the Osmocom libosmocore
6library is required. Your distribution might already contain
7the necessary utility.
8
9In general all Qualcomm devices that export DIAG should be
10supported. We have tested it with the Quectel UC20, EC20 and
11EC25 devices.
Eric Wild6f9290d2020-05-12 17:02:03 +020012
13The convenient way to create a pcap dump of the messages is to run
Eric Wilda3ffa992020-05-12 18:26:10 +020014./capture.sh -s /dev/ttyUSB0 -f outfilename.pcap
Eric Wild6f9290d2020-05-12 17:02:03 +020015This requires tcpdump, as well as the required permissions
16to capture, i.e. on ubuntu this can be conveniently achieved by
17sudo setcap cap_net_raw,cap_net_admin=ep /usr/sbin/tcpdump
18
Eric Wildacb80082020-12-09 04:24:13 +010019In order to distinguish multiple different modems in the capture file
20passing a GSMTAP destination ip is possible with the -i parameter, i.e.
21./capture.sh -s /dev/ttyUSB0 -f outfilename.pcap -i 127.0.0.4
22This will "just work" on linux, since there is a default 127.0.0.0/8 route.
23
Eric Wild6f9290d2020-05-12 17:02:03 +020024Additionally wireshark needs Edit->Preferences->Protocols->NAS-EPS
25"Force dissect as plain EPS" set to true, since capturing encrypted NAS
26messages is fairly useless (although possible), so unencrypted
27unprotected NAS messages are emitted, but wireshark will by default
28refuse to dissect plain messages because according to the spec most
29messages need to be at least integrity protected.
30
31Ubuntus ModemManager will interfere with the modem, so it needs to be
32told to leave the modem alone. This can be accomplished by adding the
33following line to
34/etc/udev/rules.d/69-block-mm.rules :
35ATTRS{idVendor}=="2c7c" ATTRS{idProduct}=="0125", ENV{ID_MM_DEVICE_IGNORE}="1
36
37This example is for quectel ec25-e, adjust the USB VID:PID according to
38what lsusb tells you about your particular modem. The rules then need to
39be reloaded and ModemManager restarted:
40sudo udevadm control --reload-rules
41sudo udevadm trigger
42sudo systemctl restart ModemManager
43
44There appears to be a bug on Ubuntu 18.04 and the ModemManager will still
45interfere, see
46https://bugs.launchpad.net/ubuntu/+source/modemmanager/+bug/1827328
47
48