On Fri, Jun 22, 2001 at 06:08:34PM +0530, ravi bel wrote:
> hello greg,
> 
> we are trying provide tty interface for the bluetooth driver. we have
> written a tty line discipline for that. while doing the testing we have one
> bluetooth device connected to the PC via UART and another through USB.

I don't understand, the current USB bluetooth driver looks like a tty
device to userspace, and sends that data out to the USB bluetooth
device.  What do you mean when you say "we are trying provide tty
interface for the bluetooth driver."?

> i have two doubts now.
> 
> 1. while sending the packets from uart, packet type is sent first and then
> the actual data. in usb we are receiving the packet and in callback(int and
> read bulk) we are putting the packet type at the beginning and calling the
> receive_buf of the line discipline. since this is the serial tty interface i
> think there are two packet type fields when data comes to the line
> discipline. one that is sent from the uart side and another added in the
> callback. how is this handled/should be handled.
> 
> 2. while sending data from USB, the packet type is checked in the
> bluetooth_write based on the packet type the rest of the data is sent using
> appropriate urbs. now i have noticed that we are not sending the packet type
> along with the data. when an uart connected guy receives the packet on what
> basis is he going to decide what type of packet he has received. because we
> have not sent the packet type at all.

For both of these issues, we are emulating a USB UART device in the
bluetooth driver.  This involves splitting data apart when data is sent
to us (stripping off the packet type from the data stream and sending
the proper data to the proper USB endpoint) and adding the packet type
byte back on when the data is received (depending on which endpoint it
came in on.)

For the USB Bluetooth hardware interface the packet types is not
supposed to be sent with the data, unlike the Serial Bluetooth hardware
interface.  See the Bluetooth spec for an explanation of this.

What Linux Bluetooth stack are you trying to use with the driver?

greg k-h

_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
http://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to