Exercise: Exploring USB and Bluetooth Hardware

Identifying and Interacting with Local Radios

A hands-on exercise to identify USB-connected hardware, including the host’s built-in Bluetooth adapter, and use command-line tools to scan for nearby devices.
Author

Chuck Nelson

Published

November 16, 2025

1 Purpose

This exercise provides hands-on experience with identifying the physical hardware that the operating system can see. Most modern laptops have a built-in Bluetooth adapter that is internally connected via USB. You will learn to use command-line tools to find this device and then use a Bluetooth-specific tool to perform a scan, demonstrating a direct link between a software command and a physical radio.

2 What You’ll Accomplish

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

  • Use lsusb to list all USB devices visible to the system.
  • Use dmesg to search for kernel messages about the Bluetooth driver.
  • Use the bluetoothctl tool to scan for discoverable Bluetooth devices.

This exercise maps to the following program and course learning outcomes:

  • Course Learning Outcomes (CLOs):
    • 1. Identify hardware and basic network components: You will identify a specific piece of wireless hardware and its connection type.
    • 3. Troubleshoot hardware and basic network components: Using tools to verify hardware presence and function is a fundamental troubleshooting step.

This exercise develops the following skills, which align with the O*NET SOC Code 15-1232.00 for Computer User Support Specialists.

Learning Objective O*NET KSAs Technologies Used
Identify and interact with Bluetooth hardware. Knowledge: Computers & Electronics, Telecommunications
Abilities: Information Ordering
lsusb, bluetoothctl

3 Prerequisites

This exercise requires a running Fedora 42 virtual machine. It is most effective when run on a host machine (like a laptop) that has a built-in Bluetooth adapter.

Some commands in these exercises require administrative privileges, prefixed with sudo. To avoid repeatedly typing your password, you can configure your user account to run sudo commands without a password.

CautionSecurity Warning

This is a convenient setting for a trusted virtual machine learning environment. Never do this on a production server or any computer that is exposed to the internet, as it is a significant security risk.

  1. Open the visudo editor to create a new configuration file. The -f flag lets you specify the filename.

    sudo visudo -f /etc/sudoers.d/99-nopasswd-user
  2. This will open a text editor. Add the following line, replacing your_username with your actual username (e.g., chuck).

    your_username ALL=(ALL) NOPASSWD: ALL

    You can also use the $USER variable, but typing your literal username is safer in this context.

  3. Save and exit the file. If you are in the vi editor (the default), press Esc, then type :wq and press Enter.

Your user will now be able to run sudo commands without being prompted for a password.

4 Step-by-Step Guide

Open a terminal window in your Fedora VM to begin.

4.1 Step 1: List USB Devices

The lsusb command lists information about all USB buses in the system and the devices connected to them.

  1. Run the command:

    lsusb
  2. Analyze the output. You will see a list of devices. Look for one that mentions “Intel Corp.” or “Broadcom” and “Bluetooth”. This is the internal Bluetooth adapter of your host machine. This shows that the VM is aware of the hardware passed through from the host.

4.2 Step 2: Check Kernel Messages

The dmesg command prints the kernel’s message buffer. We can search it to see if the Bluetooth driver loaded correctly.

  1. Run the following command to search the kernel log for lines containing “bluetooth” (the -i makes the search case-insensitive).

    sudo dmesg | grep -i bluetooth
  2. You should see several lines indicating that the Bluetooth driver has been initialized and is managing the hardware.

4.3 Step 3: Scan for Devices with bluetoothctl

bluetoothctl is the primary command-line tool for managing Bluetooth devices.

  1. Start the tool in interactive mode:

    bluetoothctl

    Your prompt will change to [bluetooth]#.

  2. From the new prompt, start a scan for nearby discoverable devices:

    scan on
  3. Let the scan run for 15-20 seconds. You should see a list of any nearby Bluetooth devices that are in pairing or discovery mode (e.g., smartphones, wireless mice, headphones, smartwatches).

  4. Stop the scan:

    scan off
  5. Exit the tool:

    exit

In your notebook, copy one of the lines corresponding to a device you discovered. What information is provided for each device?

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 commands you used in this exercise.
  • 2 pieces of information you saw in the lsusb output for your Bluetooth device.
  • 1 question you still have about how the VM accesses the host’s hardware.
TipCheck on Learning

Answer these questions in your notebook to solidify your understanding:

  1. What is the purpose of the lsusb command?
  2. You run bluetoothctl and type scan on, but you see no devices. What are two possible reasons for this?
  3. Why is it useful to check dmesg when troubleshooting hardware?
  4. What does the bluetoothctl tool allow you to do?
Back to top