Bcsp Blue Core Serial Protocol

bccmd (1)

  1. Rs232 Serial Protocol
  2. Bcsp Bluecore Serial Protocol Manual

NAME

How is BlueCore Serial Protocol (Bluetooth protocol) abbreviated? BCSP stands for BlueCore Serial Protocol (Bluetooth protocol). BCSP is defined as BlueCore Serial Protocol (Bluetooth protocol.

bccmd - Utility for the CSR BCCMD interface

SYNOPSIS

  1. H:2 (HCI USB Transport Layer); H:4 (HCI UART Transport Layer); BCSP (BlueCore Serial Protocol); Raw UART (enables custom protocols from VM applications). Combining support for all of these transports with RFCOMM requires more than 4Mbit of program memory. Hence, some firmware builds only contain support for.
  2. And the interface it can support is BCSP (BlueCore Serial Protocol) which was developed by CSR. To run in Linux host platform, it cannot run with luedroid T stack, because luedroid doesn’t support SP, but H4 (HCI UART Transport Layer). The best candidate Laird would recommend to integrate with.
bccmd
bccmd [-t <transport>] [-d <device>] <command> [<args>]
bccmd [-h --help]
Serial

DESCRIPTION

bccmdissues BlueCore commands toCambridge Silicon Radiodevices. If run without the <command> argument, a short help page will be displayed.

OPTIONS

-t <transport>
Specify the communication transport. Valid options are:
HCI
Local device with Host Controller Interface (default).
USB
Direct USB connection.
BCSP
Blue Core Serial Protocol.
H4
H4 serial protocol.
3WIRE
3WIRE protocol (not implemented).

-d <dev>

Specify a particular device to operate on. If not specified, default is the first available HCI deviceor /dev/ttyS0 for serial transports.

COMMANDS

builddef
Get build definitions
keylen <handle>
Get current crypt key length
clock
Get local Bluetooth clock
rand
Get random number
chiprev
Get chip revision
buildname
Get the full build name
panicarg
Get panic code argument
faultarg
Get fault code argument
coldreset
Perform cold reset
warmreset
Perform warm reset
disabletx
Disable TX on the device
enabletx
Enable TX on the device
singlechan <channel>
Lock radio on specific channel
hoppingon
Revert to channel hopping
rttxdata1 <decimal freq MHz> <level>
TXData1 radio test
radiotest <decimal freq MHz> <level> <id>
Run radio tests, tests 4, 6 and 7 are transmit tests
memtypes
Get memory types
psget [-r] [-s <stores>] <key>
Get value for PS key.-r sends a warm reset afterwards
psset [-r] [-s <stores>] <key> <value>
Set value for PS key.-r sends a warm reset afterwards
psclr [-r] [-s <stores>] <key>
Clear value for PS key.-r sends a warm reset afterwards
pslist [-r] [-s <stores>]
List all PS keys.-r sends a warm reset afterwards
psread [-r] [-s <stores>]
Read all PS keys.-r sends a warm reset afterwards
psload [-r] [-s <stores>] <file>
Load all PS keys from PSR file.-r sends a warm reset afterwards
pscheck [-r] [-s <stores>] <file>
Check syntax of PSR file.-r sends a warm reset afterwards

KEYS

bdaddr country devclass keymin keymax features commands versionremver hciextn mapsco baudrate hostintf anafreq anaftrim usbvidusbpid dfupid bootmode

AUTHORS

Written by Marcel Holtmann <marcel@holtmann.org>,man page by Adam Laurie <adam@algroup.co.uk>
  • 4HCI Transport Layer
  • 5Controller Specific Information
    • 5.1AMPAK
    • 5.2Broadcom
    • 5.3Realtek

Bluetooth provides a large number of application profiles. Examples are playing audio between devices (A2DP), wireless keyboards and mice (HID) and transferring data wirelessly between devices (FTP, OPP).

These application profiles work on a stack of protocols, similar in concept to the networking and USB stacks. For example the Object Push Profile (OPP) uses the OBject EXchange (OBEX) protocol, which uses the Radio Frequency COMMunication (RFCOMM) protocol, which uses the Logical Link Control and Adaptation Protocol (L2CAP), which uses the Host Controller Interface (HCI) protocol, which uses the radio link protocols.

This can rapidly become a complex area, but the user space tools make this all 'just work' for users. It is beyond the scope of this page to configure Bluetooth profiles.

The focus of this wiki page is on the interface between host and controller.

The collection of user space tools is maintained by the Bluez project.Note that the tool chain requires D-Bus. For application development the D-Bus API is documented in the Bluez source.

A contemporary short instruction for CLI usage can be found in the Archlinux Wiki.

Serial

The Host Controller Interface is a lower level protocol in the Bluetooth stack. A host is usually a PC, tablet, SBC, phone, etc. A controller is the chip with the Bluetooth radio. Although some simpler Bluetooth devices, such as a headset, may have the host and controller implemented on a single processor.

Rs232 Serial Protocol

The communication layer between host and controller can be over a number of interfaces, for example UART, USB and SPI.

The purpose of a Bluetooth driver for a sunxi system on chip is to set up the Bluetooth controller ready for user space to provide Bluetooth applications.

This is the physical interface between host and controller. A number of transport layer drivers are provided in the Linux kernel and the Kernel's Kconfig file for the drivers gives a useful description.

UART

The Linux kernel driver is hci_uart

This is a serial interface and there are several protocols used, e.g. H4, H5, BCSP. The H4 protocol is probably the most common and uses serial control lines. The H5 protocol is a three-wire protocol so no serial control lines are used. There are also a number of proprietary protocols, BCSP (BlueCore Serial Protocol) being an example.

The datasheet for the controller and the schematics for the device should be enough to determine which protocol is used.

USB

The Linux kernel driver is btusb

Other

Examples are SPI and SDIO. These transport layers do not appear to be used in any devices with AllWinner SoCs.

This section contains details on Bluetooth controller chips used alongside sunxi system on chips and how to drive them. A controller chip will need one or more of the following:

  • Power management, usually wake and sleep
  • Configuration of the transport between host and controller, often over UART, but could also be SPI or USB
  • Copying of controller's firmware to controller on start up
  • Co-ordination on the host with other drivers, e.g. Bluetooth A2DP will also need the audio driver configured

AMPAK

AP6210

The AMPAK AP6210 combines Broadcom Wifi (BCM43362) and Bluetooth 4.0 (BCM20710) chips in a single system in package. The package exposes only the Bluetooth chip's UART transport layer. Audio is carried over a PCM interface.

Procedure for Sunxi Linux 3.4 kernel:

  • Cubietruck/Bluetooth - notes on this Wiki about the Cubietruck that contains an AP6210
  • 'Got bluetooth working on Cubietruck - proof of concept' - Arch Linux forum
  • EddyBeaupre/ap6210 - GitHub, 'Wifi and Bluetooth driver for CubieTruck'

Procedure for mainline Linux kernel:

  • phelum/CT_Bluetooth - working procedure for Bluetooth with AP6210 using both Linux mainline and 3.4 kernels, still a work in progress and the author is seeking feedback on the Mailing_list
  • 'ARM: dts: sun7i: add bluetooth module to CubieTruck DTS' - patch as an example DTS file
  • User_talk:Sehraf - Sehraf has notes on an attempt to get the AP6210 working

Broadcom

Broadcom provide a tool for Linux to configure and test Broadcom Bluetooth chips. The tool source code is licensed under the Apache License 2.0. Binaries are also available for download. This tool can be used to upload firmware to the controller. For example a firmware upload over UART:

BCM20710

The BCM20710 provides both SPI and UART transport layers. See BCM20710 datasheet for more details.

The firmware needs to be uploaded to the controller. The firmware .hcd file is available here.

Realtek

8723au

This device has no driver included in the kernel, but you can install it separately. It also supports Wifi functionality.

The Bluetooth functionality is included in the hardware that does the wifi, so you may need to have the wifi drivers described above working to also have this working. However, don't expect it to work particularly well as there appear to be numerous bugs (in either the driver or the hardware or both). There seems to also be an issue where using both wifi and bluetooth at the same time cause severe interference to the point where connections are dropped (this has been seen in the stock Android firmware as well).

check out the code from https://github.com/lwfinger/rtl8723au_bt.git and compile with the following command:

NOTE: This command assumes that you checked out the rtl8723au_bt repo into the same directory as the linux-sunxi repo (note the ../linux-sunxi/ points to where your local kernel repository is)

copy the *.bin and *.ko files over to the device and run the following on the device (as root) where you have your files:

Apparently, the RTL8723AU driver (r8728au) in mainline serves only wifi, though it has an option to coexist with BT.rtl8723au_bt, branch new is the work repository fora current bluetooth driver.

8723bs

Bcsp Bluecore Serial Protocol Manual

Firmware and userspace loader can be found here.

Retrieved from 'http://linux-sunxi.org/index.php?title=Bluetooth&oldid=14334'
Posted :