/IoT

repository to IoT tips

  • This command runs the sudo dmesg | tail command in the terminal.
  • It displays the last few lines of the kernel ring buffer, which contains information about the system's hardware and software events.
sudo dmesg | tail
  • Reads data from the HID device at /dev/hidraw2 and displays it in hexadecimal format.
sudo cat /dev/hidraw2 | hexdump -C
  • Reads the input from the mouse device and displays it in hexadecimal format.
sudo cat /dev/input/mouse3 | hexdump -C

This code snippet retrieves information about input devices from the /proc/bus/input/devices file. It uses the cat command to display the contents of the file. The path to the file is specified as /proc/bus/input/devices.

cat /proc/bus/input/devices

Get information about a specific input device

This command retrieves detailed information about a specific input device using its device name.

sudo udevadm info --query=all --name=/dev/input/mouse3