View Full Version : Writing device driver for Lexmark X85

July 17th, 2010, 03:18 PM
I have an old Lexmark X85 printer/scanner, and there is no device driver for it.
I want to write one.
My plan is to install the printer in a virtual machine running Windows and analyze the traffic, from Linux, using Wireshark USB capabilities.
Wireshark is actually capable to get raw USB traffic, direct from USB interface.
Initially, I want to try a user space driver, using libusb as my layer to communicating with the printer.
My problem is that I never wrote a device driver, and I need some advice.
I wanna know how can I extract relevant data from wireshark output and how can I use libusb primitives.

This is the link where I'm putting the information that I got

July 17th, 2010, 07:03 PM
Wow, that's quite a difficult task. I'd start with a related driver, chances are there's some similarities.

July 17th, 2010, 09:00 PM
Sounds like you have more or less the right idea. Log traffic using Wireshark, dump the data to file, and then try to emulate that using a userspace driver.

A little Googling gave these resources:
- On writing drivers, though it discusses kernelspace drivers
- The libusb documentation
- On writing userspace drivers

July 18th, 2010, 12:12 AM
You should try to figure out what kind of chip set the printer is using and write the driver based on that. The network sniffing isn't going to give you the details you need to initialize the printer chip set.