Linux

Revision as of 01 May 2012 06:31 by cparker (Comments | Contribs) | (USB Serial Drivers)

Opticon does not officially endorse or support any Linux-based operating system, however we've noticed that the Linux kernel has good support for most of our devices. We can't guarentee that any of the below will work, as it's dependent on your particular distribution and version of the Linux kernel, but if you're running a modern distribution and you haven't modified and recompiled the kernel, there's a good chance the below will work for you.

USB-HID

Most of Opticon's scanners can be configured to transmit data as USB keyboards. Since the Linux kernel provides good support for USB keyboards, this means that Opticon's scanners work very well under Linux in this mode.

USB Serial Drivers

There are two ways that Opticon's devices can be accessed in Linux while in USB-VCP. Our 1D devices have a driver that provides good support for serial communication. As well, our 2D products use a generic CDC/ACM driver for serial communication. Since this is also well-supported in Linux, all of our products are well-supported.

The typical method for accessing our 1D products is to open the /dev/ttyUSB# file, where the # is a number, starting from 0 and counting up. Our 2D products are accessed through a similar device file, with the exception that since they use the CDC drivers they are accessed through /dev/ttyACM#.

A quick method for testing data transmission is to open the file corresponding to your device with the "cat" utility, then scanning some barcodes. For example, if your 1D scanner is the only USB-VCP device on the system, it can be accessed by typing "cat /dev/ttyUSB0" into the terminal. Depending on your level of permissions, you may need to be root to do this.

It's also possible to use tools like ttylog to wedge keyboard data into a terminal from a serial port.