In order to get bluetooth to work you first need to get ttyS1 to work.
The problem here is that the current kernel allows for only one uart and ttyS0 is already in use for debug terminal
recompiling the kernel with
$this->bbcode_second_pass_code('', 'CONFIG_SERIAL_8250_NR_UARTS=2
CONFIG_SERIAL_8250_RUNTIME_UARTS=2
')
instead of 1 solves that problem. ttyS1 is now available:
$this->bbcode_second_pass_code('', '[ 1.465217] [uart]: serial probe 2 irq 35 mapbase 0x01c28800
[ 1.497099] sunxi-uart.2: ttyS1 at MMIO 0x1c28800 (irq = 35) is a U6_16550A
')
then preload the following modules:
$this->bbcode_second_pass_code('', 'bluetooth
hidp
rfcomm
bnep
hci_uart
')
in /etc/modules-load.d/bluetooth.conf.
then get the broadcom patchram plus utility here:
https://broadcom-bluetooth.googlecode.c ... 9ab.tar.gz
unpack and compile (just type make)
then (assuming you already have the firmware ap6210 in /usr/lib/firmware)
go read this page: http://linux-sunxi.org/Cubietruck/Bluetooth
now type
$this->bbcode_second_pass_code('', 'sudo systemctl start bluetooth
')
now type as root in the patchram directory (or put in your path somewhere)
$this->bbcode_second_pass_code('', './brcm_patchram_plus -d --patchram /lib/firmware/ap6210/bcm20710a1.hcd --enable_hci --bd_addr 11:22:33:44:55:66 --no2bytes --tosleep 1000 /dev/ttyS1')
I always need to Ctrl-C and do it again to make it work. The console goes dead, leave it be (Work for later...)
Open a second console and type
$this->bbcode_second_pass_code('', 'sudo bluetoothctrl
')you see your controller appear.
$this->bbcode_second_pass_code('', '[NEW] Controller 11:22:33:44:55:66 cubie [default]
[bluetooth]# show
Controller 11:22:33:44:55:66
Name: cubie
Alias: cubie
Class: 0x000000
Powered: no
Discoverable: no
Pairable: yes
UUID: PnP Information (...)
UUID: Generic Access Profile (...)
UUID: Generic Attribute Profile (...)
UUID: A/V Remote Control (...)
UUID: A/V Remote Control Target (...)
Modalias: usb:...
Discovering: no
[bluetooth]# ')
your bluetooth is working.
This is a proof of concept within the ARCH environment. There is more work to be done.
fave fun
LP