Bluetooth

The phyCORE-AM57x development kit does not have Bluetooth integrated on the carrier board, but it can support external Bluetooth modules via the 2x16 pin header (X26). This guide will walk through the basic setup and usage of WiLink8 WiFi module (PCM-949 or PCM-958) by scanning for other Bluetooth devices. For more information on Bluetooth on the phyCORE-AM57x, please see section 19 in the Hardware Manual.

../_images/pb-057948_wifi-bt.png

Requirements

Hardware Setup

  • Power off and remove power from the kit.

  • Connect the module at X26.

    ../_images/pb-057948_wifi-bt-pcm949.png

Enable the Bootloader Overlay

The bootloader environment needs to be modified in order to enable the Bluetooth device tree overlay before booting into Linux.

  • Power on the development kit and hit any key to stop in U-Boot.

    Target (U-Boot)
    setenv overlays am57xx-phytec-pcm-948-wlan-wilink8.dtbo
    boot
    

Note

For more information about overlays see the guide Configuring the Bootloader.

Initializing BT

  • Initialize the Bluetooth module by attaching UART10 to the Bluetooth’s driver:

    Target (Linux)
    hciattach /dev/ttyS9 texas
    
    Expected Output
    root@am57xx-phycore-kit:~# hciattach /dev/ttyS9 texas
    Found a Texas Instruments' chip!
    Firmware file : /lib/firmware/ti-connectivity/TIInit_11.8.32.bts
    Loaded BTS script version 1
    texas: changing baud rate to 3000000, flow control to 1
    [ 51.051613] Bluetooth: Core ver 2.22
    [ 51.055395] NET: Registered protocol family 31
    [ 51.059863] Bluetooth: HCI device and connection manager initialized
    [ 51.066336] Bluetooth: HCI socket layer initialized
    [ 51.071241] Bluetooth: L2CAP socket layer initialized
    [ 51.076424] Bluetooth: SCO socket layer initialized
    [ 51.090657] Bluetooth: HCI UART driver ver 2.3
    [ 51.095172] Bluetooth: HCI UART protocol H4 registered
    [ 51.100386] Bluetooth: HCI UART protocol LL registered
    [ 51.106221] Bluetooth: HCI UART protocol Broadcom registered
    Device setup complete
    
  • Scanning for Bluetooth devices:

    Target (Linux)
    hcitool scan
    
    Expected Output
    root@am57xx-phycore-kit:~# hcitool scan
    Scanning ...
    98:5F:D3:E7:5B:57 DESKTOP-LUEK3D8
            B4:69:21:71:30:7B       DESKTOP-8HV09AF
    
  • Scanning for Bluetooth LE devices:

    Target (Linux)
     hcitool lescan
    
    Expected Output
    root@am57xx-phycore-kit:~# hcitool lescan
    LE Scan ...
    23:95:89:DE:90:C8 (unknown)
    2A:66:5C:F2:E2:83 (unknown)
    33:DE:FC:F7:26:F5 (unknown)
    29:CA:92:CB:CF:1C (unknown)
    4C:87:5D:0D:8E:87 (unknown)
    4C:87:5D:0D:8E:87 LE-headPhone
    2F:CC:A7:01:06:9A (unknown)
    55:5F:ED:13:08:D0 (unknown)
    7E:2A:E0:CF:9C:9A (unknown)
    38:38:5B:37:82:00 (unknown)
    33:DE:FC:F7:26:F5 (unknown)
    7E:2A:E0:CF:9C:9A (unknown)
    14:07:86:9C:41:3F (unknown)
    6B:87:7A:0E:7B:94 (unknown)
    6B:87:7A:0E:7B:94 (unknown)
    2F:CC:A7:01:06:9A (unknown)
    55:5F:ED:13:08:D0 (unknown)