2004-05-13 20:20:52

by Simon Huggins

[permalink] [raw]
Subject: [Bluez-users] D-Link DBT 120 B4 + 2.6.6 / 2.6.6-mh1

Hi,

I've just got a D-link DBT 120 which on the box has a revision of B4
(not quite sure where to find this when the module is loaded).

I compiled up 2.6.6 and got the module loaded and everything and it all
looked fine but it won't see my phone in hcidump.

So I looked on the site and noticed it said:
This patch brings the long awaited kernel HID support for the
Human Interface Device Protocol and fixes some serious bugs in
the USB based Bluetooth drivers.

So I tried it with the -mh1 patch to 2.6.6 and didn't get any further.

I have a Nokia 6310i and I was expecting to see it in hcitool scan but I
just get:
huggie@thin:~$ hcitool scan
Scanning ...
in spite of the phone having Bluetooth turned on and having a name.

I tried running hcidump too and it shows me stuff like:
> HCI Event: Inquiry Complete(0x01) plen 1
> HCI Event: Command Status(0x0f) plen 4
when I run the above scan.

Oh I tried "hcitool inq" as well but didn't get that working either.

hciconfig -a shows:
hci0: Type: USB
BD Address: 00:0F:3D:0D:73:5C ACL MTU: 192:8 SCO MTU: 64:8
UP RUNNING PSCAN ISCAN AUTH
RX bytes:465 acl:0 sco:0 events:32 errors:0
TX bytes:622 acl:0 sco:0 commands:27 errors:0
Features: 0xff 0xff 0x0f 0x00 0x00 0x00 0x00 0x00
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: HOLD SNIFF PARK
Link mode: SLAVE ACCEPT
Name: 'thin-0'
Class: 0x000100
Service Classes: Unspecified
Device Class: Computer, Uncategorized
HCI Ver: 1.1 (0x1) HCI Rev: 0x20d LMP Ver: 1.1 (0x1) LMP Subver: 0x20d
Manufacturer: Cambridge Silicon Radio (10)


There are two lights on the dongle and one of them PWR and LNK and the
LNK one flashes regularly but both are green and on when I plug in (the
driver gets loaded automatically).

I'm running Debian unstable at first with the unstable packages and now
with the ones from:
deb http://bluez.sourceforge.net/download/debian/ ./

Anything you can tell me which is relevant would be useful. Don't
assume I've done something obvious because although I've tried looking
at the docs I don't seem to have got very far.

Since this is CSR I take it I don't need to load firmware?

Messages when it's detected (in 2.6.6-mh1) are:
Bluetooth: Core ver 2.4
NET: Registered protocol family 31
Bluetooth: HCI device and connection manager initialized
Bluetooth: HCI socket layer initialized
Bluetooth: L2CAP ver 2.1
Bluetooth: L2CAP socket layer initialized
Bluetooth: RFCOMM ver 1.2
Bluetooth: RFCOMM socket layer initialized
Bluetooth: RFCOMM TTY layer initialized
ohci_hcd 0000:00:0c.0: GetStatus roothub.portstatus [1] = 0x00010101 CSC
PPS CCS
hub 1-0:1.0: port 1, status 101, change 1, 12 Mb/s
hub 1-0:1.0: debounce: port 1: delay 100ms stable 4 status 0x101
ohci_hcd 0000:00:0c.0: GetStatus roothub.portstatus [1] = 0x00100103
PRSC PPS PE
S CCS
usb 1-1: new full speed USB device using address 2
usb 1-1: skipped 1 class/vendor specific interface descriptors
usb 1-1: new device strings: Mfr=0, Product=0, SerialNumber=0
usb 1-1: hotplug
usb 1-1: adding 1-1:1.0 (config #1, interface 0)
usb 1-1:1.0: hotplug
usb 1-1: adding 1-1:1.1 (config #1, interface 1)
usb 1-1:1.1: hotplug
usb 1-1: adding 1-1:1.2 (config #1, interface 2)
usb 1-1:1.2: hotplug
Bluetooth: HCI USB driver ver 2.5
hci_usb 1-1:1.0: usb_probe_interface
hci_usb 1-1:1.0: usb_probe_interface - got id
hci_usb 1-1:1.2: usb_probe_interface
hci_usb 1-1:1.2: usb_probe_interface - got id
usbcore: registered new driver hci_usb


Simon.

--
UK based domain, email and web hosting ***/ If a tree fell on a /*
http://www.blackcatnetworks.co.uk/ **/ florist, would he make a /**
[email protected] */ sound? /***
Black Cat Networks / /****


-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users


2004-05-14 23:40:45

by Simon Huggins

[permalink] [raw]
Subject: More progress with 2.6.6-mh1

On Fri, May 14, 2004 at 09:59:51AM +0100, Simon Huggins wrote:
> In 2.4.26-mh1 I can see the phone I get:
[..]
> And the scan does see the device with the name I gave it.

And if I apply bk-usb.patch from -mm2:
http://www.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.6/2.6.6-mm2/broken-out/

then it will find the phone and work from gnokii and minicom over rfcomm.

So that's vanilla 2.6.6 + -mh1 + the -mm2 usb patch.

I'm not sure which bit broke it but there is a patch there which has
been posted to one of the bluez lists which is this snippet (whitespace may be
borked):

diff -Nru a/drivers/bluetooth/hci_usb.c b/drivers/bluetooth/hci_usb.c
--- a/drivers/bluetooth/hci_usb.c Wed May 12 20:33:40 2004
+++ b/drivers/bluetooth/hci_usb.c Wed May 12 20:33:40 2004
@@ -342,7 +342,7 @@

static inline void hci_usb_wait_for_urb(struct urb *urb)
{
- while (atomic_read(&urb->count) > 1) {
+ while (atomic_read(&urb->kref.refcount) > 1) {
current->state = TASK_UNINTERRUPTIBLE;
schedule_timeout((5 * HZ + 999) / 1000);
}

I haven't tested 2.6.6-mh1 + that snippet though I can if you like.

Does 2.6.6-mh1 work for other people?

The comment that goes with it is a bit disturbing:

# 2004/04/29 10:47:50-07:00 [email protected]
# USB: fix build error in hci_usb driver due to urb reference count
# change.
#
# This really needs to get fixed the proper way, by making the urb
# allocation dynamic in the driver, instead of the hack it is
# currently doing...

Is that broken then?

Simon.

--
-+// - Oh no. It's closed. \\+-
-+<< - We're not pre-school toys Slinky; we can read. >>+-
-+\\ //+-
Colocate your server with http://www.blackcatnetworks.co.uk

2004-05-14 08:59:51

by Simon Huggins

[permalink] [raw]
Subject: Re: [Bluez-users] D-Link DBT 120 B4 - works in 2.4.26-mh1 not 2.6.6

On Thu, May 13, 2004 at 11:26:06PM +0100, Simon Huggins wrote:
> On Fri, May 14, 2004 at 12:18:35AM +0200, Marcel Holtmann wrote:
> > I miss the inquiry command. Do you ran hcidump as root? You must see
> > something like this:
> > < HCI Command: Inquiry(0x01|0x0001) plen 5
> > 33 8B 9E 08 64
> > > HCI Event: Command Status(0x0f) plen 4
> > 00 01 01 04
> Ah right no I didn't since it didn't moan when I ran it as a user.

> If I do I get:
> HCIDump - HCI packet analyzer ver 1.5
> device: hci0 snap_len: 1028 filter: 0xffffffff
> < HCI Command: Inquiry(0x01|0x0001) plen 5
> 33 8B 9E 08 64
> > HCI Event: Command Status(0x0f) plen 4
> 00 01 01 04
> > HCI Event: Inquiry Complete(0x01) plen 1
> 00

> for a scan and the same for an inq.

In 2.4.26-mh1 I can see the phone I get:
huggie@thin:~$ sudo hcidump -x
HCIDump - HCI packet analyzer ver 1.5
device: hci0 snap_len: 1028 filter: 0xffffffff
< HCI Command: Inquiry(0x01|0x0001) plen 5
33 8B 9E 08 64
> HCI Event: Command Status(0x0f) plen 4
00 01 01 04
> HCI Event: Inquiry Result(0x02) plen 15
01 29 F4 36 6D 0E 00 01 00 00 04 02 52 46 6B
> HCI Event: Inquiry Complete(0x01) plen 1
00
< HCI Command: Remote Name Request(0x01|0x0019) plen 10
29 F4 36 6D 0E 00 02 00 00 00
> HCI Event: Command Status(0x0f) plen 4
00 01 19 04
> HCI Event: Remote Name Req Complete(0x07) plen 255
00 29 F4 36 6D 0E 00 53 68 69 6E 79 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

And the scan does see the device with the name I gave it.


Simon.

--
"Be wewy wewy careful. There be dragons here." -- Linus Torvalds

2004-05-13 22:26:06

by Simon Huggins

[permalink] [raw]
Subject: Re: [Bluez-users] D-Link DBT 120 B4 + 2.6.6 / 2.6.6-mh1

Salut Marcel!

On Fri, May 14, 2004 at 12:18:35AM +0200, Marcel Holtmann wrote:
> Hi Simon,
> > Ok it shows:
> > huggie@thin:~$ hcidump -x
> > HCIDump - HCI packet analyzer ver 1.5
> > device: hci0 snap_len: 1028 filter: 0xffffffff
> > > HCI Event: Command Status(0x0f) plen 4
> > 00 01 01 04
> > > HCI Event: Inquiry Complete(0x01) plen 1
> > 00
> I miss the inquiry command. Do you ran hcidump as root? You must see
> something like this:
> < HCI Command: Inquiry(0x01|0x0001) plen 5
> 33 8B 9E 08 64
> > HCI Event: Command Status(0x0f) plen 4
> 00 01 01 04

Ah right no I didn't since it didn't moan when I ran it as a user.

If I do I get:
HCIDump - HCI packet analyzer ver 1.5
device: hci0 snap_len: 1028 filter: 0xffffffff
< HCI Command: Inquiry(0x01|0x0001) plen 5
33 8B 9E 08 64
> HCI Event: Command Status(0x0f) plen 4
00 01 01 04
> HCI Event: Inquiry Complete(0x01) plen 1
00

for a scan and the same for an inq.

Does that mean it should all be working then?

--
----------( I only play with my computer on days that end )----------
----------( in "y". )----------
Simon ----( )---- Nomis
Htag.pl 0.0.22

2004-05-13 22:18:35

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] D-Link DBT 120 B4 + 2.6.6 / 2.6.6-mh1

Hi Simon,

> Ok it shows:
> huggie@thin:~$ hcidump -x
> HCIDump - HCI packet analyzer ver 1.5
> device: hci0 snap_len: 1028 filter: 0xffffffff
> > HCI Event: Command Status(0x0f) plen 4
> 00 01 01 04
> > HCI Event: Inquiry Complete(0x01) plen 1
> 00

I miss the inquiry command. Do you ran hcidump as root? You must see
something like this:

< HCI Command: Inquiry(0x01|0x0001) plen 5
33 8B 9E 08 64
> HCI Event: Command Status(0x0f) plen 4
00 01 01 04

Regards

Marcel




-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2004-05-13 22:00:10

by Simon Huggins

[permalink] [raw]
Subject: Re: [Bluez-users] D-Link DBT 120 B4 + 2.6.6 / 2.6.6-mh1

Hi Marcel,

On Thu, May 13, 2004 at 11:50:54PM +0200, Marcel Holtmann wrote:
> > I tried running hcidump too and it shows me stuff like:
> > > HCI Event: Inquiry Complete(0x01) plen 1
> > > HCI Event: Command Status(0x0f) plen 4
> > when I run the above scan.
> run it with -x switch to better see the event content.

Ok it shows:
huggie@thin:~$ hcidump -x
HCIDump - HCI packet analyzer ver 1.5
device: hci0 snap_len: 1028 filter: 0xffffffff
> HCI Event: Command Status(0x0f) plen 4
00 01 01 04
> HCI Event: Inquiry Complete(0x01) plen 1
00

> > UP RUNNING PSCAN ISCAN AUTH
> You should disable auth in hcid.conf, because this will set the dongle
> into security mode 3 and this is not what you want.

I took out the auth line in hcid.conf and it got rid of the AUTH line
but it still doesn't find anything.

I asked someone else who said they hadn't got it working in 2.6.5 but
that it works in 2.4.x.

I'm not sure what to try next to debug this or get it working.

Simon.

--
Just another wannabie | Le doute est le commencement | Just another fool
----------------------+ de la sagesse. +-------------------
This message was brought to you by the letter R and the number 14.
htag.pl 0.0.22 -- http://www.earth.li/projectpurple/progs/htag.html

2004-05-13 21:50:54

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] D-Link DBT 120 B4 + 2.6.6 / 2.6.6-mh1

Hi Simon,

> I've just got a D-link DBT 120 which on the box has a revision of B4
> (not quite sure where to find this when the module is loaded).
>
> I compiled up 2.6.6 and got the module loaded and everything and it all
> looked fine but it won't see my phone in hcidump.
>
> So I looked on the site and noticed it said:
> This patch brings the long awaited kernel HID support for the
> Human Interface Device Protocol and fixes some serious bugs in
> the USB based Bluetooth drivers.
>
> So I tried it with the -mh1 patch to 2.6.6 and didn't get any further.
>
> I have a Nokia 6310i and I was expecting to see it in hcitool scan but I
> just get:
> huggie@thin:~$ hcitool scan
> Scanning ...
> in spite of the phone having Bluetooth turned on and having a name.
>
> I tried running hcidump too and it shows me stuff like:
> > HCI Event: Inquiry Complete(0x01) plen 1
> > HCI Event: Command Status(0x0f) plen 4
> when I run the above scan.

run it with -x switch to better see the event content.

> hciconfig -a shows:
> hci0: Type: USB
> BD Address: 00:0F:3D:0D:73:5C ACL MTU: 192:8 SCO MTU: 64:8
> UP RUNNING PSCAN ISCAN AUTH
> RX bytes:465 acl:0 sco:0 events:32 errors:0
> TX bytes:622 acl:0 sco:0 commands:27 errors:0
> Features: 0xff 0xff 0x0f 0x00 0x00 0x00 0x00 0x00
> Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
> Link policy: HOLD SNIFF PARK
> Link mode: SLAVE ACCEPT
> Name: 'thin-0'
> Class: 0x000100
> Service Classes: Unspecified
> Device Class: Computer, Uncategorized
> HCI Ver: 1.1 (0x1) HCI Rev: 0x20d LMP Ver: 1.1 (0x1) LMP Subver: 0x20d
> Manufacturer: Cambridge Silicon Radio (10)

You should disable auth in hcid.conf, because this will set the dongle
into security mode 3 and this is not what you want.

Regards

Marcel




-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users