Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ttyAMA0 from app not working #179

Closed
AntonioSanta opened this issue Jan 17, 2018 · 13 comments
Closed

ttyAMA0 from app not working #179

AntonioSanta opened this issue Jan 17, 2018 · 13 comments
Labels

Comments

@AntonioSanta
Copy link

Description
I cannot drive the UART0_TX (pin#8) from cpp application. The port ttyAMA0 can be opened successfully from the app but when trying writing some data nothing happens on the TX pin.

Steps to reproduce the issue:

  1. set ENABLE_UART = "1" and MACHINE_FEATURES += "pi3-disable-bt" . Changed the SERIAL_CONSOLE on the raspberrypi3.conf file to SERIAL_CONSOLE ?= "115200 tty1" followed the instructions on the docs http://meta-raspberrypi.readthedocs.io/en/latest/extra-build-config.html#enable-uart
    2.rebuild the image nad load it to the sd card.
    3.when raspberrypi3 boots up check with a simple app or echo '1' > /dev/ttyAMA0 , nothing is output to the tx pin of the UART ttyAMA0.

Describe the results you received:
the TX pin does not move, nothing is transmitted and no error is reported.

Describe the results you expected:
the TX pin to transmit the data

Additional information you deem important (e.g. issue happens only occasionally):
the same application on the same hw is working using Raspbian original image.
Additional details (revisions used, host distro, etc.):
it seems the console is retained anyway to ttyAMA0 as dmesg | grep ttyAMA0 output shows kernel command line: ...... console=ttyAMA0,115200. Then how to change the console to go to another uart ?

@agherzan
Copy link
Owner

What is the RPi model you are working on?

@AntonioSanta
Copy link
Author

hello, it is raspberryPi3 model B , I have made the UART0_TX pin working by using the ttyS0 port instead of ttyAMA0.

@agherzan
Copy link
Owner

Can we close the issue in that case? @AntonioSanta

@AntonioSanta
Copy link
Author

OK with me if this is as expected.

@agherzan
Copy link
Owner

agherzan commented Feb 5, 2018

@AntonioSanta It sounds like an issue. Would you be able to try to reproduce on a raspbian?

@AntonioSanta
Copy link
Author

On Raspbian 8 ( jessie )(with Linux 4.9.35-v7 ) the same application is successfully driving the pin UART0_TX pin when opening ttyAMA0 device.
On the OS built with meta-raspberrypi instead the pin is successfully driven when using the ttyS0 device from the app. When using ttyAM0 the port can be opened but when writing to the tx nothing happens to the UART0_TX pin.

@agherzan
Copy link
Owner

agherzan commented Mar 1, 2018

@AntonioSanta are you able to give it a try with the current master (we updated firmware and kernel)?

@61131
Copy link

61131 commented Apr 5, 2018

Known behaviour with RP3 - See raspberrypi/linux#1399

@agherzan
Copy link
Owner

agherzan commented Apr 5, 2018

@61131 But the pi3-disable-bt should switch roles. That's the issue reported here.

@kraj kraj added the type/bug label Apr 16, 2018
@agherzan
Copy link
Owner

By all means, this sounds like an issue in the kernel. I recommend trying newer meta-raspberrypi revisions to reproduce. Otherwise, follow it up in linux-raspberrypi github repository. Closing for now.

@AntonioSanta
Copy link
Author

AntonioSanta commented Jul 26, 2018 via email

@agherzan
Copy link
Owner

agherzan commented Jul 26, 2018 via email

@AntonioSanta
Copy link
Author

I checked with the Sumo version and the behavior is still the same ,it works with ttyS0. I will follow on linux-raspberrypi, as you said.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants