5 years agopinned-spans: remove '--enable-pinned' from configure
Oron Peled [Tue, 15 Oct 2013 14:45:38 +0000 (17:45 +0300)]
pinned-spans: remove '--enable-pinned' from configure

pinned-spans utilities are now essential:
* Called by udev rules
* Called by dahdi_genconf

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

5 years agopinned-spans: fix examples in configuration files
Oron Peled [Tue, 15 Oct 2013 17:56:31 +0000 (20:56 +0300)]
pinned-spans: fix examples in configuration files

* Correctly use the new "location" attribute
* Document the possibility to match against sysfs devpath
  (used to be the "location")

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

5 years agopinned-spans: fix configuration file names
Oron Peled [Tue, 15 Oct 2013 17:54:54 +0000 (20:54 +0300)]
pinned-spans: fix configuration file names

* Install them as *.conf.sample -- that's what they are
* Correctly rename spantype.conf to span-types.conf (new name)

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

5 years agodahdi_genconf: Do not fail if pinned/assigned span utilities were not installed. v2.8.0-rc2 v2.8.0-rc3 v2.8.0-rc4
Shaun Ruffell [Thu, 14 Nov 2013 18:19:45 +0000 (12:19 -0600)]
dahdi_genconf: Do not fail if pinned/assigned span utilities were not installed.

If you installed dahdi tools and did not specify DAHDI_PINNED=yes on the
makefile, when you run dahdi_genconf you would get an error like the following:

  # dahdi_genconf
  sh: span_types: command not found
  Command failed (status=32512): 'span_types dumpconfig > /etc/dahdi/span-types.conf' at ...

This change allows the generator for span-types.conf and span-assignements.conf
check for the existence of the utilities before attempting to call them.

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

5 years agowcte43x: Teach tools about the wcte43x driver. v2.8.0-rc1
Shaun Ruffell [Mon, 11 Nov 2013 21:39:20 +0000 (15:39 -0600)]
wcte43x: Teach tools about the wcte43x driver.

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

5 years agowcaxx: Teach tools about the wcaxx driver.
Shaun Ruffell [Mon, 11 Nov 2013 21:35:56 +0000 (15:35 -0600)]
wcaxx: Teach tools about the wcaxx driver.

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

5 years agoxpp_fxloader: support loading AB with ID > 201
Tzafrir Cohen [Mon, 21 Oct 2013 12:16:14 +0000 (15:16 +0300)]
xpp_fxloader: support loading AB with ID > 201

Support loading firmware for Astribanks with bcdDevice > 2.01, as we'll
have 2.02 soon.

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

5 years agofix typos in man-page
Oron Peled [Mon, 14 Oct 2013 09:15:49 +0000 (11:15 +0200)]
fix typos in man-page

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

5 years agoMan pages for span_types and span_assignments
Tzafrir Cohen [Sun, 13 Oct 2013 20:28:29 +0000 (23:28 +0300)]
Man pages for span_types and span_assignments

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

5 years agoRemove dahdi_map, obsoleted by span_assignments
Tzafrir Cohen [Wed, 2 Oct 2013 18:54:58 +0000 (21:54 +0300)]
Remove dahdi_map, obsoleted by span_assignments

dahdi_map can be replaced by span_assignments list / dumpconfig

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

5 years agodahdi_registration: adapt to pinned-spans
Oron Peled [Sun, 29 Sep 2013 16:24:08 +0000 (18:24 +0200)]
dahdi_registration: adapt to pinned-spans

* If xpp.dahdi_autoreg parameter is 'Y' -- Skip actuall registration.
* If dahdi.auto_assign_spans is '0' and there's no /etc/dahdi/pinned-spans.conf
  Than use 'span_assignments auto ...' to assign device spans.
* Since dahdi_registration iterate in correct xpp_order, the span
  assignment logic provides migration path for users who did not
  generate their pinned-spans.conf configuration yet.

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

5 years agospan_assignments: -k / --keys and more
Oron Peled [Sun, 29 Sep 2013 08:09:56 +0000 (10:09 +0200)]
span_assignments: -k / --keys and more

* New functionality (documented in the script header):
  - Alternative "keys" for device matching
  - Added new command line options: --help, --dry-run, --verbose, --key

* Clean sysfs attribute contents from special characters in every use-case.

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

5 years agoDo the Right Thing when there's no config
Tzafrir Cohen [Tue, 1 Oct 2013 19:13:43 +0000 (22:13 +0300)]
Do the Right Thing when there's no config

Do the "right thing" (hopefully. At least for a system with a single
device) if there is are no configuration files:

* No span-types.conf: just ignore it as before. It is optional.
* No pinned-spans.conf: use span_assignments auto (same as having
* No system.conf: generate a temporary one with dahdi_genconf.

This will hopefully allow having a partially-working system, and help
making ut usable with 'span_assignments dumpconfig'. Or maybe just work

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

5 years agodahdi_cfg: can optionally read config from stdin
Oron Peled [Sun, 6 Oct 2013 13:10:48 +0000 (16:10 +0300)]
dahdi_cfg: can optionally read config from stdin

Allow for the convention of '-' marking stdin:

  dahdi_cfg -c -

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

5 years agoAugment dahdi_genconf default generators list
Oron Peled [Mon, 23 Sep 2013 15:11:36 +0000 (17:11 +0200)]
Augment dahdi_genconf default generators list

Run Add spantypes and pinnedspans generators by default.

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

5 years agoadd new dahdi_genconf generators
Oron Peled [Mon, 23 Sep 2013 15:08:49 +0000 (17:08 +0200)]
add new dahdi_genconf generators

* pinnedspas: For /etc/dahdi/pinned-spans.conf
* spantypes: For /etc/dahdi/span-types.conf

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

5 years agoremove unused dahdi_cfg_device_args
Oron Peled [Mon, 23 Sep 2013 15:19:03 +0000 (17:19 +0200)]
remove unused dahdi_cfg_device_args

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

5 years agohandle_device: don't fail if no config files
Tzafrir Cohen [Mon, 23 Sep 2013 17:43:25 +0000 (20:43 +0300)]
handle_device: don't fail if no config files

Allow the udev rule to work well even if there's no span-types.conf

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

5 years agoNewer version of DAHDI hotplug scripts
Oron Peled [Mon, 23 Sep 2013 11:59:14 +0000 (13:59 +0200)]
Newer version of DAHDI hotplug scripts

A newer version of the scripts fully adapted to pinned spans:
* handle_device does not run dahdi_cfg.
* A separate UDEV rule script for that: span_config. Should also work
  for the non-pinned case.
* span_assignments, span_types: add actions 'auto' (manually enable all)
  and 'dumpconfig' (dump current status in the format of configuration
* Fixed name of span_types and span_assignments (no '-').
* spantype.conf renamed span-types.conf: configuration files do have a
* Those two are useful programs, insstalled to /usr/sbin.

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

6 years agobuild_tools/make_version: Teach version string about git. v2.7.0.1 v2.7.0.2
Shaun Ruffell [Wed, 12 Jun 2013 17:03:55 +0000 (12:03 -0500)]
build_tools/make_version: Teach version string about git.

This copies in the make_version script from DAHDI-Linux to allow the version to
be properly reported from builds in git checkouts.

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

6 years agoAdd support for Digium's new te13x line of cards v2.7.0 v2.7.0-rc1
Russ Meyerriecks [Tue, 28 May 2013 22:06:10 +0000 (17:06 -0500)]
Add support for Digium's new te13x line of cards

Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>

6 years agofxotune: Use DAHDI_SPECIFY when opening by integer channel number.
Shaun Ruffell [Thu, 9 May 2013 15:34:20 +0000 (10:34 -0500)]
fxotune: Use DAHDI_SPECIFY when opening by integer channel number.

In DAHDI-Linux 2.7 the layout of the /dev/dahdi files changes so that they are
grouped by span. When opening channels by number all utilities need to use

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

6 years agodahdi_cfg: Make -S option based on spannumber instead of order in config file.
Shaun Ruffell [Thu, 9 May 2013 19:03:46 +0000 (14:03 -0500)]
dahdi_cfg: Make -S option based on spannumber instead of order in config file.

If the config file has two spans defined:


And you only want to configure span-2, you would need to pass -S 1 to
dahdi_cfg. Now make the -S option take the span number as assigned in the
config file.

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

6 years agofxstest: Use DAHDI_SPECIFY when opening by integer channel number.
Shaun Ruffell [Thu, 9 May 2013 15:34:20 +0000 (10:34 -0500)]
fxstest: Use DAHDI_SPECIFY when opening by integer channel number.

In DAHDI-Linux 2.7 the layout of the /dev/dahdi files changes so that they are
grouped by span. When opening channels by number all utilities need to use

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

6 years agoUpdate the configure script as well.
Tzafrir Cohen [Thu, 23 May 2013 23:06:29 +0000 (02:06 +0300)]
Update the configure script as well.

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

6 years agooptionally install pinned files: --enable-pinned
Tzafrir Cohen [Thu, 23 May 2013 22:52:43 +0000 (01:52 +0300)]
optionally install pinned files: --enable-pinned

Add installation of the pinned-spans support to the Makefile. For the
moment, however, they are not installed unless you use ./configure
--enable-pinned or build with 'make DAHDI_PINNED=yes'

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

6 years agoMake udev run dahdi_cfg on each device:
Oron Peled [Thu, 6 Oct 2011 19:03:03 +0000 (21:03 +0200)]
Make udev run dahdi_cfg on each device:

 * New script: dahdi_cfg_device_args:
   - Just like span_assignments, span_types: may be given
     one or more sysfs devpath's
   - Output the required options for dahdi_cfg. E.g:
       "-S 8 -C 15-28"
   - This may be passed (with any other wanted options)
     to the new dahdi_cfg (which supports '-S' and '-C')

 * Use dahdi_cfg_device_args in handle_device so we configure
   each span from udev.

Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>

6 years agobasic user-space for pinned-spans
Oron Peled [Thu, 6 Oct 2011 19:03:00 +0000 (21:03 +0200)]
basic user-space for pinned-spans

handle_device is the basic script intended to be called from udev.

It will call span_types on the span to apply optional
/etc/dahdi/spantype.conf onfiguration settings that need to be applied
before assignment (currently "pri" port types: E1/T1/J1).

Next it assigns span numbers to spans: if configured in
/etc/dahdi/pinned-spans.conf - use those settings. If not: by the order
of loading.

span_types and span_assignments can also be used to report the settings
they are used to configure.

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

6 years agoDon't fail init script if no modules
Tzafrir Cohen [Thu, 23 May 2013 16:49:57 +0000 (19:49 +0300)]
Don't fail init script if no modules

No point in loading the modules if nobody built them yet. It is a common
case for one to install the userspace tools package but not (yet?) build
the modules. See, e.g.  http://bugs.debian.org/706046 .

With this changeset, we exit gracefully in such a case.

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

6 years agoIgnore generated files
Tzafrir Cohen [Thu, 23 May 2013 16:49:56 +0000 (19:49 +0300)]
Ignore generated files

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

6 years agodahdi_scan: Support gaps in channel numbering.
Shaun Ruffell [Wed, 17 Apr 2013 02:33:05 +0000 (21:33 -0500)]
dahdi_scan: Support gaps in channel numbering.

If, via the sysfs attributed introduced in DAHDI-Linux 2.5.0, a user has
configured spans that do not have contiguous channel numbers, dahdi_scan will
not print several of the span attributes in addition to a bad basechan number.

This patch allows dahdi_scan to try and get the basechan for a span from sysfs
as opposed to calculating based on the number of channels in the previous span

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

6 years agoxpp: Fix compile error with fedora 17
Russ Meyerriecks [Wed, 13 Mar 2013 19:28:48 +0000 (14:28 -0500)]
xpp: Fix compile error with fedora 17

One line change to re-include a missing header

Reported-By: Anthony Messina
Internal-Issue-ID: DAHTOOL-60
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>

6 years agomenuselect: Remove last bits completely from the repo
Russ Meyerriecks [Fri, 21 Sep 2012 19:43:49 +0000 (19:43 +0000)]
menuselect: Remove last bits completely from the repo

menuselect has not been used in dahdi-tools since r10411 (7 months ago). This
patch removes menuselect from the repository completely.

Reported-by: Sean Bright
Internal-Issue-ID: DAHTOOL-61
Patches: kill-menuselect.patch by Sean Bright (license #5060)

Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>

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

6 years agodahdi-monitor: Fix broken control-C behavior and -F output option
Russ Meyerriecks [Fri, 21 Sep 2012 17:25:48 +0000 (17:25 +0000)]
dahdi-monitor: Fix broken control-C behavior and -F output option

After hitting control-C when writing a wav file, dahdi_monitor reports
"Failed to read in a full wav header. Expect bad things."

Also when using the -F output option, the wav header is not written.

Reported-by: Richard Miller
Internal-Issue-ID: DAHTOOL-59
Patch: dahdi_monitor.diff by Richard Miller (license #5685)
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>

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

6 years agoxpp: add missing include
Tzafrir Cohen [Thu, 20 Sep 2012 13:46:23 +0000 (13:46 +0000)]
xpp: add missing include

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

6 years agodahdi-tools: xpp: cleanup dead code in xtalk
Oron Peled [Thu, 20 Sep 2012 13:45:06 +0000 (13:45 +0000)]
dahdi-tools: xpp: cleanup dead code in xtalk

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

6 years agoxtalk: checkpatch clean (almost)
Oron Peled [Thu, 20 Sep 2012 13:43:41 +0000 (13:43 +0000)]
xtalk: checkpatch clean (almost)

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

Origin: Xorcom xtalk (r10638)

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

6 years agoxtalk: Demote one ERR() to DBG()
Oron Peled [Thu, 20 Sep 2012 13:41:00 +0000 (13:41 +0000)]
xtalk: Demote one ERR() to DBG()

(caller should decide on policy)

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

Origin: Xorcom xtalk (r9304)

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

6 years agoxtalk: Caller passes xusb_spec to xusb_find_iface()
Oron Peled [Thu, 20 Sep 2012 13:40:40 +0000 (13:40 +0000)]
xtalk: Caller passes xusb_spec to xusb_find_iface()

* This xusb_spec:
  - Is a dummy struct used for this xusb instance only.
  - Is now passed by reference from caller.
  - So caller now manage the life cycle of this struct
* Also, demote one INFO() to DBG() (library should not print
  on its own)
* Also minor fix to DBG() output of spec initialization (leading 0)

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

Origin: Xorcom xtalk (r9303)

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

6 years agoxtalk: allow dump_packet() without debug flags
Oron Peled [Thu, 20 Sep 2012 13:38:39 +0000 (13:38 +0000)]
xtalk: allow dump_packet() without debug flags

xtalk: dump_packet() may now be used without debug flags by passing
mask == 0.

Origin: Xorcom xtalk (r9302)

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

6 years agoREADME.Astribank: load module => module load
Tzafrir Cohen [Sun, 29 Jul 2012 11:31:39 +0000 (11:31 +0000)]
README.Astribank: load module => module load

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

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

7 years agodahdi_hardware: Detect the Digium TE820 card.
Shaun Ruffell [Mon, 14 May 2012 16:11:06 +0000 (16:11 +0000)]
dahdi_hardware: Detect the Digium TE820 card.

Adding the TE820 vendor and device ID into PCI.pm allows dahdi_hardware to
recognize the card.

Reported-by: Xavier Hienne
Internal-Issue-ID: DAHTOOL-58
Signed-off-by: Shaun Ruffell <sruffell@digium.com>

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

7 years agoblacklist: Add hfcmulti, hfcpci, and netjet.
Shaun Ruffell [Wed, 28 Mar 2012 16:35:23 +0000 (16:35 +0000)]
blacklist: Add hfcmulti, hfcpci, and netjet.

If DAHDI is installed the vast majority of users will most likely not want
hfcmulti, hfcpci, or netjet loaded since they may conflict with DAHDI drivers
for the TDM400, B410P, and TE11XP cards.

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

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

7 years agoxpp: astribank_hook: wait for udev to settle
Oron Peled [Thu, 22 Mar 2012 17:38:57 +0000 (17:38 +0000)]
xpp: astribank_hook: wait for udev to settle

When running the astribank_hook (only on Astribanks, in XPP_HOTPLUG_DAHDI
mode), wait for all other Astribanks to create all the required device

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

7 years agoxpp: astribank_allow: useless debug on write
Tzafrir Cohen [Tue, 20 Mar 2012 10:43:00 +0000 (10:43 +0000)]
xpp: astribank_allow: useless debug on write

Remove a useless debug message in the "write" operation.

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

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

7 years agoxpp: fix build warnings
Tzafrir Cohen [Mon, 19 Mar 2012 16:57:24 +0000 (16:57 +0000)]
xpp: fix build warnings

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

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

7 years agoxpp: oct612x: fix build warnings
Tzafrir Cohen [Mon, 19 Mar 2012 16:45:40 +0000 (16:45 +0000)]
xpp: oct612x: fix build warnings

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

7 years agoxpp: add forgotten include
Oron Peled [Thu, 15 Mar 2012 20:46:48 +0000 (20:46 +0000)]
xpp: add forgotten include

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

7 years agoxpp: Update product ID's in Dahdi::Hardware::USB
Oron Peled [Thu, 15 Mar 2012 20:46:27 +0000 (20:46 +0000)]
xpp: Update product ID's in Dahdi::Hardware::USB

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

7 years agoxpp: clobber fpga_load
Oron Peled [Thu, 15 Mar 2012 20:45:57 +0000 (20:45 +0000)]
xpp: clobber fpga_load

* It was replaced long ago by astribank_hexload/astribank_tool/astribank_allow
* It hasn't been used for several releases now, nor updated.
* Time to move into the eternal bit-bucket.
* Left (very) few strings as a tribute...

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

7 years agoxpp: fix manpage of astribank_hexload
Oron Peled [Thu, 15 Mar 2012 20:45:36 +0000 (20:45 +0000)]
xpp: fix manpage of astribank_hexload

* Fixed 'astribanks_tool' string

Signed-off-by: Oron Peled <oron.peled@xorcom.com>

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

7 years agoxpp: Customizable license markers
Oron Peled [Thu, 15 Mar 2012 20:43:57 +0000 (20:43 +0000)]
xpp: Customizable license markers

* 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>

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

7 years agoxpp: Add info to astribank_tool -Q
Oron Peled [Thu, 15 Mar 2012 20:43:18 +0000 (20:43 +0000)]
xpp: Add info to astribank_tool -Q

* In MPP serial protocol add support for SER_STAT_GET command
* Use it to query firmware for:
  - FPGA build configuration number (1 - old main, 2 - new main)
  - Watchdog timer state bit (ready/expired)
  - XPD Alive timer state bit (yes/no)
* Also cleanup the code in mpps_card_info():
  - In all MPP serial commands the send/recive buffers must
    have identical size
  - No need to alias struct pointers to byte-buffers, just use
    the structs themselves as buffers.

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

7 years agoxpp: echo_loader: whitespace cleanup
Oron Peled [Thu, 15 Mar 2012 20:42:56 +0000 (20:42 +0000)]
xpp: echo_loader: whitespace cleanup

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

7 years agoxpp: bugfix: handle echo_loader errors
Oron Peled [Thu, 15 Mar 2012 20:42:33 +0000 (20:42 +0000)]
xpp: bugfix: handle echo_loader errors

* 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>

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

7 years agoxpp: echo_loader.c: add AB id to messages
Oron Peled [Thu, 15 Mar 2012 20:42:10 +0000 (20:42 +0000)]
xpp: echo_loader.c: add AB id to messages

* 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>

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

7 years agoimprove build_tools/dump_sys_state
Oron Peled [Thu, 15 Mar 2012 20:41:49 +0000 (20:41 +0000)]
improve build_tools/dump_sys_state

* Use the new dahdi_sysfs_copy script
* Clean old/unused code
* Add notification output
* Now always creates a tarball - the gzipped copy is many times smaller.
* Without arguments, tarball name is:

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

7 years agonew build_tools/dahdi_sysfs_copy
Oron Peled [Thu, 15 Mar 2012 20:40:52 +0000 (20:40 +0000)]
new build_tools/dahdi_sysfs_copy

Short perl script to copy dahdi related sysfs trees
into a designated directory.

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

7 years agoxpp: xpp_fxloader: improve output
Oron Peled [Thu, 15 Mar 2012 20:36:33 +0000 (20:36 +0000)]
xpp: xpp_fxloader: improve output

* 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

7 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

* 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

7 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

7 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

7 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

7 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

8 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

8 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

8 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

8 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

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

8 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

8 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