System Administration Guide: Solaris Printing

How Auto-Discovery of Devices Works

Discovery of devices, including printers, is accomplished through the Hardware Abstraction Layer (HAL) device registry (database) component. HAL uses D-BUS messaging to notify interested applications about changes to its registry. D-BUS is a messaging bus that passes messages between applications and broadcasts signals that interested applications are able to detect. This messaging service is used by HAL and a number of other applications. HAL provides the framework for device discovery and notification of device configuration changes on a system. In the Solaris release, this support has been extended to detecting printers that are added or removed from a local system.

The HAL daemon, hald, provides a view of devices that are attached to a local system. This view is updated automatically, as a system's hardware configuration changes, by hotplugging or by other methods. HAL's internal database, also called the HAL device tree, is where device information is stored and maintained. HAL devices are uniquely identified in the HAL database through a Universal Device Identifier (UDI). This database is populated with properties of each device in the HAL database.

The automatic printing configuration feature works with the HAL daemon by listening for sysevents. When a hotplug-capable printer is added to a system, HAL creates a new node in the HAL device tree, as shown in the following example:


/org/freedesktop/Hal/devices/pci_0_0/pci1022_74606/pci108e_534d_3_1/printer_2_0_if0/print

When the device node has been successfully registered in the HAL database, HAL signals interested applications that the device is available. Device removal works similarly.

For more information about HAL, see http://opensolaris.org/os/project/tamarack/.

The network device discovery components are standard service interfaces that are offered by classes of network-attached devices. This module is capable of actively scanning a network for new devices. The service is directly controlled through the svcadm interface. For more information, see the svcadm(1M) man page. svcadm(1M). To determine the device type, an active scan is performed through a Simple Network Management Protocol version 1 (SNMPv1) broadcast. Be default, the SNMP based network-attached printer discovery service probes the network for printers every 60 seconds. This property is configurable. See Configuring Auto-Discovery Settings for Network-Attached Printers. During this active scan, SNMP determines the device type by attempting to connect to the device.


Note –

Only active device discovery is available in this Solaris OS. Passive device discovery through the Multicast DNS (mDNS) is not available.