# ttyAMA0 fails with pHAT on RPi3

**URL:** <https://forums.pimoroni.com/t/ttyama0-fails-with-phat-on-rpi3/5012>\
**Category:** Raspberry Pi\
**Created:** [June 10, 2017, 5:32pm UTC](https://forums.pimoroni.com/t/ttyama0-fails-with-phat-on-rpi3/5012 "2017-06-10T17:32:42Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![lucidman](https://avatars.discourse-cdn.com/v4/letter/l/34f0e0/32.png) [@lucidman](https://forums.pimoroni.com/u/lucidman)\
**Post date:** [June 10, 2017, 5:32pm UTC](https://forums.pimoroni.com/t/ttyama0-fails-with-phat-on-rpi3/5012/1 "2017-06-10T17:32:42Z")

</div>

Newly installed Propeller HAT on Raspberry Pi 3 fails the following command:

sudo propman Your-first-SPIN-program.binary

… with the following response:

pm.device: Failed to open device: "ttyAMA0"  
pm.device: Failed to open device: "ttyAMA0"  
pm.device: Failed to open device: "ttyAMA0"  
pm.device: Failed to open device: "ttyAMA0"  
pm.device: Failed to open device: "ttyAMA0"  
pm.loader: [ttyAMA0] EROR: DEvice not open

I followed the instructions to ensure that ttyAMA0 is enabled more than once with no success.  
I had first performed a lengthy update to my Jessie Pi OS, then followed the instruction to install the IDE.  
Openspin failed at first, until I changes its owner and group to ‘pi’.  
But uploads to the hat always fail with the above message.  
Any suggestions are welcome.

---

<div class="post-metadata">

**Author:** ![gadgetoid](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/gadgetoid/32/13_2.png) [@gadgetoid](https://forums.pimoroni.com/u/gadgetoid)\
**Post date:** [June 10, 2017, 5:53pm UTC](https://forums.pimoroni.com/t/ttyama0-fails-with-phat-on-rpi3/5012/2 "2017-06-10T17:53:39Z")

</div>

The Pi 3 wreaks havoc on the UART setup by giving the hardware over to Bluetooth and using, iirc, a software alternative to serve the ttyAMA0 pins. This mucks with the precise timings that the Propeller chip relies upon. You need to add `dtoverlay=pi3-disable-bt` or `dtoverlay=pi3-miniuart-bt` to `/boot/config.txt`

See here for details on what those do: [https://github.com/raspberrypi/firmware/blob/master/boot/overlays/README#L957-L982](https://github.com/raspberrypi/firmware/blob/master/boot/overlays/README#L957-L982)

---

<div class="post-metadata">

**Author:** ![lucidman](https://avatars.discourse-cdn.com/v4/letter/l/34f0e0/32.png) [@lucidman](https://forums.pimoroni.com/u/lucidman)\
**Post date:** [June 10, 2017, 7:02pm UTC](https://forums.pimoroni.com/t/ttyama0-fails-with-phat-on-rpi3/5012/3 "2017-06-10T19:02:22Z")

</div>

gadgetoid,

Thanks for you quick response.  
I applied ‘dtoverlay=pi3-disable-bt’, rebooted, but no success. I get the same response as before. I searched for startup messages in /var/log/syslog, and found no hint of an error related the overlay change. I also applied ‘sudo systemctl disable hciuart’ before reboot per the info text.

---

<div class="post-metadata">

**Author:** ![lucidman](https://avatars.discourse-cdn.com/v4/letter/l/34f0e0/32.png) [@lucidman](https://forums.pimoroni.com/u/lucidman)\
**Post date:** [June 10, 2017, 7:46pm UTC](https://forums.pimoroni.com/t/ttyama0-fails-with-phat-on-rpi3/5012/4 "2017-06-10T19:46:00Z")

</div>

gadgetoid,

My suspicion is that if I place ‘dtoverlay=pi3-disable-bt’ in /boot/config.txt I must also possess a file named ‘pi3-disable-bt-overlay.dtb’ in /boot/overlays. Am I right? If so, where do I get that file?

---

<div class="post-metadata">

**Author:** ![gadgetoid](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/gadgetoid/32/13_2.png) [@gadgetoid](https://forums.pimoroni.com/u/gadgetoid)\
**Post date:** [June 10, 2017, 8:24pm UTC](https://forums.pimoroni.com/t/ttyama0-fails-with-phat-on-rpi3/5012/5 "2017-06-10T20:24:10Z")

</div>

It should just be named `pi3-disable-bt.dtbo` and you can find it here: [https://github.com/raspberrypi/firmware/tree/master/boot/overlays](https://github.com/raspberrypi/firmware/tree/master/boot/overlays)

It _should_ be there as standard in a Raspbian Jessie image.

---

<div class="post-metadata">

**Author:** ![lucidman](https://avatars.discourse-cdn.com/v4/letter/l/34f0e0/32.png) [@lucidman](https://forums.pimoroni.com/u/lucidman)\
**Post date:** [June 10, 2017, 8:30pm UTC](https://forums.pimoroni.com/t/ttyama0-fails-with-phat-on-rpi3/5012/6 "2017-06-10T20:30:13Z")

</div>

Success!  
I didn’t have the latest Raspian distribution. I do now.

Thanks!

---

<div class="post-metadata">

**Author:** ![PiguyAnge](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/piguyange/32/11560_2.png) [@PiguyAnge](https://forums.pimoroni.com/u/PiguyAnge)\
**Post date:** [June 25, 2017, 11:30pm UTC](https://forums.pimoroni.com/t/ttyama0-fails-with-phat-on-rpi3/5012/7 "2017-06-25T23:30:26Z")

</div>

Is this also an issue with the Pi Zero ‘W’ as well?

---

<div class="post-metadata">

**Author:** ![gadgetoid](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/gadgetoid/32/13_2.png) [@gadgetoid](https://forums.pimoroni.com/u/gadgetoid)\
**Post date:** [June 26, 2017, 9:12am UTC](https://forums.pimoroni.com/t/ttyama0-fails-with-phat-on-rpi3/5012/8 "2017-06-26T09:12:40Z")

</div>

Yes, I believe it is.
