Re: USB CDC-ACM filter?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am Montag 27 April 2009 15:12:52 schrieb Manuel Naranjo:
> Oliver Neukum escribió:

> > You'd modify acm_tty_write() and strip the headers in acm_rx_tasklet()
> > But are you sure you need all the serial stuff cdc-acm has to support?
  
> Yes because my device is CDC-ACM compliant except for this data filter. 
> I know there are many devices that work this way, windows (I know it's 
> not a good comparison) provide an api where you provide your filter, and 
> you get the rest done by the OS.

But how do you use setting baud rate and parity, etc ... on a bluetooth
dongle?

> I know the easy way is just copy/paste cdc-acm code, but maybe it's a 
> good idea to have a sort of framework like usb-serial does. Where you 
> extend the structure.

You add a quirk which causes the probe() method to use another function here:
acm->urb_task.func = acm_rx_tasklet;
and
tty_register_device(acm_tty_driver, minor, &control_interface->dev);

In static int __init acm_init(void) you define a second driver with an altered
set of tty_operations that defines a different acm_tty_write()
Can you post "lsusb -v" for your device?

	Regards
		Oliver
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux