¿ªÔÆÌåÓý

Re: Serial PTT not functioning after exit


 

¿ªÔÆÌåÓý

Hi David, thanks for your reply.

I've been exploring the sudo issue for a few days now and here's what I've found.

- Works perfectly on the default pi user on Rpi. This is because pi is set up for sudo access without password. Can be verified by examining the sudoers file with visudo.

- Direwolf calls chmod go+rw on the gpio direction and value irrespective of whether the permissions are set correctly. Can be verified by examining the system logs -? # journalctl | grep gpio.

All my user permissions are set up for gpio as you recommended below. I can create gpio devices, change direction and write to value as a normal user with gpio group membership.

gpio devices are created by udev rules with root:gpio 0770 permissions. This is set in /etc/udev/rules.d/99-com.rules. Also worth noting that when a gpio device is created under /sys/class/gpio it's actually a symlink to /sys/device/platform/soc//3f200000.gpio/gpio.

So Direwolf appears to do some checks for permissions in ptt.c. I've not quite figured that part out yet but for whatever reason it still decides it needs elevated permissions to change the gpio direction and value even if it is correct. I've sent a bug report/query to John regarding this.

That aside, the decoding performance on HF is fantastic! I've had a Windows build running with 5@30 300 modems and it's decoding stuff I can barely hear on 10.1476MHz.

73
Nick G4IRX



On 28/02/2017 05:05, David Ranch dranch@... [direwolf_packet] wrote:

?


As for GPIO access, the running user needs to be apart of the "gpio" group.? Quick example is:

--
??????? b. Add this new user into the following unix groups:
????????????? - "audio" (allow users to access the soundcard)
????????????? - "dialout" (allow serial port access - if needed)
????????????? - "gpio" (allow access to the GPIO pins)
????????????? - "sudo" (allow root access)
????????????? - "video" group (allow diagnostic permissions to the GPU)

???????????????? sudo usermod -G audio,dialout,gpio,sudo,video
--

As far as killing direwolf, control-c should be fine as well as using "kill" but don't use the -HUP signal.?

When you kill Direwolf and the serial port is no longer available, try running "ps aux | grep modem" and tell us if NetworkManager's "modem-manager" is running.

--David
KI6ZHD


On 02/27/2017 09:37 AM, 'Nick B.' nick@... [direwolf_packet] wrote:
?

Hope you don't mind if I join in with this Tim as I'm watching this with interest. I have similar problems trying to get GPIO PTT and DCD working with the correct permissions. Despite being able to write to GPIO as my normal user, Direwolf always wants a sudo password.

I haven't tried USB serial PTT yet but I may well do and see if I get a similar result to you.

Nick.


On 27/02/2017 11:41, overrocking@... [direwolf_packet] wrote:
?

I'm always game for learning more, thanks for diving in with some help.?

Here are the results of the commands:

kd9dcs@bluetracker:~ $ who
kd9dcs ? :0 ? ? ? ? ? 2017-02-26 17:51 (:0)
kd9dcs ? pts/0 ? ? ? ?2017-02-27 05:34 (192.168.2.10)

kd9dcs@bluetracker:~ $ groups
pi adm dialout cdrom sudo audio video plugdev games users input netdev gpio i2c spi

kd9dcs@bluetracker:~ $ ls -al /dev/PTT
lrwxrwxrwx 1 root root 7 Feb 26 17:51 /dev/PTT -> ttyUSB0

Thanks again for looking at this

Tim ...





Join [email protected] to automatically receive all group messages.