summaryrefslogtreecommitdiff
path: root/xpp
AgeCommit message (Collapse)Author
2012-07-29README.Astribank: load module => module loadsvn_2.5Tzafrir Cohen
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10701 git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/branches/2.5@10702 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-03-22xpp: astribank_hook: wait for udev to settleTzafrir Cohen
When running the astribank_hook (only on Astribanks, in XPP_HOTPLUG_DAHDI mode), wait for all other Astribanks to create all the required device files. Signed-off-by: Oron Peled <oron.peled@xorcom.com> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10585 git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/branches/2.5@10595 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-03-20xpp: astribank_allow: useless debug on writeTzafrir Cohen
Remove a useless debug message in the "write" operation. Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10549 git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/branches/2.5@10554 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-03-20xpp: fix build warningsTzafrir Cohen
Unlike original: also fixed fpga_load. Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10543 git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/branches/2.5@10546 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-03-20xpp: oct612x: fix build warningsTzafrir Cohen
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10542 git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/branches/2.5@10545 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-03-15xpp: Update product ID's in Dahdi::Hardware::USBTzafrir Cohen
Signed-off-by: Oron Peled <oron.peled@xorcom.com> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10505 git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/branches/2.5@10514 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-03-15xpp: fix manpage of astribank_hexloadTzafrir Cohen
* Fixed 'astribanks_tool' string Signed-off-by: Oron Peled <oron.peled@xorcom.com> Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10503 git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/branches/2.5@10513 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-03-15xpp: Customizable license markersTzafrir Cohen
* License strings markers (BEGIN.../END...) can be customized * By default, generate a "generic" license markers * We accept any (paired) markers from the valid list Signed-off-by: Oron Peled <oron.peled@xorcom.com> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10502 git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/branches/2.5@10512 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-03-15xpp: bugfix: handle echo_loader errorsTzafrir Cohen
* I/O errors of the device were not propagated up by echo_loader * As a result, Octasic load failure did not prevented USB renumeration * Make consistent return values: - In our functions: ret < 0 is error - In Octasic functions (UINT32): return Octasic error codes * All error paths prints error messages (so we see how the error propagates) * Also changed error order testing in init_octasic(): Return status should be tested before the values of by-reference parameters Signed-off-by: Oron Peled <oron.peled@xorcom.com> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10499 git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/branches/2.5@10510 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-03-15xpp: echo_loader.c: add AB id to messagesTzafrir Cohen
* Define new macros AB_INFO(), AB_ERR() that prefix their message with the astribank information (usb device + serial number) * Replace all INFO()/ERR() messages in echo_loader.c with the new macros Signed-off-by: Oron Peled <oron.peled@xorcom.com> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10498 git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/branches/2.5@10509 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-03-15xpp: xpp_fxloader: improve outputTzafrir Cohen
* 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> Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10495 git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/branches/2.5@10508 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> Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10491 git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/branches/2.5@10507 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> Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10465 git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/branches/2.5@10467 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/branches/2.5@10371 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-12-04xpp: xpp_fxloader: regressions from r10355Tzafrir 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/branches/2.5@10370 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-11-30xpp: 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/branches/2.5@10356 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-11-30xpp: 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/branches/2.5@10355 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-11-30xpp: 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. git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/branches/2.5@10354 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-10-21dahdi_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> 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
2011-10-21dahdi_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> 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
2011-09-07xpp: 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/branches/2.5@10188 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-09-07README.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/branches/2.5@10187 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-09-07xpp: 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/branches/2.5@10186 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-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-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-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-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
2011-01-25dahdi-perl: fix xpp driver in dahdi_hardwareTzafrir Cohen
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.asterisk.org/svn/dahdi/tools/trunk@9699 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-20dahdi-perl: left-over $span->xpdTzafrir Cohen
Replace one remaining $span->{XPD} with xpd_of_span(). Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@9648 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-11-17dahdi_genconf: Don't generate configurations that use channel 16 on E1 CASKinsey Moore
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.asterisk.org/svn/dahdi/tools/trunk@9485 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-11-16xpp_fxloader: Don't try to load FPGA firmware twiceTzafrir Cohen
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.asterisk.org/svn/dahdi/tools/trunk@9482 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-10-20Dahdi::Hardware: Support beroNet BN4S0e PCI Express cardTzafrir Cohen
Add extra PCI IDs to support "beroNet BN4S0e PCI Express 4x S0 Karte". Origin: http://bugs.debian.org/600839 git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@9452 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-10-17astribank_is_starting: use semop if no semtimedopTzafrir Cohen
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.asterisk.org/svn/dahdi/tools/trunk@9426 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-08-18DAHDI-perl: Config (sort of) for dynamic channelsTzafrir Cohen
Generate some sort of configuration for dynamic channels. Usable enough for testing. git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@9159 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-08-03dahdi-perl: also detect Aligera cardsTzafrir Cohen
(closes issue #17783) Reported by: frawd Patches: dahdi-tools_aligera.patch uploaded by frawd (license 610) git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@9079 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-30perl: make sure the channel parser recognizes "Reserved" for unusable ↵Kinsey Moore
channels and fix a bug preventing E&M-E1 from being detected properly git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@9066 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-28twinstar: err on an invalid command.Tzafrir Cohen
git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@9031 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-22increase maximal firmware delay to 15 secondsTzafrir Cohen
Hmm... how badly congested can the startup of Centos be? git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@8964 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-21More hyphen/minus fixes.Tzafrir Cohen
git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@8954 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-20xpp_fxloader: replace a sleep with a sleep loopTzafrir Cohen
For newer kernels there's no need to sleep at all. For Centos5 systems there seems to be a need for a large sleep for firmware load at boot time. So let's make it a loop. git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@8951 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-20README.Astribank: new VMWI settingsTzafrir Cohen
git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@8948 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-14dahdi_genconf: better error message for a bad generator moduleTzafrir Cohen
git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@8924 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-14Allow using CONNECTOR/LABEL in genconf_parametersTzafrir Cohen
Allow using CONNECTOR/LABEL in addition to SPAN and NUM for pri_termtype in genconf_parameters git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@8923 a0bf4364-ded3-4de4-8d8a-66a801d63aff