Support Forum

Share your projects and post your questions

Register   or   Sign In
The Forum

Pi Zero woes

The Serial Pi Plus and Serial Pi Zeroare a RS232 Serial Port for the Raspberry Pi

17/07/2016

Posted by:
StotfoldSteve

StotfoldSteve Avatar

I am having difficulties with a Serial Pi module in my Pi Zero running jessie. When I "dmesg | grep tty" it tells me that I have a port called "tty1", but when I try to access this with minicom or cutecom I cannot access the port. I have check that shell and kernel messages are off (through raspi-config->advanced->Serial) but no joy. Any suggestions. TIA.

17/07/2016

Posted by:
andrew

andrew Avatar

The UART serial port on the Raspberry Pi should be listed in Raspian Jessie as ttyAMA0. The serial port on the Raspberry Pi is configured as default for console input/output. To use it with minicom you will have to disable the console support and reconfigure it as a standard serial port.

We have a Raspberry Pi Serial Port tutorial in our knowledge base that should help you with setting up the serial port.

17/07/2016

Posted by:
StotfoldSteve

StotfoldSteve Avatar

Andrew, many thanks for that. I have followed your tutorial, but I don't seem to have an "innittab" file in my /etc folder. I'm using a PiZero V1.3, Jessie V4.4.13+. In my /dev folder I have tty, tty0, then tty1 to tty63, and ttyprintk. No reference to ttyAMA0.

17/07/2016

Posted by:
andrew

andrew Avatar

Are you using one of the new version 1.3 pi zeros or one of the original models? The installation instructions may have changed since we wrote the tutorial so tomorrow I will try setting up a fresh install of Jessie on a Pi Zero and find out why it is not working.

18/07/2016

Posted by:
StotfoldSteve

StotfoldSteve Avatar

It's a V1.3 with camera connector.

18/07/2016

Posted by:
andrew

andrew Avatar

I have tried setting up a new install of Raspbian Jessie on the V1.3 Raspberry Pi Zero and managed to get the serial port working. On a fresh install of Jessie, the serial port is configured as a terminal console so you can use the Serial Pi Plus to access the Linux terminal and configure the Raspberry Pi. To change the default mode to a normal serial port I had to edit /boot/cmdline.txt and remove the reference to serial1. It looks like in the latest version of Raspbian they have changed the name of the serial port in cmdline.txt from ttyAMA0 to serial1 but if you change the contents of cmdline.txt to be the following it should disable the console support for the serial port.

dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait

You will need to reboot for this to work.

After rebooting I checked the contents of the /dev folder and there was a reference to ttyAMA0 as shown in the screenshot below.

forum image

I could access the serial port with minicom using the following command.

minicom -b 115200 -o -D /dev/ttyAMA0

Hopefully, if you update the cmdline.txt file your serial port should begin working properly.

18/07/2016

Posted by:
StotfoldSteve

StotfoldSteve Avatar

Thanks Andrew. IT WORKS.It took two attempts, as at first I disabled the serial SSH port using raspi-config but this might be the cause of the removal of ttyAMA0 in \dev. Re-flashing the SD card, and not changing the SSH in config, I just edited the file as per your notes.For anyone else having this problem, my original cmdline.txt was...dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait...which I changed to...dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwaitUsing minicom -b 9600 -o -D /dev/ttyAMA0 worked (maybe it would work with /dev/tty1 as well?).I've also managed to use these port settings to communicate succesfully to a Pi-Lite LOL board.Thanks once again for your help.Steve

Sign in to post your reply


Note: documents in Portable Document Format (PDF) require Adobe Acrobat Reader 5.0 or higher to view.
Download Adobe Acrobat Reader or other PDF reading software for your computer or mobile device.

Home

Shop

Learn

Forum

FAQ

Contact

0 item

Your cart is empty

Please browse our shop to order from the wide range of Raspberry Pi boards and accessories.

Subtotal:£0.00
View Basket Continue to Checkout