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 `_. .. image:: ../../images/phycore-am62x/pb-07124_bt-x36.png :width: 800px :alt: phyCORE-AM62x BT Requirements -------------- * `Sterling LWB5+ WIFI + Bluetooth 5.0 SDIO Module (453-00048) `_ * `RF Antenna, 2.4GHZ/5GHZ (2069940100) `_ *Option 1* * `Dual Band Antenna, 2.45GHz/5.5125GHz (2344656-6) `_ *Option 2* * M2 4MM Bolt (Optional) .. 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). .. list-table:: Jumper Configuration :stub-columns: 1 * - 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. .. code-block:: none :caption: Target (U-Boot) setenv overlays k3-am62-phyboard-lyra-m2-lwb5p.dtbo saveenv boot .. note:: For more information about overlays see the guide :ref:`ConfiguringTheBootloader-62`. Verifying BT Connection ------------------------- * Once in Linux, verify that module is recognized by development kit. .. code-block:: none :caption: Target (Linux) hciconfig .. code-block:: none :caption: Example Output root@phyboard-lyra-am62xx-3:~# hciconfig hci0: Type: Primary Bus: UART BD Address: 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. .. code-block:: none :caption: Target (Linux) hciconfig hci0 up .. code-block:: none :caption: Example Output root@phyboard-lyra-am62xx-3:~# hciconfig hci0: Type: Primary Bus: UART BD Address: 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. .. code-block:: none :caption: Target (Linux) hcitool scan .. code-block:: none :caption: Expected Output root@phyboard-lyra-am62xx-3:~# hcitool scan Scanning ... Pixel 4a <--DEVICE NAME * Ping the device .. code-block:: none :caption: Target (Linux) l2ping -i hci0 -c 10 .. code-block:: none :caption: Expected Output root@phyboard-lyra-am62xx-3:~# l2ping -i hci0 -c Ping: from 00:25:CA:2F:EE:72 (data size 44) ... 0 bytes from id 0 time 13.78ms 0 bytes from id 1 time 101.05ms 0 bytes from id 2 time 111.12ms 0 bytes from id 3 time 118.60ms 0 bytes from id 4 time 97.36ms 0 bytes from id 5 time 113.59ms 0 bytes from id 6 time 94.90ms 0 bytes from id 7 time 111.10ms 0 bytes from id 8 time 128.61ms 0 bytes from id 9 time 108.60ms 10 sent, 10 received, 0% loss