RPi-Serial

 view release on metacpan or  search on metacpan

lib/RPi/Serial.pm  view on Meta::CPAN


=head2 Raspberry Pi 3 / 4 (and Zero W)

The on-board Bluetooth modem is wired to the primary PL011 UART, leaving GPIO
14/15 on the inferior, baud-unstable mini-UART (C</dev/ttyS0>). To move the good
UART onto the header pins you must disable Bluetooth. Edit
C</boot/firmware/config.txt> (C</boot/config.txt> on releases before Bookworm)
and add:

    enable_uart=1
    dtoverlay=disable-bt

With that overlay the header serial port becomes C</dev/ttyAMA0>.

=head2 Raspberry Pi 5

Bluetooth has its B<own dedicated UART> and is B<not> shared with the GPIO 14/15
pins, so there is nothing to disable. Just enable the header UART in
C</boot/firmware/config.txt>:

    enable_uart=1

The header serial port is C</dev/ttyAMA0>. (Note that on the Pi 5



( run in 1.012 second using v1.01-cache-2.11-cpan-600a1bdf6e4 )