[App_rpt-users] Parallel printer port output pins?
Chuck Henderson
rpt2 at chuck.midlandsnetworking.com
Mon Apr 11 09:05:32 UTC 2011
Kyle,
Thanks for the help. I have it working now. First thing I did after
receiving your email was ground all of the ground pins. That may have
helped.
I think it may have been working all along but I made an
incorrect assumption.
I assumed that the "pp2=out1" type lines in usbradio.conf would initialize
the pins to that state as soon as asterisk was started.
It does not. It just initializes how the pins will be set when the next
"cop 61" is activated or a PTT event happens.
I came up with a fix for this so that the initialization commands actually
initialize the pins on startup.
My fix may not be the right way to do this but it works for me for now.
(Jim, please tell me if this is okay or if there is a better solution.)
Here is a diff showing the fix.
- - - - - - - - - cut here - - - - - - - -
*** chan_usbradio.c-before 2011-03-13 05:58:41.000000000 -0500
--- chan_usbradio.c-after-fix 2011-04-11 03:27:37.000000000 -0500
***************
*** 5720,5725 ****
--- 5720,5731 ----
if (haspp == 1) ast_verbose(VERBOSE_PREFIX_3 "Parallel port
is %s\n",pport);
else if (haspp == 2) ast_verbose(VERBOSE_PREFIX_3 "Parallel
port is at %04x hex\n",pbase);
}
+ //CAH modified 2011-04-11 begin
+ if ((hasout == 1) && (haspp > 0))
+ {
+ ppwrite(pp_val);
+ }
+ //CAH modified 2011-04-11 end
ast_config_destroy(cfg);
- - - - - - - - - cut here - - - - - - - -
Chuck
On Sun, Apr 10, 2011 at 10:01 PM, K&R Yoksh <yokshs at sbcglobal.net> wrote:
>
> Hello Chuck,
>
>
> I have had great luck with the parallel port under app_rpt.
>
> First thing to try is: (Make sure Asterisk is controlling the
> parallel port!)
>
> # lsof /dev/parport0
> COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
> asterisk 25664 root 24u CHR 99,0 1010 /dev/parport0
>
> Next, make sure parallel port pins 18-25 are grounded. Some ports are quite
> picky about this.
>
> Here is my usbradio.conf template for using an IRLP/PLRI board:
>
> [usb1234]
> rxchannel=usb1234
> ;
> pp3 = ptt ; Parallel port settings
> pp11 = cor
> pp4=out0 ; in, cor or ctcss
> pp5=out0 ; multiple pins can be set to PTT if desired
> pp6=out0 ; pins 4,5,6 are AUX 1,2,3, default off
> ;
> hdwtype=0
> rxboost=1
> txboost=0
> rxctcssrelax=1
> txctcssdefault=100.0
> rxctcssfreqs=100.0
> txctcssfreqs=100.0
> carrierfrom=ppinvert
> ctcssfrom=no
> rxdemod=speaker
> txprelim=no
> txlimonly=no
> txtoctype=no
> txmixa=voice
> txmixb=no
> invertptt=0
> duplex=0
>
> rxondelay=0
> rxnoisefiltype=0
> eeprom=0
>
>
> Next, here's a little script to control parallel pins from a prompt:
>
> #!/bin/bash
> # Script to control PLRI Aux ports from prompt
> # by Kyle Yoksh January 2011
> #
> # Usage: pport [node no] [parallel port pin] [logic state]
> #
> # Example, pport 2211 2 1 turns pp pin 2 on
> #
> asterisk -r -x "rpt cmd $1 cop 61,PP$2"="$3 0"
> One last thought, I've noticed that app_rpt will not reliably control the
> parallel port if you have a node configured in rpt.conf for
> "rxchannel=Radio/usbxxxx" without a fob present.
>
> 73 for now. Good luck.
>
> Kyle
>
> K0KN
>
>
>
> --- Original Message ---
>
>
> I am trying to use the parallel printer port output pins on an Intel ATOM
> D510MO mother board. I have included below my usbradio.conf file.
> For testing there is a board with LED's attached to the port and on POST it
> displays various patterns then nothing until fully booted when it shows
> only
> pin 4 active.
> I have tried this with the pport commented out and with the pbase commented
> out and the same result. I have tried each of the options available in the
> BIOS setup for the parallel port and same result.
> The only lines found in the log files that seem to relate to the parport
> are
> the following...
>
> Apr 10 13:26:10 server8 kernel: parport: PnPBIOS parport detected.
> Apr 10 13:26:10 server8 kernel: parport0: PC-style at 0x378, irq 7 [PCSPP]
> Apr 10 13:26:10 server8 kernel: lp0: using parport0 (interrupt-driven).
> Apr 10 13:26:12 server8 asterisk[2548]: VERBOSE[2548]: -- Parallel port
> is /dev/parport0
>
>
> Does anyone have any suggestions as to how I can troubleshoot this or what
> might be the problem?
> Chuck
>
> - - - - - cut here - - - - -
>
> ; Usbradio channel driver Configuration File
> [general]
> ; General config options that apply to entire channel driver.
> pport=/dev/parport0 ; Specify parport device (optional)
> pbase=0x378 ; Specify printer port I/O address (if not using
> parport driver) (optional)
>
> [usb27722]
> ; set default output pin states
> pp2=out0 ; 1 to select low power, 0 to select high power transmit
> pp3=out1 ; 1 to enable aux input on repeater
> pp4=out0 ; 1 to disable repeater transmitter
> pp5=out1 ; 1 to select AC operation 0 to select battery test
> operation
> pp6=out0 ; 1 to enable space heater
> pp7=out0 ; 1 to light yellow test LED
> pp8=out1 ; 1 to light red test LED
> pp9=out1 ; 1 to light green test LED
> ;
> hdwtype=0
> rxboost=1
> txboost=1
> rxctcssrelax=1
> txctcssdefault=103.5
> rxctcssfreqs=103.5
> txctcssfreqs=103.5
> ;rxctcssoverride=0
> carrierfrom=dsp
> ctcssfrom=dsp
> rxdemod=flat
> txprelim=yes
> txlimonly=no
> txtoctype=no
> txmixa=composite
> txmixb=voice
> invertptt=0
> duplex=1
> rxondelay=0
> rxnoisefiltype=0
> eeprom=0
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.keekles.org/pipermail/app_rpt-users/attachments/20110411/bcfe31a8/attachment.html>
More information about the App_rpt-users
mailing list