Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: John Nogatch <jnogatch <at> yahoo.com>
Subject: Elektor SDR requires sudo
Newsgroups: gmane.linux.hams.hamlib.devel
Date: Thursday 19th August 2010 16:37:00 UTC (over 7 years ago)
--- On Wed, 8/18/10, Nate Bargmann  wrote:
> It should be possible with a bit of udev rules tinkering to have the
> Elektor be assigned a group such as 'dialout' which the USB
> to serial> adapters are assigned on Debian/Ubunutu.  ...
> ...  Getting it into the 'dialout' group has the advantage of
> placing it in a standard system group and then adding one's
> username to that group so that `sudo' would no longer be
> required.  What device is the Elektor assigned by default?

I read the man page for udev, & I do not understand it yet.

Unplugging the Elektor SDR yields this in dmesg:
[72171.641075] usb 2-2: USB disconnect, address 4

Plugging it in again yields this in dmesg:
[72217.265040] usb 2-2: new full speed USB device using uhci_hcd and
address 5
[72217.471371] ftdi_sio 2-2:1.0: FTDI USB Serial Device converter detected
[72217.471451] usb 2-2: Detected FT232RL
[72217.471459] usb 2-2: Number of endpoints 2
[72217.471466] usb 2-2: Endpoint 1 MaxPacketSize 64
[72217.471473] usb 2-2: Endpoint 2 MaxPacketSize 64
[72217.471479] usb 2-2: Setting MaxPacketSize 64
[72217.472448] usb 2-2: FTDI USB Serial Device converter now attached to
ttyUSB0

And, this device appears, & it shows the dialout group:
$ ls -ld /dev/*USB*
crw-rw---- 1 root dialout 188, 0 2010-08-19 07:26 /dev/ttyUSB0

I already have dialout as a secondary group
$ groups
jtn adm dialout cdrom audio plugdev lpadmin admin sambashare

By default, I cannot access ttyUSB0:
$ rigctl -m 2507
rig_open: error = IO error

Using sg seems to work, but the frequency numbers are all wrong, i.e. the
startup freq is wrong, & setting specific values does not return legitimate
Elektor SDR freqs:
$ sg dialout rigctl -m 2507
Rig command: f
Frequency: 145000000
Rig command: F
Frequency: 9991000
Rig command: f
Frequency: 9991000
Rig command: F
Frequency: 9995000
Rig command: f
Frequency: 9995000
Rig command: q

Using sudo, the frequency numbers are correct:
$ sudo rigctl -m 2507
[sudo] password for jtn:
Rig command: f
Frequency: 1250000
Rig command: F
Frequency: 9995000
Rig command: f
Frequency: 9993750
Rig command: q

newgrp does not seem to work:
$ newgrp dialout
[email protected]:~$ rigctl -m 2507
rig_open: error = IO error
$ id
uid=1000(jtn) gid=20(dialout)
groups=4(adm),20(dialout),24(cdrom),29(audio),46(plugdev),107(lpadmin),115(admin),120(sambashare),1000(jtn)

So, Nate's suggestion to use group dialout is already present, but does not
work as expected?

-John AC6SL




      


------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev
 
CD: 3ms