Skip to content

rpi: add uart device_path#842

Open
Mani-Sadhasivam wants to merge 1 commit into
eclipse-mraa:masterfrom
Mani-Sadhasivam:rpi_uart_fix
Open

rpi: add uart device_path#842
Mani-Sadhasivam wants to merge 1 commit into
eclipse-mraa:masterfrom
Mani-Sadhasivam:rpi_uart_fix

Conversation

@Mani-Sadhasivam

Copy link
Copy Markdown
Contributor

Currently there is no device_path registered for UART in Raspberry Pi
source. This will hinder the working of UART driver in mraa.

So, register the device_path with '/dev/serial0' as most of the
raspbian images make this as a soft link to real UART port by
default.

Tested-on: Raspberry pi 3 model B

Signed-off-by: Manivannan Sadhasivam manivannan.sadhasivam@linaro.org

@kvkdileep kvkdileep left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on raspberry pi 3
the mraa-uart list is listing the uart bus

@alext-mkrs

Copy link
Copy Markdown
Contributor

The change is technically trivial and looks ok to me, but are you sure the path is the same on RasPi 1 & 2, in addition to 3? Quick googling gives me this may be a RasPi 3 thing and on older versions the port was either /dev/ttyAMA0 or /dev/ttyS0. I don't have any of those to check, unfortunately.

On the other hand, if it wasn't there at all, it didn't work anyway, so having a wrong one would do no harm.

Currently there is no device_path registered for UART in Raspberry Pi
source. This will hinder the working of UART driver in mraa.

So, register the device_path with '/dev/ttyS0' for all the raspberry
pi models except Rpi3. For Rpi3 'dev/serial0' is used as most of the
raspbian images make this as a symlink to _real_ UART port by
default.

Tested-on: Raspberry pi 3 model B

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
@Mani-Sadhasivam

Copy link
Copy Markdown
Contributor Author

@alext-mkrs I assumed that /dev/serial0 exists for all Rpi models!

Changed the serial port to /dev/ttyS0 for all models except Rpi3. This port is used as general purpose UART while /dev/ttyACM0 is used for console. Also, /dev/serial0 is used for Rpi3.

@Mani-Sadhasivam

Copy link
Copy Markdown
Contributor Author

@kvkdileep Can you do a quick test now?

@kvkdileep

kvkdileep commented Nov 15, 2017

Copy link
Copy Markdown

@Mani-Sadhasivam spare me some time, i will test it with sensor having uart interface

@arfoll

arfoll commented Nov 17, 2017

Copy link
Copy Markdown
Contributor

@kvkdileep have you had a chance to test this?

@arfoll

arfoll commented Jan 4, 2018

Copy link
Copy Markdown
Contributor

@kvkdileep did this work?

@alext-mkrs

alext-mkrs commented Jan 16, 2018

Copy link
Copy Markdown
Contributor

@kvkdileep, are you still up to checking this one out? That's the last step before merging as everything else looks ok (Travis failure is unrelated to the change contents).

@Propanu

Propanu commented Apr 30, 2018

Copy link
Copy Markdown
Contributor

If this was tested I'm OK to merge!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants