How can I implement an HCI interface for the IG60-BL654?
An HCI interface can be implemented in lieu of using smartBASIC to communicate with / program the BL654 in Laird's IG60.
To achieve this, build the hci_uart example for BL654_DVK.
Bluetooth: HCI UART — Zephyr Project Documentation
Direct the output to a folder, for example:
west build -b bl654_dvk samples/bluetooth/hci_uart --pristine -d my_firmware
Download Ubutil—
Linux:
UBUtil Firmware Upgrade Generation Utility v1.0 – Linux / MAC | Ezurio (formerly Laird Connectivity)
Windows:
UBUtil Firmware Upgrade Generation Utility v1.0 – Windows | Ezurio
Follow these instructions to create a .UBU:
Firmware Programming Guide (lairdconnect.com)
TLDR:
Copy the zephyr.hex from the "my_firmware" directory in Zephyr.
./UBUtil --create-key hci_uart.pem
./UBUtil --application-key-file hci_uart.pem --a0-version 1 --a0-compressed --a0-target 0 --a0-startaddress 0x1000 --a0-filetype 1 --a0-filename zephyr.hex --a0-keytype 1 --append-pub-key --output zephyr.hex --ubu-output hci_uart.ubu --ubu-platform 5ECB654F --ubu-flash-size 2097152 --ubu-sector-size 4096 --ubu-base-address 0 --ubu-align-length 4
Copy the .ubu to the IG60.
With the file on the gateway execute the following command:
- btpa_firmware_loader.py /dev/ttyS2 115200 hci_uart.ubu BL654
Reboot the system, then check /sys/class/bluetooth for hci0. If this sysfs node is present you've successfully created the HCI interface.