1

I have an RaspberryPI 3+ with Debian installed on it. I'am trying to connect a serial device (Raspbee) via the GPIO pins like this. Under Raspbian this worked by enabling UART in raspi-config after which I could talk to the device via /dev/ttyAMA0.

How can I do this on Debian? There is of course no raspi-config on stock Debian and I doesn't get any communication out of /dev/ttyAMA0.

xeetsh
  • 11
  • 1
  • 2

2 Answers2

1

raspi-config is just a shell script with minimal dependencies. Grab a copy from here:

https://github.com/RPi-Distro/raspi-config/blob/master/raspi-config

For most things including this it should work fine as Raspbian is in fact nearly identical to Debian. There may be a few thing that require the userland tools but this is not one of them.

All it appears to to do is add enable_uart=1 to /boot/config.txt, and, if you want the serial line console disabled (you probably do if you want to do anything other than login or observe system messages over UART), it removes console=serial0 or console=ttyAMA0 /boot/cmdline.txt. The best bet is to change that to console=tty1, which will put system messages on a virtual console (the one you see on the screen if you boot without a GUI).

The official config.txt documentation regarding the UART is here: https://github.com/raspberrypi/documentation/blob/master/configuration/uart.md

goldilocks
  • 60,325
  • 17
  • 117
  • 234
0

First, I suggest you use /dev/serial0 (which is /dev/ttyS0 on the Pi3) /dev/ttyAMA0 is connected to Bluetooth.

I haven't used Debian on a Pi, but assume it is using Device Tree and has the standard devices and uses udev to map serial ports.

NOTE to use a Pi you MUST use "non-free software" just to boot.

The following link explains serial, and manual processes to enable it. How do I make serial work on the Raspberry Pi3 or later

Milliways
  • 62,573
  • 32
  • 113
  • 225