All of lore.kernel.org
 help / color / mirror / Atom feed
* HCI over SPI support
@ 2017-08-08 13:09 Ivan Drobyshevskyi
  2017-08-09 10:45 ` Johan Hedberg
  0 siblings, 1 reply; 2+ messages in thread
From: Ivan Drobyshevskyi @ 2017-08-08 13:09 UTC (permalink / raw)
  To: linux-bluetooth

I need to get BlueZ working with KW30Z chip on a custom ARM board.
It's strongly preferred to use SPI for HCI, since UART is needed for
another purpose, but it looks HCI over SPI is not implemented in
kernel. After some digging, it seems like the following options might
work:

1) Implement HCI over SPI in drivers/bluetooth, similarly to hci_uart.
2) use hci_vhci and make a (userspace) bridge app that would forward
traffic between vhci and spi device. I found a python example for some
unsupported chip connected over UART.
3) Implement some kind of adapter between UART and SPI (fake UART
device), and use hci_uart.

What is the best/recommended way? It looks like the first option is
the cleanest one, with some upstreaming potential, but it might
involve much more work than the second one.

On a related note, why is SPI is rarely, if at all, used for HCI?

Thanks!

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

* Re: HCI over SPI support
  2017-08-08 13:09 HCI over SPI support Ivan Drobyshevskyi
@ 2017-08-09 10:45 ` Johan Hedberg
  0 siblings, 0 replies; 2+ messages in thread
From: Johan Hedberg @ 2017-08-09 10:45 UTC (permalink / raw)
  To: Ivan Drobyshevskyi; +Cc: linux-bluetooth

Hi Ivan,

On Tue, Aug 08, 2017, Ivan Drobyshevskyi wrote:
> I need to get BlueZ working with KW30Z chip on a custom ARM board.
> It's strongly preferred to use SPI for HCI, since UART is needed for
> another purpose, but it looks HCI over SPI is not implemented in
> kernel. After some digging, it seems like the following options might
> work:
> 
> 1) Implement HCI over SPI in drivers/bluetooth, similarly to hci_uart.
> 2) use hci_vhci and make a (userspace) bridge app that would forward
> traffic between vhci and spi device. I found a python example for some
> unsupported chip connected over UART.
> 3) Implement some kind of adapter between UART and SPI (fake UART
> device), and use hci_uart.
> 
> What is the best/recommended way? It looks like the first option is
> the cleanest one, with some upstreaming potential, but it might
> involve much more work than the second one.

I'd go for proper kernel-side driver.

> On a related note, why is SPI is rarely, if at all, used for HCI?

Because SPI is not a standard HCI transport (something specified as part
of the Bluetooth Core Specification). So if you make a kernel-side
driver you need to be aware that it may not become the only SPI HCI
driver as the implementation will be vendor-specific rather than
standard.

Johan

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

end of thread, other threads:[~2017-08-09 10:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-08 13:09 HCI over SPI support Ivan Drobyshevskyi
2017-08-09 10:45 ` Johan Hedberg

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.