Skip to main content
73 votes
Accepted

How do I make serial work on the Raspberry Pi3 (PiZeroW, Pi4 or later models)

This answer is still correct, and explains in more detail the nature of the changes, but most users of current Raspbian should just run sudo raspi-config Select Interfacing Options / Serial then ...
Milliways's user avatar
  • 60.4k
21 votes

How do I make serial work on the Raspberry Pi3 (PiZeroW, Pi4 or later models)

finally this got work for my pi3 (os: debian jessie) please follow these 6 steps carefully. Step 1 - Install Raspbian Jessie onto a SD card and boot the Pi when connected to a network Login via ...
naseer mohammad's user avatar
18 votes

What is /dev/ttyAMA0

@Milliways had the best answer in my opinion. His answer can be found here: Link given here ttyAMA0 can be the Tx, Rx pins for the Raspberry. But for the Raspberry Pi 3b it was used for the Bluetooth....
Rayaarito's user avatar
  • 331
17 votes
Accepted

Why my program won't communicate through ttyAMA0 on Raspbian (Jessie)?

Ensure terminal over serial is disabled in raspi-config Run sudo raspi-config and in "Advanced" choose "Serial" (Enable/Disable shell and kernel messages on the serial connection) and disable it....
mvmn's user avatar
  • 286
15 votes

How do I make serial work on the Raspberry Pi3 (PiZeroW, Pi4 or later models)

Raspberry Pi4 UART The BCM2711 used in the Raspberry Pi 4 Model B, the Raspberry Pi 400, and the Raspberry Pi Compute Module 4 has 4 additional UART (uart2-uart5) in addition to uart0/1 on the older ...
Milliways's user avatar
  • 60.4k
11 votes

How do I make serial work on the Raspberry Pi3 (PiZeroW, Pi4 or later models)

Naseer's answer is correct but a bit elaborate if you just flashed the latest rasbian. All I needed to do, is just to add the following line to my config.txt (from e.g. windows where you plug in the ...
Arnout's user avatar
  • 211
11 votes
Accepted

Bit waveform clarification

To me it looks like ser.write(1) has an implicit conversion to string. So your 1 becomes a "1" which is 00110001, which perfectly fits into your observation.
kwasmich's user avatar
  • 2,702
10 votes

Python serial permission issue

@LiWi's answer will work temporarily, but the permission change will be lost once the device is removed or the server rebooted. A permanent solution is to add your user to the dialout group, which ...
Cerin's user avatar
  • 2,261
10 votes
Accepted

python serial.Serial() module not found error

First uninstall serial with sudo pip uninstall serial (thank you so much Ali!) Then, if import serial does not work anymore: use sudo pip install pyserial. This will install the correct serial module ...
BaxMode's user avatar
  • 116
8 votes
Accepted

Reliable method to differentiate a Raspberry Pi 2 and 3?

cat /proc/cpuinfo | grep Revision RPi 2 boards will show board revisions a*1040, a*1041 or a*2042, while an RPi 3 board will give you a*2082. Here's a list of board revisions. See also: Getting Your ...
Dmitry Grigoryev's user avatar
8 votes
Accepted

RS232 to Raspberry Pi Zero W

Given the significant differences in the voltage levels it is not safe to directly connect any RS232 signal lines to the Pi's GPIO. Even if the voltage of some RS232 drivers might be as low as 3 V, ...
Ghanima's user avatar
  • 15.9k
8 votes

How many serial ports are on the Pi 3?

The Pi has 2 serial ports, but only 1 is accessible - the other is connected to Bluetooth. (It is possible to switch ports in Device Tree.) See How do I make serial work on the Raspberry Pi3 , Pi3B+, ...
Milliways's user avatar
  • 60.4k
7 votes

How can Rpi read ADS1256 ADC Data

Any answer might only be of limited help to you as long as you have not understood how SPI actually works, so you should take a detailed look at this interface. Concerning question 1: SPI is a master-...
Sim Son's user avatar
  • 681
7 votes

RPi4 Serial port not working on either Raspberry OS or Ubuntu

Here's some things I needed to do specifically to connect to a device like the Roboclaw. I got this to work on Ubuntu20.04, Ubuntu18.04 and raspberry pi OS (raspbian) add enable_uart=1 to /boot/...
achille's user avatar
  • 171
6 votes
Accepted

Serial output in case of no OS

is there a possibility to read information trough the serial device even if there is no boot device? Yes! It is possible since Raspberry Pi 4B. The RPi 4B comes with an EEPROM containing the boot ...
Ingo's user avatar
  • 42.2k
5 votes
Accepted

Garbage on Raspberry Pi console

Acording to this question, to use UART on the Pi-3 you will need to disable bluetooth.
Patrick Cook's user avatar
  • 6,365
5 votes

Colored console over serial connection?

I read Walter's answer here and researched more and found: https://kb.iu.edu/d/acpy which indicated: TERM=ansi; export TERM does the job, you can add it to your .bashrc However, I still have grey ...
Robert's user avatar
  • 51
5 votes

Raspbian Wheezy, Raspberry Pi 3 and HC05

Wheezy will support the Pi-3 if it's firmware is first fully updated in an older pi with: sudo apt-get update && sudo apt-get upgrade then remove the SD card and put it in a Pi-3 and it will ...
Mike Redrobe's user avatar
5 votes
Accepted

Raspberry Pi as Wiegand device - output Wiegand to receiver

Wiegand is quite straightforward. It is not a particularly onerous interface. For an example of transmitting Wiegand codes see http://abyz.me.uk/rpi/pigpio/examples.html#pdif2_tx_WD /* This ...
joan's user avatar
  • 71.2k
5 votes

Receiving data over USB to GPIO

You can not implement a USB bus using the Pi GPIO. The transfer speeds are far too high, you simply wouldn't be able to talk the USB protocol in software without hardware support. Why not ...
joan's user avatar
  • 71.2k
5 votes
Accepted

Receiving data over USB to GPIO

You can make the Pi act as a USB gadget and impersonate a USB device. Adafruit has a tutorial on how to do that -- or you can just keep reading for a summary. Plug the SD card into another computer. ...
anonymoose's user avatar
5 votes

Connect multiple SPI e-paper devices to a single Pi

This topic seems to be a bit more confusing than it should be. (I'm researching the same question myself, and this page came up first in my searches). First, a little background on the SPI protocol -...
Digicrat's user avatar
  • 151
5 votes

How can Rpi read ADS1256 ADC Data

In addition to the other answer about the SPI protocol I notice that the product page you linked to shows that, as well as the SPI CS pin on GPIO 15 (BCM22), the ADS1256 ADC has a "Data Ready" pin ...
Roger Jones's user avatar
  • 1,484
5 votes

How do I use a Raspberry Pi to install OpenWrt firmware on a BT HomeHub 5a or PlusNet Hub One router

Note I am deliberately answering my own question There are lots of detailed guides out there; this is an overview of the key points particularly with respect to using a Raspberry Pi as the host. Take ...
nickcrabtree's user avatar
4 votes
Accepted

Serial Port on Raspberry Pi 3 ttys0

Its because in RPI3 ttyS0 is disabled by default. enable the ttyS0 in file sudo nano /boot/config.txt and at the bottom of file change 0 to 1 to enable ttyS0 enable_uart=1 and reboot. I followed ...
Anushree M's user avatar
4 votes
Accepted

Why doesn't IPv6 over SLIP work?

The short answer is that it can't work using slattach and standard SLIP, but there is a way to do what you want. Why it doesn't work It might seem as though Linux would classify IPv4 or IPv6 packets ...
Edward's user avatar
  • 961
4 votes

communicate with arduino over serial

You need to do a few things before being able to use /dev/ttyAMA0 Add your user (that will use ttyAMA0) to the dialout group: sudo usermod -a -G dialout pi (pi is the user here) Disable linux ...
deacs's user avatar
  • 161
4 votes
Accepted

Compute module 3 ttyAMA0

you can add dtparam=uart0=on to config.txt https://www.raspberrypi.org/forums/viewtopic.php?t=141248&p=1100536
mperlet's user avatar
  • 66
4 votes
Accepted

Send data from Python to Arduino through serial port

I do this all the time. Two-way communications works just fine. Yes I keep my ports open continuously. UNLESS I am running the IDE. The IDE requires that I not have any other programs trying to ...
SDsolar's user avatar
  • 2,358
4 votes
Accepted

Can not use PL2303 USB to Serial with Pi B+

I suggest you start with a clean reboot and a loopback test: that will eliminate any glitches or a mismatch in settings you may have. If that doesn't work, there's a problem with your hardware. ...
Dmitry Grigoryev's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible