Hardware⏱️ 3 min readπŸ“… 2026-06-15

How to Fix: Error when running hp-setup "no device selected"

HP LaserJet M402dne printer installation issue with hp-setup command.

Quick Answer: Try using the -d option to specify the device path, e.g. hp-setup -i -d /dev/usb/lp0

The error 'no device selected/specified or that supports this functionality' occurs when attempting to install an HP printer using the command line. This issue affects users who have installed the hp-setup utility but are unable to recognize their printer, resulting in a frustrating installation process. The primary cause of this error is often related to incorrect settings or missing device drivers.

This problem can be particularly vexing for IT professionals and users alike, as it prevents the successful installation of critical hardware components. Fortunately, there are several methods to resolve this issue, which will be outlined in the following steps.

⚠️ Common Causes

  • The primary reason for this error is that the hp-setup utility may not have detected the printer's device driver or may require specific settings to recognize the device. This can occur when the printer is connected via USB and does not support the necessary communication protocols.
  • Alternatively, the issue could be caused by a misconfiguration of the system's USB ports or a conflict with other devices on the same bus.

πŸ”§ Proven Troubleshooting Steps

Using the 'usb' Option

  1. Step 1: To resolve this issue using the 'usb' option, run the following command: `hp-setup -i --usb`. This will force the hp-setup utility to look for a USB-connected device.
  2. Step 2: Next, select the correct USB port that the printer is connected to. You can do this by running the command `ls /dev/usb/*` to list all available USB devices and selecting the one corresponding to your printer.
  3. Step 3: Once you have identified the correct device, run the command `hp-setup -i --usb /dev/usb/lp0` (replace 'lp0' with the actual device name). This will initiate the installation process.

Using the '/dev/usb/lp0' Command

  1. Step 1: Another approach to resolve this issue is to use the '/dev/usb/lp0' command directly. Run the following command: `echo 'sometext' > /dev/usb/lp0`. This will print the specified text on the printer.
  2. Step 2: If the printer responds correctly, run the following command: `hp-setup -i --usb /dev/usb/lp0`. This should initiate the installation process and recognize the printer.

πŸ’‘ Conclusion

By following these steps, you should be able to resolve the 'no device selected/specified or that supports this functionality' error when installing an HP LaserJet M402dne printer using the command line. Remember to always refer to the official hp-setup documentation for specific instructions and troubleshooting guides.

Did this fix your problem?

If not, try searching for specific error codes.

πŸ” Search Error Database

❓ Frequently Asked Questions