All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bluez-devel] Digianswer USB driver
@ 2003-08-15  6:25 Jan J. Jessen
  2003-08-15 12:39 ` Marcel Holtmann
  0 siblings, 1 reply; 12+ messages in thread
From: Jan J. Jessen @ 2003-08-15  6:25 UTC (permalink / raw)
  To: bluez-devel

Hi
During my master thesis, I wrote a custom Linux USB Bluetooth driver to
comply with my specific needs. I did this because I couldn't get bluez
working. The hardware that was available to me, was some development
boards from Digianswer a subsidiary of Motorola. They couldn't provide
much help, since their official driver is for Microsoft products, and they
have outsourced the development of their driver to another company in
Denmark.

So I just wrote my own driver according to the Bluetooth USB specification
and the spec for USB 1.1, and basically found that my driver didn't
work:-(

A sniff program on a Windows computer then revealed that Digianswer for
some strange reason uses a different value for their control requests,
than what is expected. I changed my #define to the correct value, and my
driver worked perfectly.

Later I tried to change the value, just to see if I could get bluez
working, and I succeeded:-)

in hci_usb.h
change
#define HCI_CTRL_REQ         0x20
to
#define HCI_CTRL_REQ         0x40

And everything works just fine. Though it was a development board that I
used, this change can possibly make bluez work with other Digianswer USB
hardware stated as "not working" with Bluez

Maybe there could be a note on the webpage to potential users of
Digianswer hardware, that this small hack could work?


Best regards, Jan Jakob
------------------------------------
Jan Jakob Jessen
Ph.D. Student, M.Sc.E.E.
Center for Embedded Software Systems
Aalborg University
Fredrik Bajers Vej 7C, B2-212
DK-9220 Aalborg East



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Bluez-devel] Digianswer USB driver
  2003-08-15  6:25 [Bluez-devel] Digianswer USB driver Jan J. Jessen
@ 2003-08-15 12:39 ` Marcel Holtmann
  2003-08-26 11:24   ` Jan J. Jessen
  0 siblings, 1 reply; 12+ messages in thread
From: Marcel Holtmann @ 2003-08-15 12:39 UTC (permalink / raw)
  To: Jan J. Jessen; +Cc: BlueZ Mailing List

Hi Jan,

> During my master thesis, I wrote a custom Linux USB Bluetooth driver to
> comply with my specific needs. I did this because I couldn't get bluez
> working. The hardware that was available to me, was some development
> boards from Digianswer a subsidiary of Motorola. They couldn't provide
> much help, since their official driver is for Microsoft products, and they
> have outsourced the development of their driver to another company in
> Denmark.
> 
> So I just wrote my own driver according to the Bluetooth USB specification
> and the spec for USB 1.1, and basically found that my driver didn't
> work:-(
> 
> A sniff program on a Windows computer then revealed that Digianswer for
> some strange reason uses a different value for their control requests,
> than what is expected. I changed my #define to the correct value, and my
> driver worked perfectly.
> 
> Later I tried to change the value, just to see if I could get bluez
> working, and I succeeded:-)
> 
> in hci_usb.h
> change
> #define HCI_CTRL_REQ         0x20
> to
> #define HCI_CTRL_REQ         0x40
> 
> And everything works just fine. Though it was a development board that I
> used, this change can possibly make bluez work with other Digianswer USB
> hardware stated as "not working" with Bluez
> 
> Maybe there could be a note on the webpage to potential users of
> Digianswer hardware, that this small hack could work?

thanks for this information. I always tried to get my hands on the
Digianswer Bluetooth devices, but I never got one. Do you have a spare
one for me?

Changing the bRequestType is such an ugly hack, but on the other side it
is a very simple change to get these devices supported by hci_usb. I
will write a patch for supporting Digianswer devices and H:2 Bluetooth
devices at the same time, but I need some more information about the
your device. Please send me the output of "cat /proc/bus/usb/devices"
and "hciconfig -a".

Regards

Marcel




-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Bluez-devel] Digianswer USB driver
  2003-08-15 12:39 ` Marcel Holtmann
@ 2003-08-26 11:24   ` Jan J. Jessen
  2003-08-30  0:11     ` Marcel Holtmann
  0 siblings, 1 reply; 12+ messages in thread
From: Jan J. Jessen @ 2003-08-26 11:24 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: BlueZ Mailing List

Hi,

On 15 Aug 2003, Marcel Holtmann wrote:

> Hi Jan,
>
> thanks for this information. I always tried to get my hands on the
> Digianswer Bluetooth devices, but I never got one. Do you have a spare
> one for me?

Unfortunately no. Aalborg University has a history of cooperation with
Digianswer, and they have partly sponsered the equipment for use in
student projects. So I don't own the devices.

> Changing the bRequestType is such an ugly hack, but on the other side it
> is a very simple change to get these devices supported by hci_usb. I
> will write a patch for supporting Digianswer devices and H:2 Bluetooth
> devices at the same time, but I need some more information about the
> your device. Please send me the output of "cat /proc/bus/usb/devices"
> and "hciconfig -a".
>
> Regards
>
> Marcel

At the moment my Linux dist is having a vacation! Can you do with vendor
and product IDs? From my own driver:

/* Digianswer specific values */
#define USB_DIGI_VENDOR_ID    0x08fd
#define USB_DIGI_PRODUCT_ID   0x1
#define BLUETOOTH_REQ_TYPE    0x40

I hope this will do.

Best regards, Jan Jakob
------------------------------------
Jan Jakob Jessen
Ph.D. Student, M.Sc.E.E.
Center for Embedded Software Systems
Aalborg University
Fredrik Bajers Vej 7C, B2-212
DK-9220 Aalborg East

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Bluez-devel] Digianswer USB driver
  2003-08-26 11:24   ` Jan J. Jessen
@ 2003-08-30  0:11     ` Marcel Holtmann
  2003-09-16 14:02       ` Jan J. Jessen
  2003-09-16 14:16       ` Jan J. Jessen
  0 siblings, 2 replies; 12+ messages in thread
From: Marcel Holtmann @ 2003-08-30  0:11 UTC (permalink / raw)
  To: Jan J. Jessen; +Cc: BlueZ Mailing List

[-- Attachment #1: Type: text/plain, Size: 914 bytes --]

Hi Jan,

> > Changing the bRequestType is such an ugly hack, but on the other side it
> > is a very simple change to get these devices supported by hci_usb. I
> > will write a patch for supporting Digianswer devices and H:2 Bluetooth
> > devices at the same time, but I need some more information about the
> > your device. Please send me the output of "cat /proc/bus/usb/devices"
> > and "hciconfig -a".
> 
> At the moment my Linux dist is having a vacation! Can you do with vendor
> and product IDs? From my own driver:
> 
> /* Digianswer specific values */
> #define USB_DIGI_VENDOR_ID    0x08fd
> #define USB_DIGI_PRODUCT_ID   0x1
> #define BLUETOOTH_REQ_TYPE    0x40
> 
> I hope this will do.

attached is a patch which modifies the hci_usb.o driver to deal with
normal H:2 and the Digianswer devices. Please test it and send me a
report with "hciconfig -a" and "cat /proc/bus/usb/devices".

Regards

Marcel


[-- Attachment #2: patch-hci-usb-digianswer --]
[-- Type: text/x-patch, Size: 1797 bytes --]

diff -urN linux-2.4.22/drivers/bluetooth/hci_usb.c linux-2.4.22-digianswer/drivers/bluetooth/hci_usb.c
--- linux-2.4.22/drivers/bluetooth/hci_usb.c	Mon Aug 25 13:44:41 2003
+++ linux-2.4.22-digianswer/drivers/bluetooth/hci_usb.c	Sat Aug 30 01:59:59 2003
@@ -79,6 +79,9 @@
 	/* Bluetooth Ultraport Module from IBM */
 	{ USB_DEVICE(0x04bf, 0x030a) },
 
+	/* Digianswer device */
+	{ USB_DEVICE(0x08fd, 0x0001), driver_info: HCI_DIGIANSWER },
+
 	{ }	/* Terminating entry */
 };
 
@@ -427,7 +430,7 @@
 	} else
 		dr = (void *) _urb->urb.setup_packet;
 
-	dr->bRequestType = HCI_CTRL_REQ;
+	dr->bRequestType = husb->ctrl_req;
 	dr->bRequest = 0;
 	dr->wIndex   = 0;
 	dr->wValue   = 0;
@@ -872,6 +875,11 @@
 	husb->bulk_out_ep = bulk_out_ep[0];
 	husb->bulk_in_ep  = bulk_in_ep[0];
 	husb->intr_in_ep  = intr_in_ep[0];
+
+	if (id->driver_info & HCI_DIGIANSWER)
+		husb->ctrl_req = HCI_DIGI_REQ;
+	else
+		husb->ctrl_req = HCI_CTRL_REQ;
 
 #ifdef CONFIG_BLUEZ_USB_SCO
 	if (isoc_iface) {
diff -urN linux-2.4.22/drivers/bluetooth/hci_usb.h linux-2.4.22-digianswer/drivers/bluetooth/hci_usb.h
--- linux-2.4.22/drivers/bluetooth/hci_usb.h	Fri Jun 13 16:51:32 2003
+++ linux-2.4.22-digianswer/drivers/bluetooth/hci_usb.h	Sat Aug 30 02:02:46 2003
@@ -35,6 +35,9 @@
 #define HCI_DEV_PROTOCOL     0x01	/* Bluetooth programming protocol */
 
 #define HCI_CTRL_REQ	     0x20
+#define HCI_DIGI_REQ	     0x40
+
+#define HCI_DIGIANSWER       0x01
 
 #define HCI_MAX_IFACE_NUM	3 
 
@@ -118,6 +121,8 @@
 	struct usb_interface            *isoc_iface;
 	struct usb_endpoint_descriptor	*isoc_out_ep;
 	struct usb_endpoint_descriptor	*isoc_in_ep;
+
+	__u8			ctrl_req;
 
 	struct sk_buff_head	transmit_q[4];
 	struct sk_buff		*reassembly[4]; // Reassembly buffers

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Bluez-devel] Digianswer USB driver
  2003-08-30  0:11     ` Marcel Holtmann
@ 2003-09-16 14:02       ` Jan J. Jessen
  2003-09-16 23:57         ` Marcel Holtmann
  2003-09-16 14:16       ` Jan J. Jessen
  1 sibling, 1 reply; 12+ messages in thread
From: Jan J. Jessen @ 2003-09-16 14:02 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: BlueZ Mailing List

Hi Marcel,
I've now tried the patch and compiled a new kernel with hci_usb as a
module.
When I load it into the kernel I get the following:

# insmod /lib/modules/2.4.22/kernel/drivers/bluetooth/hci_usb.o
/lib/modules/2.4.22/kernel/drivers/bluetooth/hci_usb.o: unresolved symbol
hci_register_dev_Rsmp_17de4405
/lib/modules/2.4.22/kernel/drivers/bluetooth/hci_usb.o: unresolved symbol
hci_unregister_dev_Rsmp_380d73d1
/lib/modules/2.4.22/kernel/drivers/bluetooth/hci_usb.o: unresolved symbol
hci_recv_frame_Rsmp_75250b00

I've used a "fresh" 2.4.22 kernel

regards
Jan Jakob


On 30 Aug 2003, Marcel Holtmann wrote:

> Hi Jan,
>
> attached is a patch which modifies the hci_usb.o driver to deal with
> normal H:2 and the Digianswer devices. Please test it and send me a
> report with "hciconfig -a" and "cat /proc/bus/usb/devices".
>
> Regards
>
> Marcel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Bluez-devel] Digianswer USB driver
  2003-08-30  0:11     ` Marcel Holtmann
  2003-09-16 14:02       ` Jan J. Jessen
@ 2003-09-16 14:16       ` Jan J. Jessen
  1 sibling, 0 replies; 12+ messages in thread
From: Jan J. Jessen @ 2003-09-16 14:16 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: BlueZ Mailing List

Hi Marcal,
Forget about /proc/bus/usb/devices
A cat gives:
T:  Bus=03 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 0.00
S:  Product=USB UHCI Root Hub
S:  SerialNumber=1860
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=255ms
T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 0.00
S:  Product=USB UHCI Root Hub
S:  SerialNumber=1840
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=255ms
T:  Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=12  MxCh= 0
D:  Ver= 1.10 Cls=e0(unk. ) Sub=01 Prot=01 MxPS= 8 #Cfgs=  1
P:  Vendor=08fd ProdID=0001 Rev= 0.01
S:  Manufacturer=DIGIANSWER
S:  Product=Digianswer USB Bluetooth
C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
I:  If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
I:  If#= 1 Alt= 1 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
I:  If#= 1 Alt= 2 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
I:  If#= 1 Alt= 3 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
I:  If#= 1 Alt= 4 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
I:  If#= 1 Alt= 5 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 0.00
S:  Product=USB UHCI Root Hub
S:  SerialNumber=1820
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=255ms
regards
Jan Jakob


On 30 Aug 2003, Marcel Holtmann wrote:

> Hi Jan,
>
> attached is a patch which modifies the hci_usb.o driver to deal with
> normal H:2 and the Digianswer devices. Please test it and send me a
> report with "hciconfig -a" and "cat /proc/bus/usb/devices".
>
> Regards
>
> Marcel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Bluez-devel] Digianswer USB driver
  2003-09-16 14:02       ` Jan J. Jessen
@ 2003-09-16 23:57         ` Marcel Holtmann
  2003-09-17  9:59           ` Jan J. Jessen
  0 siblings, 1 reply; 12+ messages in thread
From: Marcel Holtmann @ 2003-09-16 23:57 UTC (permalink / raw)
  To: Jan J. Jessen; +Cc: BlueZ Mailing List

Hi Jan,

> I've now tried the patch and compiled a new kernel with hci_usb as a
> module.
> When I load it into the kernel I get the following:
> 
> # insmod /lib/modules/2.4.22/kernel/drivers/bluetooth/hci_usb.o
> /lib/modules/2.4.22/kernel/drivers/bluetooth/hci_usb.o: unresolved symbol
> hci_register_dev_Rsmp_17de4405
> /lib/modules/2.4.22/kernel/drivers/bluetooth/hci_usb.o: unresolved symbol
> hci_unregister_dev_Rsmp_380d73d1
> /lib/modules/2.4.22/kernel/drivers/bluetooth/hci_usb.o: unresolved symbol
> hci_recv_frame_Rsmp_75250b00
> 
> I've used a "fresh" 2.4.22 kernel

try it again, because this is a problem with MODVERSION. Maybe the
running kernel or bluez.o module is compiled without and the hci_usb.o
driver with it.

Regards

Marcel




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Bluez-devel] Digianswer USB driver
  2003-09-16 23:57         ` Marcel Holtmann
@ 2003-09-17  9:59           ` Jan J. Jessen
  2003-09-22 17:59             ` Marcel Holtmann
  0 siblings, 1 reply; 12+ messages in thread
From: Jan J. Jessen @ 2003-09-17  9:59 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: BlueZ Mailing List

Hi Marcel,
I've compiled a kernel with MODVERSION and now hci_usb loads without
trouble. I've tried to do hciconfig hci0 up but this gives:
Can't init device hci0. Connection timed out(110)

# lsmod
Module                  Size  Used by    Not tainted
hci_usb                 9212   0
bluez                  36452   1  [hci_usb]
usb-uhci               24460   0  (unused)
usbcore                66272   1  [hci_usb usb-uhci]

# cat /proc/bus/usb/devices
T:  Bus=03 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 0.00
S:  Product=USB UHCI Root Hub
S:  SerialNumber=1860
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=255ms
T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 0.00
S:  Product=USB UHCI Root Hub
S:  SerialNumber=1840
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=255ms
T:  Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=12  MxCh= 0
D:  Ver= 1.10 Cls=e0(unk. ) Sub=01 Prot=01 MxPS= 8 #Cfgs=  1
P:  Vendor=08fd ProdID=0001 Rev= 0.01
S:  Manufacturer=DIGIANSWER
S:  Product=Digianswer USB Bluetooth
C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=hci_usb
E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
I:  If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=hci_usb
E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
I:  If#= 1 Alt= 1 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=hci_usb
E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
I:  If#= 1 Alt= 2 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=hci_usb
E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
I:  If#= 1 Alt= 3 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=hci_usb
E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
I:  If#= 1 Alt= 4 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=hci_usb
E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
I:  If#= 1 Alt= 5 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=hci_usb
E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 0.00
S:  Product=USB UHCI Root Hub
S:  SerialNumber=1820
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=255ms

Am I missing something?

regards
Jan Jakob

On 17 Sep 2003, Marcel Holtmann wrote:

> Hi Jan,
>
> try it again, because this is a problem with MODVERSION. Maybe the
> running kernel or bluez.o module is compiled without and the hci_usb.o
> driver with it.
>
> Regards
>
> Marcel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Bluez-devel] Digianswer USB driver
  2003-09-17  9:59           ` Jan J. Jessen
@ 2003-09-22 17:59             ` Marcel Holtmann
  2003-09-23  8:21               ` Jan J. Jessen
  0 siblings, 1 reply; 12+ messages in thread
From: Marcel Holtmann @ 2003-09-22 17:59 UTC (permalink / raw)
  To: Jan J. Jessen; +Cc: BlueZ Mailing List

[-- Attachment #1: Type: text/plain, Size: 237 bytes --]

Hi Jan,

> I've compiled a kernel with MODVERSION and now hci_usb loads without
> trouble. I've tried to do hciconfig hci0 up but this gives:
> Can't init device hci0. Connection timed out(110)

what about this patch?

Regards

Marcel



[-- Attachment #2: patch-hci-usb-digianswer2 --]
[-- Type: text/x-patch, Size: 1888 bytes --]

diff -urN linux-2.4.22/drivers/bluetooth/hci_usb.c linux-2.4.22-digianswer/drivers/bluetooth/hci_usb.c
--- linux-2.4.22/drivers/bluetooth/hci_usb.c	Mon Aug 25 13:44:41 2003
+++ linux-2.4.22-digianswer/drivers/bluetooth/hci_usb.c	Mon Sep 22 19:57:15 2003
@@ -70,6 +70,9 @@
 static struct usb_driver hci_usb_driver; 
 
 static struct usb_device_id bluetooth_ids[] = {
+	/* Digianswer device */
+	{ USB_DEVICE(0x08fd, 0x0001), driver_info: HCI_DIGIANSWER },
+
 	/* Generic Bluetooth USB device */
 	{ USB_DEVICE_INFO(HCI_DEV_CLASS, HCI_DEV_SUBCLASS, HCI_DEV_PROTOCOL) },
 
@@ -427,7 +430,7 @@
 	} else
 		dr = (void *) _urb->urb.setup_packet;
 
-	dr->bRequestType = HCI_CTRL_REQ;
+	dr->bRequestType = husb->ctrl_req;
 	dr->bRequest = 0;
 	dr->wIndex   = 0;
 	dr->wValue   = 0;
@@ -872,6 +875,11 @@
 	husb->bulk_out_ep = bulk_out_ep[0];
 	husb->bulk_in_ep  = bulk_in_ep[0];
 	husb->intr_in_ep  = intr_in_ep[0];
+
+	if (id->driver_info & HCI_DIGIANSWER)
+		husb->ctrl_req = HCI_DIGI_REQ;
+	else
+		husb->ctrl_req = HCI_CTRL_REQ;
 
 #ifdef CONFIG_BLUEZ_USB_SCO
 	if (isoc_iface) {
diff -urN linux-2.4.22/drivers/bluetooth/hci_usb.h linux-2.4.22-digianswer/drivers/bluetooth/hci_usb.h
--- linux-2.4.22/drivers/bluetooth/hci_usb.h	Fri Jun 13 16:51:32 2003
+++ linux-2.4.22-digianswer/drivers/bluetooth/hci_usb.h	Mon Sep 22 19:56:44 2003
@@ -35,6 +35,9 @@
 #define HCI_DEV_PROTOCOL     0x01	/* Bluetooth programming protocol */
 
 #define HCI_CTRL_REQ	     0x20
+#define HCI_DIGI_REQ	     0x40
+
+#define HCI_DIGIANSWER       0x01
 
 #define HCI_MAX_IFACE_NUM	3 
 
@@ -118,6 +121,8 @@
 	struct usb_interface            *isoc_iface;
 	struct usb_endpoint_descriptor	*isoc_out_ep;
 	struct usb_endpoint_descriptor	*isoc_in_ep;
+
+	__u8			ctrl_req;
 
 	struct sk_buff_head	transmit_q[4];
 	struct sk_buff		*reassembly[4]; // Reassembly buffers

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Bluez-devel] Digianswer USB driver
  2003-09-22 17:59             ` Marcel Holtmann
@ 2003-09-23  8:21               ` Jan J. Jessen
  2003-09-23  8:56                 ` Marcel Holtmann
  0 siblings, 1 reply; 12+ messages in thread
From: Jan J. Jessen @ 2003-09-23  8:21 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: BlueZ Mailing List

Hi Marcel,

On 22 Sep 2003, Marcel Holtmann wrote:

> Hi Jan,
>
> > I've compiled a kernel with MODVERSION and now hci_usb loads without
> > trouble. I've tried to do hciconfig hci0 up but this gives:
> > Can't init device hci0. Connection timed out(110)
>
> what about this patch?

Works perfect:-) At first hciconfig hci0 up gave an error saying that it
couldn't set scan mode. Working with these cards for more than a year, I
know that they sometimes don't reply with the event they are supposed to,
so I just tried again, and everything is OK Bluetooth:-)
#cat /proc/bus/usb/devices

T:  Bus=03 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 0.00
S:  Product=USB UHCI Root Hub
S:  SerialNumber=1860
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=255ms
T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
B:  Alloc= 27/900 us ( 3%), #Int=  1, #Iso=  1
D:  Ver= 1.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 0.00
S:  Product=USB UHCI Root Hub
S:  SerialNumber=1840
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=255ms
T:  Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=12  MxCh= 0
D:  Ver= 1.10 Cls=e0(unk. ) Sub=01 Prot=01 MxPS= 8 #Cfgs=  1
P:  Vendor=08fd ProdID=0001 Rev= 0.01
S:  Manufacturer=DIGIANSWER
S:  Product=Digianswer USB Bluetooth
C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=hci_usb
E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
I:  If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=hci_usb
E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
I:  If#= 1 Alt= 1 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=hci_usb
E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
I:  If#= 1 Alt= 2 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=hci_usb
E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
I:  If#= 1 Alt= 3 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=hci_usb
E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
I:  If#= 1 Alt= 4 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=hci_usb
E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
I:  If#= 1 Alt= 5 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=hci_usb
E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 0.00
S:  Product=USB UHCI Root Hub
S:  SerialNumber=1820
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=255ms

# hciconfig -a
hci0:   Type: USB
        BD Address: 00:50:CD:00:42:2B ACL MTU: 384:6  SCO MTU: 32:7
        UP RUNNING
        RX bytes:58747 acl:0 sco:0 events:6 errors:0
        TX bytes:27 acl:0 sco:0 commands:7 errors:0
        Features: 0xff 0xfa 0x21 0x00
        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
        Link policy:
        Link mode: SLAVE ACCEPT
        Name: ''
        Class: 0x000000
        Service Classes: Unspecified
        Device Class: Miscellaneous,
        HCI Ver: 1.1 (0x1) HCI Rev: 0x0 LMP Ver: 1.1 (0x1) LMP Subver: 0x37
        Manufacturer: Motorola (8)

I hope this is all the information that you need. It shure will easy my
explanations to students here at the university that wants to use these
devices, that they can just use bluez from now on.

Since Digianswer is a subsidiary of Motorola one could imagine that if
Motorola once made a Bluetooth USB dongle, Bluez would work perfectly
with it - just a thouhgt.

regards
Jan Jakob


Best regards, Jan Jakob
------------------------------------
Jan Jakob Jessen
Ph.D. Student, M.Sc.E.E.
Center for Embedded Software Systems
Aalborg University
Fredrik Bajers Vej 7C, B2-212
DK-9220 Aalborg East

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Bluez-devel] Digianswer USB driver
  2003-09-23  8:21               ` Jan J. Jessen
@ 2003-09-23  8:56                 ` Marcel Holtmann
  2003-09-29 10:58                   ` Jan J. Jessen
  0 siblings, 1 reply; 12+ messages in thread
From: Marcel Holtmann @ 2003-09-23  8:56 UTC (permalink / raw)
  To: Jan J. Jessen; +Cc: BlueZ Mailing List

Hi Jan,

> Works perfect:-) At first hciconfig hci0 up gave an error saying that it
> couldn't set scan mode. Working with these cards for more than a year, I
> know that they sometimes don't reply with the event they are supposed to,
> so I just tried again, and everything is OK Bluetooth:-)

these are good news. Your initial problem setting scan mode can only be
solved with a USB sniffer, I think.

Do you have any H:2 USB Bluetooth devices? If yes, please attach them
along with a Digianswer one to the same host and use them both. I want
to make sure that a Digianswer device works in conjunction with a H:2
device.

> # hciconfig -a
> hci0:   Type: USB
>         BD Address: 00:50:CD:00:42:2B ACL MTU: 384:6  SCO MTU: 32:7
>         UP RUNNING
>         RX bytes:58747 acl:0 sco:0 events:6 errors:0
>         TX bytes:27 acl:0 sco:0 commands:7 errors:0
>         Features: 0xff 0xfa 0x21 0x00
>         Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
>         Link policy:
>         Link mode: SLAVE ACCEPT
>         Name: ''
>         Class: 0x000000
>         Service Classes: Unspecified
>         Device Class: Miscellaneous,
>         HCI Ver: 1.1 (0x1) HCI Rev: 0x0 LMP Ver: 1.1 (0x1) LMP Subver: 0x37
>         Manufacturer: Motorola (8)

Have you ever updated the firmware of the Digianswer device? I though
that Digianswer already had a USB device at the time they are not a
subsidiary of Motorola. So the manufacturer should be 12.

> I hope this is all the information that you need. It shure will easy my
> explanations to students here at the university that wants to use these
> devices, that they can just use bluez from now on.

Please do my test above and send me "hciconfig -a" of a machine with two
different dongles. If this works I apply this patch to mainline and your
students can start working with BlueZ very easy ;)

> Since Digianswer is a subsidiary of Motorola one could imagine that if
> Motorola once made a Bluetooth USB dongle, Bluez would work perfectly
> with it - just a thouhgt.

Do you have any contact to Motorola, so I can get one of these devices?

Regards

Marcel




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Bluez-devel] Digianswer USB driver
  2003-09-23  8:56                 ` Marcel Holtmann
@ 2003-09-29 10:58                   ` Jan J. Jessen
  0 siblings, 0 replies; 12+ messages in thread
From: Jan J. Jessen @ 2003-09-29 10:58 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: BlueZ Mailing List

Hi Marcel,

On 23 Sep 2003, Marcel Holtmann wrote:

> Hi Jan,
>
> these are good news. Your initial problem setting scan mode can only be
> solved with a USB sniffer, I think.

Well I've tried it a few times now, and it is a rare event.

>
> Do you have any H:2 USB Bluetooth devices? If yes, please attach them
> along with a Digianswer one to the same host and use them both. I want
> to make sure that a Digianswer device works in conjunction with a H:2
> device.

I've just tried it with a 3com device, and it works:-)

>
> Have you ever updated the firmware of the Digianswer device? I though
> that Digianswer already had a USB device at the time they are not a
> subsidiary of Motorola. So the manufacturer should be 12.

I have no idea. I've never updated the firmware on their devices.
Digianswer has - at least in the past - been very restrictive about
getting access to the firmware and related issues. A few years ago, former
students at Aalborg University wrote a linux driver for their first pcmcia
cards, but a lot of NDA stuff has prevented the publishing of this driver.
But that's a whole different story.

> Please do my test above and send me "hciconfig -a" of a machine with two
> different dongles. If this works I apply this patch to mainline and your
> students can start working with BlueZ very easy ;)

# lsmod
Module                  Size  Used by    Not tainted
hci_usb                 9212   0  (unused)
bluez                  36452   0  [hci_usb]
usb-uhci               24460   0  (unused)
usbcore                66272   0  [hci_usb usb-uhci]

# hciconfig hci0 up
# hciconfig hci1 up
# hciconfig -a
hci0:   Type: USB
        BD Address: 00:0B:AC:E8:21:B1 ACL MTU: 192:8  SCO MTU: 64:8
        UP RUNNING PSCAN ISCAN
        RX bytes:69 acl:0 sco:0 events:8 errors:0
        TX bytes:27 acl:0 sco:0 commands:7 errors:0
        Features: 0xff 0xff 0x0f 0x00
        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
        Link policy:
        Link mode: SLAVE ACCEPT
        Name: 'VIP'
        Class: 0x000000
        Service Classes: Unspecified
        Device Class: Miscellaneous,
        HCI Ver: 1.1 (0x1) HCI Rev: 0x20e LMP Ver: 1.1 (0x1) LMP Subver: 0x20e
        Manufacturer: Cambridge Silicon Radio (10)

hci1:   Type: USB
        BD Address: 00:50:CD:00:42:2B ACL MTU: 384:6  SCO MTU: 32:7
        UP RUNNING PSCAN ISCAN
        RX bytes:42673 acl:0 sco:0 events:7 errors:0
        TX bytes:27 acl:0 sco:0 commands:7 errors:0
        Features: 0xff 0xfa 0x21 0x00
        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
        Link policy:
        Link mode: SLAVE ACCEPT
        Name: ''
        Class: 0x000000
        Service Classes: Unspecified
        Device Class: Miscellaneous,
        HCI Ver: 1.1 (0x1) HCI Rev: 0x0 LMP Ver: 1.1 (0x1) LMP Subver: 0x37
        Manufacturer: Motorola (8)


It seems to work perfectly now. Apply Your patch, and everyone is happy...
regards,
Jan Jakob


Best regards, Jan Jakob
------------------------------------
Jan Jakob Jessen
Ph.D. Student, M.Sc.E.E.
Center for Embedded Software Systems
Aalborg University
Fredrik Bajers Vej 7C, B2-212
DK-9220 Aalborg East

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2003-09-29 10:58 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-15  6:25 [Bluez-devel] Digianswer USB driver Jan J. Jessen
2003-08-15 12:39 ` Marcel Holtmann
2003-08-26 11:24   ` Jan J. Jessen
2003-08-30  0:11     ` Marcel Holtmann
2003-09-16 14:02       ` Jan J. Jessen
2003-09-16 23:57         ` Marcel Holtmann
2003-09-17  9:59           ` Jan J. Jessen
2003-09-22 17:59             ` Marcel Holtmann
2003-09-23  8:21               ` Jan J. Jessen
2003-09-23  8:56                 ` Marcel Holtmann
2003-09-29 10:58                   ` Jan J. Jessen
2003-09-16 14:16       ` Jan J. Jessen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.