Commit Graph

13 Commits

Author SHA1 Message Date
Harald Welte 130eeb39f7 fix "-Werror" build against latest libosmo-abis
libosmo-abisrecently marked the 'out_cb' of the subchan_demux
as 'const', which caused compiler warnings/errors.

Related: libosmo-abis.git Ia082b9fddf03d02afd007825a1588a3ef0dbedae
Change-Id: I0cf430980e50fa8094f0efc7642004fb5923c4c6
2020-06-09 09:03:55 +02:00
Harald Welte 1b41abda3d e1cap_dump: Avoid deprecated osmo_init_logging() API
Change-Id: I7d9d88eb5615f6b323b6c36eceb4d847bae01d1d
2019-12-04 14:15:47 +01:00
Harald Welte b36921fffc e1cap_dump: Add -h and -V to print help / version of program
Change-Id: I621c1f15e1bdb38691ae1fc50c5190ae2701eb58
2019-12-04 12:08:33 +01:00
Harald Welte cbf23b6465 exit(2) on unsupported positional arguments on command line
Change-Id: I6d4efa6ddef41607aecd5ceee78e400db821292f
2019-12-04 12:08:33 +01:00
Harald Welte 3863beef26 e1cap_dump: fix superchannel without pcap output
We have to check if g_pcap_fd is >= 0,as we initialize it to -1.

Change-Id: I458c02b4619b6fb2c7d30b1ce3bbac86243a6977
2019-11-24 18:56:12 +01:00
Harald Welte 6df0729271 fix various compiler warnings
Change-Id: I65a862132563f578eff11b8d085960b820f5d4b7
2019-11-24 18:42:26 +01:00
Harald Welte 41a5300243 e1_recorder: Add LAPD PCAP dump support
We can now write a PCAP file from the HDLC-decoded super channel.
2016-11-14 23:22:49 +01:00
Harald Welte 1df5cf4950 e1cap_dump: Implement functional HDLC decode of super-channel
Finally the bit ordering and bit format of the SuperChannel has been
figured out.
* the data as read from DAHDI must be flipped (0->1 / 1->0). why?
* the data must be read lsb-first when converting into a bit-buffer

We are now getting the following output e.g. for a OM2000 "TX
Configuration Request" message:
fa 03 8a 8a 80 80 00 13 00 b0 0b 00 ff 01 20 00 2e 2b 1c 00 06 01 95 81 76 00 e9 bf
^ lapd hdr  ^ OML    ^l ^OM2000 TX Config Req for 43 dBm
2016-11-14 21:29:01 +01:00
Harald Welte c1b9cab053 e1cap_dump: Add SC (Super Channel) mode
In the super channel mode, it seems the BTS transmits one byte in each
timeslot, accross the entire link.

This basically means that if you have a 10 byte long signalling message
to be sent, its first byte will be in TS1 up until the tenth byte in
TS10.

As we are reading in 160 byte chunks from the E1 timeslots, we build a
matrix with 160 columns (for each byte) and 24/30 rows (timeslots).  So
we write 24 times 160 bytes into the matrix.

Once we have completed all timeslots, we start to read the matrix by
reading byte 0 of each timeslot (in incrementing TS order), next byte 1
of each timeslot, ... until we end up having read 160 times 24 bytes
from the matrix.

The resulting bitstream needs to be HDLC-synchronized and the resulting
messages passed up for further decoding.
2016-10-23 19:36:14 +02:00
Harald Welte 525af1832e e1cap_dump: Add 16k sub-channel demux + filter
We can now filter a given 16k sub-slot out of the capture data and
export it to stdout.
2016-10-19 00:38:46 +02:00
Harald Welte f403232e0f e1cap_dump: Add capability to filter on a given line+timeslot and for binary output 2016-10-19 00:23:10 +02:00
Harald Welte 74d1e3409d e1cap_dump: Print human-readable time 2016-10-19 00:06:22 +02:00
Harald Welte dbb0f5ae99 add a command line tool for dumping the contents of a capture file 2016-10-18 23:51:54 +02:00