I2C or SPI Bluetooth on N2

Post Reply
Posts: 59
Joined: Thu Nov 28, 2019 2:25 am
languages_spoken: english
ODROIDs: N2 4gig
Has thanked: 8 times
Been thanked: 1 time

I2C or SPI Bluetooth on N2

Post by JustSumDad »

I am looking at ways to integrate bluetooth into my N2 that do NOT use the USB ports.
Not sure if I2C or SPI is better, hopeing for input on this.
This will be for use with Android and this is why USB BT wont cut it. I need to use HFP/HSP (hands free protocol and headset protocol) and under android these cannot (or so I am told) be used across a USB bus.

I realise this will also need a matching driver in the Android O/S and I am hopeing I can avoid this by selecting the correct BT chip and useing a driver that is already folded into the current Android image for the N2
Also hopeing for input on this.

Any advise?

Thank you.
God I wish I could write apps!

Posts: 5372
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
Has thanked: 0
Been thanked: 452 times

Re: I2C or SPI Bluetooth on N2

Post by crashoverride »

While I can not speak to Android, the standard interface for a Bluetooth controller (HCI) is serial (UART). The complexity of HFP/HSP typically arises from its use of AT modem commands and the need for software emulation of a modem if one is not present. The only technical justification for using a UART interface over USB is that a PCM (sound) line is typically used with a UART to supply SCO (codec) audio decoded by the Bluetooth chip. In the case of a USB interface, the host processor is responsible for audio encoding/decoding using SCO.

User avatar
Site Admin
Posts: 37412
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
Has thanked: 1798 times
Been thanked: 1145 times

Re: I2C or SPI Bluetooth on N2

Post by odroid »

As far as I know, HCI can use UART or USB interface while HSP/HFP needs PCM data over I2S interface with input/output simultaneous stream.
If it is true, you need to enable the I2S input pin on the N2 7-pin header and test the I2S/ALSA driver with a trial audio codec chips.

Once the audio codec input/ouput works, make an add-on board to mount a Bluetooth module something like https://www.microchip.com/wwwproducts/en/BM83
After that, port the audio device driver and enable Bluetooth HSP/HFP stack in Android HAL.
These users thanked the author odroid for the post:
JustSumDad (Sat Apr 03, 2021 3:11 pm)

Post Reply

Return to “Hardware and peripherals”

Who is online

Users browsing this forum: No registered users and 2 guests