Timmiej93
Posts: 17
Joined: Tue May 26, 2015 6:22 pm
Location: The Netherlands

Can't get access to ttyAMA0 for my Razberry

Wed Jul 13, 2016 9:19 am

First off: I'm not sure if this is the right place to ask this question, if not, please redirect me.

So I had to do an unforeseen complete re-install of my RPi, since it stopped working out of the blue, and I don't have enough knowledge to fix something like that.
Now I'm trying to get Domoticz back up and running, for which I want to use a Razberry. The issue comes in linking ttyAMA0 to ttyUSB20 (or anything else for that matter).
I followed this guide, which I remember using the last time I set up my RPi.
The issue is, that I can't seem to access ttyAMA0. I've looked in the /dev folder, and it's just not there, so when I try to link it to any ttyUSBx, it just won't do anything that works.
Why can't I see/access ttyAMA0? I know I had issues with this part the last time I did this, but I don't remember how I fixed this.

User avatar
B.Goode
Posts: 10356
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Can't get access to ttyAMA0 for my Razberry

Wed Jul 13, 2016 9:32 am

So that people can provide appropriate focussed advice, can you confirm that you have installed the 'domoticz' Raspberry Pi SD card image as the Operating System for your RPi?

(Because that OS might possibly handle devices in a different way to other 'mainstream' Operating Systems, and advice will need to take that into account.)

Timmiej93
Posts: 17
Joined: Tue May 26, 2015 6:22 pm
Location: The Netherlands

Re: Can't get access to ttyAMA0 for my Razberry

Wed Jul 13, 2016 12:35 pm

I have not installed the pre-done domoticz image. I installed Raspbian via Noobs installer, and installed Domoticz by following this guide. This is the same way as I did this a few months back.

User avatar
B.Goode
Posts: 10356
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Can't get access to ttyAMA0 for my Razberry

Thu Jul 14, 2016 8:40 am

The current release of Raspbian Jessie does not use /dev/ttyAMA0 as the device for the built-in serial port.

That may be a change from the previous system you installed.

Timmiej93
Posts: 17
Joined: Tue May 26, 2015 6:22 pm
Location: The Netherlands

Re: Can't get access to ttyAMA0 for my Razberry

Thu Jul 14, 2016 8:52 am

That would indeed probably be it, since I was running quite an outdated version before (1.4.x I believe). What should I do to fix this in the latest version (1.9.x)?

---------------------

So after some searching I found some info online.

Apparently, in Raspbian Jessie 1.9.x (and up probably), the GPIO serial port has been disabled by default. I found this guide, which basically describes nothing more then the following:
  • Edit the config.txt file:

Code: Select all

sudo nano /boot/config.txt
  • Add or change the following line (also make sure it's not commented out):

Code: Select all

enable_uart=1
And that's basically it. Make sure to save and reboot, and you should have access to ttyAMA0 again. Be aware: on the RPi2, ttyAMA0 is the GPIO serial port. On the RPi 3, ttyAMA0 is bluetooth (port?), and ttySO is the GPIO serial port.

Return to “Troubleshooting”