This introduces support for loading multiple firmwares in parallel also
for the case of a manual load. This is anyway the case for an automatic
load from udev.
* libusb needs to scan the bus all too often. This causes occasional
failures for opening devices.
* Thus introduce a semaphore to serialize uses of libusb.
E-Main-3 firmware differs by a different value of bcdDevice:
* Read this from the sysfs devices tree.
* Fall back to lsusb -v (much slower) is sysfs not available.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10348 17933a7a-c749-41c5-a318-cba88f637d49
* Newer firmwares may have more lines.
* While we're at it, add better debug printing.
* Remove some unused debugging code.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10343 17933a7a-c749-41c5-a318-cba88f637d49
* dahdi_cfg -S <num>: only apply changes to span <num>.
* If span is analog (no 'span=<num>,<channels>,...' statement in
system.conf), we need to set range: -C <channels>
* With the <basechan> and <channels> attributes in sysfs
we easily configure each device on the fly.
Simply run: dahdi_cfg -S <spanno> -C <basechan>+<channels>-1
from udev script
Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10306 17933a7a-c749-41c5-a318-cba88f637d49
This utility will export packet captures for channels in dahdi. It requires
CONFIG_DAHDI_MIRROR to be defined in dahdi-linux as it uses the unsupported
DAHDI_MIRROR ioctl interface.
Internal-Issue-ID: DAHTOOL-49
From: Torrey Searle <tsearle@gmail.com>
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
Acked-by: Shaun Ruffell <sruffell@digium.com>
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10293 17933a7a-c749-41c5-a318-cba88f637d49
The xpp_order configuration generator should only loop over telephony
devices, not all spans.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10266 17933a7a-c749-41c5-a318-cba88f637d49
Don't force extens we generate to have exactly 4 digits (simple
formatting limitation).
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10265 17933a7a-c749-41c5-a318-cba88f637d49
Also makes sure that the percentage output from the verbose and
non-verbose modes of timer_test are the same and print a cumulative
accuracy which smooths out the jitter for each pass.
If the time it takes to read in 1 second worth of data is longer than 1
second accuracy will be 0%.
(closes issue #18573)
Reported by: smurfix
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10216 17933a7a-c749-41c5-a318-cba88f637d49
Warn the user if attempting to monitor a statistic that the particular
board driver does not appear to be collecting. The wcte12xp in r10212 in
now fills in -1 for any statistic it does not collect and other digital
cards can do the same.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10215 17933a7a-c749-41c5-a318-cba88f637d49
The wcb4xxp driver does not put enough information in the proc filesystem to
determine if the ports are in TE or NT mode. Previously the ports would
always just setup the dahdi-channels.conf file in TE mode. After this change
the dahdi_scan utility is used to detect if the ports are in TE or NT mode and
setup dahdi-channels.conf appropriately.
Internal-Issue-ID: DAHTOOL-54
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10214 17933a7a-c749-41c5-a318-cba88f637d49
Resolves a regression on the 2.5 branch that would result in:
$ dahdi_genconf
dahdi_genconf: missing default group (termtype=UNKNOWN)
E1 / T1 spans use software configuration to set CPE / NET mode. This
patch will just assume that a termtype is software selectable if it was
"UNKNOWN" when first scanning the span.
Internal-Issue-ID: DAHTOOL-55
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Tested-by: David Purdue <support@noojee.com.au>
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10213 17933a7a-c749-41c5-a318-cba88f637d49
Fix dahdi_maint's usage message while we're at it.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10198 17933a7a-c749-41c5-a318-cba88f637d49
On several pathological cases we may need to wait more than 40 seconds.
Make that timeout configurable.
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10177 17933a7a-c749-41c5-a318-cba88f637d49
Use 'dahdi_genconf freepbxdb' to generate the required astdb entries
for Asterisk to use the extensions generated by dahdi_genconf. Requires
asterisk to be running.
This module is intended for testing as it bypasses standard FreePBX
functions only and hence may not work properly with Freepbx.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10142 17933a7a-c749-41c5-a318-cba88f637d49
Fixes the feature introduced in r9909 that allows patlooptest to
monitor channel events. Patlooptest was reporting events that we don't
care about, prior to reading from the channel. This fix ignore the first
event read on a channel and reports all subsequent events properly.
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10071 17933a7a-c749-41c5-a318-cba88f637d49
* Silently exit right away if user did not set XPP_HOTPLUG_DAHDI.
* Only one Astribank should be allowed to run the startup script:
- Protect that section with a "lock" (symlinking a file).
- Sadly we can't rely on /run and may have to wait for a r/w file-system.
- And thus even this waiting needs to be run in the background
as to not hold udev.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10068 17933a7a-c749-41c5-a318-cba88f637d49
It is possible that the contents of the proc files can change while the
perl modules are in the processing of processing them.
Specifically, if lsdahdi is called on boot before the channels are
configured, the channel will be "probed" to determine if it's an FXO or
FXS channel and that can result in the output of proc changing. When the
size of proc changes, the script can get confused about where the
beginning of the next line is.
This patch reads in the proc file completely into memory first, and then
starts processing each of the lines.
This resolves the "Unrecognized garbage 'INACTIVE)' in -" that is
displayed on boot with the recent trunk of DAHDI.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10040 17933a7a-c749-41c5-a318-cba88f637d49
Echo Cancellation firmware is loaded by xpp/stribank_hexload
(Using the oct612x code).
* astribank_hexload: options -O/-o/-A for handling the Octasic echo
cancellation firmware.
* astribank_tool: report that.
* xpp_fxloader: Run astribank_hexload, if needed.
* dahdi_perl: The EC module is an extra XPD, but not a "telephony device"
and hence not a span. Deal with that.
* waitfor_xpds: may need to wait a bit longer for firmware loading.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10032 17933a7a-c749-41c5-a318-cba88f637d49
Include a copy of the oct612x Octasic echo canceller interface to be used
by astribank_hexload to load the echo canceller firmware to a Xorcom
Astribank.
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10030 17933a7a-c749-41c5-a318-cba88f637d49
There is an issue with the hardware on the B410P that makes it unreliable to
connect one of the ports to another port for testing.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10026 17933a7a-c749-41c5-a318-cba88f637d49
The sorting function for SORT_XPPORDER accidentally sorted the Astribank
priorities from the xpp_order file (/etc/dahdi/xpp_order) lexicographically
instead of numerically, that is: 10 before 2.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9986 17933a7a-c749-41c5-a318-cba88f637d49
Make the pri_termtype setting in genconf_parameters apply to any BRI/PRI
carddeclared as "soft NT". ATM, this is only the Xorcom E1/T1 device
and the Digium HA8 (BRI) module of the TDM card.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Acked-by: Shaun Ruffell <sruffell@digium.com>
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9979 17933a7a-c749-41c5-a318-cba88f637d49
pattest and patgen already had this capability, but there were cases in which
they would act unexpectedly. Now, if the name specified is not a character
device file, it will be treated as a channel number if possible.
Acked-by: Shaun Ruffell <sruffell@digium.com>
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9975 17933a7a-c749-41c5-a318-cba88f637d49
This was provided for interop with analog lines provided by Etisilat.
DAHDI-796.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9920 17933a7a-c749-41c5-a318-cba88f637d49
The new buffer events code introduced in revision 9905 gives userspace
processes an interface to activate detection of buffer over and underflows.
This change allows patlooptest to take advantage of that feature to better
inform users of the cause of pattern errors.
Acked-by: Shaun Ruffell <sruffell@digium.com>
(original patch by Matt Fredrickson)
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9909 17933a7a-c749-41c5-a318-cba88f637d49
* Move most of the USB access code from xpp/ to xpp/xtalk/ .
* astribank_tool and such tools can now use a shorter -D mmm/nnn rather
than a full path.
Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9825 17933a7a-c749-41c5-a318-cba88f637d49
Don't require 'dahdi_hardware -v' to show the driver for a USB device.
Only works when the usbfs is not used (when /proc/bus/usb is not mounted).
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9699 17933a7a-c749-41c5-a318-cba88f637d49
Update documentation to the effect that HWEC is not enabled by default
and must be enabled manually if desired via "echocanceller" in system.conf.
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9528 17933a7a-c749-41c5-a318-cba88f637d49
Put back in the loopup and loopdown functionality which had been removed
from dahdi_tool
According to the spec AT&T TR 54016 we should keep the loopback
actuate and release signals on the line for 5 seconds.
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
Acked-by: Shaun Ruffell <sruffell@digium.com>
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9517 17933a7a-c749-41c5-a318-cba88f637d49
Attempting to use channel 16 on E1 CAS is disallowed since that channel is
reserved for RBS signaling. Configurations should not be generated that
attempt to use it.
Closes DAHDI-763.
Patch by dmartinez.
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9485 17933a7a-c749-41c5-a318-cba88f637d49
When called from udev to load the FPGA firmware, make sure that this is
not the event generated for the first end-point of the existing two, as
we need to talk with the second one.
This is probably better done in the udev rules, but will be slightly
more complicated to apply only to the FPGA loading and not to USB
firmware loading.
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9482 17933a7a-c749-41c5-a318-cba88f637d49
Make the error counters a little more readable, removed the prbs
counters since they are not currently functioning
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9477 17933a7a-c749-41c5-a318-cba88f637d49