UART peripherals on Android Things for Raspberry Pi 3
Asked Answered
P

2

10

How do I use UART peripherals on Android Things for Raspberry Pi 3?

It seems that by default it is assigned the linux console.

Panettone answered 13/12, 2016 at 17:22 Comment(0)
P
9

By default the UART port is mapped to the linux console, in order to prevent the kernel message from messing around with your peripheral.

You can disable the console by mounting the boot partition from the sdcard on your host computer using:

mount /dev/sdX1 /mnt/disk

where sdX is replaced with your sdcard reader device name (running dmesg after inserting your sdcard into your reader should help you figure out the device name).

Then edit /mnt/disk/cmdline.txt to replace the following kernel boot argument:

console=serial0,115200

with:

console=tty0

If you need to re-enable the console later for debugging purpose, just add the same argument back.

See the developer docs for more info on disabling the console.

Panettone answered 13/12, 2016 at 17:25 Comment(0)
J
1

Beginning with Developer Preview 3, in which USB-Serial devices support added, external USB-UART dongles like this can be used instead of built-in UART of Raspberry Pi 3.

Jeanett answered 7/7, 2017 at 14:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.