[arm-allstar] USB GPIO pins

Scott Zimmerman n3xcc at zewireless.com
Mon Jan 15 14:52:04 EST 2018


Lloyd,

I thought that I had sent you the attached text files before.?

You basically need to define what GPIO you want and what it's initial state should be in SimpleUSB.conf. (at the bottom in my 
example file)

You then map DTMF functions to cop commands in rpt.conf. These DTMF commands will then allow you to "bit-bang" the GPIO as 
needed. Once you have that working, I think Doug has a set of macros that will allow you to "write" all of the necessary bits 
with one command.

I found this post. It uses the Rpi pins, but I'm sure it could be modified to use the CM119 GPIO instead:
http://lists.hamvoip.org/pipermail/arm-allstar/2016-January/002640.html

Scott

Scott Zimmerman
Amateur Radio Call N3XCC
474 Barnett Road
Boswell, PA 15531

On 1/15/2018 2:12 PM, "Lloyd Duck via arm-allstar" wrote:
> I’m still working on channel steering a CDM1250 using DTMF.
> 
> Here is the RB-USB RIM schematic and it has GPIO pins 5,6 and 7 to use for the steering.
> 
> This is a USB device and I’m not sure how to control those. Any help?
> 
> http://www.repeater-builder.com/products/pdfs/RB_RIM_Lite.pdf
> 
> ARES®   Amateur Radio Emergency Service®
> Lloyd Duck, W5LND
> Emergency Coordinator
> Howard Co, Texas
> Email: w5lnd at arrl.net
> Cellphone: 432-210-3473
> _______________________________________________
> 
> arm-allstar mailing list
> arm-allstar at hamvoip.org
> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
> 
> Visit the BBB and RPi2/3 web page - http://hamvoip.org
> 
-------------- next part --------------

; Radio Repeater configuration file (for use with app_rpt)


; Your Repeater

**{{SNIP}}**

scheduler = schedule                    ; scheduler stanza
functions = functions                   ; Repeater Function stanza
phone_functions = functions             ; Phone Function stanza
link_functions = functions              ; Link Function stanza

**{{ADD}}** Only if FAN control is desired.
events=events                           ; to add GPIO control
**{{/ADD}}**

**{{SNIP}}**

;statpost_program = /usr/bin/wget,-q,--timeout=15,--tries=1,--output-document=/dev/null
;statpost_url = http://stats.allstarlink.org/uhandler.php ; Status updates

; ** For Limey Linux **
;statpost_program = /bin/wget,-q,--timeout=15,--tries=1,--output-document=/dev/null
;statpost_url = http://stats.allstarlink.org/uhandler.php ; Status updates

**{{ADD}}** Only if FAN control is desired.
[events]

; Automatically control GPIO pins for fan control
touch /tmp/RPT_TXKEYED2375 = s|t|RPT_TXKEYED
rm -f /tmp/RPT_TXKEYED2375 = s|f|RPT_TXKEYED
**{{/ADD}}**

[functions]

; Prefix        Functions
; *1            Disconnect Link
; *2            Monitor Link
; *3            Connect Link
; *4            Command Mode
; *5            Macros
; *6            User Functions
; *7            Connection Status/Functions
; *8            User Functions
; *9            User Functions
; *0            User Functions

; *A            User Functions
; *B            User Functions
; *C            User Functions
; *D            User Functions


; Mandatory Command Codes
; http://docs.allstarlink.org/drupal/node/91

1 = ilink,1             ; Disconnect specified link
2 = ilink,2             ; Connect specified link -- monitor only
3 = ilink,3             ; Connect specified link -- tranceive
4 = ilink,4             ; Enter command mode on specified link
70 = ilink,5            ; System status
99 = cop,6              ; PTT (phone mode only)

; End Mandatory Command Codes

**{{ADD}}** for FAN control or GPIO control

; COP command mapping for GPIO's
; cop,62 is command GPIOx=y where x is GPIO number and y is desired state.
90 = cop,62,GPIO5=0 ; Turn off GPIO 5
91 = cop,62,GPIO5=1 ; Turn on  GPIO 5
**{{/ADD}}**


-------------- next part --------------
; SimpleUSB configuration

[general]

[usb]

eeprom = 1              ; EEPROM installed: 0,1
                        ; 0 = no (default)
                        ; 1 = yes

hdwtype = 0             ; Leave this set to 0 for USB sound fobs modified using
                        ; the instructions from usbfob.pdf. Use a setting of
                        ; 1 is for Dingotel/Sph interfaces.

; Receiver parameters

rxboost = 0             ; 0 = 20db attenuator inserted, 1= 20db attenuator removed
                        ; Set to 1 for additonal gain if using a low-level receiver output

carrierfrom = no        ; no,usb,usbinvert
                        ; no - no carrier detection at all
                        ; usb - from the COR line on the USB sound fob (Active high)
                        ; usbinvert - from the inverted COR line on the USB sound fob (Active low)

ctcssfrom = usbinvert   ; no,usb,usbinvert
                        ; no - CTCSS decoding, system will be carrier squelch
                        ; usb - CTCSS decoding using input from USB sound fob (Active high)
                        ; usbinvert - from the inverted CTCSS line on the USB sound fob (Active low)

deemphasis = no         ; enable de-emphasis (input from discriminator)

plfilter = no           ; enable PL filter

;rxondelay = 0          ; number of 20ms intervals to hold off receiver turn-on indication


; Transmitter parameters

txmixa = voice          ; Left channel output (A): no,voice,tone,composite,auxvoice
                        ; no - Do not output anything
                        ; voice - output voice only

txmixb = no             ; Right channel output (B): no,voice,tone,composite,auxvoice
                        ; See txmixa above.

txboost = 0

invertptt = 0           ; Invert PTT 0 = ground to transmit, 1 = open to transmit
                        ; This is the collector lead of the 2n4401 on the modified
                        ; usb sound fob.
                        ; please refer to the howto for the procedure to do this.

preemphasis = 0

; pager = no            ; no,a,b (e.g. pager = b means "put the normal repeat audio on channel A, and the pager audio on channel B")

; duplex3 = 0           ; duplex 3 gain setting (0 to disable)

duplex = 1              ; Duplex 0,1
                        ; 0 - half duplex
                        ; 1 - full duplex

; When you configure a GPIO pin, you can either designate it as
; 'in' (input), 'out0' (output with a default state of 'off'),
; or 'out1' (output with a default state of 'on').

gpio5=out0              ; in, out0 or out1


More information about the arm-allstar mailing list