summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-03-15xpp: perl_modules: Remove /proc/xpp usageTzafrir Cohen
* 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.asterisk.org/svn/dahdi/tools/trunk@10492 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-03-15xpp: clean 'Extrainfo' EEPROM fieldTzafrir Cohen
* 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.asterisk.org/svn/dahdi/tools/trunk@10491 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-02-22xpp: improved waitfor_xpdsTzafrir Cohen
* 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.asterisk.org/svn/dahdi/tools/trunk@10465 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-01-08Disable menuselect in dahdi-toolsTzafrir Cohen
* 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.asterisk.org/svn/dahdi/tools/trunk@10411 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-12-04xpp: two extra product IDs: 1112, 1164Tzafrir Cohen
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/trunk@10368 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-12-04xpp: xpp_fxloader: regressions from r10348Tzafrir Cohen
* 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/trunk@10366 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-11-30DAHDI-perl: Fix PCI ID for Rhino R4T1 (0b0b:0305)Tzafrir Cohen
(Closes issue DAHTOOL-56) Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@10358 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-11-29xpp: recovery firmware in xpp_fxloaderTzafrir Cohen
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/trunk@10349 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-11-29xpp: Serialized Parallel load; E-Main-3 firmwareTzafrir Cohen
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/trunk@10348 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-11-21xpp: astribank_hexload: we need more linesTzafrir Cohen
* 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.asterisk.org/svn/dahdi/tools/trunk@10343 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-11-02Fix GCC 4.6 "set but not used" warningsTzafrir Cohen
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@10311 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-11-02dahdi_genconf: Allow it to recognize the TE8xx 8-port cards.Shaun Ruffell
Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@10308 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-11-02dahdi_cfg: add '-S <spanno>' and '-C <chan-ranges>'Tzafrir Cohen
* 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.asterisk.org/svn/dahdi/tools/trunk@10306 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-11-01dahdi_pcap: Imported user space utility for managing pcap streamsRuss Meyerriecks
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.asterisk.org/svn/dahdi/tools/trunk@10293 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-10-23dahdi_perl: Use $Dahdi::sys_base for sysfs pathesTzafrir Cohen
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@10267 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-10-23xpp_order generator: ignore EC XPDTzafrir Cohen
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.asterisk.org/svn/dahdi/tools/trunk@10266 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-10-23chandahdi gen: extens can have any num of digitsTzafrir Cohen
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.asterisk.org/svn/dahdi/tools/trunk@10265 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-10-23Typos in man pages: toolyouTzafrir Cohen
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@10264 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-09-29dahdi_test: Enforce range from 0.0% - 100.0% for accuracy.Shaun Ruffell
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.asterisk.org/svn/dahdi/tools/trunk@10216 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-09-29dahdi_maint: Print 'unsupported' warning if framing errors is -1.Shaun Ruffell
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.asterisk.org/svn/dahdi/tools/trunk@10215 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-09-29dahdi_genconf: Use 'dahdi_scan' to determine span_type for B410P cards.Shaun Ruffell
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.asterisk.org/svn/dahdi/tools/trunk@10214 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-09-29dahdi_genconf: Assume spans with unknown term types are software selectable.Shaun Ruffell
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.asterisk.org/svn/dahdi/tools/trunk@10213 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-09-09Man page for dahdi_maintTzafrir Cohen
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.asterisk.org/svn/dahdi/tools/trunk@10198 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-09-09Update the dahdi-monitor man pageTzafrir Cohen
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@10196 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-09-09fix typos in some xpp utilsTzafrir Cohen
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@10194 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-09-05xpp: waitfor_xpds: higher and configurable timeoutTzafrir Cohen
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/trunk@10177 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-25dahdi-perl: Also get USB loaded driver from usbfsTzafrir Cohen
Signed-off-by: Oron Peled <oron.peled@xorcom.com> Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@10153 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-18dahdi-perl: Freepbxdb config generatorTzafrir Cohen
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.asterisk.org/svn/dahdi/tools/trunk@10142 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-10README.Astribank: HWEC and build instructionsTzafrir Cohen
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@10104 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-09xpp: pri_termtype: match complete SPAN patternsTzafrir Cohen
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/trunk@10101 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-02Extra README fixes: 'th' and ztcfgTzafrir Cohen
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@10087 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-02spelling: ocnfig.status and suchTzafrir Cohen
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@10085 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-07-21patlooptest: Ignore the first buffered eventRuss Meyerriecks
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.asterisk.org/svn/dahdi/tools/trunk@10071 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-07-21astribank_hook: startup lock and moreTzafrir Cohen
* 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.asterisk.org/svn/dahdi/tools/trunk@10068 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-07-12Span.pm: Process the /proc/dahdi/<x> files atomically.Shaun Ruffell
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.asterisk.org/svn/dahdi/tools/trunk@10040 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-07-11xpp: astribank_hexload: yes, we HAVE_OCTASICTzafrir Cohen
Hardwire this for now, as this does not come from autoconf. git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@10034 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-07-10xpp: support loading Octasic EC firmwareTzafrir Cohen
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.asterisk.org/svn/dahdi/tools/trunk@10032 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-07-10xpp: A copy of oct612x in dahdi-toolsTzafrir Cohen
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.asterisk.org/svn/dahdi/tools/trunk@10030 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-07-05system.conf.sample: Add note regarding cross connecting spans on B410P.Shaun Ruffell
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.asterisk.org/svn/dahdi/tools/trunk@10026 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-23fix registration order for more than 9 AstribanksTzafrir Cohen
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.asterisk.org/svn/dahdi/tools/trunk@9986 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-16dahdi_genconf: apply termtype to Digium HA8 BRITzafrir Cohen
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.asterisk.org/svn/dahdi/tools/trunk@9979 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-07tools: Allow pattern tools to access channels above the device file limitKinsey Moore
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.asterisk.org/svn/dahdi/tools/trunk@9975 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-07xpp: this is the right place for astribank_close()Tzafrir Cohen
git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@9973 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-05-24zonedata: Add support for United Arab Emirates.Shaun Ruffell
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.asterisk.org/svn/dahdi/tools/trunk@9920 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-05-24zonedata: Add support for Costa Rica.Shaun Ruffell
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.asterisk.org/svn/dahdi/tools/trunk@9919 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-04-18tools: Allow patlooptest to activate and handle buffer eventsKinsey Moore
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.asterisk.org/svn/dahdi/tools/trunk@9909 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-03-16astribank_is_starting.c: do have timeout (typo)Tzafrir Cohen
Due to a typo the option for not using a timeout was always used. Regression since r9426. git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@9831 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-03-16dahdi.init: LSB short descriptionTzafrir Cohen
git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@9830 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-03-10xpp: use 'xtalk' for the USB access codeTzafrir Cohen
* 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.asterisk.org/svn/dahdi/tools/trunk@9825 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-02-06dahdi-perl: more left-over $span->xpdTzafrir Cohen
Replace the remaining $span->xpd with xpd_of_span(). Following up on r9648. git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@9731 a0bf4364-ded3-4de4-8d8a-66a801d63aff