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

Finding the Serial Port / UART #7

Open
ge0rg opened this issue Jan 20, 2016 · 9 comments
Open

Finding the Serial Port / UART #7

ge0rg opened this issue Jan 20, 2016 · 9 comments

Comments

@ge0rg
Copy link
Owner

ge0rg commented Jan 20, 2016

The Bootloader performs logging over the serial port, and allows limited interactive access. Therefore it would be great to locate and document the serial port.

Possible serial port locations:

  1. 2x4 contact pad on the mainboard (iFixit tutorial with pictures)
  2. On the Micro-USB port, using a port multiplexer (like Nexus S / Galaxy Nexus or Nexus 4)

There is an external shutter using the USB pins in a way comparable to (2), so chances are that a different resistor value will actually provide UART access.

A brave person is needed to either risk their camera by trying this out or to disassemble it and make high-res photos of the PCB. Moderate-quality pictures exist, but don't allow to identify all chips, especially an eventually existing USB multiplexer.

@ge0rg
Copy link
Owner Author

ge0rg commented Jan 21, 2016

After verifying that the NX300 uses a TI TSU61111a USB multiplexer, and that it supports resistor-based port switching, I was brave enough to attach a USB-OTG-UART cable, and tested 150K and 620K resistor values, which should trigger UART and BOOT-UART modes, respectively. Unfortunately, there was no serial output on either.

However, the Linux kernel on the NX300 reported the following in dmesg, when attaching/removing the cable:

[   17.385776] not surport
[   19.435360] not surport

This is output by arch/arm/mach-drime4/board-d4-nx300.c if the detected USB mode is neither USB nor ETC (charger or audio), leaving A/V and UART as the possibilities.

@ge0rg
Copy link
Owner Author

ge0rg commented Apr 6, 2016

I also tried this approach on the NX500, but it doesn't even put anything into dmesg :'(

@vasile-gh
Copy link

vasile-gh commented May 17, 2016

OTG cables have the ID pin internally shorted to GND so regardless what resistor you put, it won't change impedance on that pin.

You need to start with a normal cable and put the resistor between ID and GND pin.
Also, if you put the cables when the camera was already booted, it was useless. You need to power on the camera with the cable plugged in.

@ge0rg
Copy link
Owner Author

ge0rg commented May 17, 2016

Sorry for the confusion. This is not a real OTG cable of course, it is a micro-USB connector soldered to a breakout board, with actual resistors connected. It was prepared by a friend as I totally lack soldering skills, so I can't change the resistor values besides the two I tried.

@Lehkeda
Copy link

Lehkeda commented Aug 10, 2017

@vasile-gh hey, sorry for annoying. I've tried to put 150K resistor between GND and ID pin to start uart serial debugging for my device (samsung galaxy star gt-s5282) but it doesn't work and I even tried to use jig dongle to enter my phone to download mode and it didn't work. I think the problem is with ID pin on my phone so is there anything I can do do check where is the problem ? (btw, the phone is fully working and it can be charged and connected as mtb too)

@Nikolas-LFDesigns
Copy link
Collaborator

to start uart serial debugging for my device (samsung galaxy star gt-s5282)

wanna get to bootloader? Use ODIN instead.
Because, you know, it's an android phone, not a fancy camera with linux..
If you insist on UART connection, I would search along the lines of service manual, which contains information about pins and so on.

@Lehkeda
Copy link

Lehkeda commented Aug 10, 2017

@Nikolas-LFDesigns use odin to debug the phone ??? can you send me a link to start with ?
I wanna port higher version of linux kerrnel for my phone for learning purpose that's why I need uart connection.

@Nikolas-LFDesigns
Copy link
Collaborator

@Lehkeda well, that's a better definition of intent, ok..
tools like ODIN would only go as far as to boot you into the only known bootloader - Samsung fw loader ;)
that of no use in debugging, yeah.
As my suggestion stands, I would look for a service manual of sorts which occasionally published for phones. Another debugging method would be file writes at crucial points, the only downside of that would be that at least inital fs should exist by then ))
Anyway, this is going to be offtopic here, XDA-developers would be a better place for that sort of things.

@Lehkeda
Copy link

Lehkeda commented Aug 10, 2017

@Nikolas-LFDesigns thanks for help :)

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

No branches or pull requests

4 participants