Author Topic: Accessing Prolific USB to serial converter from Embedded host  (Read 16528 times)

Selva

  • Member
  • ***
  • Posts: 11
I have to use Prolific USB converter from VNC2 .
From bInterfaceClass  it looks like vendor specific device .

How do i access this device ..
what Driver IO calls I can use to access this converter .
Can i use generic driver IO calls available in VNC2 ..

 

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Accessing Prolific USB to serial converter from Embedded host
« Reply #1 on: July 23, 2015, 02:42:39 pm »
I'm not clear on whether you are using a Prolific chip or an FTDI Vinculum. But in either case, if it uses a vendor-provided driver, you need to obtain documentation from the vendor to learn how to communicate with the chip.

Selva

  • Member
  • ***
  • Posts: 11
Re: Accessing Prolific USB to serial converter from Embedded host
« Reply #2 on: July 24, 2015, 01:07:01 am »
here my device is  Prolific USB to serial converter  & Host is VNC2.




Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Accessing Prolific USB to serial converter from Embedded host
« Reply #3 on: July 25, 2015, 07:49:27 pm »
If the Prolific chip uses a vendor defined driver, you will need to use Prolific's documentation as a guide to writing a compatible driver for the Vinculum.

Or look into alternate ways to accomplish what you are trying to do.

Selva

  • Member
  • ***
  • Posts: 11
Re: Accessing Prolific USB to serial converter from Embedded host
« Reply #4 on: July 27, 2015, 12:50:04 am »
Do We need to develop a driver in vnc2  ?

Is it possible to access (R/W) the device (Prolific converter ) using generic driver available in vnc2 . .

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Accessing Prolific USB to serial converter from Embedded host
« Reply #5 on: July 27, 2015, 06:10:23 pm »
Possibly. You would need documentation for the Prolific device and driver that provide enough information so you can emulate the driver using the generic driver. For example, what descriptors does the Prolific device return? What transfer types does it use? What commands, etc., does it respond to?

Selva

  • Member
  • ***
  • Posts: 11
Re: Accessing Prolific USB to serial converter from Embedded host
« Reply #6 on: July 28, 2015, 02:20:34 am »
Prolific Device works with PC , I am just testing it with Loop back ..
Please find the descriptors taken using USBVIEW in the following link .

    http://postimg.org/image/4ed08j765/full/
    http://tinypic.com/r/28comea/8

    Transfer : It uses bulk transfer

   Command : I have done loop back on UART  , So i am expecting whatever i write to USB .
 
   I am just using USB Generic sample code , it`s getting enumerated .
 
    VOS_IOCTL_USBHOST_DEVICE_GET_VID_PID - This call works i am getting VID & PID


Selva

  • Member
  • ***
  • Posts: 11
Re: Accessing Prolific USB to serial converter from Embedded host
« Reply #7 on: July 28, 2015, 07:51:34 am »
I am getting success return for all the following IO calls

VOS_IOCTL_USBHOST_DEVICE_GET_NEXT_HANDLE
VOS_IOCTL_USBHOST_DEVICE_GET_VID_PID
VOS_IOCTL_USBHOST_DEVICE_GET_CONTROL_ENDPOINT_HANDLE
VOS_IOCTL_USBHOST_DEVICE_GET_BULK_IN_ENDPOINT_HANDLE
VOS_IOCTL_USBHOST_DEVICE_GET_BULK_OUT_ENDPOINT_HANDLE
VOS_IOCTL_USBHOST_DEVICE_GET_DEV_INFO
VOS_IOCTL_USBHOST_DEVICE_GET_ENDPOINT_INFO

I am continuously writing data to USB , i didn`t receive it at UART ...
I am not sure whether it is Issue with driver / write call

To test this i am using another serial converter & reading it at PC through hyper-terminal

With scope i didn`t see any trace of Data transmission at UART-TX  pin in prolific converter ..



Selva

  • Member
  • ***
  • Posts: 11
Re: Accessing Prolific USB to serial converter from Embedded host
« Reply #8 on: July 28, 2015, 07:56:06 am »
I have shared full code in the following link

http://www.filedropper.com/usbhostgeneric_1

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Accessing Prolific USB to serial converter from Embedded host
« Reply #9 on: July 28, 2015, 11:26:31 am »
Use a protocol analyzer to view the traffic between the Prolific chip and a PC. That is what you have to emulate with the Vinculum.

What are you trying to accomplish with these chips? It's possible that there is an easier way to do it.

Selva

  • Member
  • ***
  • Posts: 11
Re: Accessing Prolific USB to serial converter from Embedded host
« Reply #10 on: July 29, 2015, 08:42:29 am »
I have used USB analyzer

This device is virtual com port

There are  64 control transfer handled while opening COM port with hyper terminal

Do i need to send all the transfers ...

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Accessing Prolific USB to serial converter from Embedded host
« Reply #11 on: July 29, 2015, 09:57:27 am »
Copying what Windows does is one way to do it. The other option is to base your code on whatever documentation Prolific provides on how to communicate with the chip.

If the control transfers are vendor-specific, you will need the documentation to understand them.