HCI

It is possible to program the Vela IF820 module with a specific HCI firmware version. The module can then be used as an HCI Bluetooth controller exposing an HCI UART interface.

Obtaining the HCI Firmware

Download the Vela IF820 HCI firmware at the following link:

Vela IF820 HCI firmware

Programming the HCI Firmware

The HCI firmware can be programmed with the Ezurio programming tools. See here for instructions for programming firmware.

Using the Vela IF820 HCI Module on Linux

Linux usually comes with all necessary tools preinstalled. Those are:

  • BlueZ (Official Linux Bluetooth/LE stack)
  • btattach and bluetoothctl (command line utilities for configuring HCI devices and doing basic tasks)

Connect the Vela IF820 to your Linux PC. The IF820 USB dongle version can be directly plugged into a USB port. When using an IF820 DVK this is simply done by connecting a USB cable.

Open a command shell/terminal on Linux and enter bluetoothctl list. This will return the existing HCI devices. If the PC has an integrated Bluetooth/LE controller, this will be shown as default device.

Attach the IF820 module to the Linux HCI subsystem by setting the proper serial port, baud rate and other parameters.

Note: The btattach command will not return. It will continue to run. Open a new terminal to issue other commands.

sudo btattach -B /dev/ttyACM0 -P h4 -S 3000000

Enter bluetoothctl to interact with the bluetooth subsystem. The list command will show the available bluetooth controllers. The IF820 module will now be the default device.

bluetoothctl

[bluetooth]# list
Controller 00:25:CA:B2:06:89 uby #2 [default]
Controller E4:A4:71:47:E6:6C uby

Scan for BLE devices with the scan le command. The devices command will show the discovered devices.

[bluetooth]# scan le
[bluetooth]# SetDiscoveryFilter success
[bluetooth]# hci1 type 6 discovering on
[bluetooth]# Discovery started
[bluetooth]# [CHG] Controller 00:25:CA:B2:06:89 Discovering: yes
[bluetooth]# [NEW] Device 20:6D:31:FB:06:49 Firewalla Gold
[bluetooth]# [NEW] Device 6F:EF:EF:C3:7C:30 6F-EF-EF-C3-7C-30
[bluetooth]# [NEW] Device 1A:0D:AB:3F:96:30 1A-0D-AB-3F-96-30
[bluetooth]# [NEW] Device 73:BA:C5:5A:76:C1 73-BA-C5-5A-76-C1
[bluetooth]# [NEW] Device 55:CA:44:0A:97:3B 55-CA-44-0A-97-3B
[bluetooth]# [NEW] Device 60:25:49:6C:67:25 60-25-49-6C-67-25
[bluetooth]# [NEW] Device 75:C3:D8:54:AB:F3 75-C3-D8-54-AB-F3
[bluetooth]# [NEW] Device 56:58:5F:C0:E1:3F 56-58-5F-C0-E1-3F
[bluetooth]# [NEW] Device 63:33:38:93:2F:45 63-33-38-93-2F-45
[bluetooth]# [NEW] Device 47:8E:99:DC:D3:74 47-8E-99-DC-D3-74
[bluetooth]# [NEW] Device 4A:B6:E8:8C:3E:B6 4A-B6-E8-8C-3E-B6
[bluetooth]# [CHG] Device 6F:EF:EF:C3:7C:30 RSSI: 0xffffffc4 (-60)