Udev trouble: Non working rule...or...

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Udev trouble: Non working rule...or...

tuxic
Hi,

may bet this is part of the theory about the relationship
between the forest and the trees...I am trying this already
for a longer time.

I have one of these:



When plugged in, lsusb reports those as:
Bus 006 Device 018: ID 16d0:0753 MCS Digistump DigiSpark

and in the verbose form:
Bus 006 Device 018: ID 16d0:0753 MCS Digistump DigiSpark
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass          255 Vendor Specific Class
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0         8
  idVendor           0x16d0 MCS
  idProduct          0x0753 Digistump DigiSpark
  bcdDevice            1.06
  iManufacturer           0
  iProduct                0
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           18
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         0
      bInterfaceSubClass      0
      bInterfaceProtocol      0
      iInterface              0

On the web site of digistump there is listed the following udev-rule,
which I copy-pasted into
ls -l /etc/udev/rules.d/49-micronucleus.rules
-rw-r--r-- 1 root root 809 2017-09-28 16:23 /etc/udev/rules.d/49-micronucleus.rules

the contents of that rule is:

# UDEV Rules for Micronucleus boards including the Digispark.
# This file must be placed at:
#
# /etc/udev/rules.d/49-micronucleus.rules    (preferred location)
#   or
# /lib/udev/rules.d/49-micronucleus.rules    (req'd on some broken systems)
#
# After this file is copied, physically unplug and reconnect the board.
#
SUBSYSTEMS=="usb", ATTRS{idVendor}=="16d0", ATTRS{idProduct}=="0753", MODE:="0666"
KERNEL=="ttyACM*", ATTRS{idVendor}=="16d0", ATTRS{idProduct}=="0753", MODE:="0666", ENV{ID_MM_DEVICE_IGNORE}="1"
#
# If you share your linux system with other users, or just don't like the
# idea of write permission for everybody, you can replace MODE:="0666" with
# OWNER:="yourusername" to create the device owned by you, or with
# GROUP:="somegroupname" and mange access using standard unix groups.
#

After inserting that rule I did a
udevadm control --reload-rules
as root and inserted the Digispark.

As listed above, lsusb could list the Digispark...but udev ignores it.
I can find the device under /dev/bus/...., though.
But there is no device created by udev directly in /dev.

Since the Arduino-IDE needs any port to send the firmware to I am
currentlu out of business.

I can see the trees...but where is the forest?

Thanks a lot for any enlightment in advance!
Cheers
Meino






Reply | Threaded
Open this post in threaded view
|

Re: Udev trouble: Non working rule...or...

tuxic

Sorry, forgot the link...here it is:
http://digistump.com/products/1



On 09/28 03:03, [hidden email] wrote:

> Hi,
>
> may bet this is part of the theory about the relationship
> between the forest and the trees...I am trying this already
> for a longer time.
>
> I have one of these:
>
>
>
> When plugged in, lsusb reports those as:
> Bus 006 Device 018: ID 16d0:0753 MCS Digistump DigiSpark
>
> and in the verbose form:
> Bus 006 Device 018: ID 16d0:0753 MCS Digistump DigiSpark
> Device Descriptor:
>   bLength                18
>   bDescriptorType         1
>   bcdUSB               1.10
>   bDeviceClass          255 Vendor Specific Class
>   bDeviceSubClass         0
>   bDeviceProtocol         0
>   bMaxPacketSize0         8
>   idVendor           0x16d0 MCS
>   idProduct          0x0753 Digistump DigiSpark
>   bcdDevice            1.06
>   iManufacturer           0
>   iProduct                0
>   iSerial                 0
>   bNumConfigurations      1
>   Configuration Descriptor:
>     bLength                 9
>     bDescriptorType         2
>     wTotalLength           18
>     bNumInterfaces          1
>     bConfigurationValue     1
>     iConfiguration          0
>     bmAttributes         0x80
>       (Bus Powered)
>     MaxPower              100mA
>     Interface Descriptor:
>       bLength                 9
>       bDescriptorType         4
>       bInterfaceNumber        0
>       bAlternateSetting       0
>       bNumEndpoints           0
>       bInterfaceClass         0
>       bInterfaceSubClass      0
>       bInterfaceProtocol      0
>       iInterface              0
>
> On the web site of digistump there is listed the following udev-rule,
> which I copy-pasted into
> ls -l /etc/udev/rules.d/49-micronucleus.rules
> -rw-r--r-- 1 root root 809 2017-09-28 16:23 /etc/udev/rules.d/49-micronucleus.rules
>
> the contents of that rule is:
>
> # UDEV Rules for Micronucleus boards including the Digispark.
> # This file must be placed at:
> #
> # /etc/udev/rules.d/49-micronucleus.rules    (preferred location)
> #   or
> # /lib/udev/rules.d/49-micronucleus.rules    (req'd on some broken systems)
> #
> # After this file is copied, physically unplug and reconnect the board.
> #
> SUBSYSTEMS=="usb", ATTRS{idVendor}=="16d0", ATTRS{idProduct}=="0753", MODE:="0666"
> KERNEL=="ttyACM*", ATTRS{idVendor}=="16d0", ATTRS{idProduct}=="0753", MODE:="0666", ENV{ID_MM_DEVICE_IGNORE}="1"
> #
> # If you share your linux system with other users, or just don't like the
> # idea of write permission for everybody, you can replace MODE:="0666" with
> # OWNER:="yourusername" to create the device owned by you, or with
> # GROUP:="somegroupname" and mange access using standard unix groups.
> #
>
> After inserting that rule I did a
> udevadm control --reload-rules
> as root and inserted the Digispark.
>
> As listed above, lsusb could list the Digispark...but udev ignores it.
> I can find the device under /dev/bus/...., though.
> But there is no device created by udev directly in /dev.
>
> Since the Arduino-IDE needs any port to send the firmware to I am
> currentlu out of business.
>
> I can see the trees...but where is the forest?
>
> Thanks a lot for any enlightment in advance!
> Cheers
> Meino
>
>
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Udev trouble: Non working rule...or...

Mateusz Lenik
In reply to this post by tuxic
On Thu, Sep 28, 2017 at 05:03:14PM +0200, [hidden email] wrote:
> I have one of these:
>
> Bus 006 Device 018: ID 16d0:0753 MCS Digistump DigiSpark
>
> ... snip ...
>
> SUBSYSTEMS=="usb", ATTRS{idVendor}=="16d0", ATTRS{idProduct}=="0753", MODE:="0666"
> KERNEL=="ttyACM*", ATTRS{idVendor}=="16d0", ATTRS{idProduct}=="0753", MODE:="0666", ENV{ID_MM_DEVICE_IGNORE}="1"

This udev rule looks fine, it tries to make the device nodes
readable/writeable to everyone and makes modemmanager ignore it.

My guess would be that you don't have the correct serial port driver
built or loaded, so ttyACM nodes are not created at all.

Take a look at dmesg contents when the device gets plugged in.

--
mlen

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Udev trouble: Non working rule...or...

tuxic
On 09/28 05:03, Mateusz Lenik wrote:

> On Thu, Sep 28, 2017 at 05:03:14PM +0200, [hidden email] wrote:
> > I have one of these:
> >
> > Bus 006 Device 018: ID 16d0:0753 MCS Digistump DigiSpark
> >
> > ... snip ...
> >
> > SUBSYSTEMS=="usb", ATTRS{idVendor}=="16d0", ATTRS{idProduct}=="0753", MODE:="0666"
> > KERNEL=="ttyACM*", ATTRS{idVendor}=="16d0", ATTRS{idProduct}=="0753", MODE:="0666", ENV{ID_MM_DEVICE_IGNORE}="1"
>
> This udev rule looks fine, it tries to make the device nodes
> readable/writeable to everyone and makes modemmanager ignore it.
>
> My guess would be that you don't have the correct serial port driver
> built or loaded, so ttyACM nodes are not created at all.
>
> Take a look at dmesg contents when the device gets plugged in.
>
> --
> mlen


Hi mlen,

thanks for your help ! :)

The interesting thing is: I have a pololu avr programmer (v20, an
ISP-programmer it is), which uses also /dev/ttyACM<n>...and that
one works fine. I plugged it in simultanously to ensure all drivers
get loaded...and then I plugged in the Digispark...and udec does
nothing.

Or do I misinterpret here something?

Cheers
Meino




Reply | Threaded
Open this post in threaded view
|

Re: Udev trouble: Non working rule...or...

Mateusz Lenik
On Thu, Sep 28, 2017 at 07:39:58PM +0200, [hidden email] wrote:
> The interesting thing is: I have a pololu avr programmer (v20, an
> ISP-programmer it is), which uses also /dev/ttyACM<n>...and that
> one works fine. I plugged it in simultanously to ensure all drivers
> get loaded...and then I plugged in the Digispark...and udec does
> nothing.
>
> Or do I misinterpret here something?
Multiple different drivers may create /dev/ttyACM<n> nodes for devices.

For example, on my system I have multiple /dev/ttyUSB<n> nodes. Some of
them are created by cdc_ether driver, that's my LTE modem. When I plug
in a popular arduino clone that uses ch341 usb chip, it needs
a different driver called ch341.

You probably need to build your kernel with CONFIG_USB_ACM compiled in
or enabled as a module.

--
mlen

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Udev trouble: Non working rule...or...

tuxic
On 09/28 05:56, Mateusz Lenik wrote:

> On Thu, Sep 28, 2017 at 07:39:58PM +0200, [hidden email] wrote:
> > The interesting thing is: I have a pololu avr programmer (v20, an
> > ISP-programmer it is), which uses also /dev/ttyACM<n>...and that
> > one works fine. I plugged it in simultanously to ensure all drivers
> > get loaded...and then I plugged in the Digispark...and udec does
> > nothing.
> >
> > Or do I misinterpret here something?
> Multiple different drivers may create /dev/ttyACM<n> nodes for devices.
>
> For example, on my system I have multiple /dev/ttyUSB<n> nodes. Some of
> them are created by cdc_ether driver, that's my LTE modem. When I plug
> in a popular arduino clone that uses ch341 usb chip, it needs
> a different driver called ch341.
>
> You probably need to build your kernel with CONFIG_USB_ACM compiled in
> or enabled as a module.
>
> --
> mlen

Hi mlen,

USB_ACM is already included into the kernel (not as module).
By the way: CH340/CH341 ... I had a lot of trouble with those...

Cheers
Meino