- Sat Jan 13, 2018 6:09 am
#197873
That is the document I thought I did perform option 2. I must have something screwed up I really don't know anything about udev rules.
I created a file,
In the website you gave me I noticed 2 things. They mention to make a file
Here are the outputs as I followed the website you linked to.
Info from lsusb:
the website says that this line:
Also, from this output,
I reloaded the udev rules with:
So, going back to the output from udevadm test command above, I noticed a few other things.
Now, I'm not sure if the output is telling me to RUN this command myself or it just 'ran' it:
And here is where I think I may be running into problems:
First I tried to look for a problem to the permissions as I suspect this is the issue:
From:https://ubuntuforums.org/showthread.php?t=901891
I tried the solution in post #4 with:
I created a file,
Code: Select all
which contained the following:/etc/udev/rules.d/99-picaxe.rules
Code: Select all
But that didn't seem to work, because after I reboot, the only way I could get the usb cable to show up in /dev/ was to use option 1 every time.#/etc/udev/rules.d/99-axe027.rules
#contains axe027 udev rule to patch default
#FTDI product id to AXE027 product id (0xbd90)
ATTR{idProduct}=="bd90", ATTR{idVendor}=="0403", RUN+="/sbin/modprobe -q ftdi_sio product=0xbd90 vendor=0x0403"
In the website you gave me I noticed 2 things. They mention to make a file
Code: Select all
and they say to use ATTRS and NOT ATTR.../etc/udev/rules.d/10-local.rules
Here are the outputs as I followed the website you linked to.
Info from lsusb:
Code: Select all
Info from udevadm:
lsusb
Bus 002 Device 006: ID 0403:bd90 Future Technology Devices International, Ltd
Code: Select all
Then I created the file:
udevadm info -a -p $(udevadm info -q path -n /dev/bus/usb/002/006)
Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.
looking at device '/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1':
KERNEL=="2-1.1"
SUBSYSTEM=="usb"
DRIVER=="usb"
ATTR{authorized}=="1"
ATTR{avoid_reset_quirk}=="0"
ATTR{bConfigurationValue}=="1"
ATTR{bDeviceClass}=="00"
ATTR{bDeviceProtocol}=="00"
ATTR{bDeviceSubClass}=="00"
ATTR{bMaxPacketSize0}=="8"
ATTR{bMaxPower}=="90mA"
ATTR{bNumConfigurations}=="1"
ATTR{bNumInterfaces}==" 1"
ATTR{bcdDevice}=="0600"
ATTR{bmAttributes}=="80"
ATTR{busnum}=="2"
ATTR{configuration}==""
ATTR{devnum}=="6"
ATTR{devpath}=="1.1"
ATTR{idProduct}=="bd90"
ATTR{idVendor}=="0403"
ATTR{ltm_capable}=="no"
ATTR{manufacturer}=="Revolution"
ATTR{maxchild}=="0"
ATTR{product}=="AXE027 PICAXE USB"
ATTR{quirks}=="0x0"
ATTR{removable}=="removable"
ATTR{speed}=="12"
ATTR{urbnum}=="15"
ATTR{version}==" 2.00"
looking at parent device '/devices/pci0000:00/0000:00:1d.0/usb2/2-1':
KERNELS=="2-1"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{authorized}=="1"
ATTRS{avoid_reset_quirk}=="0"
ATTRS{bConfigurationValue}=="1"
ATTRS{bDeviceClass}=="09"
ATTRS{bDeviceProtocol}=="01"
ATTRS{bDeviceSubClass}=="00"
ATTRS{bMaxPacketSize0}=="64"
ATTRS{bMaxPower}=="0mA"
ATTRS{bNumConfigurations}=="1"
ATTRS{bNumInterfaces}==" 1"
ATTRS{bcdDevice}=="0000"
ATTRS{bmAttributes}=="e0"
ATTRS{busnum}=="2"
ATTRS{configuration}==""
ATTRS{devnum}=="2"
ATTRS{devpath}=="1"
ATTRS{idProduct}=="0024"
ATTRS{idVendor}=="8087"
ATTRS{ltm_capable}=="no"
ATTRS{maxchild}=="6"
ATTRS{quirks}=="0x0"
ATTRS{removable}=="unknown"
ATTRS{speed}=="480"
ATTRS{urbnum}=="126"
ATTRS{version}==" 2.00"
looking at parent device '/devices/pci0000:00/0000:00:1d.0/usb2':
KERNELS=="usb2"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{authorized}=="1"
ATTRS{authorized_default}=="1"
ATTRS{avoid_reset_quirk}=="0"
ATTRS{bConfigurationValue}=="1"
ATTRS{bDeviceClass}=="09"
ATTRS{bDeviceProtocol}=="00"
ATTRS{bDeviceSubClass}=="00"
ATTRS{bMaxPacketSize0}=="64"
ATTRS{bMaxPower}=="0mA"
ATTRS{bNumConfigurations}=="1"
ATTRS{bNumInterfaces}==" 1"
ATTRS{bcdDevice}=="0409"
ATTRS{bmAttributes}=="e0"
ATTRS{busnum}=="2"
ATTRS{configuration}==""
ATTRS{devnum}=="1"
ATTRS{devpath}=="0"
ATTRS{idProduct}=="0002"
ATTRS{idVendor}=="1d6b"
ATTRS{interface_authorized_default}=="1"
ATTRS{ltm_capable}=="no"
ATTRS{manufacturer}=="Linux 4.9.0-4-686-pae ehci_hcd"
ATTRS{maxchild}=="2"
ATTRS{product}=="EHCI Host Controller"
ATTRS{quirks}=="0x0"
ATTRS{removable}=="unknown"
ATTRS{serial}=="0000:00:1d.0"
ATTRS{speed}=="480"
ATTRS{urbnum}=="63"
ATTRS{version}==" 2.00"
looking at parent device '/devices/pci0000:00/0000:00:1d.0':
KERNELS=="0000:00:1d.0"
SUBSYSTEMS=="pci"
DRIVERS=="ehci-pci"
ATTRS{broken_parity_status}=="0"
ATTRS{class}=="0x0c0320"
ATTRS{companion}==""
ATTRS{consistent_dma_mask_bits}=="32"
ATTRS{d3cold_allowed}=="1"
ATTRS{device}=="0x1c26"
ATTRS{dma_mask_bits}=="32"
ATTRS{driver_override}=="(null)"
ATTRS{enable}=="1"
ATTRS{irq}=="23"
ATTRS{local_cpulist}=="0-15"
ATTRS{local_cpus}=="ffff"
ATTRS{msi_bus}=="1"
ATTRS{subsystem_device}=="0x1147"
ATTRS{subsystem_vendor}=="0x1043"
ATTRS{uframe_periodic_max}=="100"
ATTRS{vendor}=="0x8086"
looking at parent device '/devices/pci0000:00':
KERNELS=="pci0000:00"
SUBSYSTEMS==""
DRIVERS==""
Code: Select all
And I made this line within the file:
/etc/udev/rules.d/10-local.rules
Code: Select all
I saved that file then checked it with:
SUBSYSTEMS=="usb", ATTRS{product}=="AXE027 PICAXE USB", GROUP="users"
Code: Select all
which gave me:
udevadm test /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1
Code: Select all
So from this I think that both the 99-picaxe027.rules and 10-local.rules are being read as udev rules I'm assuming.sb2/2-1/2-1.1
calling: test
version 232
This program is for debugging only, it does not run any program
specified by a RUN key. It may show incorrect results, because
some values may be different, or not available at a simulation run.
=== trie on-disk ===
tool version: 232
file size: 8788535 bytes
header size 80 bytes
strings 1851623 bytes
nodes 6936832 bytes
Load module index
Found container virtualization none
timestamp of '/etc/systemd/network' changed
timestamp of '/lib/systemd/network' changed
Parsed configuration file /lib/systemd/network/99-default.link
Created link configuration context.
timestamp of '/etc/udev/rules.d' changed
Reading rules file: /etc/udev/rules.d/10-local.rules
Reading rules file: /lib/udev/rules.d/39-usbmuxd.rules
Reading rules file: /lib/udev/rules.d/40-usb_modeswitch.rules
Reading rules file: /lib/udev/rules.d/50-firmware.rules
Reading rules file: /lib/udev/rules.d/50-udev-default.rules
Reading rules file: /lib/udev/rules.d/55-dm.rules
Reading rules file: /lib/udev/rules.d/56-hpmud.rules
Reading rules file: /lib/udev/rules.d/60-block.rules
Reading rules file: /lib/udev/rules.d/60-cdrom_id.rules
Reading rules file: /lib/udev/rules.d/60-crda.rules
Reading rules file: /lib/udev/rules.d/60-drm.rules
Reading rules file: /lib/udev/rules.d/60-evdev.rules
Reading rules file: /lib/udev/rules.d/60-fuse.rules
Reading rules file: /lib/udev/rules.d/60-libgphoto2-6.rules
Reading rules file: /lib/udev/rules.d/60-libsane.rules
Reading rules file: /lib/udev/rules.d/60-persistent-alsa.rules
Reading rules file: /lib/udev/rules.d/60-persistent-input.rules
Reading rules file: /lib/udev/rules.d/60-persistent-storage-dm.rules
Reading rules file: /lib/udev/rules.d/60-persistent-storage-tape.rules
Reading rules file: /lib/udev/rules.d/60-persistent-storage.rules
Reading rules file: /lib/udev/rules.d/60-persistent-v4l.rules
Reading rules file: /lib/udev/rules.d/60-serial.rules
Reading rules file: /lib/udev/rules.d/64-btrfs.rules
Reading rules file: /lib/udev/rules.d/64-xorg-xkb.rules
Reading rules file: /lib/udev/rules.d/65-libwacom.rules
Reading rules file: /lib/udev/rules.d/69-cd-sensors.rules
Reading rules file: /lib/udev/rules.d/69-libmtp.rules
Reading rules file: /lib/udev/rules.d/69-wacom.rules
Reading rules file: /lib/udev/rules.d/70-debian-uaccess.rules
Reading rules file: /lib/udev/rules.d/70-mouse.rules
Reading rules file: /lib/udev/rules.d/70-power-switch.rules
Reading rules file: /lib/udev/rules.d/70-printers.rules
Reading rules file: /lib/udev/rules.d/70-touchpad.rules
Reading rules file: /lib/udev/rules.d/70-uaccess.rules
Reading rules file: /lib/udev/rules.d/71-seat.rules
Reading rules file: /lib/udev/rules.d/73-seat-late.rules
Reading rules file: /lib/udev/rules.d/73-special-net-names.rules
Reading rules file: /lib/udev/rules.d/73-usb-net-by-mac.rules
Reading rules file: /lib/udev/rules.d/75-net-description.rules
Reading rules file: /lib/udev/rules.d/75-probe_mtd.rules
Reading rules file: /lib/udev/rules.d/78-sound-card.rules
Reading rules file: /lib/udev/rules.d/80-debian-compat.rules
Reading rules file: /lib/udev/rules.d/80-drivers.rules
Reading rules file: /lib/udev/rules.d/80-ifupdown.rules
Reading rules file: /lib/udev/rules.d/80-libinput-device-groups.rules
Reading rules file: /lib/udev/rules.d/80-net-setup-link.rules
Reading rules file: /lib/udev/rules.d/80-udisks2.rules
Reading rules file: /lib/udev/rules.d/85-hdparm.rules
Reading rules file: /lib/udev/rules.d/85-hplj10xx.rules
Reading rules file: /lib/udev/rules.d/85-hwclock.rules
Reading rules file: /lib/udev/rules.d/85-regulatory.rules
Reading rules file: /lib/udev/rules.d/90-alsa-restore.rules
Reading rules file: /lib/udev/rules.d/90-console-setup.rules
Reading rules file: /lib/udev/rules.d/90-libinput-model-quirks.rules
Reading rules file: /lib/udev/rules.d/90-pulseaudio.rules
Reading rules file: /lib/udev/rules.d/95-cd-devices.rules
Reading rules file: /lib/udev/rules.d/97-hid2hci.rules
Reading rules file: /etc/udev/rules.d/99-axe027.rules
Reading rules file: /lib/udev/rules.d/99-systemd.rules
rules contain 393216 bytes tokens (32768 * 12 bytes), 29957 bytes strings
23013 strings (183614 bytes), 19745 de-duplicated (156926 bytes), 3269 trie nodes used
GROUP 100 /etc/udev/rules.d/10-local.rules:1
IMPORT builtin 'usb_id' /lib/udev/rules.d/50-udev-default.rules:13
IMPORT builtin 'hwdb' /lib/udev/rules.d/50-udev-default.rules:13
MODE 0664 /lib/udev/rules.d/50-udev-default.rules:41
PROGRAM 'mtp-probe /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1 2 6' /lib/udev/rules.d/69-libmtp.rules:2283
starting 'mtp-probe /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1 2 6'
'mtp-probe /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1 2 6'(out) '0'
Process 'mtp-probe /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1 2 6' succeeded.
RUN '/sbin/modprobe -q ftdi_sio product=0xbd90 vendor=0x0403' /etc/udev/rules.d/99-axe027.rules:5
handling device node '/dev/bus/usb/002/006', devnum=c189:133, mode=0664, uid=0, gid=100
set permissions /dev/bus/usb/002/006, 020664, uid=0, gid=100
setting mode of /dev/bus/usb/002/006 to 020664 failed: Operation not permitted
setting owner of /dev/bus/usb/002/006 to uid=0, gid=100 failed: Operation not permitted
ACTION=add
BUSNUM=002
DEVNAME=/dev/bus/usb/002/006
DEVNUM=006
DEVPATH=/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1
DEVTYPE=usb_device
DRIVER=usb
ID_BUS=usb
ID_MODEL=AXE027_PICAXE_USB
ID_MODEL_ENC=AXE027\x20PICAXE\x20USB
ID_MODEL_ID=bd90
ID_REVISION=0600
ID_SERIAL=Revolution_AXE027_PICAXE_USB
ID_USB_INTERFACES=:ffffff:
ID_VENDOR=Revolution
ID_VENDOR_ENC=Revolution
ID_VENDOR_FROM_DATABASE=Future Technology Devices International, Ltd
ID_VENDOR_ID=0403
MAJOR=189
MINOR=133
PRODUCT=403/bd90/600
SUBSYSTEM=usb
TYPE=0/0/0
USEC_INITIALIZED=55109417169
run: '/sbin/modprobe -q ftdi_sio product=0xbd90 vendor=0x0403'
Unload module index
Unloaded link configuration context.
the website says that this line:
Code: Select all
indicates that the udev rules were applied successfully.handling device node '/dev/bus/usb/002/006', devnum=c189:133, mode=0664, uid=0, gid=100
Also, from this output,
Code: Select all
seems to do what we wanted.GROUP 100 /etc/udev/rules.d/10-local.rules:1
I reloaded the udev rules with:
Code: Select all
but I'm still getting the same results from Linaxepadsudo udevadm control --reload-rules && udevadm trigger
So, going back to the output from udevadm test command above, I noticed a few other things.
Now, I'm not sure if the output is telling me to RUN this command myself or it just 'ran' it:
Code: Select all
which basically looks the same as option 1 from the pdf except for the ":5" at the end.RUN '/sbin/modprobe -q ftdi_sio product=0xbd90 vendor=0x0403' /etc/udev/rules.d/99-axe027.rules:5
And here is where I think I may be running into problems:
Code: Select all
Also, towards the end of that output it says again to 'run' modprobe command but this time not 'RUN'.setting mode of /dev/bus/usb/002/006 to 020664 failed: Operation not permitted
setting owner of /dev/bus/usb/002/006 to uid=0, gid=100 failed: Operation not permitted
First I tried to look for a problem to the permissions as I suspect this is the issue:
From:https://ubuntuforums.org/showthread.php?t=901891
I tried the solution in post #4 with:
Code: Select all
which gave me:
lsusb -v -d 0403:bd90
Code: Select all
so obviously I'm having an issue accessing this device and it seems to be because of permissions, although everything looks like it's setup properly. If I run the above command as sudo, then I don't get the message:
trevor@debian:~/Downloads$ lsusb -v -d 0403:bd90
Bus 002 Device 006: ID 0403:bd90 Future Technology Devices International, Ltd
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x0403 Future Technology Devices International, Ltd
idProduct 0xbd90
bcdDevice 6.00
iManufacturer 1
iProduct 2
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 32
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 90mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 255 Vendor Specific Protocol
iInterface 2
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Code: Select all
I'll keep trying but I don't want to just start changing things I don't know anything about. Sorry for the long post, but I figured it was better to post all of the information. Thanks again.Bus 002 Device 006: ID 0403:bd90 Future Technology Devices International, Ltd
Couldn't open device, some information will be missing