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

Library for MediaTek UART/USB Driver #4

Open
leocrg opened this issue Nov 25, 2020 · 3 comments
Open

Library for MediaTek UART/USB Driver #4

leocrg opened this issue Nov 25, 2020 · 3 comments

Comments

@leocrg
Copy link

leocrg commented Nov 25, 2020

Hi!
First of all, I would like to congratulate and thank you for your help in developing the CP21x driver library for the Arduino. It was an impeccable job that inspired me to develop a similar library for Mediatek's UART/USB converter chipset (VID: 0E8D & PID: 0023).

I'm Trying to use a GPS Tracker with mediatek chipset to comunicate with the USB Host Shield 2.0 and Arduino MEGA.

When I used the example "hub_demo.ino" I received this respose from the USB:

01
--
String Descriptors:
Manufacturer:		MediaTek Inc
Product:		Product

Device descriptor: 
Descriptor Length:	12
Descriptor type:	01
USB version:		0200
Device class:		EF
Device Subclass:	02
Device Protocol:	01
Max.packet size:	08
Vendor  ID:		0E8D
Product ID:		0023
Revision ID:		0100
Mfg.string index:	05
Prod.string index:	06
Serial number index:	00
Number of conf.:	01

Configuration descriptor:
Total length:		008D
Num.intf:		04
Conf.value:		01
Conf.string:		00
Attr.:			80
Max.pwr:		FA
Unknown descriptor:
Length:		08
Type:		0B
Contents:	00020A0000010904

Interface descriptor:
Intf.number:		00
Alt.:			00
Endpoints:		02
Intf. Class:		0A
Intf. Subclass:		00
Intf. Protocol:		00
Intf.string:		01

Endpoint descriptor:
Endpoint address:	81
Attr.:			02
Max.pkt size:		0040
Polling interval:	00

Endpoint descriptor:
Endpoint address:	01
Attr.:			02
Max.pkt size:		0040
Polling interval:	00

Interface descriptor:
Intf.number:		01
Alt.:			00
Endpoints:		01
Intf. Class:		02
Intf. Subclass:		02
Intf. Protocol:		01
Intf.string:		02
Unknown descriptor:
Length:		05
Type:		24
Contents:	0010010424
Unknown descriptor:
Length:		04
Type:		24
Contents:	020F0524
Unknown descriptor:
Length:		05
Type:		24
Contents:	0601000524
Unknown descriptor:
Length:		05
Type:		24
Contents:	0103000705

Endpoint descriptor:
Endpoint address:	84
Attr.:			03
Max.pkt size:		0010
Polling interval:	03
Unknown descriptor:
Length:		08
Type:		0B
Contents:	02020A0000030904

Interface descriptor:
Intf.number:		02
Alt.:			00
Endpoints:		02
Intf. Class:		0A
Intf. Subclass:		00
Intf. Protocol:		00
Intf.string:		03

Endpoint descriptor:
Endpoint address:	82
Attr.:			02
Max.pkt size:		0040
Polling interval:	00

Endpoint descriptor:
Endpoint address:	02
Attr.:			02
Max.pkt size:		0040
Polling interval:	00

Interface descriptor:
Intf.number:		03
Alt.:			00
Endpoints:		01
Intf. Class:		02
Intf. Subclass:		02
Intf. Protocol:		01
Intf.string:		04
Unknown descriptor:
Length:		05
Type:		24
Contents:	0010010424
Unknown descriptor:
Length:		04
Type:		24
Contents:	020F0524
Unknown descriptor:
Length:		05
Type:		24
Contents:	0603020524
Unknown descriptor:
Length:		05
Type:		24
Contents:	0103020705

Endpoint descriptor:
Endpoint address:	83
Attr.:			03
Max.pkt size:		0010
Polling interval:	03

Addr:1(0.0.1)

I wonder if you could help me develop this library and make it available on this git. I don't know what I need to know about these drivers and how to get them. Whatever you can do to help me, I would appreciate it very much!

@thaanstad
Copy link
Collaborator

Do you have a part number and link to the datasheet for MediaTek's UART/USB converter? Is this an IC similar to the FT232RL and CP210x?

@leocrg
Copy link
Author

leocrg commented Nov 26, 2020

My gps module ST210U is a "black box" and I don't have a good documentation, but I found the module linkit ON (https://seeeddoc.github.io/LinkIt_ONE/#Installing_Mediatek_LinkIt_ONE_SDK) that communicate with the same mediatek driver for PC. When I opened the schematic on EAGLE (https://docs.labs.mediatek.com/resource/linkit-one/en/documentation), I saw that the usb interface is connected in MT2502A IC (https://datasheetspdf.com/pdf-file/947458/MediaTek/MT2502A/1).

@thaanstad
Copy link
Collaborator

henla464,

I downloaded and reviewed ftd2xx.h from ftdi's windows VCP driver and I didn't understand how the configuration registers match up with the info in cdcftdi.h of this library. I was under the impression leocrg could use the info in the header file of the driver library for his device to create the appropriate header file and cpp file for his device. Can you point us in the right direction? What method did you use to find the appropriate registers that allow communication with cp210x?

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

2 participants