Exercise: Exploring Common Peripherals

Identifying and Testing Specialized Hardware

A modular, hands-on guide to identifying and testing common USB peripherals like GPS, NFC, Smart Card, RFID, and Barcode readers using standard Linux tools.
Author

Chuck Nelson

Published

November 16, 2025

1 Purpose

Beyond the standard keyboard and mouse, technicians often need to connect and troubleshoot a wide variety of specialized peripherals. This exercise is a modular guide to testing several common device types in a Linux environment. The parts are optional and can be completed if you have access to the corresponding hardware. For each device, you will learn the standard tools and methods to verify that the system detects the hardware and receives input from it.

2 What You’ll Accomplish

By the end of this exercise, you will be able to:

  • Use appropriate command-line tools to check for the presence of GPS, NFC, and Smart Card readers.
  • Understand the concept of a “keyboard wedge” device for RFID and barcode scanners.
  • Test various peripherals to confirm they are detected and functioning correctly.

3 Prerequisites

This exercise requires a running Fedora virtual machine. Each section in the tabbed guide below is optional and requires a specific piece of USB hardware.

4 Step-by-Step Guide

Open a terminal window in your Fedora VM to begin. Navigate to the tab corresponding to the hardware you wish to test.

This section requires a USB GPS receiver compatible with gpsd.

  1. Install GPS Tools: The gpsd-clients package provides cgps, a text-based tool for viewing GPS data.

    sudo dnf install -y gpsd-clients
  2. Connect and Test: Plug in your USB GPS receiver and run the cgps command.

    cgps
  3. Analyze the Output:

    • If you have no device: The command will likely fail with a gps_open() failed: Connection refused error. This is expected, as the main gpsd service isn’t running because it didn’t find a GPS device to manage. This error is your confirmation that no device was found.
    • If you have a device: The cgps interface will open. It may initially say “NO FIX,” but after a few moments (especially if near a window), it will populate with your coordinates and a list of satellites. Press q to quit.

This section requires a USB NFC reader.

  1. Install NFC Tools: Install the neard service, the neard-tools package for the nfctool command, and libnfc for the low-level utilities.

    sudo dnf install -y neard neard-tools libnfc
  2. Connect and List: Plug in your USB NFC reader. Use nfctool with the --list flag to see if the neard service detects it.

    nfctool --list

    If no device is listed, your reader was not detected.

  3. Poll for a Tag: If a device was listed, run the poll command. This will wait for you to present an NFC tag.

    nfctool poll
  4. Analyze: Tap an NFC-capable card or tag to the reader. The tool will print the details of the tag it discovered. Press Ctrl+C to stop polling.

This section requires a USB Smart Card or CAC reader.

  1. Install PC/SC Tools: The pcsc-tools package provides the standard pcsc_scan utility.

    sudo dnf install -y pcsc-tools
  2. Connect and Scan: Plug in your reader and run the scan tool.

    pcsc_scan
  3. Analyze:

    • If the reader is detected, the tool will print the reader’s name and wait, displaying “Waiting for card…”
    • If you insert a compatible card, it will print the card’s ATR (Answer to Reset) data, confirming it can be read.
    • If the command exits immediately with an error, no PC/SC compatible reader was found. Press Ctrl+C to stop scanning.

This section requires a simple “keyboard wedge” RFID reader (the most common type for 125KHz cards).

  1. No Software Needed: These devices emulate a keyboard. No special drivers or tools are required.

  2. Open a Text Editor: Open any application that accepts text input, like gedit or a terminal window.

  3. Scan a Tag: Place an RFID card or fob on the reader.

  4. Analyze: If the reader is a keyboard wedge, the card’s serial number will be “typed” into the text editor, usually followed by an automatic “Enter” keypress. If nothing happens, your reader may not be a keyboard wedge type or may not be detected correctly.

This section requires a standard USB barcode scanner.

  1. No Software Needed: Like many RFID readers, most USB barcode scanners act as a “keyboard wedge.”

  2. Open a Text Editor: Open any application that accepts text input.

  3. Scan a Barcode: Scan any common barcode (e.g., on a book or food item).

  4. Analyze: If the scanner is working, the data from the barcode will be “typed” into your text editor, typically followed by an “Enter” keypress.

5 Reflect and Review

ImportantReflection: 3-2-1

Now that you have completed this exercise, reflect on your experience in your Microsoft Teams Student Notebook:

  • 3 different types of peripherals you learned about.
  • 2 different command-line tools you used to test hardware.
  • 1 question you still have about how Linux interacts with USB devices.
TipCheck on Learning

Answer these questions in your notebook to solidify your understanding:

  1. For one of the devices you tested, what was the command you used to check for its presence? What was the output?
  2. What is a “keyboard wedge” device, and why doesn’t it require special software?
  3. What is the difference in purpose between a service like neard and a low-level tool like nfc-list?
  4. You run pcsc_scan and it immediately exits with an error. What is the most likely cause?
Back to top