• sudo override

    From vjp2.at@at.BioStrategist.dot.dot.co@21:1/5 to All on Tue Oct 15 23:59:01 2024
    It seems I need to use sudo on minicom,
    but not for sudo, to access the USB port.

    It is annoying but not fatal.
    Is there any way to turn off this reqmt?

    --
    Vasos Panagiotopoulos panix.com/~vjp2/vasos.htm
    ---{Nothing herein constitutes advice. Everything fully disclaimed.}---

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lew Pitcher@21:1/5 to All on Wed Oct 16 01:07:12 2024
    On Tue, 15 Oct 2024 23:59:01 +0000, vjp2.at wrote:

    It seems I need to use sudo on minicom,
    but not for sudo, to access the USB port.

    I'm not sure what you mean here.
    Do you mean that, in order to use minicom as an unprivileged user,
    you must run minicom under sudo (eg "sudo minicom") so that it
    can access a USB serial communications device?

    It is annoying but not fatal.
    Is there any way to turn off this reqmt?

    If my guess above is correct, then you probably have a permissions
    problem, in that the USB serial device permission bits exclude your unprivileged user from read/write access.

    You can fix this in a couple of ways:
    1) make changes to the udev rules governing the USB device so that
    the new rules grant your unprivileged user read/write access, or
    2) as root, add your unprivileged user's UID to a group that /does/
    have read/write access to the USB device.

    HTH
    --
    Lew Pitcher
    "In Skills We Trust"

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anssi Saari@21:1/5 to vjp2.at@at.BioStrategist.dot.dot.co on Wed Oct 16 15:04:37 2024
    vjp2.at@at.BioStrategist.dot.dot.com writes:

    It seems I need to use sudo on minicom,
    but not for sudo, to access the USB port.

    It is annoying but not fatal.
    Is there any way to turn off this reqmt?

    On some Linux systems, maybe even typically, permissions are like this
    for serial devices:

    crw-rw---- 1 root dialout 188, 0 Oct 12 12:07 /dev/ttyUSB0

    So it might be all you need to do is add your user to the dialout
    group. Then again, /dev/ttyAMA0 on my Raspberry Pi running Ubuntu
    doesn't follow this convention, so YMMV.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From The Natural Philosopher@21:1/5 to Anssi Saari on Wed Oct 16 19:55:54 2024
    On 16/10/2024 13:04, Anssi Saari wrote:
    vjp2.at@at.BioStrategist.dot.dot.com writes:

    It seems I need to use sudo on minicom,
    but not for sudo, to access the USB port.

    It is annoying but not fatal.
    Is there any way to turn off this reqmt?

    On some Linux systems, maybe even typically, permissions are like this
    for serial devices:

    crw-rw---- 1 root dialout 188, 0 Oct 12 12:07 /dev/ttyUSB0

    [ that device does not exist on my installation, but I am part of the
    dialout group and can access a USB serial port : I vaguely think I might
    have added myself for that reason]

    So it might be all you need to do is add your user to the dialout
    group. Then again, /dev/ttyAMA0 on my Raspberry Pi running Ubuntu
    doesn't follow this convention, so YMMV.

    --
    There is something fascinating about science. One gets such wholesale
    returns of conjecture out of such a trifling investment of fact.

    Mark Twain

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lew Pitcher@21:1/5 to Rich on Wed Oct 16 19:46:14 2024
    On Wed, 16 Oct 2024 19:37:04 +0000, Rich wrote:

    The Natural Philosopher <tnp@invalid.invalid> wrote:
    On 16/10/2024 13:04, Anssi Saari wrote:
    On some Linux systems, maybe even typically, permissions are like
    this for serial devices:

    crw-rw---- 1 root dialout 188, 0 Oct 12 12:07 /dev/ttyUSB0

    [ that device does not exist on my installation,

    It appears dynamically when you plug in a USB serial device to a USB
    port.

    Hence my reference to udev rules. Specifically, the udev rules that
    create the /dev file related to the USB device in question. You can
    alter or add to these rules to give that device node a specific owning
    UID and GID, and/or specific rwx rules for owner, group and other.

    BUT, it would be simpler for the OP to just add their own UID to the
    group that udev assigns group ownership of the USB device to.

    --
    Lew Pitcher
    "In Skills We Trust"

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rich@21:1/5 to The Natural Philosopher on Wed Oct 16 19:37:04 2024
    The Natural Philosopher <tnp@invalid.invalid> wrote:
    On 16/10/2024 13:04, Anssi Saari wrote:
    On some Linux systems, maybe even typically, permissions are like
    this for serial devices:

    crw-rw---- 1 root dialout 188, 0 Oct 12 12:07 /dev/ttyUSB0

    [ that device does not exist on my installation,

    It appears dynamically when you plug in a USB serial device to a USB
    port.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From The Natural Philosopher@21:1/5 to Rich on Wed Oct 16 21:40:05 2024
    On 16/10/2024 20:37, Rich wrote:
    The Natural Philosopher <tnp@invalid.invalid> wrote:
    On 16/10/2024 13:04, Anssi Saari wrote:
    On some Linux systems, maybe even typically, permissions are like
    this for serial devices:

    crw-rw---- 1 root dialout 188, 0 Oct 12 12:07 /dev/ttyUSB0

    [ that device does not exist on my installation,

    It appears dynamically when you plug in a USB serial device to a USB
    port.

    Fairy Nuff. But yes, adding yourself to the dialout group allows access.

    --
    "Socialist governments traditionally do make a financial mess. They
    always run out of other people's money. It's quite a characteristic of them"

    Margaret Thatcher

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to The Natural Philosopher on Wed Oct 16 21:01:13 2024
    On Wed, 16 Oct 2024 19:55:54 +0100, The Natural Philosopher wrote:

    On 16/10/2024 13:04, Anssi Saari wrote:

    crw-rw---- 1 root dialout 188, 0 Oct 12 12:07 /dev/ttyUSB0

    [ that device does not exist on my installation...

    Like any USB device, it only exists while the physical hardware is plugged
    in.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David W. Hodgins@21:1/5 to Lawrence D'Oliveiro on Thu Oct 17 00:58:01 2024
    On Wed, 16 Oct 2024 17:01:13 -0400, Lawrence D'Oliveiro <ldo@nz.invalid> wrote:

    On Wed, 16 Oct 2024 19:55:54 +0100, The Natural Philosopher wrote:

    On 16/10/2024 13:04, Anssi Saari wrote:

    crw-rw---- 1 root dialout 188, 0 Oct 12 12:07 /dev/ttyUSB0

    [ that device does not exist on my installation...

    Like any USB device, it only exists while the physical hardware is plugged in.

    Plugging in the device will create the /dev entry only if the package modemmanager is installed. That's the package with the udev rules to
    create /dev/ttyUSB0 devices.

    https://www.freedesktop.org/wiki/Software/ModemManager/

    Regards, Dave Hodgins

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to David W. Hodgins on Thu Oct 17 05:46:04 2024
    On Thu, 17 Oct 2024 00:58:01 -0400, David W. Hodgins wrote:

    Plugging in the device will create the /dev entry only if the package modemmanager is installed.

    I don’t have modemmanager installed. I plugged in a USB-serial adapter,
    and /dev/ttyUSB0 appeared. It disappeared when I unplugged the adapter.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anssi Saari@21:1/5 to Lawrence D'Oliveiro on Thu Oct 17 13:01:08 2024
    Lawrence D'Oliveiro <ldo@nz.invalid> writes:

    On Thu, 17 Oct 2024 00:58:01 -0400, David W. Hodgins wrote:

    Plugging in the device will create the /dev entry only if the package
    modemmanager is installed.

    I don’t have modemmanager installed. I plugged in a USB-serial adapter,
    and /dev/ttyUSB0 appeared. It disappeared when I unplugged the adapter.

    Same here, for example the LTE module on my router has five USB-serial interfaces (ttyUSB0-ttyUSB4) and modemmanager isn't installed.

    In fact, I think It would be quite odd if modemmanager were required for USB-serial adapter udev rules.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Chris Ahlstrom@21:1/5 to Anssi Saari on Thu Oct 17 06:51:12 2024
    Anssi Saari wrote this copyrighted missive and expects royalties:

    Lawrence D'Oliveiro <ldo@nz.invalid> writes:

    On Thu, 17 Oct 2024 00:58:01 -0400, David W. Hodgins wrote:

    Plugging in the device will create the /dev entry only if the package
    modemmanager is installed.

    I don’t have modemmanager installed. I plugged in a USB-serial adapter,
    and /dev/ttyUSB0 appeared. It disappeared when I unplugged the adapter.

    Same here, for example the LTE module on my router has five USB-serial interfaces (ttyUSB0-ttyUSB4) and modemmanager isn't installed.

    In fact, I think It would be quite odd if modemmanager were required for USB-serial adapter udev rules.

    I've used USB-to-serial adaptors to connect a laptop to (for example) a Cisco router. No modem manager needed to get /dev/ttyUSB0. Used gtkterm IIRC.
    This was years ago.

    --
    Do what thou wilt shall be the whole of the Law.
    -- Aleister Crowley

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David W. Hodgins@21:1/5 to Chris Ahlstrom on Thu Oct 17 13:28:25 2024
    On Thu, 17 Oct 2024 06:51:12 -0400, Chris Ahlstrom <OFeem1987@teleworm.us> wrote:

    Anssi Saari wrote this copyrighted missive and expects royalties:

    Lawrence D'Oliveiro <ldo@nz.invalid> writes:

    On Thu, 17 Oct 2024 00:58:01 -0400, David W. Hodgins wrote:

    Plugging in the device will create the /dev entry only if the package
    modemmanager is installed.

    I don’t have modemmanager installed. I plugged in a USB-serial adapter, >>> and /dev/ttyUSB0 appeared. It disappeared when I unplugged the adapter.

    Same here, for example the LTE module on my router has five USB-serial
    interfaces (ttyUSB0-ttyUSB4) and modemmanager isn't installed.

    In fact, I think It would be quite odd if modemmanager were required for
    USB-serial adapter udev rules.

    I've used USB-to-serial adaptors to connect a laptop to (for example) a Cisco router. No modem manager needed to get /dev/ttyUSB0. Used gtkterm IIRC.
    This was years ago.


    On my system ...
    $ grep ttyUSB0 /lib/udev/rules.d/* /lib/udev/rules.d/77-mm-fibocom-port-types.rules:# ttyUSB0 (if #0): QCDM port /lib/udev/rules.d/77-mm-fibocom-port-types.rules:# ttyUSB0 (if #2): AT port /lib/udev/rules.d/77-mm-fibocom-port-types.rules:# ttyUSB0 (if #2): debug port (ignore)
    /lib/udev/rules.d/77-mm-fibocom-port-types.rules:# ttyUSB0 (if #0): debug port (ignore)
    /lib/udev/rules.d/77-mm-fibocom-port-types.rules:# ttyUSB0 (if #0): AT port /lib/udev/rules.d/77-mm-fibocom-port-types.rules:# ttyUSB0 (if #2): AT port /lib/udev/rules.d/77-mm-quectel-port-types.rules:# ttyUSB0 (if #0): QCDM/DIAG port
    /lib/udev/rules.d/77-mm-quectel-port-types.rules:# ttyUSB0 (if #0): QCDM/DIAG port
    /lib/udev/rules.d/77-mm-quectel-port-types.rules:# ttyUSB0 (if #0): QCDM/DIAG port
    /lib/udev/rules.d/77-mm-quectel-port-types.rules:# ttyUSB0 (if #0): QCDM/DIAG port
    /lib/udev/rules.d/77-mm-quectel-port-types.rules:# ttyUSB0 (if #0): QCDM/DIAG port
    /lib/udev/rules.d/77-mm-quectel-port-types.rules:# ttyUSB0 (if #0): QCDM/DIAG port

    Those two files are from the modemmanager package.

    What package has the ttyUSB0 udev rules on your system?

    Regards, Dave Hodgins

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rich@21:1/5 to David W. Hodgins on Thu Oct 17 21:09:57 2024
    David W. Hodgins <dwhodgins@nomail.afraid.org> wrote:
    On Thu, 17 Oct 2024 06:51:12 -0400, Chris Ahlstrom <OFeem1987@teleworm.us> wrote:
    I've used USB-to-serial adaptors to connect a laptop to (for
    example) a Cisco router. No modem manager needed to get
    /dev/ttyUSB0. Used gtkterm IIRC. This was years ago.


    On my system ...
    $ grep ttyUSB0 /lib/udev/rules.d/* /lib/udev/rules.d/77-mm-fibocom-port-types.rules:# ttyUSB0 (if #0): QCDM port
    ...
    /lib/udev/rules.d/77-mm-quectel-port-types.rules:# ttyUSB0 (if #0): QCDM/DIAG port

    Those two files are from the modemmanager package.

    What package has the ttyUSB0 udev rules on your system?

    On Slackware 15, the ttyUSB0 udev rules are also part of the
    ModemManager package.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to David W. Hodgins on Thu Oct 17 21:21:59 2024
    On Thu, 17 Oct 2024 13:28:25 -0400, David W. Hodgins wrote:

    What package has the ttyUSB0 udev rules on your system?

    ldo@theon:~> grep -i ttyusb /lib/udev/rules.d/*
    /lib/udev/rules.d/60-serial.rules:KERNEL!="ttyUSB[0-9]*|ttyACM[0-9]*", GOTO="serial_end"
    ldo@theon:~> dpkg-query -S /lib/udev/rules.d/60-serial.rules
    dpkg-query: no path found matching pattern /lib/udev/rules.d/60-serial.rules
    ldo@theon:~> dpkg-query -S /usr/lib/udev/rules.d/60-serial.rules
    udev: /usr/lib/udev/rules.d/60-serial.rules

    That’s on Debian Unstable; Debian Stable will be the same, as should
    most derivatives.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Eric Pozharski@21:1/5 to David W. Hodgins on Fri Oct 18 07:51:07 2024
    with <op.2vrr2zawa3w0dxdave@hodgins.homeip.net> David W. Hodgins wrote:
    On Wed, 16 Oct 2024 17:01:13 -0400, Lawrence D'Oliveiro
    <ldo@nz.invalid> wrote:
    On Wed, 16 Oct 2024 19:55:54 +0100, The Natural Philosopher wrote:
    On 16/10/2024 13:04, Anssi Saari wrote:

    crw-rw---- 1 root dialout 188, 0 Oct 12 12:07 /dev/ttyUSB0
    [ that device does not exist on my installation...
    Like any USB device, it only exists while the physical hardware is
    plugged in.
    Plugging in the device will create the /dev entry only if the package modemmanager is installed. That's the package with the udev rules to
    create /dev/ttyUSB0 devices.

    Correction. If upon insertion /dev/sr and /dev/sg appear then this is manifestation of zero-config and then modemmanager (Was it
    'usb-modeswitch' a decade ago? Darn, I'm so ignoring all the cool
    modern toys.) is indeed required. However, clear usb-serial modems
    exist, but those aren't popular.

    *CUT* [ 2 lines 1 level deep]

    --
    Torvalds' goal for Linux is very simple: World Domination
    Stallman's goal for GNU is even simpler: Freedom

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)