Raspberry Pi 3 Serial Console

This forum is for topics dealing with problems with software specifically in the ARMv7h repo.

Raspberry Pi 3 Serial Console

Postby ILMostro » Mon Jul 04, 2016 6:54 pm

I can't find an appropriate thread on this forum to address the apparent difference between the raspi2 and raspi3 serial console setup.

According to various sources, including elinux.org, the raspi3 has the Bluetooth console setup to "/dev/ttyAMA0". It is advised to change the cmdline.txt to remove that, as the "/dev/ttyS0" is used instead. However, I can't seem to figure out how to get this to work on alarm.

Removing the cmdline still only shows "/dev/ttyAMA0" as the available console.

$this->bbcode_second_pass_code('', '# cat /proc/tty/driver/ttyAMA
serinfo:1.0 driver revision:
0: uart:PL011 rev2 mmio:0x3F201000 irq:87 tx:2 rx:1 brk:1 CTS')

$this->bbcode_second_pass_code('', '# cat /proc/devices |grep tty
4 tty
5 /dev/tty
5 ttyprintk
204 ttyAMA')

$this->bbcode_second_pass_code('', '# cat /proc/cmdline
8250.nr_uarts=0 dma.dmachans=0x7f35 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2709.boardrev=0xa22082 bcm2709.serial=0x1e7298a4 smsc95xx.macaddr=B8:27:EB:72:98:A4 bcm2708_fb.fbswap=1 bcm2709.uart_clock=48000000 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000 root=/dev/mmcblk0p2 rw rootwait console=ttyS0,115200 console=tty1 selinux=0 plymouth.enable=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 elevator=noop')
ILMostro
 
Posts: 29
Joined: Tue Apr 22, 2014 8:07 am

Re: Raspberry Pi 3 Serial Console

Postby ILMostro » Mon Jul 04, 2016 9:40 pm

It seems that I've had to add the following line as well:

$this->bbcode_second_pass_code('', '# vim /boot/config.txt

enable_uart=1')
ILMostro
 
Posts: 29
Joined: Tue Apr 22, 2014 8:07 am

Re: Raspberry Pi 3 Serial Console

Postby cmsigler » Mon Jul 04, 2016 11:33 pm

Hi,

I tried to re-find some URLs that helped me set up my RPi3 to use the serial console from the header pins. I know I used the raspberrypi.org forum post below. Take a look at these, hopefully they are useful:

http://raspberrypi.stackexchange.com/qu ... pberry-pi3

http://spellfoundry.com/2016/05/29/conf ... ment-66323

https://www.raspberrypi.org/forums/view ... 3&t=138162

tl;dr: In /boot/cmdline.txt change ttyAMA0 to ttyS0 in both places. (I'm not sure if /dev/serial0 has been enabled or not.) You may or may not need to add core_freq=250 as well as enable_uart=1 to /boot/config.txt. HTH :)

Clemmitt
- Raspberry Pi 3
- Odroid-C2
- Raspberry Pi Zero
cmsigler
 
Posts: 37
Joined: Wed May 25, 2016 6:01 pm

Re: Raspberry Pi 3 Serial Console

Postby ILMostro » Tue Jul 05, 2016 6:14 am

Thanks for the help.

That's what I had done, as you can see from the first post. The only thing I had missed was the "enable_uart=1" part in "/boot/config.txt". The part about the frequency is not necessary. Another post also shows a way to "enable UART with maximum core frequency" by adding the following to config.txt:

$this->bbcode_second_pass_code('', 'force_turbo=1')

Once again, though, that's not mandatory to get the Serial console working.

To reiterate:
  • Edit /boot/cmdline.txt to replace "/dev/ttyAMA0" with "/dev/ttyS0"
  • Add a line to /boot/config.txt to enable UART "enable_uart=1"
ILMostro
 
Posts: 29
Joined: Tue Apr 22, 2014 8:07 am

Re: Raspberry Pi 3 Serial Console

Postby cmsigler » Tue Jul 05, 2016 12:46 pm

@ILMostro:

Glad it's working :) I read some posts saying core_freq=250 was no longer needed, glad to know that is indeed the case.

Anyone who's come here trying to solve a problem might want to go through this thread:

https://www.raspberrypi.org/forums/view ... p?t=138223

Also, read /boot/overlays/README and look for pi3-miniuart-bt and pi3-disable-bt. HTH.

Clemmitt
- Raspberry Pi 3
- Odroid-C2
- Raspberry Pi Zero
cmsigler
 
Posts: 37
Joined: Wed May 25, 2016 6:01 pm


Return to ARMv7h

Who is online

Users browsing this forum: No registered users and 10 guests