qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] bt-hci-csr problem
@ 2008-11-11 22:42 Dmitry Baryshkov
  2008-11-11 23:55 ` [Qemu-devel] " andrzej zaborowski
  0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Baryshkov @ 2008-11-11 22:42 UTC (permalink / raw)
  To: qemu-devel

Hi,

When trying to add support for bt-hci-csr to tosa I stumbled upon a
problem. hciattach always displayed "timed out" error. After short
debugging I narrowed it to the following problem:

The first packet that hciattach was sending is:
0x01, 0x00, 0xfc, 0x17,
0xc2, 0x00, 0x00, 0x09,
0x00, 0x00, 0x00, 0x19,
0x28, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00,

At first glance it's perfectly valid. However csrhci_data_len() function
adds 1 to the length of this packet and thus does not detect the end of
the packet correctly.

Most probably we should be more precise in selecting which commands have
incorrect length, shouldn't we? Or is that a problem with my hciattach?

-- 
With best wishes
Dmitry

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

* [Qemu-devel] Re: bt-hci-csr problem
  2008-11-11 22:42 [Qemu-devel] bt-hci-csr problem Dmitry Baryshkov
@ 2008-11-11 23:55 ` andrzej zaborowski
  0 siblings, 0 replies; 2+ messages in thread
From: andrzej zaborowski @ 2008-11-11 23:55 UTC (permalink / raw)
  To: Dmitry Baryshkov; +Cc: qemu-devel

Hi,

2008/11/11 Dmitry Baryshkov <dbaryshkov@gmail.com>:
> When trying to add support for bt-hci-csr to tosa I stumbled upon a
> problem. hciattach always displayed "timed out" error. After short
> debugging I narrowed it to the following problem:
>
> The first packet that hciattach was sending is:
> 0x01, 0x00, 0xfc, 0x17,
> 0xc2, 0x00, 0x00, 0x09,
> 0x00, 0x00, 0x00, 0x19,
> 0x28, 0x00, 0x00, 0x00,
> 0x00, 0x00, 0x00, 0x00,
> 0x00, 0x00, 0x00, 0x00,
> 0x00, 0x00, 0x00,
>
> At first glance it's perfectly valid. However csrhci_data_len() function
> adds 1 to the length of this packet and thus does not detect the end of
> the packet correctly.
>
> Most probably we should be more precise in selecting which commands have
> incorrect length, shouldn't we? Or is that a problem with my hciattach?

I suppose probably your device has a standard serial HCI?  The
bt-hci-csr is some Broadcom CSR chip which is not standard because it
aligns frame sizes to multiples of 2, so it uses a non-standard driver
in the n800 linux.

As far as I'm concerned the only differences are this frame size
alignment and the presence of vendor specific commands for firmware
upload.  If you remove these two things you should get a standard
serial dongle (if I can suggest a name, I'd call it bt-hci-uart.c).

Cheers

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

end of thread, other threads:[~2008-11-11 23:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-11 22:42 [Qemu-devel] bt-hci-csr problem Dmitry Baryshkov
2008-11-11 23:55 ` [Qemu-devel] " andrzej zaborowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).