[Mono-list] USB hardware detection using Mono on Linux

Danny Haak danny.haak at nedap.com
Tue Aug 18 08:22:10 EDT 2009


That seems like a good approach, but on the HAL site it states that "HAL
is in maintenance mode - no new features are added. All future
development focuses on Software/DeviceKit-disks,
Software/DeviceKit-power, NetworkManager, PulseAudio, udev, ... " [1].
Therefore, it seems not a good idea to me to use it in new software.

Best regards,

[1]: http://www.freedesktop.org/wiki/Software/hal

-----Original Message-----
From: mono-list-bounces at lists.ximian.com
[mailto:mono-list-bounces at lists.ximian.com] On Behalf Of Adam Tauno
Sent: dinsdag 18 augustus 2009 12:49
To: mono-list
Subject: Re: [Mono-list] USB hardware detection using Mono on Linux

On Tue, 2009-08-18 at 12:06 +0200, Danny Haak wrote:
> Hi all,
> I am currently writing a piece of software that needs to detect which 
> USB devices are attached to the computer. Event-based notifications of

> attaching and detaching hardware while the software is running is 
> nice, but not required.
> I first used DeviceKit-Sharp (by Ben Gamari), but when observing a bug

> and asking the DeviceKit mailing-list, Kay Sievers answered: "The 
> DeviceKit daemon is dead and will not run, or be installed on any 
> usual system. You need to use libudev, or the GUdev to retrieve this 
> information." This is a pity, because DeviceKit was working nicely, 
> despite the bug in the daemon.
> I can't find any Mono-bindings for libudev, and diving deeper in the 
> documentation, libudev seems quite low-level and talking to HAL. 
> Looking for HAL abstractions, I discovered that HAL will be obsolete 
> as well in the near future. This leaves me completely confused about 
> 'the way to go' for hardware detection in Mono on Linux. Is there 
> anybody who can suggest a (sort of) future-proof approach to this?

I believe you can attach to the system D-BUS and you will receive HAL
events.   <http://www.ndesk.org/DBus_Documentation>
OpenGroupware developer: awilliam at whitemice.org
OpenGroupare & Cyrus IMAPd documenation @

Mono-list maillist  -  Mono-list at lists.ximian.com

More information about the Mono-list mailing list