Summary:ASTERISK-01193: [post-1.0][patch] support to set via module param max loop current on the proslic
Reporter:Matteo Brancaleoni (mbrancaleoni)Labels:
Date Opened:2004-03-10 17:23:19.000-0600Date Closed:2008-06-07 10:45:04
Versions:Frequency of
Environment:Attachments:( 0) wcfxs.patch5
Description:The maximum allowed loop current on the wcfxs proslic modules is 20mA . According to datasheets this value could be set via reg 71 up to 41mA in step of 3. Sometimes is needed to have more that 20mA, like 30 or 35, expecially when experimenting module resets caused by power alarms. Some devices needs > 20mA to operate correctly. This patch permits to set that value via the module param loopc=xx where xx is a loop current (in mA) between 20 and 41, in steps of 3... 20,23,26,29,23...41
If the value is below or over the limits, is set to the nearest allowed value. If the param is not set, the value is as default, ie 0x00 (20mA)

Example modules.conf exntry:
options wcfxs debug=1 loopc=35
Comments:By: James Golovich (jamesgolovich) 2004-03-10 18:27:26.000-0600

Two possible suggestions

Change loopc to loopcur or loopcurrent
maybe change it so if the loop current is passed out of range, maybe set it to default instead of high...  Just so somebody screwing around doesn't fry their board (if its even possible)

By: Matteo Brancaleoni (mbrancaleoni) 2004-03-11 03:45:46.000-0600

sure that's possible. here's the second patch.
* changed module param from loopc to loopcurrent
* if the value is out of range, set to the default, not to the max

By: twisted (twisted) 2004-04-29 08:39:56

can we add a diff with explanation and example for modules.conf.sample?

By: Matteo Brancaleoni (mbrancaleoni) 2004-05-01 10:38:40

new patch to apply clean on current CVS as of ${bugnote-date}

By: bwitso (bwitso) 2004-05-29 15:36:00

I created a new patch for the current CVS (as of 5/29). I have been using this feature for a little over a week and it has been working great! I needed this for a voice response system connected to a TDM400 fxs port. The port card in the IVR couldn't detect the loop current when it was set to the defualt. Raising it to 32mA did the trick. I need to have this functionality to be able to use the TDM400 in my environment. It's likely that it will help with compatibilty with other telephony and IVR equipment too.

By: twisted (twisted) 2004-06-17 00:09:20

can we make sure this will not interfere with the tdm400 fxo port as well now?  Also, if it doesn't, we need to make sure it compiles cleanly against current cvs of zaptel.  If all is well, i'll put this in markster's todo list for review.

By: bwitso (bwitso) 2004-06-19 18:15:55

I created a new patch for the current CVS as of today. I've been using this for several weeks on a TDM400 with 3 fxs ports and 1 fxo port with excellent results and no problems.

By: twisted (twisted) 2004-06-19 21:17:58

Great.   Just to verify, this does *NOT* change the default operation unless the option is specified.  Also, I did not see in the code where it looks for loopc=, the closest match I found is loopcurrent as a full string.   Please verify the correct method of operation for this patch..  It may be me and my sort of lack in understanding how kernel modules read params, but I just want to have the correct documentation before we file this one.  Maybe you changed it according to jamesgolovich's remark, but if so, it wasn't noted.

By: bwitso (bwitso) 2004-06-19 21:38:36

If you don't specify the line in modules.conf it works as default. And it has been changed to loopcurrent= (not loopc= any more). I should let Matteo answer all this since he did all the hard work coming up with the patch! Thanks Matteo!

By: twisted (twisted) 2004-06-19 22:11:18

Okay.. final question, although I don't think it to be extremely relevant, as it's sort of a trivial patch, is this disclaimed by all parties involved?

By: Matteo Brancaleoni (mbrancaleoni) 2004-06-20 02:53:35

sure, already disclaimed months ago 'cause I already sent some patches :)
also, the note about moving from loopc= to loopcurrent= modules param is
in bugnote #2.

edited on: 06-20-04 02:38

By: bwitso (bwitso) 2004-07-01 18:15:32

I don't think I have anything to disclaim, but in case you were waiting for a response from me I do.

By: Olle Johansson (oej) 2004-07-16 14:22:06

Is this stable enough for CVS? Any feedback from markster?


By: Mark Spencer (markster) 2004-09-07 23:46:32

Added to CVS, although it shouldn't have to be used in principle.

By: Digium Subversion (svnbot) 2008-06-07 10:45:04

Repository: dahdi
Revision: 453

U   trunk/wcfxs.c
U   trunk/wctdm.c

r453 | markster | 2008-06-07 10:45:03 -0500 (Sat, 07 Jun 2008) | 2 lines

Make loop current settable (bug ASTERISK-1193)