Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

System Administration Guide: Solaris Printing
Previous Next

Managing Network Device Discovery Services (Task Map)

Task

Description

For Information

Initiate the HAL add-on module for network device discovery.

Before the system can actively scan the network for network‐attached printers, you must first initiate the HAL add-on module that discovers devices on a network. You can enable this service from the desktop or by using the svcadm command.

How to Enable the Network Device Discovery Service

How to Initiate the Network Device Discovery Services by Using SMF

Obtain information about printers that are discovered by the system by using the command line.

You might need to obtain information about printers that have been discovered by your system. You can obtain this information by using the command line. The output shows all of the devices that have been discovered by the system.

How to Determine Which Printers Are Known to the System

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 https://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.


Adding Newly Discovered Printers From the Desktop

You can use OpenSolaris Print Manager to configure newly discovered directly attached or newly discovered network‐attached printers from the desktop. By default, the system automatically discovers directly attached USB printers. The system also discovers network‐attached printers, if the network device discovery service has been enabled. See How to Enable the Network Device Discovery Service.

  • Adding a Directly Attached USB Printer

    When a new USB printer is connected to the system and discovered , the Add Printer Queue dialog, populated with printer configuration data, automatically opens on the desktop. From here, you can modify the existing configuration information and then create the new printer queue. After the new printer queue is created, it appears in the Queue pane of the Print Manager window. For more information, see How To Set Up Auto-Discovered Printers by Using the OpenSolaris Print Manager.

  • Adding a Network‐Attached Printer

    Network‐attached printers are auto‐discovered the same way as directly attached printers. This support is designed and implemented through a HAL add-on module, /usr/lib/hal/hald-addon-network-discovery. When a new network‐attached printer is discovered by the system, a printer queue is automatically created. At the same time, a notification message is displayed next to a printer icon located in the panel notification area of the desktop. Clicking this notification message launches the OpenSolaris Print Manager application. From here, you can view or change the configuration data for the newly discovered network‐attached printer. To do so, select the printer queue in the Queue pane of the Print Manager window and choose Properties from the Printer menu. For more information, see How To Set Up Auto-Discovered Printers by Using the OpenSolaris Print Manager.

    To utilize the network device discovery feature, the following conditions must be met:

    • The network device discovery service, network/device-discovery/printers:snmp, must be enabled.

      You can enable this service from the desktop or by using SMF commands. For more information, see Managing Network Device Discovery Services (Task Map).

    • Network‐attached printers must support SNMP queries, which means the device must be “known” to the system.

      For more information, see How to Determine Which Printers Are Known to the System.

    • Network-attached printers must be on the same subnet as the system that is querying the network.

      The service is not capable of discovering network-attached printers that are more than one hop away.

    • OpenSolaris Print Manager Preferences for desktop notifications of network printing events must be turned on.

      For more information, see Managing Print Manager and Printer Preferences.


Note - In the OpenSolaris 2008.11 release, attempts to enable the HAL add‐on module from the desktop or by using SMF commands, cause the system to revert to maintenance state. This problem does not occur if you are running a supported Solaris Express Community Edition release. To enable this service in the OpenSolaris 2008.11 release, you must first install the SUNWSmmgr package. For detailed instructions, go to https://www.opensolaris.org/os/project/indiana/resources/relnotes/200811/x86/.


Notification of Printing Events in the Desktop

The panel notification icon is a printer icon that is displayed in panel notification area of the desktop to notify you when:

  • One or more print jobs are processing

  • One or more printers have been discovered

To get more information, click the printer icon.

  • If one or more print jobs are processing normally, a Job List window opens for each printer queue that has a pending print job.

  • If one or more printer queues have been discovered, the Printer Queue Properties dialog or the Print Manager application opens, allowing you to check the configuration of the new printer queues.


Note - Notification messages that are not manually closed disappear after 5 seconds.


Preferences for notification messages can be viewed and changed in the Printer Preferences dialog. For more information, see Managing Print Manager and Printer Preferences.

Panel Notification Icon Context Menu

The following table describes the menu items that are available when you right-click the panel notification icon.

When Print Jobs Are Processing Normally

When Printers/Queues Are Discovered

Show Queue: Opens a Job List window for each queue in which you have a pending print job.

Open Print Manager: opens the Print Manager window, with the All Printers group selected, and all new queues selected within the group.

queuename Properties: Opens the associated Printer Properties window.

queue‐name Properties: Opens the associated Printer Properties window. Hidden if more than one new queue was discovered.

Print Manager Preferences: Opens the Print Manager Preferences dialog.

Print Manager Preferences: Opens the Print Manager Preferences dialog.

For more information about viewing or changes preferences for notifications, see Managing Print Manager and Printer Preferences.

How to Enable the Network Device Discovery Service

By default, the OpenSolaris Print Manager automatically discovers and configures USB printers that are directly connected to your system. Print Manager also has the ability to discover and configure printers that are on a network after the network device discovery service has been enabled.


Note - Note that in the OpenSolaris 2008.11 release, this service cannot be enabled from the desktop until you install the SUNWSmmgr package. If you attempt to enable the service before installing this package, the system reverts to maintenance state. For detailed instructions, go to https://www.opensolaris.org/os/project/indiana/resources/relnotes/200811/x86/.


  1. From the Main Menubar, select:

    System-> Administration-> Services

    The Services settings window is displayed.

  2. To initiate the device discovery add-on module, select the Hardware Abstraction Layer network‐attached printer discovery (network/device-discovery/printers:snmp) option.
  3. Save your changes.

    To disable auto‐discovery of devices, deselect this option.

How to Initiate the Network Device Discovery Services by Using SMF

This procedure describes how to initiate, as well as disable, the network device-discovery/printers service (the HAL add-on module) by using the SMF.

  1. Become superuser or assume an equivalent role.
  2. Determine whether the SMF device-discovery/printers service is online.
    # svcs device-discovery/printers

    If the service is online, the following output is displayed:

    STATE          STIME    FMRI
    online         13:30:22 svc:/network/device-discovery/printers:snmp

    If the service is offline, the following output is displayed:

    STATE          STIME    FMRI
    disabled       Dec_12   svc:/network/device-discovery/printers:snmp
  3. To enable or disable the service instance, use the appropriate command.
    • To enable the service, type:
      # svcadm enable printers:snmp
    • To disable the service, type:
      # svcadm disable printers:snmp
  4. Verify that the HAL add-on module has been enabled or disabled.

    If the module has been successfully enabled, the output is as follows:

    # svcs device-discovery/printers
    STATE          STIME    FMRI
    online         13:30:22 svc:/network/device-discovery/printers:snmp 

    If the module has been successfully disabled, the output is as follows:

    # svcs device-discovery/printers
    STATE          STIME    FMRI
    disabled       Dec_12   svc:/network/device-discovery/printers:snmp

How to Determine Which Printers Are Known to the System

  • On the system that you want to get information about discovered printers, type:
    system% hal-find-by-capability --capability printer

    The output shows you all of the printers that have been discovered by the system.

    • To obtain additional details about discovered printers, type:
      zsh% for udi in $(hal-find-by-capability --capability printer) ; do ; lshal --show $udi --long ; done

      Or, if you are using a shell that does not support the use of $(command), type:

      sh% for udi in `hal-find-by-capability --capability printer` ; do ; lshal --show $udi --long ; done
Example 10-1 Determining Which Printers Are Known to the System

This example shows all of the devices discovered by the system, snoopy.

snoopy% hal-find-by-capability --capability printer
/org/freedesktop/Hal/devices/pci_0_0/pci1022_7460_6/pci108e_534d_3_1/printer_2_printer_0
    snoopy%
Example 10-2 Obtaining Additional Details about Printers That Are Known to the System
    zsh% for udi in $(hal-find-by-capability --capability printer) ; \ do ; lshal --show $udi --long ; done udi = \ '/org/freedesktop/Hal/devices/pci_0_0/pci1022_\ 7460_6/pci108e_534d_3_1/printer_2_printer_0'
      info.claimed.uid = 24656  (0x6050)  (int)
      info.claimed.service = 'gnome-volume-manager'  (string)
      info.claimed = true  (bool)
      printer.commandset = {'PJL', 'MLC', 'BIDI-ECP', 'PCLXL', 'PCL',
    'PDF', 'PJL', 'MIME', 'POSTSCRIPT'} (string list)
      printer.description = 'Hewlett-Packard color LaserJet 4650'  (string)
      printer.serial = '00000D920NSL'  (string)
      printer.product = 'hp color LaserJet 4650'  (string)
      printer.vendor = 'Hewlett-Packard'  (string)
      printer.device = '/dev/printers/1'  (string)
      info.capabilities = {'printer'} (string list)
      info.category = 'printer'  (string)
      info.solaris.driver = 'usbprn'  (string)
      solaris.devfs_path =
    '/[email protected],0/pci1022,[email protected]/pci108e,[email protected],1/[email protected]:printer'  (string)
      info.product = 'printer'  (string)
      info.udi =
    '/org/freedesktop/Hal/devices/pci_0_0/pci1022_7460_6/pci108e_534d_3_1/printer_2_printer_0'...)
      info.parent =
    '/org/freedesktop/Hal/devices/pci_0_0/pci1022_7460_6/pci108e_534d_3_1/printer_2_if0_0'...)

    zsh%
Previous Next

 
 
  Published under the terms fo the Public Documentation License Version 1.01. Design by Interspire