# 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:** 1\
**Showing post:** 3

<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.

---

_[View the full topic](https://hub.mender.io/t/bluetooth-on-technexion-pico-pi-imx7/937)._
