0

I was following this tutorial: http://webiopi.trouch.com/Tutorial_Serial.html so I can make serial communication using the On-board serial UART

I couldn't find the file /etc/inittab, I skipped that step because I read that this file doesn't exist in Jessie.

Then I edited /boot/cmdline.txt and it says that I need to remove references to ttyAMA0.

This is what I find in that file:

dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=/dev/mmcblk0p7 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait

Should I erase the serial0? I got really confused by this and I'm not sure what to do.

goldilocks
  • 58,859
  • 17
  • 112
  • 227
Luz A
  • 57
  • 3
  • 15

1 Answers1

0

Firstly you should NOT edit /boot/cmdline.txt but make changes in raspi-config.

If you don't want to use the serial console you can remove it by either means.

You don't say which model Pi you are using. The Pi3 uses /dev/ttyAMA0 for Bluetooth and swaps the miniUART to the serial pins.

You can use /dev/ttyAMA0 on an older Pi or /dev/ttyS0 on Pi3. In the latest software there should be a /dev/serial0 which selects the appropriate device.

There appears to be some problems on the Pi3 with varying baudrate.

I modified the /boot/config.txt by adding the following line at the end:-

core_freq=250
Milliways
  • 59,890
  • 31
  • 101
  • 209
  • I am using the Pi 2 and the last version of Raspbian Jessie. If I am not supposed to change that file, why this tutorial tells me to do so? I should skip that step as well? – Luz A Apr 11 '16 at 02:01
  • @LuzA I assume by "this tutorial" you mean that in your question. That refers to an older version of Raspbian using SysV and is obsolete. I have never used webIOP so can't comment on the other content. To disable console use raspi-config to make changes. If you want background see How-do-i-make-serial-work-on-the-raspberry-pi3 – Milliways Apr 11 '16 at 02:14
  • To achieve the serial communication in this new version of Raspbian, I need to disable console and add core_freq=250 to the config file, right? and leave alone the cmdline.txt – Luz A Apr 11 '16 at 02:36
  • @LuzA Run sudo raspi-config select Advanced Options then A8 Serial That is ALL you need to do to disable console. The core_freq is for Pi3 (but wouldn't hurt). – Milliways Apr 11 '16 at 03:00
  • This worked!! thank you, I just marked your answer as correct. – Luz A Apr 16 '16 at 15:43