# Bluetooth on Technexion PICO-PI-IMX7

**URL:** <https://hub.mender.io/t/bluetooth-on-technexion-pico-pi-imx7/937>\
**Category:** General Discussions\
**Created:** [May 5, 2019, 11:28pm UTC](https://hub.mender.io/t/bluetooth-on-technexion-pico-pi-imx7/937 "2019-05-05T23:28:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![yannickadam](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/yannickadam/32/217_2.png) [@yannickadam](https://hub.mender.io/u/yannickadam)\
**Post date:** [May 5, 2019, 11:28pm UTC](https://hub.mender.io/t/bluetooth-on-technexion-pico-pi-imx7/937/1 "2019-05-05T23:28:42Z")

</div>

@jorisoffouga Thanks for this board integration!

Has anyone managed to get Bluetooth working?

---

<div class="post-metadata">

**Author:** ![jorisoffouga](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/jorisoffouga/32/64_2.png) [@jorisoffouga](https://hub.mender.io/u/jorisoffouga)\
**Post date:** [May 5, 2019, 11:46pm UTC](https://hub.mender.io/t/bluetooth-on-technexion-pico-pi-imx7/937/2 "2019-05-05T23:46:13Z")

</div>

It’s a pleasure.

No sorry. It does not seem like. I searched for a moment and I did not find a solution

---

<div class="post-metadata">

**Author:** ![yannickadam](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/yannickadam/32/217_2.png) [@yannickadam](https://hub.mender.io/u/yannickadam)\
**Post date:** [May 8, 2019, 9:58pm UTC](https://hub.mender.io/t/bluetooth-on-technexion-pico-pi-imx7/937/3 "2019-05-08T21:58:02Z")

</div>

If it can help anyone, I (finally) found how to enable Bluetooth.

You need to enable/reset the bluetooth controller using GPIO:

```bash
echo 114 > /sys/class/gpio/export
echo "out" > /sys/class/gpio/gpio114/direction
cd /sys/class/gpio/gpio114
echo 1 > value && sleep 1 && echo 0 > value && echo 1 > value

```

There is probably a better way to do this, through rfkill, but I didn’t know anything about kernels and yocto a few weeks ago - so still learning.

Then,

```bash
btattach -B /dev/ttymxc6 -P bcm &

```

Make sure you have the proper firmware in /lib/firmware/brcm. I googled for one.

Finally,

```auto
root@imx7d-pico:~# bluetoothctl
Agent registered
[bluetooth]# list
Controller 43:39:00:00:1F:AC imx7d-pico [default]
[bluetooth]# power on
Changing power on succeeded
[bluetooth]# scan on
Discovery started
[CHG] Controller 43:39:00:00:1F:AC Discovering: yes
[NEW] Device 2A:7D:FA:A8:54:90 2A-7D-FA-A8-54-90
[NEW] Device 07:D4:40:21:35:35 07-D4-40-21-35-35

```

Also, if it is of interest to others:

- You can enable the second processor on mainline kernel by changing the u-boot config like below. I do not know what is the implication of running in hypervisor mode though.

```auto
-CONFIG_ARMV7_BOOT_SEC_DEFAULT=y
+CONFIG_ARMV7_NONSEC=y

```

[0.005302] CPU: Testing write buffer coherency: ok  
[0.006409] CPU0: update cpu\_capacity 1024  
[0.006443] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000  
[0.008759] Setting up static identity map for 0x80100000 - 0x80100078  
[0.009313] rcu: Hierarchical SRCU implementation.  
[0.011685] smp: Bringing up secondary CPUs …  
[0.014196] CPU1: update cpu\_capacity 1024  
[0.014210] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001  
[0.015044] smp: Brought up 1 node, 2 CPUs  
[0.015098] SMP: Total of 2 processors activated (96.00 BogoMIPS).  
[0.015125] CPU: All CPU(s) started in HYP mode.  
[0.015150] CPU: Virtualization extensions available.

I also changed the .DTSI file to have both CS for SPI, and also SPIDEV listed in /dev/.  
And I believe I now have all the functionnality I had with Android Things, with more flexibility.

---

<div class="post-metadata">

**Author:** ![jorisoffouga](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/jorisoffouga/32/64_2.png) [@jorisoffouga](https://hub.mender.io/u/jorisoffouga)\
**Post date:** [May 9, 2019, 5:27pm UTC](https://hub.mender.io/t/bluetooth-on-technexion-pico-pi-imx7/937/4 "2019-05-09T17:27:04Z")

</div>

Thanks for sharing, can you provide the firmware to put in / lib / firmware / brcm?

---

<div class="post-metadata">

**Author:** ![yannickadam](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/yannickadam/32/217_2.png) [@yannickadam](https://hub.mender.io/u/yannickadam)\
**Post date:** [May 9, 2019, 6:15pm UTC](https://hub.mender.io/t/bluetooth-on-technexion-pico-pi-imx7/937/5 "2019-05-09T18:15:53Z")

</div>

I believe I used this one:  
[https://github.com/rockchip-linux/rkwifibt/blob/master/firmware/broadcom/all/BT\_FIRMWARE/bcm4339a0.hcd](https://github.com/rockchip-linux/rkwifibt/blob/master/firmware/broadcom/all/BT_FIRMWARE/bcm4339a0.hcd)  
And renamed it to BCM4335C0.hcd

Also - I think this file would solve the workaround with the GPIOs:

> <https://github.com/TechNexion/linux/blob/tn-imx_4.9.88_2.0.0_ga-test/net/rfkill/rfkill-bcm43xx.c>

  
Lines 55-58 are doing pretty much the same thing.
