*************************************************
**
**  Custom Virtual Com Driver 
**  Linux compatible USB serial driver
**
**  Release: 1.03
**
**  SCode: 01DV0000000162
**
*************************************************/

List of supported printers:
Flex-TT:                    VID=0x0DD4 PID=0x8247
K3:                         VID=0x0DD4 PID=0x820A
KPM150H:                    VID=0x0DD4 PID=0x8203
KPM180H/TK180:              VID=0x0DD4 PID=0x8208
KPM216HII-ETH (200 dpi):    VID=0x0DD4 PID=0x819A
KPM216HII-ETH (300 dpi):    VID=0x0DD4 PID=0x81A2
KPM300H/TK300/TK200:        VID=0x0DD4 PID=0x8175
TODO KPM862:                VID=0x0DD4 PID=0x8242
MY3 A:                      VID=0x0DD4 PID=0x820B
MYPrinter A:                VID=0x0DD4 PID=0x8231
Q3:                         VID=0x0DD4 PID=0x818E
TODO TG02-H:                VID=0x0DD4 PID=0x8186
TODO TPTCM60III:            VID=0x0DD4 PID=0x821D
TODO TPTCM112III:           VID=0x0DD4 PID=0x8225
VK80 (300 dpi):             VID=0x0DD4 PID=0x8212
VKP80III:                   VID=0x0DD4 PID=0x8205
K80:                        VID=0x0DD4 PID=0x8237
TG2460-H:                   VID=0x0DD4 PID=0x8245
TG2480-H:                   VID=0x0DD4 PID=0x8244
Plus2:                      VID=0x0DD4 PID=0x819F
Plus4:                      VID=0x0DD4 PID=0x820C
Modus 3:                    VID=0x0DD4 PID=0x823B
MULTI SCAN:                 VID=0x0DD4 PID=0x824B
FUSION PC:                  VID=0x0DD4 PID=0x8239
TL60 III:                   VID=0x0DD4 PID=0x8250
TL80 III:                   VID=0x0DD4 PID=0x8251
TG2460-H EJ:                VID=0x0DD4 PID=0x8253
TG1260-H:                   VID=0x0DD4 PID=0x8255
TODO KM216HC (200dpi):      VID=0x0DD4 PID=0x81AA
TODO KM216HC (300dpi):      VID=0x0DD4 PID=0x81AB
VKP80II 300:                VID=0x0DD4 PID=0x8261
TODO QD2:                   VID=0x0DD4 PID=0x5102
TODO P3 036:                VID=0x0DD4 PID=0x8260
TL60 12V III:               VID=0x0DD4 PID=0x825E
TL60-EJ III:                VID=0x0DD4 PID=0x8263
BD103:                      VID=0x0DD4 PID=0x814A
MP Ranger:                  VID=0x0DD4 PID=0x8269

Kernel version compatibility:
This driver may be compiled for kernel version >= 2.6.35
Use "uname -a" to check for your running kernel version


TO COMPILE:
 make clean
 make

TO INSTALL:
First install usbserial module then customvcom module
 modprobe usbserial
 insmod ./customvcom.ko

If you want to support a new printer, add the printer specific option in "usb_device_id id_table[]", line 63.
You can uncomment line 142 and change it with correct PID and correct interface protocol.
Example:
{ USB_DEVICE_AND_INTERFACE_INFO(0x0DD4, 0x02C4, USB_CUSTOM_VCOM_INTCLASS, USB_CUSTOM_VCOM_INTSUBCLASS, USB_CUSTOM_VCOM_INTPROTOCOL_0) },
or
{ USB_DEVICE_AND_INTERFACE_INFO(0x0DD4, 0x02C4, USB_CUSTOM_VCOM_INTCLASS, USB_CUSTOM_VCOM_INTSUBCLASS, USB_CUSTOM_VCOM_INTPROTOCOL_2) },

Interface protocol is available from "lsusb -v" command under 
Interface Descriptor:
	...
	bInterfaceProtocol      0 or 2
	

When connecting a supported printer the /dev/ttyUSBX device file will be automatically created by udev daemon.
Use this file device as a normal serial device.



TO TEST:
After printer is connected and ttyUSB0 device file is created:
cd testapp
gcc -o serial serial.c (to compile test appliacation)
./serial /dev/ttyUSB0

TO CREATE A SYMLINK
In order to create a symlink to /dev/ttyUSBX, you need to add an udev rule. You can find a working sample in ./udevNotes, named 99-customvcom.rules.
That rule creates symlinks to /dev/ttyUSBX for KPM180-H printers, in case the printer is in ATB mode the symlink will be /dev/TK180H_ATB, while if the printer is set in BTP the symlink will be /dev/TK180H_BTP.
In case of symlink, you can execute the test software with the following command:
./serial /dev/TK180H_ATB
or 
./serial /dev/TK180H_BTP 


NOTES:
If modem-manager service si running, please stop this service.
