.. title: UART on Galaxy S3 and Note 2 .. slug: uart-on-galaxy-s3 .. date: 2017-11-01 23:00:00 UTC+11:00 .. tags: linux, exynos, midas .. category: mainline .. link: .. description: .. type: text Over the next few months (years?) I plan on working on porting several Android-based Exynos 4412-based devices - namely, the [Galaxy S3](https://en.wikipedia.org/wiki/Galaxy_S_III>) (of which there are three Exynos4412-based variants), and the [Galaxy Note 2](https://en.wikipedia.org/wiki/Samsung_Galaxy_Note_II) (of which there are two variants). The first step, I figured, was probably to get UART working on the vendor-provided Linux 3.0 kernel: Fortunately, I was not the first person to attempt this, and there are [a few guides](https://forum.xda-developers.com/galaxy-s3/general/info-i9300-uart-guide-how-to-talk-to-t2928854) on constructing a cable suitable for the process. Note, the UART output is multiplexed over the MicroUSB port by a MAX77693 MUIC, not an FSA9485 as the XDA guide suggests. So, equipped with the knowledge I needed, I went shopping (yay!). I bought a [CP1202 USB-to-UART adapter]( https://www.ebay.com.au/itm/USB-to-UART-5-Pin-CP2102-Module-Serial-Converter-for-Electrical-Engineering/142295732271>), and a [microUSB cable with a 523kΏ resistor](https://www.ebay.com.au/itm/UART-Cable-with-RJ45-and-USB-Connectors-Based-on-523k-Resistor/122062611479>). After a lot of waiting, both pieces finally arrived, and I could get hacking. I ~~tore apart~~ carefully cut the cable - only the microUSB end is of any use. ## Making it work Before soldering, I thought it might be good idea to use some jumper wires (conveniently packaged alongside the UART adapter) to check that my wiring was connect. This was not a good idea. It turns out, UART is pretty reliant on having a stable ground connection (who would've thought?). Jumper cables don't make providing such a connection easy. After much fighting with the cables, I managed to get a couple of lines of semi-readable output on the UART console - the trick was to solder the USB cable connectors to the relevant ports on the UART, and to swap the TX and RX cables around. So, I end up with this:
USB | UART |
---|---|
White | GND |
Black | RXD |
Green | TXD |