I want to make a small device which just present itself to my PC as a generic serial port device like /dev/ttyUSB0 so I do not have to have a special driver on my PC. I expect the communication to look like:
Code: Select all
echo "set mode=7" > /dev/ttyUSB0
cat /dev/ttyUSB0 > data.log
The project is very similar to this EasyLogger which interfaces to the keyboard. A good concept unless you need to have 2 or more devices connected.
http://www.obdev.at/products/vusb/easylogger.html
So I looked for a small and simple USB-serial driver at my system:
Code: Select all
$ ls -S /lib/modules/$(uname -r)/kernel/drivers/usb/serial/ | tail -n 1
zio.ko
In the source it looks like it almost de nothing at all. It simply just use the generic serial device code with no hooks:
http://lxr.linux.no/#linux+v3.2/drivers ... rial/zio.c
It is a bit similar to a generic keyboard but for a serial port.
I know I am not supposed to present my device as another vendor:product but it looks like that if choose to use USB_DEVICE(0x1CBE, 0x0103) my system will automatically load the zio driver and I got a /dev/ttyUSB0 .
Will this work and is it possible to use V-USB for that?
Zilog has "drivers" for there device but they are just parameters for a default usb-serial:
http://www.zilogic.com/releases/zio-sw-1.1/drivers/
(it is just text files)
/hans
(I'm sorry if this question has been asked before. I could not find the answer)