Questions tagged [udev]

Udev manages the Linux /dev directory, and hooks userspace into kernel device events.

udev (userspace /dev) is a device manager for the Linux kernel. As the successor of devfsd and hotplug, udev primarily manages device nodes in the /dev directory. At the same time, udev also handles all user space events raised when hardware devices are added into the system or removed from it, including firmware loading as required by certain devices.

https://en.wikipedia.org/wiki/Udev

https://wiki.debian.org/udev

http://reactivated.net/writing_udev_rules.html

518 questions
0
votes
1 answer

Mounting remote fs - post mount and pre unmount scripts (linux)

I'm trying to figure out a way to run a script when a specific remote fs like cifs or nfs is mounted and also when it's about to be unmounted. I have entries in my fstab so mounting icons are automatically created on my desktop. But I need to mount…
alex
  • 111
  • 6
0
votes
1 answer

Linux Symbolic Link to USB device not working

On my Raspberry Pi I am trying to create a symbolic link for a device plugged into the USB port. I have done this before and it worked just fine, but recently I re-flashed the Pi's SD card to start from a clean slate again and now the Symbolic link…
user2725455
  • 13
  • 1
  • 5
0
votes
0 answers

ADB doesn't detect my android tablet in ubuntu?

I want to run my android apps in my tablet directly from eclipse. I set up my device as per the procedure given in android site added rules files with correct vendor ID. But it didn't work. even the adb devices command didn't detect my device. so…
pa1pal
  • 743
  • 3
  • 14
  • 32
0
votes
1 answer

udev doesn't always report 'features' on bluetooth devices

I have been using pyudev to look for bluetooth devices and then used the "features" attribute to determine if the device has LE support. However, just recently in the latest version of Ubuntu, udev no longer reports anything for "features". Here's…
Tim Tisdall
  • 9,914
  • 3
  • 52
  • 82
0
votes
1 answer

How to make udev deamon "think" we have added a new rule?

Does someone knows if its possible to access programmatically to the data structure where udev store the rules? And if its possible to modify them? In short: I want to run a program and cause the same effect of adding a new rule without actually…
Raydel Miranda
  • 13,825
  • 3
  • 38
  • 60
0
votes
1 answer

Udev Rule to match Ralink Wifi card and load rt2800usb

I've been working on a simple Linux firmware to load up a Ralink wifi card which requires the drivers rt2800usb. The firmware includes the file rt2800usb in the relevant place, starts the udev daemon and has a rule to match the card's attributes.…
James
  • 3,957
  • 4
  • 37
  • 82
0
votes
1 answer

program to know list of attached devices to my linux laptop

I am writing a small apllication that will tell list of attached devices to my linux laptop.There is one utility that is udev that can be used for hot plugging but is their some other way where i can write simple c program where it will tell that…
Srb
  • 219
  • 3
  • 13
0
votes
1 answer

Getting hard disk serial number (USB stick / ATA based) with pyudev

Been working on the below sample code to retrieve the connected HDD detail using pyudev. Devices that I am trying to probe: regular sata hard disk USB to SATA converter USB Sticks With the below script, I have been able to retrieve the USB sticks…
Ragav
  • 942
  • 4
  • 19
  • 37
0
votes
1 answer

Default file permissions for FAT32 USB stick on Raspberry Pi

When I plug a USB stick/thumbdrive that has been formatted as FAT32 into a Raspberry Pi (running Raspbian) the file permissions default to 644 and I cannot change them. I need to leave the stick as FAT32 so it can be used back and forward to a…
David G
  • 337
  • 6
  • 17
0
votes
1 answer

udevadm code with undefined reference error

udevadm executes well on my desktop. However, I have written the code which links to libudev.so, by compiling my code with the following command: gcc -g -Wall -ludev test.c -o testadm I got a bunch of errors in the following log: undefined reference…
Sam
  • 4,521
  • 13
  • 46
  • 81
0
votes
1 answer

netlink socket address structure (nl_group)

The netlink socket address structure is shown in the following, struct sockaddr_nl { sa_family_t nl_family; /* AF_NETLINK */ unsigned short nl_pad; /* zero */ __u32 nl_pid; /* process pid */ __u32 …
Sam
  • 4,521
  • 13
  • 46
  • 81
0
votes
1 answer

ttyusb udev naming by hardware port

I Have two usb->serial adapters, both ftdi, lets name them ftdiA, and ftdiB. The device (in this case raspberry pi but it is kind of irrelevant) has 2 USB ports, let's name them 'top' and 'bottom'. Is there a way to create udev rule so, that no…
davidovv
  • 80
  • 1
  • 7
0
votes
1 answer

Pyudev : KeyError raised even though property exists

I am trying to monitor and filter usb mass storage devices using pyudev in python. In the given code devices are being filtered out if their ID_FS_USAGE property is None : import gtk from pyudev import Context,Monitor from pyudev.glib import…
Flame of udun
  • 2,136
  • 7
  • 35
  • 79
0
votes
1 answer

udev: I Need use of udev for pendrive on linux

Can anyone tell me a little example on ubuntu-linux how to write udev rule for pendrive and i can experiment on my linux machine. please give steps for it i am new for udev. How to run a script when i will insert usb-pendrive to my system using…
Vinod Patidar
  • 372
  • 1
  • 4
  • 12
0
votes
0 answers

Linux kernel module is not running anymore when switching from mdev to udev

I have a simple Kernel module: void GPIO_LED(void) { printk(" GPIO: set PC8: '0'); at91_set_gpio_value(AT91_PIN_PC8, 1); } // int init_module(void) { GPIO_LED(); return 0; } MODULE_LICENSE("GPL"); When using it with mdev device…
user3085931
  • 1,757
  • 4
  • 29
  • 55