74
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 ...
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 ...
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....
14
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....
13
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 ...
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 ...
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.
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 ...
9
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 ...
8
votes
Binary garbage on the UART when powering the RPi
The Pi's UART has a fault (in the firmware). Whenever the port is opened there is a 30 µs low glitch on TXD.
See http://elinux.org/RPi_Serial_Connection#Unwanted_serial_garbage_input and search for ...
8
votes
Cronjob is set to run every 5 minutes but runs every minute
From man 5 crontab:
Step values can be used in conjunction with ranges. Following a range with "/<number>" specifies skips of the number's value through the
range. For example, "0-...
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 ...
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, ...
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+, ...
7
votes
Accepted
Colored console over serial connection?
The default bash prompt is set in a system wide file; for a complete explanation of how bash sources its configuration see INVOCATION near the top of man bash. In short, that system wide file is ...
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-...
6
votes
How to configure serial port settings of /dev/ttyAMA0?
To configure the UART ttyAMA0 for your application (like minicom)
pi@raspberrypi:~ $ lsb_release -a
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 8.0 (jessie)
Release: 8.0
...
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 ...
6
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/...
5
votes
Accepted
Serial vs I2C speed
There is no real comparison, these are designed for different purposes.
Serial communication is designed for long distance communication. I have used it over 1000km. There are often speed/distance ...
5
votes
Accepted
Is there a way to attach multiple serial port devices to a single raspberry pi?
You could:
utilize a couple of USB to serial adapters like this one.
you could use a microcontroller that has multiple serial ports (e.g. arduino mega) to gather the data and transfer it to the Pi, ...
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 ...
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.
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 ...
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 ...
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 ...
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. ...
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 -...
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 ...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
serial × 719uart × 143
python × 142
usb × 132
raspbian × 91
pi-3 × 86
arduino × 85
gpio × 83
bluetooth × 37
serial-console × 37
communication × 32
pi-4 × 27
pi-3b+ × 27
gps × 24
pi-2 × 22
pi-zero-w × 20
gsm × 19
sensor × 18
i2c × 16
hardware × 15
raspbian-jessie × 15
python-3 × 15
linux × 14
rfid × 14
pi-pico × 14