Serial debugging/Cable schematics: Difference between revisions
m Knuxfanwin8 moved page Serial debugging to Serial debugging:Cable schematics |
Update cable schematics page, some information has been moved to the general Serial debugging page. |
||
Line 1: | Line 1: | ||
This page contains schematics for serial cables, as well as device support tables and basic build instructions. For more information about serial debugging, visit the [[Serial debugging]] page. | |||
<!--Note to editors: if you're adding a new debug cable design/schematic for a particular device, put it at the bottom of the page. If it's a design for multiple devices or a series of devices, put it under the SuzyQ cable.--> | |||
== microUSB/Carkit debug cable == | |||
Many devices with microUSB ports have the serial port multiplexed with the micro/mini USB connector, initially implemented as part of [[Micro-USB_Interface_Controller|carkit standard]]. The Replicant project has a [https://redmine.replicant.us/projects/replicant/wiki/SamsungSerial page dedicated to serial on Galaxy Nexus] using this cable. | |||
[[File:Nexus-usb-debug.png|border|700px]] | |||
Note that some devices and [[MUIC|MUICs]] require a resistor with a different resistance than 150KΩ. '''To find the correct resistor value''', check your device's wiki page, the [[MUIC]] page or follow the guide in [[Serial_debugging#Finding_the_UART_ports_on_your_device|Serial debugging#Finding the UART ports on your device]]. | |||
{{note|'''Tip:''' Most common resistance values used for serial debugging can only be found on SMD (surface-mounted) resistors. If you want to use them with a regular breadboard, or without having to make your own PCB, you have multiple options: | |||
* Use multiple regular resistors connected in series. There's usually a small margin of error where MUICs will detect the resistance even if it's a bit off. | |||
* [https://learn.adafruit.com/smt-prototyping-using-breakout-pcbs Use a prototyping breakout board.] | |||
* Solder wires directly to the surface-mounted resistor. This is quite challenging, as these elements are very small, and should be seen as a last resort.}} | |||
== Nexus debug cable == | == Nexus debug cable == | ||
Some Nexus phones multiplexed the serial debug lines with the headphone audio lines. To switch it into serial mode you have to supply -3V to the mic port. The UART lines themselves are 1.8V. If you use a 3.3V usb-to-uart adapter the signal from the phone will probably work, for the TX side you have to add a resistor divider to lower the voltage for the phone. Here's the schematic for a nexus debug cable: | |||
[[File:Nexus-debug-cable.png]] | [[File:Nexus-debug-cable.png]] | ||
Line 24: | Line 39: | ||
NT: You will have a better luck with FTDI based serial cable. | NT: You will have a better luck with FTDI based serial cable. | ||
== USB debug cable == | == Mediatek USB debug cable == | ||
Some Mediatek devices expose an 3.3V uart interface at the usb port when a special Mediatek debug cable is attached to the device while booting | |||
The schematic for this debug cable is the same as the Nexus USB debug cable above, except that the ID pin shouldn't be connected. | |||
== Suzy-Q debug cable == | |||
The Suzy-Q debug cable isn't strictly a serial debug cable, it accesses the Closed Case Debugging system, it can access multiple busses on the device. This system was originally developed to debug chromebooks but has been used in the newer Pixel phones. Details for the Closed Case Debugging system can be found at | |||
https://chromium.googlesource.com/chromiumos/platform/ec/+/cr50_stab/docs/case_closed_debugging.md | |||
{| | {{todo|The usb type-c receptacle pinout is wrong(B8 is SBU2 B5 is CC2, no RFU1), see https://en.wikipedia.org/wiki/USB-C}} | ||
[[File:suzyq-debug-cable.png|600x600px]] | |||
The official SuzyQable from Google has an 2 port USB hub into the cable itself, one port connects to the normal usb lines in the USB-C connector and the other port connects to the CC1/RFU1 pair like the diagram above, this way you can use both interfaces at the same time. The debug mode with the cable also only works on one of the two orientations in the USB-C socket. The official cable has a "DBG" mark on the C connector that should be facing up when plugged into the device. The other way around it will act as a normal USB cable. | |||
== | That cable can be used with ChromeOS based devices for serial access. | ||
== Per manufacturer/series == | |||
=== Sony Xperia === | |||
See [https://developer.sony.com/develop/open-devices/guides/access-uart-ports this page]. | |||
=== Some Motorola Devices === | |||
On [https://www.manualdocelular.net/2019/01/manuais-de-servico-esquema-eletrico_25.html here], find your device, and download and extract the file,then: | |||
* open the one contains schematics. | |||
* search keyword <code>UART</code>(could be <code>MSM_UART_*</code> or <code>*_UART_MSM_*</code> or <code>*_DBG_UART_*</code>) and see where it goes to(usually it's <code>JTAG:MINI</code>). | |||
** in some device(like <code>motorola-harpia</code>),tx and rx will connect to a test pad(<code>TP_*</code>),which makes it easier to access. | |||
* find it in board layout and on the device. | |||
== Specific devices == | |||
== Mozilla Flame == | === Mozilla Flame === | ||
The Flame has open UART pads that are accessible underneath the outer and inner covers. | The Flame has open UART pads that are accessible underneath the outer and inner covers. | ||
Line 115: | Line 80: | ||
* '''GND''' - green | * '''GND''' - green | ||
Pull-ups/downs are | Pull-ups/downs are unnecessary, hook straight up to any FTDI/USB-to-serial. | ||
[[File:Mozilla-flame-pcb.jpg|400px]] | [[File:Mozilla-flame-pcb.jpg|400px]] | ||
== Nokia N900 == | === Nokia N900 === | ||
See the following links: | See the following links: | ||
Line 128: | Line 93: | ||
[[File:N900-serial-cable.jpg]] | [[File:N900-serial-cable.jpg]] | ||
== Motorola Droid 4 == | === Samsung Galaxy S7 and S5 === | ||
See [https://forum.xda-developers.com/galaxy-s7/how-to/guide-samsung-galaxy-s7-uart-t3743895 this guide]. It worked almost exactly for the S5, only kernel MUIC driver was in another directory. | |||
=== Motorola Droid 4 === | |||
A off-the-shelf USB-TTL Adapter with 3.3V signal level can be used together with a MicroUSB connector to access the phone's UART. By using a standard MicroUSB <-> USB A cable and just combine a USB jack with a cheap chinese USB-TTL adapter is space-saving and allows you to use the same MicroUSB cable to access the device in USB mode | A off-the-shelf USB-TTL Adapter with 3.3V signal level can be used together with a MicroUSB connector to access the phone's UART. By using a standard MicroUSB <-> USB A cable and just combine a USB jack with a cheap chinese USB-TTL adapter is space-saving and allows you to use the same MicroUSB cable to access the device in USB mode | ||
Line 135: | Line 103: | ||
and http://muru.com/linux/d4/ | and http://muru.com/linux/d4/ | ||
== | === Google Pixel "Android Debug Cable" === | ||
While reported online that a "Suzy-Q" cable can be used for Android-based Pixel devices, the cable available from Sparkfun, the SuzyQable, is not the right cable for debugging Pixel phones. They are using a different incompatible scheme<sup>[How?]</sup>. On Pixel 2 devices they will not work at all, and on Pixel 3, it is reported they show the console of the Titan M chip only. | While reported online that a "Suzy-Q" cable can be used for Android-based Pixel devices, the cable available from Sparkfun, the SuzyQable, is not the right cable for debugging Pixel phones. They are using a different incompatible scheme<sup>[How?]</sup>. On Pixel 2 devices they will not work at all, and on Pixel 3, it is reported they show the console of the Titan M chip only. | ||
Line 161: | Line 113: | ||
* Google Pixel 2 | * Google Pixel 2 | ||
* Google Pixel 3 | * Google Pixel 3 | ||
== See also == | == See also == | ||
[[ | * [[Serial debugging]] | ||
* [[Micro-USB Interface Controller]] |
Revision as of 05:40, 20 November 2020
This page contains schematics for serial cables, as well as device support tables and basic build instructions. For more information about serial debugging, visit the Serial debugging page.
microUSB/Carkit debug cable
Many devices with microUSB ports have the serial port multiplexed with the micro/mini USB connector, initially implemented as part of carkit standard. The Replicant project has a page dedicated to serial on Galaxy Nexus using this cable.
Note that some devices and MUICs require a resistor with a different resistance than 150KΩ. To find the correct resistor value, check your device's wiki page, the MUIC page or follow the guide in Serial debugging#Finding the UART ports on your device.
Tip: Most common resistance values used for serial debugging can only be found on SMD (surface-mounted) resistors. If you want to use them with a regular breadboard, or without having to make your own PCB, you have multiple options:
|
Nexus debug cable
Some Nexus phones multiplexed the serial debug lines with the headphone audio lines. To switch it into serial mode you have to supply -3V to the mic port. The UART lines themselves are 1.8V. If you use a 3.3V usb-to-uart adapter the signal from the phone will probably work, for the TX side you have to add a resistor divider to lower the voltage for the phone. Here's the schematic for a nexus debug cable:
This cable has been tested with:
- Google Nexus 5 (lg-hammerhead)
- Google Nexus 5X (lg-bullhead)
- Google Pixel (google-pixel)
- Google Nexus 9 (htc-flounder)
It should work fine with:
- Nexus 7 2013 (flo)
The Nexus 7 2012 (grouper) does not work with this setup and likely does not have any serial UART capabilities at all.
Google open sourced their own debug cable design in the AOSP repository.
NT: You will have a better luck with FTDI based serial cable.
Mediatek USB debug cable
Some Mediatek devices expose an 3.3V uart interface at the usb port when a special Mediatek debug cable is attached to the device while booting
The schematic for this debug cable is the same as the Nexus USB debug cable above, except that the ID pin shouldn't be connected.
Suzy-Q debug cable
The Suzy-Q debug cable isn't strictly a serial debug cable, it accesses the Closed Case Debugging system, it can access multiple busses on the device. This system was originally developed to debug chromebooks but has been used in the newer Pixel phones. Details for the Closed Case Debugging system can be found at https://chromium.googlesource.com/chromiumos/platform/ec/+/cr50_stab/docs/case_closed_debugging.md
TODO: The usb type-c receptacle pinout is wrong(B8 is SBU2 B5 is CC2, no RFU1), see https://en.wikipedia.org/wiki/USB-C |
The official SuzyQable from Google has an 2 port USB hub into the cable itself, one port connects to the normal usb lines in the USB-C connector and the other port connects to the CC1/RFU1 pair like the diagram above, this way you can use both interfaces at the same time. The debug mode with the cable also only works on one of the two orientations in the USB-C socket. The official cable has a "DBG" mark on the C connector that should be facing up when plugged into the device. The other way around it will act as a normal USB cable.
That cable can be used with ChromeOS based devices for serial access.
Per manufacturer/series
Sony Xperia
See this page.
Some Motorola Devices
On here, find your device, and download and extract the file,then:
- open the one contains schematics.
- search keyword
UART
(could beMSM_UART_*
or*_UART_MSM_*
or*_DBG_UART_*
) and see where it goes to(usually it'sJTAG:MINI
).- in some device(like
motorola-harpia
),tx and rx will connect to a test pad(TP_*
),which makes it easier to access.
- in some device(like
- find it in board layout and on the device.
Specific devices
Mozilla Flame
The Flame has open UART pads that are accessible underneath the outer and inner covers.
- TX - red
- GND - green
Pull-ups/downs are unnecessary, hook straight up to any FTDI/USB-to-serial.
Nokia N900
See the following links:
- http://n900.elektranox.org/serial-adapter.html
- http://wiki.maemo.org/N900_Hardware_Hacking#Debug_ports
Samsung Galaxy S7 and S5
See this guide. It worked almost exactly for the S5, only kernel MUIC driver was in another directory.
Motorola Droid 4
A off-the-shelf USB-TTL Adapter with 3.3V signal level can be used together with a MicroUSB connector to access the phone's UART. By using a standard MicroUSB <-> USB A cable and just combine a USB jack with a cheap chinese USB-TTL adapter is space-saving and allows you to use the same MicroUSB cable to access the device in USB mode
See http://elektranox.org/2017/02/0009-droid-4-root/ and http://muru.com/linux/d4/
Google Pixel "Android Debug Cable"
While reported online that a "Suzy-Q" cable can be used for Android-based Pixel devices, the cable available from Sparkfun, the SuzyQable, is not the right cable for debugging Pixel phones. They are using a different incompatible scheme[How?]. On Pixel 2 devices they will not work at all, and on Pixel 3, it is reported they show the console of the Titan M chip only.
Serial access for the Pixel 2 and 3 (unverified with 3a and 4) can instead be achieved using the following Android Debug Cable. Note that using a pass-through breakout board is not mandatory, but is helpful to keep the serial console active while using ADB.
This cable should work with:
- Google Pixel 2
- Google Pixel 3