Personal tools

Difference between revisions of "How to enable Murata Bluetooth on VisionSOM-6ULL"

From SomLabs Wiki

Jump to: navigation, search
(Created page with "{{PageHeader|How to enable Murata Bluetooth on VisionSOM-6ULL}} == Configuring device tree to enable UART5 interface for Murata Bluetooth == Murata 1DX requires UART interface...")
 
 
Line 33: Line 33:
 
Now you need to download firmware for Bluetooth module and place it in /etc/firmware directory (note that download link may change in the future, you can find it in documentation section on [[VisionSOM-6ULL|VisionSOM-6ULL Wiki page]]:
 
Now you need to download firmware for Bluetooth module and place it in /etc/firmware directory (note that download link may change in the future, you can find it in documentation section on [[VisionSOM-6ULL|VisionSOM-6ULL Wiki page]]:
 
<pre>root@somlabs:~# cd ~
 
<pre>root@somlabs:~# cd ~
root@somlabs:~# wget http://somlabs.com/os_images/visionsom-6ull-bcmfirmware.tar.xz
+
root@somlabs:~# wget http://ftp.somlabs.com/visionsom-6ull-bcmfirmware.tar.xz
 
root@somlabs:~# tar xf visionsom-6ull-bcmfirmware.tar.xz
 
root@somlabs:~# tar xf visionsom-6ull-bcmfirmware.tar.xz
 
root@somlabs:~# cp -R ./lib/firmware /etc/
 
root@somlabs:~# cp -R ./lib/firmware /etc/

Latest revision as of 01:56, 5 July 2018

How to enable Murata Bluetooth on VisionSOM-6ULL


Configuring device tree to enable UART5 interface for Murata Bluetooth

Murata 1DX requires UART interface with RTS and CTS lines and one GPIO reset line for Bluetooth part. On VisionSOM-6ULL you should apply this configuration in the device tree (details on modifying device tree are available in How to customize Debian 9.2 device tree article):

...
                pinctrl_uart5: uart5grp {
                        fsl,pins = <
                                MX6UL_PAD_CSI_DATA00__UART5_DCE_TX      0x1b0b1
                                MX6UL_PAD_CSI_DATA01__UART5_DCE_RX      0x1b0b1
                                MX6UL_PAD_CSI_DATA02__UART5_DCE_RTS     0x1b0b1
                                MX6UL_PAD_CSI_DATA03__UART5_DCE_CTS     0x1b0b1
                        >;
                };

                pinctrl_bt: btgrp {
                        fsl,pins = <
                                MX6UL_PAD_CSI_MCLK__GPIO4_IO17          0x17059 /* BT reg enable */
                        >;
                };

...
...

&uart5 {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_uart5>;
        fsl,uart-has-rtscts;
        dma-names = "", "";
        status = "okay";
};
...

Downloading firmware

Now you need to download firmware for Bluetooth module and place it in /etc/firmware directory (note that download link may change in the future, you can find it in documentation section on VisionSOM-6ULL Wiki page:

root@somlabs:~# cd ~
root@somlabs:~# wget http://ftp.somlabs.com/visionsom-6ull-bcmfirmware.tar.xz
root@somlabs:~# tar xf visionsom-6ull-bcmfirmware.tar.xz
root@somlabs:~# cp -R ./lib/firmware /etc/
root@somlabs:~# rm -R ./lib

Enabling Bluetooth

To enable Bluetooth first you need to reset and attach the module:

root@somlabs:~# echo 113 > /sys/class/gpio/export
root@somlabs:~# echo out > /sys/class/gpio/gpio113/direction
root@somlabs:~# echo 0 > /sys/class/gpio/gpio113/value
root@somlabs:~# sleep 0.1
root@somlabs:~# echo 1 > /sys/class/gpio/gpio113/value
root@somlabs:~# hciattach /dev/ttymxc4 bcm43xx 3000000 flow -t 20
bcm43xx_init
Set Controller UART speed to 3000000 bit/s
Flash firmware /etc/firmware/1DX_BCM4343W/BCM43430A1.1DX.hcd
Set Controller UART speed to 3000000 bit/s
Device setup complete

Now you need to install rfkill tool and disable rfkill block for Bluetooth:

root@somlabs:~# apt install rfkill
Reading package lists... Done
Building dependency tree
...
...
Setting up rfkill (0.5-1+b1) ...
root@somlabs:~# rfkill list
0: phy0: Wireless LAN
        Soft blocked: yes
        Hard blocked: no
1: brcmfmac-wifi: Wireless LAN
        Soft blocked: yes
        Hard blocked: no
2: hci0: Bluetooth
        Soft blocked: yes
        Hard blocked: no
root@somlabs:~# rfkill unblock 2
root@somlabs:~# hciconfig hci0 up

Now we can check if Bluetooth works:

root@somlabs:~# hcitool dev
Devices:
        hci0    43:43:A1:12:1F:AC
root@somlabs:~# hcitool -i hci0 scan
Scanning ...
        XX:XX:XX:XX:XX:XX       iPhone (XX)
NXP Partner ST Partner