Using UART

Having issues with your DietPi installation, or, found a bug? Post it here.
User avatar
MichaIng
Site Admin
Posts: 1882
Joined: Sat Nov 18, 2017 5:21 pm

Re: Using UART

Post by MichaIng » Wed Oct 23, 2019 6:16 pm

@jhorv
Sorry for missing reply.

Instead of making the tty world-writeable, please add the nodered user to the tty group: usermod -aG tty nodered

Instead of only disabling Bluetooth, might might be required to switch Bluetooth serial device usage by adding dtoverlay=miniuart-bt to /DietPi/config.txt. AFAIK otherwise ttyAMA0 does not listen to the GPIO ports.
EDIT: Ah nope, disable-bt should be sufficient to allow ttyAMA0 listening to GPIO ports.

jhorv
Posts: 9
Joined: Thu May 02, 2019 8:03 pm

Re: Using UART

Post by jhorv » Sun Nov 10, 2019 9:53 am

Many thanks for the hint, better late than never. :D

I had been thinking of adding chmod a+rw /dev/ttyS0 to the /etc/rc.local file but that's absolutely not secure and your suggestion is obviously the best way to do it.

Meanwhile, after I updated DietPi from v6.25.3 to v6.26.3 I have been able to now access ttyAMA0 through node-red and python. Bluetooth is still disabled but since I don't use it (yet) that's not much of a concern for the time being.

Thanks again!

Post Reply