This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

WL18xx Bluetooth HCI init failures with TI BTS profiles

Other Parts Discussed in Thread: WL1831

Hi all--

We have an AM335x BeagleBone-like board with WL1831 module onboard, running Linux kernel 3.8.13 with BlueZ stack enabled.

We modified the UART port assignments for interfacing with the WL18xx HCI UART lines, and tried various pinmux options enabling/disabling RTS/CTS. We also have GPIO assigned for manually toggling BT_EN.

So far the WL18xx chip only gets enumerated via 'hciattach' when using the generic profile without flow control. However this has not been sufficient for testing the BT radio for nearby devices with 'hcitool scan'.

When we use the TI-specific profile with 'hciattach', it switches HCI comm-link to faster baud rate with flow control enabled, but initialization times out. There is a brief burst of activity on UART TxD/RxD lines observed with RTS/CTS lines going low.

When RTS/CTS is enabled for UART3:

root@beaglebone:~# ./ 
root@beaglebone:~# hciattach /dev/ttyO3 texas 115200 flow
Found a Texas Instruments' chip!
Firmware file : /lib/firmware/TIInit_11.8.32.bts
Loaded BTS script version 1
texas: changing baud rate to 3000000, flow control to 1
Initialization timed out.

When RTS/CTS is disabled for UART3:

root@beaglebone:~# ./
root@beaglebone:~# hciattach /dev/ttyO3 any 115200 noflow
[  245.020416] Bluetooth: HCI UART driver ver 2.2
[  245.025277] Bluetooth: HCI H4 protocol initialized
[  245.030373] Bluetooth: HCI BCSP protocol initialized
[  245.035638] Bluetooth: HCILL protocol initialized
[  245.040625] Bluetooth: HCIATH3K protocol initialized
[  245.045883] Bluetooth: HCI Three-wire UART (H5) protocol initialized
Device setup complete  
root@beaglebone:~# [  245.475620] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[  245.481356] Bluetooth: BNEP filters: protocol multicast
[  245.493115] Bluetooth: BNEP socket layer initialized
[  245.588394] Bluetooth: RFCOMM TTY layer initialized
[  245.594295] Bluetooth: RFCOMM socket layer initialized
[  245.599742] Bluetooth: RFCOMM ver 1.11

root@beaglebone:~# hciconfig -a
hci0:   Type: BR/EDR  Bus: UART
        BD Address: 98:7B:F3:D8:E9:C2  ACL MTU: 1021:6  SCO MTU: 180:4
        RX bytes:924 acl:0 sco:0 events:40 errors:0
        TX bytes:1010 acl:0 sco:0 commands:40 errors:0
        Features: 0xff 0xfe 0x2d 0xfe 0xdb 0xff 0x7b 0x87
        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
        Link policy: RSWITCH HOLD SNIFF
        Link mode: SLAVE ACCEPT
        Name: 'beaglebone-0'
        Class: 0x420100
        Service Classes: Networking, Telephony
        Device Class: Computer, Uncategorized
        HCI Version: 4.0 (0x6)  Revision: 0x0
        LMP Version: 4.0 (0x6)  Subversion: 0xac20
        Manufacturer: Texas Instruments Inc. (13)

However this generic profile is unable to discover any nearby BT devices via 'hcitool scan'. 

Note in trying to get the UART configured, we also applied the RTS/CTS serial driver patch posted on TI wiki at:

It seems evident that RTS/CTS handshaking is required for loading TI BTS profiles with 'hciattach'.

Is there a way to get this basic BT functionality working without adding more SW layers (like WLink8 driver patch set or Bluetopia stack)?