+ Reply to Thread
Results 1 to 20 of 58
[How-To] Serial debug connection
This is a discussion on [How-To] Serial debug connection within the Modding & Development forums, part of the Meizu M8 category; How to make a serial connection cable towards M8 for debugging : Hello fellow M8 owners, hereby a small how-to ...
-
08-10-2009 #1Valued Member
- Join Date
- Aug 2008
- Location
- Belgium
- Posts
- 2,434
- Thanks
- 127
Thanked 189 Times in 130 Posts[How-To] Serial debug connection
How to make a serial connection cable towards M8 for debugging :
Hello fellow M8 owners,
hereby a small how-to explanation about making a cable to communicate with the serial output that is hidden on the USB plug.
What you will need:
* a Mini USB plug that fits the M8
* a RS-232 TTL adapter for 3.3 Volt (see lower)
* a multimeter
* a soldering iron
* Some wires, example from old ribbon/floppy cable(s)
* Some soldering tin
* Terminal software
* Knife, tape, ... ?
For what purpose can it been used?
* Android debug
* Windows CE debug
* External hardware ... (no real project for M8 yet)
* etc ...
The RS-232 TTL convertor :
For a small price (5~20€) this can be bought online through ebay, e-shops or at local electronic shops. Most of them use the MAX 232 chipset and the best buys have a selectable voltage range of 3.3-5 V.
Example on my own convertor

Ofcourse this can be build by yourself look on google for information
Example schematic with MAX 232
**if you buy one it is very usefull to have some TX/RX leds for diagnostics and a USB plug instead of serial for faster and more connection(s) on most PC´s.
The Mini USB plug :
Easiest way to obtain a fully useable usb plug is by looking on ebay for a 10 pins mini usb plug, however they are hard to find but since they become a new standard you will find them more and more.
Example on female connector:

An other approach is by stripping out a standard 5 pins mini usb cable like provided with the Meizu M8.
Example on a mini usb cable:

Pinout on Meizu M8 usb port:

Code:1 5 _______________ | _ _ _ _ _ | USB charger \-------------/ | ' ' ' ' ' | Serial Debug |___________| 6 10Charger/USB mode
1 == USB VCC +5v
2 == USB Data -
3 == USB Data +
4 == N/A
5 == USB GROUND
--
Serial port
6 == SERIAL TX
7 == N/A
8 == SERIAL VCC
9 == SERIAL RX
10 == SERIAL GROUND
--
*keep in mind that connecting to a ttl convertor means :
Tx -> Rx and Rx -> Tx , NOT Tx -> Tx// Rx -> Rx !!!!
THIS PART STILL NEEDS TO BE REWRITEN
WITCH WILL BE DONE ONCE I HAVE A USB MINI PLUG
THEN I CAN ADD SOME BUILD PICTURES :
How to make the debug cable
*Take the usb cable and slice the port that needs to be connected to meizu in 2
*carefully remove the iron connector around the usb plug
*remove the melted plastic very carefully so you can see the connector pins/colored wires.
*cut of the connector that goes to the pc, strip the wires so you get the 4 colored wires, and strip those so you have the coperwire itself for each wire.
*use a multimeter to check voltages like described in android topic or just follow me blindly to the next step
*look at the color each wire has and look on the provided schematic
to be able to connect each wire like it should to ttl convertor.
*connect each wire to the correct convertor pin (ground, vcc, tx, rx)
*check that ttl convertor use 3.3 volt if it is compatible with 5 volt
*plug in usb connector on meizu m8, you can place a piece of paper to fit it that way it does not move around, soo that the contact pins are well connected.
*plug in ttl convertor on the (windows) machine
*When it installs check with com port it uses
*setup dnw/terminal to use that usb to serial port on baudrate 115200bps, leave other setting default.
*select connect on hyper terminal , boot m8 or do what ever you want with it and whatch the magic :-)
I also added the working setup just as proove fo those who do not believe what i posted.
**DNW.EXE is the original terminal application provided by Samsung and is part of the BSP SMDK6410
If you liked the post or found it usefull say thanksMyself i thank :
- Bill for confirming the fact that RX-TX is fully working
- R3wdy for finding an ebay shop that sells the 10 pins plug
- Loonix for the code draw of USB 10 pins plug
- Banxian for confirming the correct & complete pinout
Last edited by evow04; 10-27-2009 at 06:32 PM.
-
-
08-10-2009 #2Valued Member
- Join Date
- Aug 2008
- Location
- Belgium
- Posts
- 2,434
- Thanks
- 127
Thanked 189 Times in 130 Postssome pictures of my first cable for m8






Last edited by evow04; 10-23-2009 at 01:16 PM.
-
08-20-2009 #3Valued Member
- Join Date
- Aug 2008
- Location
- Belgium
- Posts
- 2,434
- Thanks
- 127
Thanked 189 Times in 130 PostsHi guys,
i am curious to known if someone build his own debug cable yet.
This because i can receive info from the meizu m8 eboot bootloader but i can not upload data/communicate to the m8 to activate the following commands:
andCode:Press [SPACE] to enter EBOOT within 2 sec
i guess i did not connect the usb Tx to m8 rx pin correctly,Code:Press [ENTER] to download image stored on boot media, or [SPACE] to enter boot monitor
so i do hope someone else could help me out with this issue?
It could really help us on the android part
I get frustrated that my tools are to big to swap the small pins on my usb cable connector
-
08-21-2009 #4Passing By
- Join Date
- Aug 2009
- Location
- China
- Posts
- 14
- Thanks
- 25
Thanked 0 Times in 0 PostsPictures don't show.Will you edit it ?
Thanks .
-
08-21-2009 #5Valued Member
- Join Date
- Aug 2008
- Location
- Belgium
- Posts
- 2,434
- Thanks
- 127
Thanked 189 Times in 130 PostsHi kohain,
over here it loads perfect, i gues that your internet provider in china blocks the link to imageshack us .
Can you tell me where to store the images then i will re-upload it for you.
-
08-21-2009 #6Administrator
- Join Date
- Mar 2007
- Location
- Budapest, Hungary
- Posts
- 4,485
- Thanks
- 237
Thanked 1,024 Times in 375 PostsI think tinypic.com is a great host, also available from China.
-
08-21-2009 #7Valued Member
- Join Date
- Aug 2008
- Location
- Belgium
- Posts
- 2,434
- Thanks
- 127
Thanked 189 Times in 130 Posts
-
Member who thanked evow04 for the post:
-
08-22-2009 #8Passing By
- Join Date
- Aug 2009
- Location
- China
- Posts
- 14
- Thanks
- 25
Thanked 0 Times in 0 PostsThe government had locked too many websites.
But I could see two (in front of the topic) yesterday.
It would be better to upload pictures into skydrive or other sites who's sever is not in USA.The cable between the USA and China has some problems these days.
I find photobucket.com is available.
PS: evow04,Thank you very much for your work on porting Android to M8.Last edited by kohain; 08-23-2009 at 02:28 AM.
-
08-22-2009 #9Valued Member
- Join Date
- Aug 2008
- Location
- Belgium
- Posts
- 2,434
- Thanks
- 127
Thanked 189 Times in 130 PostsKohain, no problem for that, only thing is that i got stuck and need help like i mentionned ;-)
I thought they recently posted that china would drop the internet filter?
Anyway, you can see all pictures now?Last edited by evow04; 08-22-2009 at 04:50 PM.
-
08-23-2009 #10Passing By
- Join Date
- Aug 2009
- Location
- China
- Posts
- 14
- Thanks
- 25
Thanked 0 Times in 0 PostsYes.very well now.
I'm sorry for not skilled to help you.
But i can translate chinese into english, if necessary.Last edited by kohain; 08-23-2009 at 02:26 AM.
-
10-26-2009 #11Member
- Join Date
- Mar 2009
- Posts
- 127
- Thanks
- 1
Thanked 113 Times in 35 Postsmaybe we have wrong defination of RX pin in M8. I can write byte in my Loader, but I can't read anymore when I type keys in hyperTerminal/DNW
-
10-26-2009 #12Valued Member
- Join Date
- Aug 2008
- Location
- Belgium
- Posts
- 2,434
- Thanks
- 127
Thanked 189 Times in 130 PostsBanxian,
i am not complete with you,
You can use full rx/tx to M8 or only tx from m8?
Cause like above mentioned i am not completely sure that i have right rx pin on m8.
That was why i asked r3wdy for a 10 pins plug so i can verify the rx on m8 :-)
(ofcourse someone else could do this aswell)
-
10-26-2009 #13Member
- Join Date
- Mar 2009
- Posts
- 127
- Thanks
- 1
Thanked 113 Times in 35 PostsOnly tx from M8. I can write to tx and see result on HyperTerminal/DNW.
Iif I try to read chars from rx, I only get a no input flag.
I tried connect it to pin8/7 but can't read any char as same as pin 10Last edited by banxian; 10-26-2009 at 04:46 PM.
-
10-26-2009 #14Valued Member
- Join Date
- Aug 2008
- Location
- Belgium
- Posts
- 2,434
- Thanks
- 127
Thanked 189 Times in 130 PostsMm that is strange, i always thought i just had a wrong pin connected.
But if you can not write to anyother... :s
I thought Bill mentioned you can write to RX on m8.
Maybe he can provide us with the answer witch pin is correct?
ps if you used 7/8/10 and does not work,
it could be that you need to boot m8 without serial and a second after boot need to plugin the serial cable?
(saw this once in the past on other devices..)
grr want my m8 back so i can continu with testing:@
edit: start doubting on myself;
ground can not be the rx otherwise we would not have any output right?Last edited by evow04; 10-26-2009 at 06:18 PM.
-
10-26-2009 #15Member
- Join Date
- Mar 2009
- Posts
- 127
- Thanks
- 1
Thanked 113 Times in 35 Postswhen I short rx to rx in nude 10p plug, I can see echoback on dnw/hyperterminal. seems terminal clients send right things but M8 can't read it (eboot or my uart test demo), due a wrong pin defination or wrong gpio intialize?
-
10-26-2009 #16Valued Member
- Join Date
- Aug 2008
- Location
- Belgium
- Posts
- 2,434
- Thanks
- 127
Thanked 189 Times in 130 PostsMmz it would be strange that eboot and your app do not receive the data due to gpio.
you mean on pc side?when I short rx to rx in nude 10p plug
If anyone could provide me with high resolution pictures of the pcb (higher then in android topic) i could try to follow the pin path to see if by any chance a resistor is missing (that is also an option)
did you already tried like i mentioned?
it could be that you need to boot m8 without serial and a second after boot need to plugin the serial cable?
-
10-27-2009 #17Member
- Join Date
- Mar 2009
- Posts
- 127
- Thanks
- 1
Thanked 113 Times in 35 PostsI use pin10 as GRD, pin6 as TX and get same result like pin9 GRD + pin6 TX.
it seems pin6 -> TX is fine.
pin 9 maybe RX. I'll try later with echo test.
-
10-27-2009 #18Member
- Join Date
- Mar 2009
- Posts
- 127
- Thanks
- 1
Thanked 113 Times in 35 Postsexchanged pin9 with pin10. all fixed.
Code:Ethernet Boot Loader Configuration: 0) IP address: 0.0.0.0 1) Subnet mask: 255.255.255.0 2) DHCP: Disabled 3) Boot delay: 2 seconds 4) Reset to factory default configuration 5) Startup image: DOWNLOAD NEW 6) Program disk image into SmartMedia card: Enabled 7) Program CS8900 MAC address (00:00:00:00:00:00) 8) KITL Configuration: DISABLED 9) Update Mode:Disabled B) Low Level Format Image Part C) Clean Boot Option: FALSE D) Download image now F) Format PocketStore's Storage Region L) LAUNCH existing Boot Media image N) Read NAND Flash (Block/Page) R) Read Configuration U) DOWNLOAD image now(USB) W) Write Configuration Right Now
PL2303 Side:
Green: GRD
Black: TXD
White: RXD
M8 Side:
Green: 10 -> GRD
Black: 9 -> RXD
White: 6 -> TXD
Here is my duallink cable with three usb plug~~
Last edited by banxian; 10-27-2009 at 06:36 PM.
-
-
10-27-2009 #19Valued Member
- Join Date
- Aug 2008
- Location
- Belgium
- Posts
- 2,434
- Thanks
- 127
Thanked 189 Times in 130 Postsbanxian, you are my hero!
finally we have a confirmation of the pins!
it is strange that it worked before while the pins were reversed,
but then again, now it works so let me play a no-brainer;-)
Can you confirm me that pin 8 is the serial vcc 3 volt?
And now i want to know what is pin 7, maybe in combination with ground it is tv out? :P
-
10-27-2009 #20Member
- Join Date
- Mar 2009
- Posts
- 127
- Thanks
- 1
Thanked 113 Times in 35 Postspin8 have a fixed voltage in my test.
recently j.wong said in forum, "we can add tvout in SE with less than $10 cost", I think it's maybe a gadget driver output by normal usb pins, or output by pin7. I have a TV but I havn't a AV plug in mid-night now...
Similar Threads
-
IMEI, Serial Number and Firmware ......
By mattcoq in forum General Meizu M8Replies: 2Last Post: 04-17-2009, 08:35 AM -
Help - I can not find the connection!
By rori in forum M8 ApplicationsReplies: 6Last Post: 04-05-2009, 06:43 PM -
Connection problem
By Alex B in forum General Meizu M6Replies: 7Last Post: 10-13-2008, 01:06 AM -
Usb Connection
By babydebolil in forum General ChatReplies: 1Last Post: 01-19-2008, 11:43 AM -
Manual/Serial number problem
By norbar in forum General Meizu M6Replies: 5Last Post: 06-21-2007, 04:35 PM



Reply With Quote
