# Bluetooth support for Raspberry Pi Zero W

**URL:** <https://community.particle.io/t/bluetooth-support-for-raspberry-pi-zero-w/35595>\
**Category:** Raspberry Pi\
**Created:** [August 26, 2017, 12:40am UTC](https://community.particle.io/t/bluetooth-support-for-raspberry-pi-zero-w/35595 "2017-08-26T00:40:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![abramsh](https://avatars.discourse-cdn.com/v4/letter/a/7ea924/32.png) [@abramsh](https://community.particle.io/u/abramsh)\
**Post date:** [August 26, 2017, 12:40am UTC](https://community.particle.io/t/bluetooth-support-for-raspberry-pi-zero-w/35595/1 "2017-08-26T00:40:06Z")

</div>

Hi,

Please forgive me if this question is a bit incoherent, I’m a bit of an IoT/Particle/Raspberry Pi noob.

I’ve got my Raspberry Pi Zero W working well with Particle, including some i2c stuff. So far, so good.

Next, I want to port over some bluetooth code I had running in Python, but I was working at such a high abstraction in Python that I’m not sure if/how bluetooth might be supported via Particle.

In a nutshell, what I’d like to do is port this library, that supports controlling BLE outlet, over to particle: [https://github.com/bernieplug/plugable-btaps/blob/master/btaps/libbtaps.py](https://github.com/bernieplug/plugable-btaps/blob/master/btaps/libbtaps.py)

Suggestions on where I should start? Is there a low level bluetooth library already ported to particle that will work with my Raspberry Pi Zero W?

Thanks in advance for any pointers

---

<div class="post-metadata">

**Author:** ![abramsh](https://avatars.discourse-cdn.com/v4/letter/a/7ea924/32.png) [@abramsh](https://community.particle.io/u/abramsh)\
**Post date:** [August 29, 2017, 1:33am UTC](https://community.particle.io/t/bluetooth-support-for-raspberry-pi-zero-w/35595/2 "2017-08-29T01:33:53Z")

</div>

So, it appears the simple way to handle this is to create an rfcomm channel and then open it like a serial port. However, from what I’ve read and seen Serial1/2/3/4 doesn’t actually work on the Raspberry Pi. I also read that a work around would be to drop down to wiringSerial, but I can’t seem to include that from the web IDE.

Any suggestions?

---

<div class="post-metadata">

**Author:** ![abramsh](https://avatars.discourse-cdn.com/v4/letter/a/7ea924/32.png) [@abramsh](https://community.particle.io/u/abramsh)\
**Post date:** [September 2, 2017, 7:15pm UTC](https://community.particle.io/t/bluetooth-support-for-raspberry-pi-zero-w/35595/3 "2017-09-02T19:15:52Z")

</div>

For now, as a workaround, I’ve just hacked it further to directly open /dev/rfcomm ☹

---

<div class="post-metadata">

**Author:** ![superpanda](https://avatars.discourse-cdn.com/v4/letter/s/73ab20/32.png) [@superpanda](https://community.particle.io/u/superpanda)\
**Post date:** [February 27, 2018, 8:51pm UTC](https://community.particle.io/t/bluetooth-support-for-raspberry-pi-zero-w/35595/4 "2018-02-27T20:51:33Z")

</div>

> [@abramsh](#):
>
> or now, as a workaround, I’ve just hacked it further to directly

I'd be interested in seeing your hack. Can you share how you did this?

---

<div class="post-metadata">

**Author:** ![abramsh](https://avatars.discourse-cdn.com/v4/letter/a/7ea924/32.png) [@abramsh](https://community.particle.io/u/abramsh)\
**Post date:** [March 3, 2018, 12:55am UTC](https://community.particle.io/t/bluetooth-support-for-raspberry-pi-zero-w/35595/5 "2018-03-03T00:55:35Z")

</div>

> [@superpanda](#):
>
> I’d be interested in seeing your hack. Can you share how you did this?

I just googled on how to use rfcomm and then with some trial and error I made it work by just reading/writing to an rfcomm device. I no longer have the code, because in the end I decided to just ditch the bluetooth stuff - it was slow and not super reliable. Instead, I just use a relay wired directly to my pi.
