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.asterisk.org/svn/dahdi/tools/branches/2.5@10186 a0bf4364-ded3-4de4-8d8a-66a801d63aff
README.Astribank: HWEC and build instructions

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/branches/2.5@10187 a0bf4364-ded3-4de4-8d8a-66a801d63aff
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.asterisk.org/svn/dahdi/tools/branches/2.5@10188 a0bf4364-ded3-4de4-8d8a-66a801d63aff
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>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10213

git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/branches/2.5@10255 a0bf4364-ded3-4de4-8d8a-66a801d63aff
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>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10214

git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/branches/2.5@10256 a0bf4364-ded3-4de4-8d8a-66a801d63aff
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.

git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/branches/2.5@10354 a0bf4364-ded3-4de4-8d8a-66a801d63aff
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.asterisk.org/svn/dahdi/tools/branches/2.5@10355 a0bf4364-ded3-4de4-8d8a-66a801d63aff
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.asterisk.org/svn/dahdi/tools/branches/2.5@10356 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Fix GCC 4.6 "set but not used" warnings

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

git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/branches/2.5@10357 a0bf4364-ded3-4de4-8d8a-66a801d63aff
xpp: xpp_fxloader: regressions from r10355

* 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.asterisk.org/svn/dahdi/tools/branches/2.5@10370 a0bf4364-ded3-4de4-8d8a-66a801d63aff
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.asterisk.org/svn/dahdi/tools/branches/2.5@10371 a0bf4364-ded3-4de4-8d8a-66a801d63aff