Bluetooth

The phyCORE-AM62x development kit does not have Bluetooth integrated on the carrier board, but it can support external Bluetooth modules via the M.2 connector located on the bottom of the development kit carrier board, at X36. For more information on the M.2 connector on the phyCORE-AM62x development kit, please see the Hardware Manual.

phyCORE-AM62x BT

Requirements

Warning

Depending on the module you are using, the jumpers J19 and J20 may require adjustment to level shift the signals routed out of the M.2 connector.

The module requires a 1.8V operating voltage, thus this module specifically requires J19 and J20 set to the 1+2 jumper position (reference development kit schematics for clarification).

Jumper Configuration

J19

1+2 = 1.8V

2+3 = 3.3V

Level shifts UART (Bluetooth) and PCM (audio) signals

J20

1+2 = 1.8V

2+3 = 3.3V

Level shifts MMC (WIFI) signals

Hardware Setup

  • Power off the development kit and disconnect the power supply.

  • Prepare the M.2 module by securing the antenna.

  • Connect the M.2 module to the X36 M.2 connector on the bottom side of the carrier board. We recommend securing the module with a M2 bolt into the soldered standoff.

Enable the Bootloader Overlay

The bootloader environment needs to be modified in order to enable the 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 k3-am62-phyboard-lyra-m2-lwb5p.dtbo
       saveenv
       boot
    

Note

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

Verifying BT Connection

  • Once in Linux, verify that module is recognized by development kit.

    Target (Linux)
    hciconfig
    
    Example Output
    root@phyboard-lyra-am62xx-3:~# hciconfig
    hci0:   Type: Primary  Bus: UART
            BD Address: <DEVICE MAC ADDR>  ACL MTU: 1021:8  SCO MTU: 64:1
            DOWN
            RX bytes:3137 acl:0 sco:0 events:307 errors:0
            TX bytes:51394 acl:0 sco:0 commands:307 errors:0
    
  • Turn Bluetooth on.

    Target (Linux)
    hciconfig hci0 up
    
    Example Output
    root@phyboard-lyra-am62xx-3:~# hciconfig
    hci0:   Type: Primary  Bus: UART
            BD Address: <DEVICE MAC ADDR>  ACL MTU: 1021:8  SCO MTU: 64:1
            UP RUNNING
            RX bytes:3137 acl:0 sco:0 events:307 errors:0
            TX bytes:51394 acl:0 sco:0 commands:307 errors:0
    

Ping Test

This ping test requires an additional Bluetooth device that can be pinged. A cellphone searching to pair with a Bluetooth device would work.

  • With the Bluetooth interface up, scan the area for available Bluetooth devices.

    Target (Linux)
    hcitool scan
    
    Expected Output
    root@phyboard-lyra-am62xx-3:~# hcitool scan
    Scanning ...
            <DEVICE MAC ADDR>       Pixel 4a  <--DEVICE NAME
    
  • Ping the device

    Target (Linux)
    l2ping -i hci0 -c 10 <DEVICE MAC ADDR>
    
    Expected Output
    root@phyboard-lyra-am62xx-3:~# l2ping -i hci0 -c <DEVICE MAC ADDR>
    Ping: <DEVICE MAC ADDR> from 00:25:CA:2F:EE:72 (data size 44) ...
    0 bytes from <DEVICE MAC ADDR> id 0 time 13.78ms
    0 bytes from <DEVICE MAC ADDR> id 1 time 101.05ms
    0 bytes from <DEVICE MAC ADDR> id 2 time 111.12ms
    0 bytes from <DEVICE MAC ADDR> id 3 time 118.60ms
    0 bytes from <DEVICE MAC ADDR> id 4 time 97.36ms
    0 bytes from <DEVICE MAC ADDR> id 5 time 113.59ms
    0 bytes from <DEVICE MAC ADDR> id 6 time 94.90ms
    0 bytes from <DEVICE MAC ADDR> id 7 time 111.10ms
    0 bytes from <DEVICE MAC ADDR> id 8 time 128.61ms
    0 bytes from <DEVICE MAC ADDR> id 9 time 108.60ms
    10 sent, 10 received, 0% loss