Yet another GPIO thread

Ben,
Thanks for clarifying, I misread the code.

Placed gpio3=out0 in simpleusb.conf and restarted ASL and entered 2 commands from the CLI:

rpt cmd 1100 cop 62 GPIO3=1
rpt fun 1100 *962

Neither command caused PTT to go active

Please give the following a try from the asterisk cli:

susb key

The GPIO3 PTT light on the RIM-Lite should illuminate. then

susb unkey

and the PTT light should go out.

That works if using simpleusb but not if using usbradio. Is that to be expected?

Edit: I see that susb commands are only valid if using the simpleusb driver…
If using usbradio, the command is radio key and unkey…

alright. i believe we are on to the issue. It’s configured correctly. PTT via the GPIO is working. however because PTT is reserved as a core function, you cannot directly access it via COP commands. So if you want to work on GPIO 1, 2, 4 it should actually toggle the pins as expected. But GPIO3 is not accessible. I’ve been playing with it here and can replicate your findings. I believe at this point 3 is reserved. I’ll have to look into the code to confirm it.

Thanks Ben

As I wanted to be able to control PTT from the bash CL (asterisk -rx ‘susb key’ or asterisk -rx ‘radio key’ - depending on which driver is being used), this is fine for my purposes.

glad you have a way to get it going for your purposes… I looked at the driver code and discovered GPIO commands on the PTT pin are discarded as I suspected. so the key/unkey method is your only method to toggle that pin. What you were originally trying should work on all other available GPIO pins, just not on the one PTT is defined.