Compile USB Serial Converter driver for PL2303

2,423 views
Skip to first unread message

Xu

unread,
Sep 4, 2010, 11:16:35 AM9/4/10
to android-porting
Hi All,

I'm trying to connect a PL2303 based USB to serial converter with one
Android MID [1].
However, the MID does not have driver for it and I do not have the
kernel source for the MID, as it's running 2.6.29 kernel, Inspired by
[2] I built the pl2303.ko file from source code myself.

The insmod pl2303.ko runs perfect, but when I insert the usb2serial
cable, I found below error message via dmesg:

<6>usb 2-1: new full speed USB device using dwc_otg and address 2
<3>usb 2-1: device v067b p2303 is not supported
<6>usb 2-1: configuration #1 chosen from 1 choice
<6>pl2303 2-1:1.0: pl2303 converter detected
<3>pl2303 2-1:1.0: No more free serial devices
<4>pl2303: probe of 2-1:1.0 failed with error -5

[1] http://en.smartdevices.com.cn/Products/V5/
[2] http://android.modaco.com/content/htc-hero-hero-modaco-com/313133/howto-compiling-tun-tap-driver-for-htc-hero/

Do you know is there something wrong in the pl2303.ko driver I built
or I need further configuration to make the cable works?

Thanks and Regards,
xu

Chris Stratton

unread,
Sep 5, 2010, 6:22:04 PM9/5/10
to android-porting
First you should build that driver source for a desktop linux and make
sure it works with the peripheral. You may need to add vid/pid codes
to it, or it might be you have the wrong driver. Figure that out on
the desktop first.

Then you should look at the driver source and see where that no more
free serial devices message is coming from.

You could also return the mid device on the grounds that it contains
pirated software - if they are not offering kernel source code they
are shipping a linux kernel without a license to do so, which is
usually called piracy.

On Sep 4, 11:16 am, Xu <xu4w...@gmail.com> wrote:
> Hi All,
>
> I'm trying to connect a PL2303 based USB to serial converter with one
> Android MID [1].
> However, the MID does not have driver for it and I do not have the
> kernel source for the MID, as it's running 2.6.29 kernel, Inspired by
> [2] I built the pl2303.ko file from source code myself.
>
> The insmod pl2303.ko runs perfect, but when I insert the usb2serial
> cable, I found below error message via dmesg:
>
> <6>usb 2-1: new full speed USB device using dwc_otg and address 2
> <3>usb 2-1: device v067b p2303 is not supported
> <6>usb 2-1: configuration #1 chosen from 1 choice
> <6>pl2303 2-1:1.0: pl2303 converter detected
> <3>pl2303 2-1:1.0: No more free serial devices
> <4>pl2303: probe of 2-1:1.0 failed with error -5
>
> [1]http://en.smartdevices.com.cn/Products/V5/
> [2]http://android.modaco.com/content/htc-hero-hero-modaco-com/313133/how...

Xu Wang

unread,
Sep 6, 2010, 10:49:09 AM9/6/10
to cs0...@gmail.com, android-porting, service
Thanks Chris. The PL2303 driver source run perfect in Linux desktop, and in Ubuntu Arm too.
In Android system, after many fails and tries,  I've manage to make the driver shows a ttyUSB0 in /dev, and are going to test the functionality.

Regarding piracy and pirated software you mentioned, I'm not sure they will provide kernel sources or not, it's a shame if it will be a real pirated software.

The service people from the MID manufacture is included in this email.


Martin Bruner

unread,
Jun 8, 2011, 7:26:59 PM6/8/11
to android...@googlegroups.com
I know this is a rather old thread, but I thought I would see if anyone has
tried to use a PL2303 USB Serial Converter for Android 3.1. So far I've been
able to do some rudimentary USB I/O with this new version of Android, but I
haven't figured out how to use it as a serial port.

Most of my experience is in Windows and embedded systems. I am new to the
Linux/Android world so I would appreciate anyone who has had success with this
subject.

Thanks,

Marty

Mahesh Ingle

unread,
Jun 9, 2011, 4:03:37 AM6/9/11
to gchap-andr...@m.gmane.org, android...@googlegroups.com
Hi,
PL2303 usb to serial driver is already present in the (android)linux main line source, simply select it from menuconfig of kernel.
device drivers -->   USB support -->  USB Serial Converter support --> USB Prolific 2303 Single Port Serial Driver (or similar)
and compile.
The driver is now loaded in the kernel image, to use it after boot check for ttyUSB0 or similar device(on usb- serial cable plugged).
now this port will act as serial port like anyother general ttyS* port.
                      


                                                          @ Mahesh @

“You Can Discover New Oceans If You Have The Courage To Lose Sight Of The Shore."


Reply all
Reply to author
Forward
0 new messages