Author Topic: MediaTek USB-UART on Gemini-PDA  (Read 6313 times)

cortez

  • Sr. Member
  • ****
  • Posts: 375
    • View Profile
    • http://www.omegamoon.com
MediaTek USB-UART on Gemini-PDA
« 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. I hope this helps others in getting this working.

Cheers,
Omegamoon
[div align=\"center\"]== == == == == == == == == == == == == ==
www.omegamoon.com
Zaurus SL-C750 - Died in a dreadful coffee experiment, has a second life somewhere in the Czech Republic
Zaurus SL-C1000 - Multiboot Zubuntu, Debian, Fedora, Poky, Android and others
Zaurus SL-C3100 - Development device, currently Zubuntu 2.0
Zaurus SL-6000L - The fridge is running Zubuntu 1.0
Zaurus SL-C860 - Cacko, untouched since kindly donated, waiting for Zubuntu
== == == == == == == == == == == == == ==[/div]

Murple2

  • Full Member
  • ***
  • Posts: 137
    • View Profile
MediaTek USB-UART on Gemini-PDA
« Reply #1 on: June 27, 2018, 07:51:20 am »
This is super helpful thankyou!

greguu

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 443
    • View Profile
    • http://github.com/greguu
MediaTek USB-UART on Gemini-PDA
« Reply #2 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. I hope this helps others in getting this working.

Cheers,
Omegamoon

Thanks for that. I will get the parts and build one hopefully soon.
Gemini-PDA (Sailfish X and Android) / LG Nexus 5 (Android 11) / Nokia N9 (MeeGo/Harmattan)
Sharp Zaurus C3100 (Borzoi) - Void Linux (voidz) Kernel 5.0.0 - Hardware (Buffalo CF LAN, DLink 660 CF WiFi, ASIX AX88772 USB Ethernet)

MikeC

  • Newbie
  • *
  • Posts: 20
    • View Profile
MediaTek USB-UART on Gemini-PDA
« Reply #3 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. I hope this helps others in getting this working.

Cheers,
Omegamoon


Thank you for posting this info!

Murple2

  • Full Member
  • ***
  • Posts: 137
    • View Profile
MediaTek USB-UART on Gemini-PDA
« Reply #4 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

I'll report back if they arrive/work!

Kiriririn

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
MediaTek USB-UART on Gemini-PDA
« Reply #5 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=htt...%2F262202365883
https://rover.ebay.com/rover/0/0/0?mpre=htt...%2F162036110446

Pics:

https://imgkk.com/i/nj6z.jpg
https://imgkk.com/i/48qa.jpg
https://imgkk.com/i/370p.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
« Last Edit: July 04, 2018, 06:34:16 pm by Kiriririn »

Murple2

  • Full Member
  • ***
  • Posts: 137
    • View Profile
MediaTek USB-UART on Gemini-PDA
« Reply #6 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?

Alberto González Palomo

  • Newbie
  • *
  • Posts: 3
    • View Profile
MediaTek USB-UART on Gemini-PDA
« Reply #7 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.

Murple2

  • Full Member
  • ***
  • Posts: 137
    • View Profile
MediaTek USB-UART on Gemini-PDA
« Reply #8 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.
« Last Edit: August 01, 2018, 01:34:31 pm by Murple2 »

greguu

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 443
    • View Profile
    • http://github.com/greguu
MediaTek USB-UART on Gemini-PDA
« Reply #9 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

 [ Invalid Attachment ]

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
 
« Last Edit: September 19, 2018, 03:32:22 am by speculatrix »
Gemini-PDA (Sailfish X and Android) / LG Nexus 5 (Android 11) / Nokia N9 (MeeGo/Harmattan)
Sharp Zaurus C3100 (Borzoi) - Void Linux (voidz) Kernel 5.0.0 - Hardware (Buffalo CF LAN, DLink 660 CF WiFi, ASIX AX88772 USB Ethernet)