I am developping a snap software which needs to communicate with another board through an RS232 interface.
I tried using ttyS0 (but at 38400 baud it’s buggy)
I found a way to use the PL11 UART (ttyAMA0)
by adding dtoverlay=pi3-disable-bt to config.txt : raspberry doesn’t boot
by adding dtoverlay=pi3-miniuart-bt : raspberry boots but interface is still ttyS0
What operating system are you using? Are you using Ubuntu Core?
I’m using ubuntu core16:
classic 16.04 26 edge canonical✓ devmode
core 16-2.41 7715 stable canonical✓ core
pi2-kernel 4.4.0-1120.129 99 stable canonical✓ kernel
pi3 16.04-0.5 x1 - - gadget
wifi-ap 25 307 stable canonical✓ -
config.txt with added lines:
target board is connected on GPIO14 and GPIO15
it is responding to ttyS0 but not ttyAMA0
@ogra any thoughts on this?
hey, sorry, i was on vacation for two weeks …
try using this but also adjust your cmdline.txt to point to “console=serial0,115200” (or serial1, i dont remember) … else it will boot but then try to write to a non-existing console device.
I tried it, but with no success … , I noticed that there are no “serial0” or “serial1” symlink in /dev directory, could that be the reason ?
suprascal@localhost:/dev$ suprascal@localhost:/dev$ ls -l | grep serial
-bash: suprascal@localhost:/dev$: No such file or directory
no, this is handled internally by the pi bootloader and u-boot so a device entry in /dev should not be needed
This is from some time ago now, but FWIW the approach that worked for me is as follows:
dtoverlay=pi3-miniuart-btto config.txt to set Bluetooth to use ttyS0 rather than ttyAMA0.
console=serial0,115200bit from cmdline.txt. This frees up the port to be used as an RS232 port rather than used for the console.
Mostly derived from https://spellfoundry.com/2016/05/29/configuring-gpio-serial-port-raspbian-jessie-including-pi-3-4/ (and targeted at Raspbian, but should be more or less equivalent for Ubuntu Core).
Hope that helps!
I googled already this site, i tried the raspbians solution.
Some tutorials ask to to remove hciuart.service , some to disble getty.
So far had no success on Ubuntu Core
my understanding is that on raspberry 3 :
- bt uses uart0 mapped on ttyAMA0 and serial console uses uart1 mapped on ttyS0 on gpio 14 and 15
- pi3-miniuart-bt swaps uart0 to ttyS0 and uart1 to ttyAMA0 so that gpio pi 14 and 15 are now connected to uart1
I tried to read the pi3-miniuart-bt overlay file, it’s obviously not a human readable file, but a readable part is (…function brcm,pull phandle target-path serial0 serial1 fake_bt_cts uart0 uart0_pins uart1 uart1_pins bt_pins gpio …) refers to uart0, uart1, serial0 and serial1
On my ubuntu Core system there is no serial0 or serial1 alias.
I will download a raspbian system and try on my board today
Hi, have you solved this problem?
I also use Ubuntu Mate 16.04 and can not find the symlink of “serial0” and “serial1”.
Is it the issue of operating system?