# Error 516:Unable to write:Broken pipe (Bluetooth)(Arduino)(MIT App Inventor)

**URL:** <https://forum.arduino.cc/t/error-516-unable-to-write-broken-pipe-bluetooth-arduino-mit-app-inventor/681428>\
**Category:** Programming\
**Created:** [November 4, 2020, 5:56pm UTC](https://forum.arduino.cc/t/error-516-unable-to-write-broken-pipe-bluetooth-arduino-mit-app-inventor/681428 "2020-11-04T17:56:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rohith0607](https://avatars.discourse-cdn.com/v4/letter/r/b9e5f3/32.png) [@rohith0607](https://forum.arduino.cc/u/rohith0607)\
**Post date:** [November 4, 2020, 5:56pm UTC](https://forum.arduino.cc/t/error-516-unable-to-write-broken-pipe-bluetooth-arduino-mit-app-inventor/681428/1 "2020-11-04T17:56:58Z")

</div>

I was trying to make this Arduino project where I would control a robotic arm using an app made with MIT App inventor via Bluetooth. I referred to the website- [https://howtomechatronics.com/tutorials/arduino/diy-arduino-robot-arm-with-smartphone-control/](https://howtomechatronics.com/tutorials/arduino/diy-arduino-robot-arm-with-smartphone-control/) (blocks, and source code is there in the website)

The circuit, code all looks fine to me. The app consists of a slider controller, I move the robot arm based on the movement of slider controller.  
The PROBLEM is that when I move the slider controller, the app crashes that is, it freezes and gives the following error- "Error 516:Unable to write:Broken pipe". I have observed that the bluetooth module(HC-05) I'm using starts disconnecting everytime I connect it, hence "broken pipe".

So, I would like to know is there any solution to fix it, if yes then please let me know it.

Thank You!

---

<div class="post-metadata">

**Author:** ![HillmanImp](https://avatars.discourse-cdn.com/v4/letter/h/9d8465/32.png) [@HillmanImp](https://forum.arduino.cc/u/HillmanImp)\
**Post date:** [November 5, 2020, 9:08am UTC](https://forum.arduino.cc/t/error-516-unable-to-write-broken-pipe-bluetooth-arduino-mit-app-inventor/681428/2 "2020-11-05T09:08:29Z")

</div>

Hi.  
It looks like something is causing the phone to disconnect from the HC-05. See what error you get if you remove power from the HC-05. There's also Error 515: Bluetooth not connected.

Check all the blocks in your app that call on Bluetooth client. Are you using the disconnect block anywhere?

A Bluetooth serial terminal app would be helpful. Do you have one installed on the phone?

John.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [May 6, 2021, 12:50am UTC](https://forum.arduino.cc/t/error-516-unable-to-write-broken-pipe-bluetooth-arduino-mit-app-inventor/681428/3 "2021-05-06T00:50:05Z")

</div>

Closed on May 6, 2021, 12:50am UTC


