osmo-e1d/contrib/e1-prbs-test
Harald Welte a82fe56aea e1d-prbs-test: Initialize libosmocore logging
Fixes the following crash when libosmo-e1d wants to log something:

ERROR: osmo_log_info == NULL! You must call log_init() before using logging in log_check_level()!
Assert failed osmo_log_info logging.c:299
backtrace() returned 13 addresses
/usr/local/lib/libosmocore.so.17(osmo_generate_backtrace+0x1c) [0x7ff4ed29d6cf]
/usr/local/lib/libosmocore.so.17(+0x263c7) [0x7ff4ed29d3c7]
/usr/local/lib/libosmocore.so.17(osmo_panic+0xe0) [0x7ff4ed29d4ac]
/usr/local/lib/libosmocore.so.17(assert_loginfo+0x74) [0x7ff4ed298f57]
/usr/local/lib/libosmocore.so.17(log_check_level+0x1e) [0x7ff4ed29b091]
/usr/local/lib/libosmo-e1d.so.1(osmo_e1dp_send+0xf2) [0x7ff4ed2727a2]
/usr/local/lib/libosmo-e1d.so.1(+0x19d4) [0x7ff4ed2729d4]
/usr/local/lib/libosmo-e1d.so.1(+0x1c37) [0x7ff4ed272c37]
/usr/local/lib/libosmo-e1d.so.1(osmo_e1dp_client_ts_open+0x1d) [0x7ff4ed2730ed]
./e1-prbs-test(+0x1841) [0x55e00daeb841]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0x7ff4ed0a60b3]
./e1-prbs-test(+0x192e) [0x55e00daeb92e]
Aborted

Change-Id: Ia305b008711c15383c84f7cf2acedd20b568ef8a
2021-04-04 11:16:58 +02:00
..
Makefile e1-prbs-test: Add support for osmo-e1d 2020-09-11 13:04:21 +02:00
README contrib: add e1-prbs-test 2020-01-06 17:37:07 +01:00
ice40-rx.c e1-prbs-test: Add initial code for checking ICE40-E1 traces 2020-01-06 17:37:07 +01:00
internal.h e1-prbs-test: Add initial code for checking ICE40-E1 traces 2020-01-06 17:37:07 +01:00
main.c e1d-prbs-test: Initialize libosmocore logging 2021-04-04 11:16:58 +02:00
prbs.c contrib: add e1-prbs-test 2020-01-06 17:37:07 +01:00
rx.c contrib: add e1-prbs-test 2020-01-06 17:37:07 +01:00
tx.c contrib: add e1-prbs-test 2020-01-06 17:37:07 +01:00
utils.c contrib: add e1-prbs-test 2020-01-06 17:37:07 +01:00

README

e1-prbs-test - Utility to test for bit errors on E1 lines using DAHDI
======================================================================

e1-prbs-test can be used to test for bit errors in E1 transmission
lines. It consists of a sender and a receiver, which should be used
on either end of the E1 line.

Transmitter and receiver can be on the same machine, or on different
machines.

The code currently works directly on DAHDI, so only DAHDI-supported E1
cards are supported at this point.

The test works by sending timeslot-specific PRBS sequences of 512 bit
(64byte) length on the transmit side, and by correlating to those PRBS
sequences on the receiver side.

The use is relatively simple:

For the A-side, assuming you would want to use DAHDI span 1:
  e1-prbs-test /dev/dahdi/chan/001

For the B-side, assuming you would want to use DAHDI span 2:
  e1-prbs-test /dev/dahdi/chan/002

The test will run indefinitely.

If you'd like to get an interim report, send a SIGHUP to
e1-prbs-test.

If you'd like to stop, simply press Ctrl+C.
There is a two-stage shut-down process.  When you press Ctrl+C for
the first time, the report is printed, but transmission continues. At
the second Ctrl+C, the process terminates.   You must press Ctrl+C for
the first time on both A and B side, before pressing it the second time
on the A-side in order to get correct results.