Debugtool
From mISDN.org
Contents |
[edit]
Intro
mISDNdebugtool consists of a kernel module (mISDN_debugtool) and a user space tool (mISDNdebugtool).
The kernel modules takes care of transmitting a UDP packet for each ISDN dchannel frame, and for events like layer 1 up/down. For hfc_multi, it also transmits packets on state changes and CRC errors.
The mISDNdebugtool program is the counterpart to the kernel module. It captures the UDP packets, does some parsing and writes them to stdout, to a logfile, and/or to a wireshark compatible dumpfile. It also can work as a daemon, see section IV.
[edit]
Setup
- Install the latest mISDN and mISDNuser. On how to obtain the sources, see GIT.
- Configure the mISDN kernel modules. On how to do that, see Installing_mISDN and Configuring_mISDN.
- Add the following line to you /etc/mISDN.conf: <module>mISDN_debugtool</module>
- Load the mISDN kernel modules via: mISDN start
- Enable the debugging facility (this is done automagically by mISDNdebugtool if started with no -n parameter): echo 1 > /sys/class/mISDN-debugtool/enabled
- Validate your setup by running the mISDNdebugtool user space program to capture all packets transmitted by the mISDNdebugtool kernel module and log them to stdout: mISDNdebugtool -v
Now let something happen on your ISDN lines, i.e. by plugging in a phone. You should now see debugging messages.
[edit]
Changing the UDP port
- Edit /etc/mISDN.conf. In this example, we use UDP port 12345: <module port="12345">mISDN_debugtool</module>
- Reload your mISDN kernel modules: mISDN restart
- Use the UDP port parameter of mISDNdebugtool: mISDNdebugtool -b 12345
[edit]
Usage of mISDNdebugtool
mISDNdebugtool [-p <mISDN-port>,..] [-f <prefix>] [-l <prefix>] [-b <UDP-port>] [-d] [-v] [-h] Arguments: -p <mISDN-port>,.. mISDN ports to care for, default: care for all -f <prefix> enable dumpfile mode, use this prefix for filenames -l <prefix> enable logfile mode, use this prefix for filenames -b <UDP-port> UDP port to bind to, default: 50501 -d daemon mode -v print packets to stdout -h print this help text and exit
