Re: [linux-minidisc] implementing unix himd autodetection function
- From: Thomas Arp <manner.moe@gmx.de>
- To: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
- Date: Sun, 23 Dec 2012 21:20:44 +0100
- Cc: linux-minidisc@lists.fu-berlin.de
- Subject: Re: [linux-minidisc] implementing unix himd autodetection function
Am 23.12.2012 16:28, schrieb John Paul Adrian Glaubitz:
I took a look at udev-discoverer gui application to see which information we can get from udev. Is there any way to get the mountpoint? I cannot find anything about that. If not maybe we can use dbus to get the device file and "DriveAdded"/"DriveRemoved" notification and use udev to get the device information for the specified device file. Or better use the other way: use udev to get notifications and device information and than use dbus to get the mountpoint if device is a himd device. Also maybe we could make use of libudev to provide autodetection mechanism without the need to create/install any udev rules.On Sun, Dec 23, 2012 at 04:01:20PM +0100, John Paul Adrian Glaubitz wrote:An easy way would be to use udev which is unfortunately Linux-specific. udev emumerates devices and can assign device files according to specific properties (USB IDs, for example). With udev, you could have any HiMD/NetMD device known from a himd.rules/netmd.rules file assign the device file /dev/himdN or /dev/netmdN (N being an integer number).As a quick follow up, here's a good introductory guide to writing udev rules [1]. However, I think we should discuss the whole auto detection mechanism on Linux, *BSD and MacOS X on more detail before we start implementing it so we can be sure to have maximum cross-platform compatibility. Adrian[1] http://www.reactivated.net/writing_udev_rules.html
I think netmd detection at application start is mostly platform independent using libusb, libusb provides it's own enumeration function as used in libnetmd. We just need device added/removed notification to reenumerate libusb devices.
I will read some more about udev. Thomas
- Follow-Ups:
- Re: [linux-minidisc] implementing unix himd autodetection function
- From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
- Re: [linux-minidisc] implementing unix himd autodetection function
- References:
- [linux-minidisc] implementing netmd support in the gui application
- From: "Thomas Arp" <manner.moe@gmx.de>
- Re: [linux-minidisc] implementing netmd support in the gui application
- From: Thomas Arp <manner.moe@gmx.de>
- [linux-minidisc] implementing unix himd autodetection function
- From: Thomas Arp <manner.moe@gmx.de>
- Re: [linux-minidisc] implementing unix himd autodetection function
- From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
- Re: [linux-minidisc] implementing unix himd autodetection function
- From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
- [linux-minidisc] implementing netmd support in the gui application
-
linux-minidisc - December 2012 - Archives indexes sorted by:
[ thread ] [ subject ] [ author ] [ date ] - Complete archive of the linux-minidisc mailing list
- More info on this list...