OESF Portables Forum

Model Specific Forums => Gemini PDA => Gemini PDA - Hardware => Topic started by: cortez on June 27, 2018, 05:51:41 am

Title: MediaTek USB-UART on Gemini-PDA
Post by: cortez on June 27, 2018, 05:51:41 am
Hi,

I managed to get UART over USB working, which is a nice, non-destructive way of getting a serial console on the Gemini-PDA.
I documented all the steps, and wrote a blog post here (http://www.omegamoon.com/blog/index.php?entry=entry180626-210224). I hope this helps others in getting this working.

Cheers,
Omegamoon
Title: MediaTek USB-UART on Gemini-PDA
Post by: Murple2 on June 27, 2018, 07:51:20 am
This is super helpful thankyou!
Title: MediaTek USB-UART on Gemini-PDA
Post by: greguu on June 27, 2018, 07:07:33 pm
Quote from: cortez
Hi,

I managed to get UART over USB working, which is a nice, non-destructive way of getting a serial console on the Gemini-PDA.
I documented all the steps, and wrote a blog post here (http://www.omegamoon.com/blog/index.php?entry=entry180626-210224). I hope this helps others in getting this working.

Cheers,
Omegamoon

Thanks for that. I will get the parts and build one hopefully soon.
Title: MediaTek USB-UART on Gemini-PDA
Post by: MikeC on June 28, 2018, 03:32:40 pm
Quote from: cortez
Hi,

I managed to get UART over USB working, which is a nice, non-destructive way of getting a serial console on the Gemini-PDA.
I documented all the steps, and wrote a blog post here (http://www.omegamoon.com/blog/index.php?entry=entry180626-210224). I hope this helps others in getting this working.

Cheers,
Omegamoon


Thank you for posting this info!
Title: MediaTek USB-UART on Gemini-PDA
Post by: Murple2 on June 29, 2018, 07:51:49 pm
Bought these 'cos theyre super cheap - https://www.amazon.co.uk/TOOGOO-Raspberry-P...s=usb+tty+cable (https://www.amazon.co.uk/TOOGOO-Raspberry-Programming-Windows-Supported-Blue-Black/dp/B0796S5SV5/ref=sr_1_sc_8?ie=UTF8&qid=1530316164&sr=8-8-spell&keywords=usb+tty+cable)

I'll report back if they arrive/work!
Title: MediaTek USB-UART on Gemini-PDA
Post by: Kiriririn on July 04, 2018, 06:31:39 pm
I've just built one of these without cutting wires etc by buying a few things from eBay:

https://rover.ebay.com/rover/0/0/0?mpre=htt...%2F282074575442 (https://rover.ebay.com/rover/0/0/0?mpre=https%3A%2F%2Fwww.ebay.co.uk%2Fulk%2Fitm%2F282074575442)
https://rover.ebay.com/rover/0/0/0?mpre=htt...%2F262202365883 (https://rover.ebay.com/rover/0/0/0?mpre=https%3A%2F%2Fwww.ebay.co.uk%2Fulk%2Fitm%2F262202365883)
https://rover.ebay.com/rover/0/0/0?mpre=htt...%2F162036110446 (https://rover.ebay.com/rover/0/0/0?mpre=https%3A%2F%2Fwww.ebay.co.uk%2Fulk%2Fitm%2F162036110446)

Pics:

https://imgkk.com/i/nj6z.jpg (https://imgkk.com/i/nj6z.jpg)
https://imgkk.com/i/48qa.jpg (https://imgkk.com/i/48qa.jpg)
https://imgkk.com/i/370p.jpg (https://imgkk.com/i/370p.jpg)
https://imgkk.com/i/spc6.jpg (https://imgkk.com/i/spc6.jpg)

Really impressed with the level of output, should really help me solve my shutdown freeze and make kernel changes non blindly
Title: MediaTek USB-UART on Gemini-PDA
Post by: Murple2 on July 05, 2018, 06:13:21 am
Is there a reason the OP recommends an USB A to A cable? I only have one and would rather not cut it up, but I have plenty of A to B,mini,micro etc cables. Can someone explain the wiring differences to me?
Title: MediaTek USB-UART on Gemini-PDA
Post by: Alberto González Palomo on July 09, 2018, 05:35:39 am
Quote from: Murple2
Is there a reason the OP recommends an USB A to A cable? I only have one and would rather not cut it up, but I have plenty of A to B,mini,micro etc cables. Can someone explain the wiring differences to me?

Not sure what kind of USB-A to A cable the OP used, because they are not standard. Some are meant for host-to-host communication and have active components in the middle, others are straight through for certain peripherals that have a USB A instead of the USB B / mini / micro they should have.
Kiriririn's post indicates that you just need a straight connection with the only active component being the USB-to-TTL-serial adapter, like those you bought.

I haven't done this particular cable yet, so I can give you only general advice: the important thing is to check the connections with a multimeter, because cable colours do not always match.
You could even use a USB-C to A cable, cut the USB-A part and plug the wires to the USB-to-TTL-serial cable. This is how I plan to do it.
Title: MediaTek USB-UART on Gemini-PDA
Post by: Murple2 on July 09, 2018, 05:59:10 am
Quote from: Alberto González Palomo
Quote from: Murple2
Is there a reason the OP recommends an USB A to A cable? I only have one and would rather not cut it up, but I have plenty of A to B,mini,micro etc cables. Can someone explain the wiring differences to me?

Not sure what kind of USB-A to A cable the OP used, because they are not standard. Some are meant for host-to-host communication and have active components in the middle, others are straight through for certain peripherals that have a USB A instead of the USB B / mini / micro they should have.
Kiriririn's post indicates that you just need a straight connection with the only active component being the USB-to-TTL-serial adapter, like those you bought.

I haven't done this particular cable yet, so I can give you only general advice: the important thing is to check the connections with a multimeter, because cable colours do not always match.
You could even use a USB-C to A cable, cut the USB-A part and plug the wires to the USB-to-TTL-serial cable. This is how I plan to do it.

Thanks very much, I havent received the usb/TTL cables yet but I'll post back with the results when they arrive. I have so many old usb cables I definitely want to recycle one of them rather than spend money on something new. I'm sure I can find one that works and thanks for the advice on the multimeter

EDIT : cables arrived today 27th july - won't have a chance to play until after the weekend but will report back
update - cables work fine with any ol' sliced up usb A cable.
Title: MediaTek USB-UART on Gemini-PDA
Post by: greguu on September 05, 2018, 01:07:55 am
For those that do not want to use their existing bus pirate or do not have a spare USB-C cable available to cut and use for the adapter, I recommend to get one of these instead:
AliExpress (https://www.aliexpress.com/item/2018-News-original-EASY-FIRMWARE-TEMA-EFT-DONGLE-EFT-Dongle-Serial-2-IN-1-cable-Free/32848940735.html)

 [ You are not allowed to view attachments ]

These work out of the box (tested on Void Linux x86 Musl):
Code: [Select]
[86224.028855] usb 2-2: new full-speed USB device number 86 using xhci_hcd
 [86224.238969] usbcore: registered new interface driver usbserial_generic
 [86224.238985] usbserial: USB Serial support registered for generic
 [86224.243113] usbcore: registered new interface driver ftdi_sio
 [86224.243140] usbserial: USB Serial support registered for FTDI USB Serial Device
 [86224.243293] ftdi_sio 2-2:1.0: FTDI USB Serial Device converter detected
 [86224.243346] usb 2-2: Detected FT232RL
 [86224.247970] usb 2-2: FTDI USB Serial Device converter now attached to ttyUSB0
Code: [Select]
[3017] cmdline: console=tty0 console=ttyMT0,921600n1 root=/dev/ram vmalloc=496M slub_max_order=0 slub_debug=OFZPU androidboot.hardware=mt6797 maxcpus=5 androi0
 [3022] lk boot time = 2911 ms
 [3022] lk boot mode = 0
 [3023] lk boot reason = wdt_by_pass_pwk
 [3023] lk finished --> jump to linux kernel 64Bit
 
 [3024]
[LK]jump to K64 0x40080000
 [ATF](0)[3.083354]save kernel info
 [ATF](0)[3.083735]K64
 [ATF](0)[3.083982]pc=0x40080000, r0=0x44000000, r1=0x0
 INFO:    BL3-1: Preparing for EL3 exit to normal world, Kernel
 INFO:    BL3-1: Next image address = 0x40080000
 INFO:    BL3-1: Next image spsr = 0x3c9
 [ATF](0)[3.086249]el3_exit