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.

WL12xx Bluetooth Low Energy aka TiWi-BLE

Other Parts Discussed in Thread: CC2540, OMAPL138, WL1271, DM3730

I have a custom board with a LS Research TiWi-BLE module on it. It appears to function correctly for standard bluetooth devices. It can detect devices and I can use bluetooth keyboards and rfcomm devices as expected.  See as follows for what I believe to be correct functionality:

# hciattach -s 115200 /dev/ttyO5 texas 3000000
Found a Texas Instruments' chip!
Firmware file : /lib/firmware/TIInit_7.6.15.bts
Loaded BTS script version 1
texas: changing baud rate to 3000000, flow control to 1
[ 17.680000] Bluetooth: Core ver 2.16
[ 17.690000] NET: Registered protocol family 31
[ 17.690000] Bluetooth: HCI device and connection manager initialized
[ 17.700000] Bluetooth: HCI socket layer initialized
[ 17.700000] Bluetooth: L2CAP socket layer initialized
[ 17.710000] Bluetooth: SCO socket layer initialized
[ 17.730000] Bluetooth: HCI UART driver ver 2.2
[ 17.730000] Bluetooth: HCI H4 protocol initialized
[ 17.730000] Bluetooth: HCI BCSP protocol initialized
[ 17.740000] Bluetooth: HCILL protocol initialized
[ 17.870000] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 17.880000] Bluetooth: BNEP filters: protocol multicast
[ 18.030000] Bluetooth: RFCOMM TTY layer initialized
[ 18.040000] Bluetooth: RFCOMM socket layer initialized
[ 18.040000] Bluetooth: RFCOMM ver 1.11
[ 18.190000] PHY: 0:00 - Link is Up - 1000/Full
Device setup complete

# hciconfig -a
hci0: Type: BR/EDR Bus: UART
BD Address: 1C:45:93:5C:8D:12 ACL MTU: 1021:4 SCO MTU: 180:4
UP RUNNING PSCAN
RX bytes:2540 acl:0 sco:0 events:50 errors:0
TX bytes:758 acl:0 sco:0 commands:42 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: '<hostname>'
Class: 0x480100
Service Classes: Capturing, Telephony
Device Class: Computer, Uncategorized
HCI Version: 4.0 (0x6) Revision: 0x0
LMP Version: 4.0 (0x6) Subversion: 0x1f3b
Manufacturer: Texas Instruments Inc. (13)

# hcitool scan
Scanning ...
D8:A2:5E:89:2B:2C Loudthought2 iMac
00:23:12:4B:55:0A Loudthought G5 (4)

I can't get the BLE features of the chip working though. I have a CC2540 Mini Development kit (BLE dev kit) and have the USB dongle discovering the keyfob. I expect my wl12xx to also be able to discover the keyfob. But it fails to do that.  I've been attempting to do the following:


# hciconfig hci0 lestates
Read LE supported states on hci0 returned status 12

# hcitool cmd 0x3f 0x015B 0x1 0x0
< HCI Command: ogf 0x3f, ocf 0x015b, plen 2
01 00
> HCI Event: 0x0e plen 4
01 5B FD 1F

# hcitool cmd 0x3f 0x01DD 0x1
< HCI Command: ogf 0x3f, ocf 0x01dd, plen 1
01
> HCI Event: 0x0e plen 4
01 DD FD 00

# hciconfig hci0 lestates
Supported link layer states:
YES Non-connectable Advertising State
YES Scannable Advertising State
YES Connectable Advertising State
YES Directed Advertising State
YES Passive Scanning State
YES Active Scanning State
YES Initiating State/Connection State in Master Role
YES Connection State in the Slave Role
YES Non-connectable Advertising State and Passive Scanning State combination
YES Scannable Advertising State and Passive Scanning State combination
YES Connectable Advertising State and Passive Scanning State combination
YES Directed Advertising State and Passive Scanning State combination
YES Non-connectable Advertising State and Active Scanning State combination
YES Scannable Advertising State and Active Scanning State combination
YES Connectable Advertising State and Active Scanning State combination
YES Directed Advertising State and Active Scanning State combination
YES Non-connectable Advertising State and Initiating State combination
YES Scannable Advertising State and Initiating State combination
YES Non-connectable Advertising State and Master Role combination
YES Scannable Advertising State and Master Role combination
YES Non-connectable Advertising State and Slave Role combination
YES Scannable Advertising State and Slave Role combination
YES Passive Scanning State and Initiating State combination
YES Active Scanning State and Initiating State combination
YES Passive Scanning State and Master Role combination
YES Active Scanning State and Master Role combination
YES Passive Scanning State and Slave Role combination
YES Active Scanning State and Slave Role combination
YES Initiating State and Master Role combination/Master Role and Master Role combination

# hcitool lescan
LE Scan ...

And it hangs... forever. Meanwhile the CC2540 Mini Dev kit detects the keyfob without issue.

I'm using the firmware linked from http://processors.wiki.ti.com/index.php/OMAP_Wireless_Connectivity_BTS_files_overview @  http://processors.wiki.ti.com/images/e/e8/BTS_files_v2.zip (./AM335/1271L/3M/TIInit_7.6.15.bts).

What's the secret? Is there any documentation anywhere as to how to actually use the WL1271L with BLE devices and bluez?

  • Kyle,
    After getting the lestates via hciconfig hci0 lestates – What is the purpose of running these commands hcitool cmd 0x3f 0x015B 0x1 0x0 & hcitool cmd 0x3f 0x01DD 0x1
    Can you run “hcidump -X &” before running hcitool hci0 lescan to check if any reports are coming from device.
    Regards,
    Naveen
  • I need to run the two seemingly arbitrary hcitool commands to enable the lestates command.  My original posts shows that the wl12xx reports an error initially when I query the lestates.  After I run those two commands it appears to suddenly understand the lestates command.   I'd like to find some documentation as to why it works this way.  I have no clue what those commands are doing, but have seen them mentioned by a TI developer @ https://groups.google.com/forum/?fromgroups=#!topicsearchin/pandaboard/ble/pandaboard/6Kf9V6KcXsw


    I've run the hcidump -X command, and have never see any replies.  At the same time the CC2540 devkit does see the replies from the keyfob.

    Please advise on how to continue.  I'm led to believe I'm using the wrong firmware and the correct firmware wouldn't need the two hcitool commands and would actually scan correctly.

  • I am checking as you might need an upgraded firmware that enables BLE correctly. I will get back you.
    Regards,
    Naveen
  • Our latest BT service packs can be found in this wiki: http://processors.wiki.ti.com/index.php/CC256x_Downloads

     

  • Hi  Zahidul,

    I'm looking for the correct firmware for the WL1271L with a filename of TIInit_7.6.15.bts.  Can you please point me in the direction where the latest firmware for this chip is published?

  • Please find the link to get the BT firmware (with BLE enabled) for WL1271L device at http://processors.wiki.ti.com/index.php/BTS_with_BTLE_enabled_for_WL1271L
    Regards,
    Naveen
    ---------------------------------------------------------------------------------------------------------
    Please click the Verify Answer button on this post if it answers your question.
    ---------------------------------------------------------------------------------------------------------
  • Hi, does the non-BLE bts file (TIInit_7.6.15.bts) have wide-band speech support enabled in the firmware?  Is there an additional bts script that needs to be downloaded to enable the avpr?  Thanks.

  • Naveen Jain said:
    Please find the link to get the BT firmware (with BLE enabled) for WL1271L device at http://processors.wiki.ti.com/index.php/BTS_with_BTLE_enabled_for_WL1271L

    I downloaded that firmware and placed it in the correct spot and attempted again with no luck.  I was using the ti-compat-bluetooth (compat-wireless-2011-12-05-1-g84dbe2c) modules from Arago on a DM8148 originally.  I've updated to compat-wireless based on compat-wireless-v3.2.5-1 ( http://wireless.kernel.org/en/users/Download/stable/#compat-wireless_3.2_stable_releases ) thinking it might help.  I'm using compat wireless to build both my wifi drivers and bluetooth drivers.  The new wl12xx wifi driver appears to work.  Running hciattach fails however:

    # hciattach -s 115200 /dev/ttyO5 texas 3000000
    Starting Bluetooh daemon:
    Found a Texas Instruments' chip!
    Firmware file : /lib/firmware/TIInit_7.6.15.bts
    Loaded BTS script version 1
    [ 49.590000] Compat-wireless backport release: compat-wireless-v3.2.5-1
    [ 49.600000] Backport based on linux-stable.git v3.2.5
    [ 49.650000] Bluetooth: Core ver 2.16
    [ 49.650000] NET: Registered protocol family 31
    [ 49.660000] Bluetooth: HCI device and connection manager initialized
    [ 49.660000] Bluetooth: HCI socket layer initialized
    [ 49.670000] Bluetooth: L2CAP socket layer initialized
    [ 49.670000] Bluetooth: SCO socket layer initialized
    [ 49.690000] Bluetooth: HCI UART driver ver 2.2
    [ 49.700000] Bluetooth: HCI H4 protocol initialized
    [ 49.700000] Bluetooth: HCI BCSP protocol initialized
    [ 49.710000] Bluetooth: HCILL protocol initialized
    [ 49.710000] Bluetooth: HCIATH3K protocol initialized
    [ 49.740000] Bluetooth: Unknown HCI packet type 00
    [ 49.740000] Bluetooth: Unknown HCI packet type 00
    [ 49.750000] Bluetooth: Unknown HCI packet type 00
    [ 49.750000] Bluetooth: Unknown HCI packet type 00
    [ 49.760000] Bluetooth: Unknown HCI packet type 00
    [ 49.760000] Bluetooth: Unknown HCI packet type 00
    [ 49.770000] Bluetooth: Unknown HCI packet type 00
    [ 49.770000] Bluetooth: Unknown HCI packet type 00
    [ 49.820000] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
    [ 49.820000] Bluetooth: BNEP filters: protocol multicast
    [ 50.720000] Bluetooth: hci0 command tx timeout
    [ 51.720000] Bluetooth: hci0 command tx timeout
    [ 52.720000] Bluetooth: hci0 command tx timeout
    [ 53.720000] Bluetooth: hci0 command tx timeout
    [ 54.720000] Bluetooth: hci0 command tx timeout
    [ 55.720000] Bluetooth: hci0 command tx timeout
    [ 56.720000] Bluetooth: hci0 command tx timeout
    [ 57.720000] Bluetooth: hci0 command tx timeout
    [ 58.720000] Bluetooth: hci0 command tx timeout
    [ 59.720000] Bluetooth: hci0 command tx timeout
    [ 60.720000] Bluetooth: hci0 command tx timeout
    [ 61.720000] Bluetooth: hci0 command tx timeout
    [ 62.720000] Bluetooth: hci0 command tx timeout
    [ 63.720000] Bluetooth: hci0 command tx timeout
    [ 64.720000] Bluetooth: hci0 command tx timeout
    [ 65.720000] Bluetooth: hci0 command tx timeout
    [ 66.720000] Bluetooth: hci0 command tx timeout
    [ 67.720000] Bluetooth: hci0 command tx timeout
    [ 68.720000] Bluetooth: hci0 command tx timeout
    [ 69.720000] Bluetooth: hci0 command tx timeout


    # cat /sys/module/bluetooth/parameters/enable_le
    Y


    # md5sum /lib/firmware/TIInit_7.6.15.bts
    6ddb33667c7db8c5d2ea2b7f634533b9 /lib/firmware/TIInit_7.6.15.bts


    I'm still running bluez 4.99, and can upgrade, but I don't believe bluez is part of the problem.  It appears that the firmware and bluetooth module are returning garbage.


    If I revert back to the old firmware (md5sum: 1bfbf9efa1e6e0e7cc1b4909d9e925af) hciattach works and I can communicate with a standard bluetooth keyboard.  This suggests to me that my hardware and the new 3.2.5 compat drivers are happy with the old firmware.


    Any ideas?

  • Kyle,
    Sorry to miss out the baud-rate limitation. The script does not have any baud-rate setting so it will work only on 115200. Please try with 115200 baud-rate - hciattach -s 115200 /dev/ttyO5 texas 115200.
    Please let me know if this works and in the mean time I will create and share the firmware with 300000 baud-rate.
    Thanks,
    Naveen
  • Naveen,

    After running hciattach at 115200 I can detect the CC2540 keyfob demo as expected.  Can you generate the 3000000 baud-rate script?  After I get that, I can mark this issue as resolved.

    Thanks!

  • Kyle,
    Please find the script with 3M baud-rate with BLE enabled at http://processors.wiki.ti.com/index.php/BTS_with_BTLE_enabled_for_WL1271L.
    Regards,
    Naveen
  • BLE appears to now work with the UART at 3 Mb/s

    For others: I'm using an Arago 3.6.37 derived kernel, compat-wireless 3.2.5, bluez 4.99.

  • Hello All,

    After getting a latest firmware to enable the BTLE. I've encountered some issue related to the WIFI. When I execute hcitool -i hci0 lescan, there's a time that I am getting these errors:

    [11270.160705] wl12xx: ERROR watchdog interrupt received! starting recovery.                                                                                                                                                [11272.176879] wl12xx: ERROR command complete timeout                                                                                                                                                                                   [11272.183502] wl12xx: ERROR failed to send stop firmware logger command  

    The Bluetooth is not responding anymore (even I execute hciconfig hci0 reset). I have to reboot my system in order to get the Bluetooth back to work. It looks like the wifi and bluetooth are not in good shape to work together based on the current firmware.

    Is there any immediate fix on these or we have to wait till the next release of the firmware?.

    Regards,

    john

     

  • I've had no problems with WiFi and BLE functioning at the same time.  I'd recommend updating your drivers to something much later with compat-wireless (I'm using a 3.6 RC) and the firmware to go with those drives.  I'd also closely watch how you handle the WLAN_EN and BT_EN pins.  There is a sequence for each that affected me.

    -Kyle

  • May I know what version of the kernel and the repository are you using? So, I will use it too.

    john

  • The drivers for bluetooth and wl12xx are from: http://linuxwireless.org/en/users/Download/stable/#compat-wireless_3.6_stable_releases and I'm using the version without any of the flags on the tarball.  You'll have to wrestle with it to get it to build the correct modules.

    Firmware for WiFi is from http://git.kernel.org/?p=linux/kernel/git/dwmw2/linux-firmware.git;a=summary

    The BLE firmware is in a previous post above (it would be nice if it was in the Linux git repo).

    I'm using a 2.6.37 kernel from Arago for a DM8148.

  • Btw, I am using Pandaboard ES. I am not sure if you are using same board.

  • Hi Kyle Manna,

             We are using 2.6.37 kernel for our OMAPL138 controller with Arago file system. By default we have Bluez4_4.95 & 96 in the file system, I would like 4.99 to be included, when i try to include 4.99 version of Bluez I am getting compilation error as

    "lib/.deps/bluetooth.Tpo file does not exist"

        I see from your statements you also have included Bluez4.99, could you let me know how you were able to resolve the issue

    PS: We are not using BT functionality of WL1271,

    Thanks,

    Manjunath

  • It looks like the TIInit_7.6.15.bts file you posted has been removed.  I too am wanting to run BLE simultaneous with WLAN on kernel 2.6.37, but on DM3730.  I would like to try to run at 3Mbps.

    Thanks,

    Chris

  • Naveen Jain,

    Can you repost the 3Mbps .bts file you created for Kyle Manna?  It looks like the page you uploaded it to got modified.

    - Chris