dahdi/tools.git
6 years agoxpp: sysfs access cleanups
Oron Peled [Thu, 15 Mar 2012 20:32:27 +0000 (20:32 +0000)]
xpp: sysfs access cleanups

With /proc/xpp code removed, some cleanup can be done.

* No need to search alternative attribute names, so xbus_attr_path() is
  redundant.

* Don't compose xbus sysfs directory in multiple code locations.
  Do it once in Xbus->new() and use the result ($xbus->sysfs_dir)

* Pass XPD directory strings directly to Xpd->new()
  - So we parse it for unit/subunit only in Xpd->new()

* Don't parse xbus sysfs name:
  - Toplevel scan, pass it as is to Xbus->new()
  - Xbus->new() deduce the xbus->num from the naming
    of Xpd's inside (nn:m:k) -- this is a hack until
    we add xbus number as an xbus sysfs attribute

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@10494 17933a7a-c749-41c5-a318-cba88f637d49

6 years agoxpp: perl_modules: Remove /proc/xpp usage
Oron Peled [Thu, 15 Mar 2012 20:30:41 +0000 (20:30 +0000)]
xpp: perl_modules: Remove /proc/xpp usage

* All references to old /proc/xpp interface were removed.
* Everything is now done via sysfs

Information has been available from /sys/bus/astribanks since before
Dahdi-linux 2.2 .

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@10492 17933a7a-c749-41c5-a318-cba88f637d49

6 years agoxpp: clean 'Extrainfo' EEPROM field
Oron Peled [Thu, 15 Mar 2012 20:29:09 +0000 (20:29 +0000)]
xpp: clean 'Extrainfo' EEPROM field

* Extrainfo field contains junk data
* Caused by:
  - The field is initialized to 0xFF values
  - There was no null termination (and no room to add it)
* New code:
  - Ensure that show_extrainfo() have null termination even if EEPROM
    field is full.
  - Replace trailing 0xFF characters with '\0' when reading this field
  - Since our default burned EEPROM contain Extrainfo field full of
    0xFF characters, this would make them look as null filled.

Internal Issue-Id: #1341
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@10491 17933a7a-c749-41c5-a318-cba88f637d49

6 years agoxpp: improved waitfor_xpds
Oron Peled [Wed, 22 Feb 2012 18:13:02 +0000 (18:13 +0000)]
xpp: improved waitfor_xpds

* Fix an issue due to long firmware load time:
  - When one Astribank has an echo canceler (long firmware loading) and
    and another one does not.
  - The EC-less Astribank finishes initialization before the Astribank
    with EC is detected.
  - Thus waitfor_xpds terminates too early.

* We now iteratively build two sets of serial numbers:
  - One from wha we see in all Xorcom (e4e4:11[3456]x) USB devices.
  - The other is those that were detected in the driver.
  - Only when the two sets are equal (and > 0) we know we are done.
  - This is resilient to many problems (e.g: disconnect/reconnect of
    same device during initialization).

* The progress output was also improved: Now each detected AB
  show the total number so far.

* The timeout was also increased to 100sec

* Woraround for an Astribank with no serial (but just a single one on
  the system).

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@10465 17933a7a-c749-41c5-a318-cba88f637d49

6 years agoDisable menuselect in dahdi-tools
Tzafrir Cohen [Sun, 8 Jan 2012 18:24:13 +0000 (18:24 +0000)]
Disable menuselect in dahdi-tools

* Remove targets from the Makefile
* report PBX_HDLC in makeopts
* Only build sethdlc is PBX_HDLC is 1
* Only build dahdi_tool is PBX_NEWT is 1
* fxstest and dahdi_diag are not included in the default target

For now the only way to manually disable building a certain tool
is by changing the value of BINS in Makefile.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Acked-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10411 17933a7a-c749-41c5-a318-cba88f637d49

7 years agoxpp: two extra product IDs: 1112, 1164 branched-2.6.y
Tzafrir Cohen [Sun, 4 Dec 2011 17:08:29 +0000 (17:08 +0000)]
xpp: two extra product IDs: 1112, 1164

Two extra USB product IDs used in some odd maintenance scenarios.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10368 17933a7a-c749-41c5-a318-cba88f637d49

7 years agoxpp: xpp_fxloader: regressions from r10348
Tzafrir Cohen [Sun, 4 Dec 2011 15:33:21 +0000 (15:33 +0000)]
xpp: xpp_fxloader: regressions from r10348

* Avoid a duplicated run of udev on some systems.
* Fix usage of astribank_tool's output.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10366 17933a7a-c749-41c5-a318-cba88f637d49

7 years agoDAHDI-perl: Fix PCI ID for Rhino R4T1 (0b0b:0305)
Tzafrir Cohen [Wed, 30 Nov 2011 20:15:33 +0000 (20:15 +0000)]
DAHDI-perl: Fix PCI ID for Rhino R4T1 (0b0b:0305)

(Closes issue DAHTOOL-56)

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10358 17933a7a-c749-41c5-a318-cba88f637d49

7 years agoxpp: recovery firmware in xpp_fxloader
Tzafrir Cohen [Tue, 29 Nov 2011 23:40:50 +0000 (23:40 +0000)]
xpp: recovery firmware in xpp_fxloader

USB_RECOV.hex is an extra firmware that may be useful for recovering
from certain Astribank hardware faults in some scenarios. This adds
support for either loading it manually
('/usr/share/dahdi/xpp_fxloader recover-sb') or through udev, *if*
the required udev rules were set on the system.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10349 17933a7a-c749-41c5-a318-cba88f637d49

7 years agoxpp: Serialized Parallel load; E-Main-3 firmware
Tzafrir Cohen [Tue, 29 Nov 2011 23:40:21 +0000 (23:40 +0000)]
xpp: Serialized Parallel load; E-Main-3 firmware

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

7 years agoxpp: astribank_hexload: we need more lines
Tzafrir Cohen [Mon, 21 Nov 2011 15:25:43 +0000 (15:25 +0000)]
xpp: astribank_hexload: we need more lines

* 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

7 years agoFix GCC 4.6 "set but not used" warnings
Tzafrir Cohen [Wed, 2 Nov 2011 21:57:25 +0000 (21:57 +0000)]
Fix GCC 4.6 "set but not used" warnings

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10311 17933a7a-c749-41c5-a318-cba88f637d49

7 years agodahdi_genconf: Allow it to recognize the TE8xx 8-port cards.
Shaun Ruffell [Wed, 2 Nov 2011 20:55:52 +0000 (20:55 +0000)]
dahdi_genconf: Allow it to recognize the TE8xx 8-port cards.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10308 17933a7a-c749-41c5-a318-cba88f637d49

7 years agodahdi_cfg: add '-S <spanno>' and '-C <chan-ranges>'
Oron Peled [Wed, 2 Nov 2011 20:10:06 +0000 (20:10 +0000)]
dahdi_cfg: add '-S <spanno>' and '-C <chan-ranges>'

* 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

7 years agodahdi_pcap: Imported user space utility for managing pcap streams
Torrey Searle [Tue, 1 Nov 2011 18:10:14 +0000 (18:10 +0000)]
dahdi_pcap: Imported user space utility for managing pcap streams

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

7 years agodahdi_perl: Use $Dahdi::sys_base for sysfs pathes
Tzafrir Cohen [Sun, 23 Oct 2011 14:43:27 +0000 (14:43 +0000)]
dahdi_perl: Use $Dahdi::sys_base for sysfs pathes

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10267 17933a7a-c749-41c5-a318-cba88f637d49

7 years agoxpp_order generator: ignore EC XPD
Tzafrir Cohen [Sun, 23 Oct 2011 14:28:40 +0000 (14:28 +0000)]
xpp_order generator: ignore EC XPD

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

7 years agochandahdi gen: extens can have any num of digits
Tzafrir Cohen [Sun, 23 Oct 2011 14:23:17 +0000 (14:23 +0000)]
chandahdi gen: extens can have any num of digits

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

7 years agoTypos in man pages: toolyou
Tzafrir Cohen [Sun, 23 Oct 2011 14:22:05 +0000 (14:22 +0000)]
Typos in man pages: toolyou

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10264 17933a7a-c749-41c5-a318-cba88f637d49

7 years agodahdi_test: Enforce range from 0.0% - 100.0% for accuracy.
Shaun Ruffell [Thu, 29 Sep 2011 17:00:59 +0000 (17:00 +0000)]
dahdi_test: Enforce range from 0.0% - 100.0% for accuracy.

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

7 years agodahdi_maint: Print 'unsupported' warning if framing errors is -1.
Shaun Ruffell [Thu, 29 Sep 2011 17:00:55 +0000 (17:00 +0000)]
dahdi_maint: Print 'unsupported' warning if framing errors is -1.

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

7 years agodahdi_genconf: Use 'dahdi_scan' to determine span_type for B410P cards.
Shaun Ruffell [Thu, 29 Sep 2011 17:00:51 +0000 (17:00 +0000)]
dahdi_genconf: Use 'dahdi_scan' to determine span_type for B410P cards.

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

7 years agodahdi_genconf: Assume spans with unknown term types are software selectable.
Shaun Ruffell [Thu, 29 Sep 2011 17:00:46 +0000 (17:00 +0000)]
dahdi_genconf: Assume spans with unknown term types are software selectable.

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

7 years agoMan page for dahdi_maint
Tzafrir Cohen [Fri, 9 Sep 2011 13:45:00 +0000 (13:45 +0000)]
Man page for dahdi_maint

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

7 years agoUpdate the dahdi-monitor man page
Tzafrir Cohen [Fri, 9 Sep 2011 12:04:34 +0000 (12:04 +0000)]
Update the dahdi-monitor man page

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10196 17933a7a-c749-41c5-a318-cba88f637d49

7 years agofix typos in some xpp utils
Tzafrir Cohen [Fri, 9 Sep 2011 10:59:39 +0000 (10:59 +0000)]
fix typos in some xpp utils

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10194 17933a7a-c749-41c5-a318-cba88f637d49

7 years agoxpp: waitfor_xpds: higher and configurable timeout
Tzafrir Cohen [Mon, 5 Sep 2011 09:05:48 +0000 (09:05 +0000)]
xpp: waitfor_xpds: higher and configurable timeout

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

7 years agodahdi-perl: Also get USB loaded driver from usbfs
Oron Peled [Thu, 25 Aug 2011 10:32:17 +0000 (10:32 +0000)]
dahdi-perl: Also get USB loaded driver from usbfs

Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10153 17933a7a-c749-41c5-a318-cba88f637d49

7 years agodahdi-perl: Freepbxdb config generator
Tzafrir Cohen [Thu, 18 Aug 2011 15:38:45 +0000 (15:38 +0000)]
dahdi-perl: Freepbxdb config generator

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

7 years agoREADME.Astribank: HWEC and build instructions
Tzafrir Cohen [Wed, 10 Aug 2011 15:31:22 +0000 (15:31 +0000)]
README.Astribank: HWEC and build instructions

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10104 17933a7a-c749-41c5-a318-cba88f637d49

7 years agoxpp: pri_termtype: match complete SPAN patterns
Tzafrir Cohen [Tue, 9 Aug 2011 13:11:20 +0000 (13:11 +0000)]
xpp: pri_termtype: match complete SPAN patterns

Match complete span patterns, to avoid pattern 'SPAN/1' from matching
e.g. span 12 (SPAN/12).

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10101 17933a7a-c749-41c5-a318-cba88f637d49

7 years agoExtra README fixes: 'th' and ztcfg
Tzafrir Cohen [Tue, 2 Aug 2011 17:28:23 +0000 (17:28 +0000)]
Extra README fixes: 'th' and ztcfg

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10087 17933a7a-c749-41c5-a318-cba88f637d49

7 years agospelling: ocnfig.status and such branched-2.5.y
Tzafrir Cohen [Tue, 2 Aug 2011 17:20:01 +0000 (17:20 +0000)]
spelling: ocnfig.status and such

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10085 17933a7a-c749-41c5-a318-cba88f637d49

7 years agopatlooptest: Ignore the first buffered event
Russ Meyerriecks [Thu, 21 Jul 2011 17:29:34 +0000 (17:29 +0000)]
patlooptest: Ignore the first buffered event

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

7 years agoastribank_hook: startup lock and more
Tzafrir Cohen [Thu, 21 Jul 2011 13:40:18 +0000 (13:40 +0000)]
astribank_hook: startup lock and more

* 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

7 years agoSpan.pm: Process the /proc/dahdi/<x> files atomically.
Shaun Ruffell [Tue, 12 Jul 2011 23:01:02 +0000 (23:01 +0000)]
Span.pm: Process the /proc/dahdi/<x> files atomically.

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

7 years agoxpp: astribank_hexload: yes, we HAVE_OCTASIC
Tzafrir Cohen [Mon, 11 Jul 2011 18:02:29 +0000 (18:02 +0000)]
xpp: astribank_hexload: yes, we HAVE_OCTASIC

Hardwire this for now, as this does not come from autoconf.

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10034 17933a7a-c749-41c5-a318-cba88f637d49

7 years agoxpp: support loading Octasic EC firmware
Tzafrir Cohen [Sun, 10 Jul 2011 16:25:18 +0000 (16:25 +0000)]
xpp: support loading Octasic EC firmware

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

7 years agoxpp: A copy of oct612x in dahdi-tools
Tzafrir Cohen [Sun, 10 Jul 2011 16:10:32 +0000 (16:10 +0000)]
xpp: A copy of oct612x in dahdi-tools

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

7 years agosystem.conf.sample: Add note regarding cross connecting spans on B410P.
Shaun Ruffell [Tue, 5 Jul 2011 20:13:49 +0000 (20:13 +0000)]
system.conf.sample: Add note regarding cross connecting spans on B410P.

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

7 years agofix registration order for more than 9 Astribanks
Tzafrir Cohen [Thu, 23 Jun 2011 17:33:43 +0000 (17:33 +0000)]
fix registration order for more than 9 Astribanks

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

7 years agodahdi_genconf: apply termtype to Digium HA8 BRI
Tzafrir Cohen [Thu, 16 Jun 2011 09:35:32 +0000 (09:35 +0000)]
dahdi_genconf: apply termtype to Digium HA8 BRI

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

7 years agotools: Allow pattern tools to access channels above the device file limit
Kinsey Moore [Tue, 7 Jun 2011 19:44:34 +0000 (19:44 +0000)]
tools: Allow pattern tools to access channels above the device file limit

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

7 years agoxpp: this is the right place for astribank_close()
Tzafrir Cohen [Tue, 7 Jun 2011 10:28:31 +0000 (10:28 +0000)]
xpp: this is the right place for astribank_close()

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9973 17933a7a-c749-41c5-a318-cba88f637d49

7 years agozonedata: Add support for United Arab Emirates.
Shaun Ruffell [Tue, 24 May 2011 15:14:32 +0000 (15:14 +0000)]
zonedata: Add support for United Arab Emirates.

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

7 years agozonedata: Add support for Costa Rica.
Shaun Ruffell [Tue, 24 May 2011 15:14:25 +0000 (15:14 +0000)]
zonedata: Add support for Costa Rica.

Add in the costa Rica zonedata.

(closes issue #19069)
Reported by: desafiocostarica

Signed-off-by: Shaun Ruffell <sruffell@digium.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9919 17933a7a-c749-41c5-a318-cba88f637d49

7 years agotools: Allow patlooptest to activate and handle buffer events
Kinsey Moore [Mon, 18 Apr 2011 21:20:10 +0000 (21:20 +0000)]
tools: Allow patlooptest to activate and handle buffer events

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

7 years agoastribank_is_starting.c: do have timeout (typo)
Tzafrir Cohen [Wed, 16 Mar 2011 14:32:27 +0000 (14:32 +0000)]
astribank_is_starting.c: do have timeout (typo)

Due to a typo the option for not using a timeout was always used.

Regression since r9426.

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9831 17933a7a-c749-41c5-a318-cba88f637d49

7 years agodahdi.init: LSB short description
Tzafrir Cohen [Wed, 16 Mar 2011 14:23:09 +0000 (14:23 +0000)]
dahdi.init: LSB short description

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9830 17933a7a-c749-41c5-a318-cba88f637d49

7 years agoxpp: use 'xtalk' for the USB access code
Oron Peled [Thu, 10 Mar 2011 18:48:11 +0000 (18:48 +0000)]
xpp: use 'xtalk' for the USB access code

* 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

7 years agodahdi-perl: more left-over $span->xpd
Tzafrir Cohen [Sun, 6 Feb 2011 18:39:57 +0000 (18:39 +0000)]
dahdi-perl: more left-over $span->xpd

Replace the remaining $span->xpd with xpd_of_span().

Following up on r9648.

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9731 17933a7a-c749-41c5-a318-cba88f637d49

7 years agodahdi-perl: fix xpp driver in dahdi_hardware
Tzafrir Cohen [Tue, 25 Jan 2011 10:11:36 +0000 (10:11 +0000)]
dahdi-perl: fix xpp driver in dahdi_hardware

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

7 years agodahdi-perl: left-over $span->xpd
Tzafrir Cohen [Thu, 20 Jan 2011 18:06:38 +0000 (18:06 +0000)]
dahdi-perl: left-over $span->xpd

Replace one remaining $span->{XPD} with xpd_of_span().

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9648 17933a7a-c749-41c5-a318-cba88f637d49

8 years agoREADME, UPGRADE.txt, system.conf.sample: Add documentation for using HWEC
Kinsey Moore [Thu, 9 Dec 2010 22:44:52 +0000 (22:44 +0000)]
README, UPGRADE.txt, system.conf.sample: Add documentation for using HWEC

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

8 years agodahdi_maint: Added the loopup/loopdown functionality
Russ Meyerriecks [Wed, 8 Dec 2010 22:14:29 +0000 (22:14 +0000)]
dahdi_maint: Added the loopup/loopdown functionality

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

8 years agoAdd 'install-tests' Makefile target.
Jason Parker [Mon, 29 Nov 2010 17:53:50 +0000 (17:53 +0000)]
Add 'install-tests' Makefile target.

Acked-by: Shaun Ruffell <sruffell@digium.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9499 17933a7a-c749-41c5-a318-cba88f637d49

8 years agodahdi_genconf: Don't generate configurations that use channel 16 on E1 CAS
Kinsey Moore [Wed, 17 Nov 2010 15:32:52 +0000 (15:32 +0000)]
dahdi_genconf: Don't generate configurations that use channel 16 on E1 CAS

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

8 years agoxpp_fxloader: Don't try to load FPGA firmware twice
Tzafrir Cohen [Tue, 16 Nov 2010 10:56:54 +0000 (10:56 +0000)]
xpp_fxloader: Don't try to load FPGA firmware twice

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

8 years agodahdi_maint: Minor name change for the error counters
Russ Meyerriecks [Thu, 11 Nov 2010 22:32:27 +0000 (22:32 +0000)]
dahdi_maint: Minor name change for the error counters

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

8 years agodahdi_scan: Show CAS framing on the framing line.
Shaun Ruffell [Wed, 10 Nov 2010 16:19:36 +0000 (16:19 +0000)]
dahdi_scan: Show CAS framing on the framing line.

Also, always append "/CRC4" on any span where that was specified as an
option.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Kinsey Moore <kmoore@digium.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9473 17933a7a-c749-41c5-a318-cba88f637d49

8 years agoFixed up the loss of crc4-multiframe alignment logic
Russ Meyerriecks [Mon, 25 Oct 2010 18:58:17 +0000 (18:58 +0000)]
Fixed up the loss of crc4-multiframe alignment logic

Loss of crc4-multiframe alignment on an E1 link is not a condition which
brings the span down. The span will continue to run as long as it can
maintain double frame alignment. Because of this, we cannot place the
LMFA alarm in the usual spaninfo.alarms member, due to userspace
programs using this as a catch-all for a span being up or down.

We can detect the alarm by watching the frame error counter (fecount).
If it continuously increments, the span is configured for crc4, and the
span remains OK (alarms = 0), then we are in loss of crc4-multiframe
state.

In order to test this alarm, you'll need to synthesize a loss of crc4
alignment on the span. You can usually do this by configuring the local
span to use crc4 and the remote end to not use crc4. I used the Fireberd
6000 in my lab to do this.

dahdi-743 & dahdi-420

Acked-by: Shaun Ruffell <sruffell@digium.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9458 17933a7a-c749-41c5-a318-cba88f637d49

8 years agoDahdi::Hardware: Support beroNet BN4S0e PCI Express card
Tzafrir Cohen [Wed, 20 Oct 2010 18:02:35 +0000 (18:02 +0000)]
Dahdi::Hardware: Support beroNet BN4S0e PCI Express card

Add extra PCI IDs to support "beroNet BN4S0e PCI Express 4x S0 Karte".

Origin: http://bugs.debian.org/600839

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9452 17933a7a-c749-41c5-a318-cba88f637d49

8 years agoastribank_is_starting: use semop if no semtimedop
Tzafrir Cohen [Sun, 17 Oct 2010 18:41:24 +0000 (18:41 +0000)]
astribank_is_starting: use semop if no semtimedop

astribank_is_starting should use a timeout for the semaphore, but if the
GNU-specific semtimedop() is not available, we'll just fall back to using
semop with no time out. Not as good, but better than nothing.

(closes issue #16783)
Reported by: abelbeck

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9426 17933a7a-c749-41c5-a318-cba88f637d49

8 years agodahdi_cfg: DAHDI_INDIRECT -> DAHDI_SPECIFY when configuring pciradio channels.
Shaun Ruffell [Mon, 20 Sep 2010 20:30:49 +0000 (20:30 +0000)]
dahdi_cfg: DAHDI_INDIRECT -> DAHDI_SPECIFY when configuring pciradio channels.

While slightly less efficient, this is only used when configuring the
channels initially (not the hot path) and allows dahdi-base.c to assume
that the open "file" pointer always refers to the channel on which to
perform the operation.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9352 17933a7a-c749-41c5-a318-cba88f637d49

8 years agotonezone: Add Macao,China to tone zone data
Russ Meyerriecks [Wed, 8 Sep 2010 22:15:22 +0000 (22:15 +0000)]
tonezone: Add Macao,China to tone zone data

Adding Macao tone zone data according to
http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf

(closes issue #17744)
Reported by: alfredtang
Patches:
      zonedata.patch uploaded by alfredtang (license 1094)

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9313 17933a7a-c749-41c5-a318-cba88f637d49

8 years agodahdi.init: Remove reference to dahdi_dummy.
Shaun Ruffell [Tue, 7 Sep 2010 18:27:57 +0000 (18:27 +0000)]
dahdi.init: Remove reference to dahdi_dummy.

Module 'dahdi_dummy.ko' is no longer needed for DAHDI to provide timing,
therefore we can remove the explicit load of dahdi_dummy, which by
default is aliased to dahdi.ko anyway.  If you've edited the DAHDI
Kbuild file in order to build dahdi_dummy explicitly, then you should
add dahdi_dummy to /etc/dahdi/modules in order to load it, but this is
not needed for normal operation.

(issue #17959)
Reported by: glen201

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9309 17933a7a-c749-41c5-a318-cba88f637d49

8 years agoPPP: Fix an incorrect function call that was causing dahdi.so to fail to load branched-2.4.y
Kinsey Moore [Tue, 31 Aug 2010 16:12:53 +0000 (16:12 +0000)]
PPP: Fix an incorrect function call that was causing dahdi.so to fail to load

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9220 17933a7a-c749-41c5-a318-cba88f637d49

8 years agoImport DAHDI-Tools r9159
Asterisk Development Team [Wed, 18 Aug 2010 13:49:24 +0000 (13:49 +0000)]
Import DAHDI-Tools r9159

This revision of DAHDI-Tools is the base revision for the switch to
git.

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/tools/trunk@9159

5 years agoImport menuselect r1110
Asterisk Development Team [Tue, 5 Feb 2013 20:28:29 +0000 (14:28 -0600)]
Import menuselect r1110

Menuselect was originally included in the DAHDI-Tools repository with an svn
external. Since git does not handle externals so well, menuselect is being
brought into the tree directly. This allows menuselect to be present for all the
commits on the 2.4, 2.5, and 2.6 releases.

The command is:
  $ svn export http://svn.asterisk.org/svn/menuselect/trunk menuselect

Signed-off-by: Shaun Ruffell <sruffell@digium.com>