If we have /etc/dahdi/span-types.conf but it doesn't have any
line, we should avoid using the option -S to astribank_hexload.
Fix the test for this.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
The variable 'default_law' was the result of a partial renaming of the
original variable 'law'. Let's keep all of them in sync.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
* Added optional '-S <span-spec>' argument to astribank_hexload:
- Allow passing PRI span specification to EC firmware loader.
- The span specifications is whitespace/comma separate list
of items.
- Each item is: <span>:<type> (Example: 3:T1)
- The <span> may use shell-like globbing (e.g: *:E1 or [12]:T1)
- Any span not matched in the span specification will be set
as without the new '-S' option (i.e: depends on the '-A' option).
* Adapted xpp_fxloader:
- Read specification for both device label and wildcard from
/etc/dahdi/span-types.conf
- If the result is non-empty, pass it as '-S <span-spec>' to
the EC firmware loader.
* Read first from modern configuration files
(/etc/dahdi/span-types.conf)
- Support either exact label match or complete '*' match in the
configuration file.
* Fallback to legacy /etc/dahdi/xpp.conf
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
* Replaced (almost) all $LOGGER to echo:
- In interactive use -- that what we want anyway
- When called from UDEV, the subprocess stdout/stderr is piped to
$LOGGER anyway (at the end of the script)
- No need for many $LOGGER instances (each with its own pid)
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@10495 17933a7a-c749-41c5-a318-cba88f637d49
* 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
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
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
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
* 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
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