A "Prolific" PL2303HX cable will cost you about £2 from ebay. A CP210x might be a better choice, but they were just open boards so didn't look as nice.
The "2 minute" version is just swap the cable for a micro USB cable. The phone will charge if you connect the 5v wire, but the safe approach would be just connect the other 3 and leave 5v disconnected. Note that I put the green and white TX/RX the wrong way around here, on purpose to demonstrate what not to do *ahem*
That's the easy way... but the 5v input meant the phone boots up as soon as the cable is plugged in, which wasn't ideal. The few hours battery was no use really. I could have just put a switch on the cable - but that would have looked a mess. I opted for switching this using the DTR signal (ctrl-T in picocom). You might get lucky and find that DTR (pin 2 on the PL2303) is already connected up to a spare track or pad, but if not, SSOP isn't too small:
Take some switching parts from an old PC motherboard or something, I used a P-Channel MOSFET, NPN and a 10k & a 1k resistor, as shown in this non-standard & badly labelled diagram:
I tested it before compacting it! (also added an LED to show charging on/off). The phone is on the other end of the cable here... the LED isn't drawing 700mA :)
There's plenty of space to fit it inside the USB plug. If you can't use SMD parts, it'd probably sit above the PCB without issue.
The finished cable. "Why that horrible green?" - stops me thinking it's just a normal micro usb cable and plugging it in to something else and exploding it
hey, that's what i'm looking for :)
ReplyDeleteIs there anything needed in terms of kernel settings? I can't get this to work on either fairphone1 nor Wiko Stairway.
ReplyDeleteIs there a specific boot up sequence needed? Like plugin cable when battery out?
It just needs to be plugged in while the phone is switched off. This starts producing output from the preloader, and keeps running through lk, but most likely output will stop once the kernel starts - the default boot cmdline includes a printk.disable_uart=1
DeleteYou can either patch this in lk, or there is an undocumented fastboot command to toggle it for the next reboot. I can't quite remember what it was, but something along the lines of "fastboot oem p2u 1"
You should still see hundreds of lines of output before the kernel loads though, so if you've got nothing then maybe your tx/rx are swapped, or baud rate is incorrect?
This does not work on my Honor 3C (H30-U10). There's no output produced. I tried swapping TX/RX, no success. And yes baud rate was set to 921600.
ReplyDeleteDoes it use 5V or 3.3V data voltage levels?
ReplyDelete3.3V on the SoCs I've tested - the same as USB FS ( https://en.wikipedia.org/wiki/USB#Signaling )
DeleteSo, my 5V USB-TTL PL2303HX might have killed the UART in my old phone :)
DeleteIf it's definitely using 5V I/O then yes, probably. The Mediatek data brief lists the absolute maximum rating for the USB to be 3.465V
DeleteHowever the datasheet for the PL2303HX (rev D) says the serial signals are limited from 1.8V to 3.3V... not as far as 5V. http://www.prolific.com.tw/userfiles/files/ds_pl2303hxd_v1_4_4.pdf
(page 13, pin 4)
I was wrong, actually. I checked it with a multimeter and it's 3.3V. But it didn't work anyway.
DeleteI tried modifying the LK to have printk.disable_uart always 1, but it didn't work. Swapping the RX and TX lines didn't help either. And there's no UART on the motherboard, no kernel sources for the phone. And the LCD screen is dead too.
I needed the UART to try to install Debian instead of Android.
Hello again. I've connected UTXD4 to my PL2303HX (only GND and RX). I get come output to the console, but I think the charset is wrong (I use UTF-8): http://imgur.com/VSK9L0a . Do you have any ideas?
ReplyDeleteLooks like a wrong baud rate setting. The MTK default is 921600.
DeleteI tried different baudrates (921600 too), but I had the same result: garbage instead of text. Is it possible that my thin wires cause interference :) ?
DeleteBy the way, thanks for quick reply.
It's probably not interference at the low speeds that UART runs at. Do you have any kind of oscilloscope or logic analyzer? That'd be the easiest way to see what's actually being transmitted.
DeleteFixed it with the orange loop. It was the interference.
Deletehttp://imgur.com/a/8Xljh
Ah well, I'm glad you got it working!
DeleteI've finally managed to get systemd to work (even though I used kernel for other MTK6589 SP). One last question: is it OK if I also connect RX pin (1.8V) to my USB-TTL (3.3V)?
DeleteThank you for everything.
I wouldn't recommend it (although I have done in the past without causing any noticable damage). The datasheet says 1.7-1.9v as the absolute max rating.
DeleteYou can make a level shifter with just a few parts, or buy them for a few cents/pence on ebay. This kind of thing will work fine for UART/JTAG/etc: https://learn.sparkfun.com/tutorials/bi-directional-logic-level-converter-hookup-guide