Writing a Linux Kernel Driver for an Unknown USB Device
How to write your first USB client driver (KMDF) - Windows drivers | Microsoft Docs
In UNIX, hardware devices are accessed by the user through special device files. The device driver is a kernel component usually a module that interacts with a hardware device. In the UNIX world there are two categories of device files and thus device drivers: character and block. This division is done by the speed, volume and way of organizing the data to be transferred from the device to the system and vice versa. In the first category, there are slow devices, which manage a small amount of data, and access to data does not require frequent seek queries. Examples are devices such as keyboard, mouse, serial ports, sound card, joystick. In general, operations with these devices read, write are performed sequentially byte by byte.
How to open a file from a kernel mode device driver and how to read from or write to the file
Open Microsoft Visual Studio. This length limit is defined in wdfglobals. In the Location field, enter the directory where you want to create the new project. Visual Studio creates one project and a solution. You can see them in the Solution Explorer window, shown here.
This article explains the creation process of a Linux kernel device driver for an undocumented USB device. In addition to the kernel driver I introduce a simple user-space tool that can be used to control the device. Although I have to delve into the specifics of a particular device, the process can be applied to other USB devices as well.