![]() ![]() ![]() However, that is way beyond what you need to do to simply use a serial port. The Zebra CDC driver conforms to the Microsoft Windows Driver Model (WDM) and is certified by Windows Hardware Quality Labs (WHQL) for installation on 32 and 64bit Windows 7 and Windows 8.1 PCs when a Zebra Scanner must be used in USB CDC host mode. If you really are curious about how the Linux CDC ACM driver works, and how it converts a write system call into the corresponding USB transfer, you can read the source of the cdc-acm driver. It might help you to search the Internet for things like "linux serial port programming" or "posix serial port programming" to understand more about how to do this. In fact, you can use the same code on any type of serial port, regardless of which kernel driver implements the serial port. The Linux serial port interface abstracts away all details about USB, endpoints, and bulk transfers, so you can use a simpler, more abstract API to communicate with the serial port. I don't know of a great way to read data from the interrupt endpoint in Linux but you can at least look into the TIOCMGET, TIOCGICOUNT, and TIOCMIWAIT ioctls in you really need to do that. These system calls are easiest to access from C and C++, but most languages have a library you can use to access serial ports. You can open /dev/ttyACM0 with the open system call, set parameters for it using termios (optional), and then use the read and write system calls to read and write bulk data from your device. There is no need to write a kernel space driver. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |