USB
  cp2101 usb protocol???

Post New Topic  Post A Reply
profile | register | preferences | faq | search

UBBFriend: Email This Page to Someone! next newest topic | next oldest topic
Author Topic:   cp2101 usb protocol???
liujyniu405
New Member
posted October 17, 2005 04:44 AM     Click Here to See the Profile for liujyniu405   Click Here to Email liujyniu405     Edit/Delete Message
I bought some CP2101 chips,i used it as a device ,and it worked normal when it was connected to the Computer.The driver worked normal too.
But now,i want the device worked as a USB SLAVE,discard the PC driver.I developped a USB HOST+MCU DEVICE to operate the USB SLAVE, I do not have the USB PROTOCOL of CP2101,could you provide me some information about the CP2101'S USB PROTOCL by EMIAL?

lj405@126.com

IP: Logged

Tsuneo
Member
posted October 18, 2005 12:31 AM     Click Here to See the Profile for Tsuneo   Click Here to Email Tsuneo     Edit/Delete Message
Hello liujyniu405,

Linux Kernel 2.6.12 and later has a "cp2101" driver and its source (by Craig Shelley) in the usb section. It may help you to learn on the CP210x driver.

The Linux driver source from SiLabs (MCCI) is what never be called a "source code", actually it's a C parser output. Though I'm not a Linux freak, I feel it's a shameful manner, if SiLabs thinks they can cheat GPL by this way.
"Linux support for SiLabs CP210x devices, take 2" on "linux kernel monkey log"

Don't ask me for the protocol, I never do such a troublesome thing.
If I were you, I don't use CP210x in your situation.

Tsuneo

IP: Logged

liujyniu405
New Member
posted October 18, 2005 04:16 AM     Click Here to See the Profile for liujyniu405   Click Here to Email liujyniu405     Edit/Delete Message
thanks for your help.

I will choose another usb controller instead of CP2101.

IP: Logged

Brent W
Administrator
posted November 19, 2005 11:19 AM     Click Here to See the Profile for Brent W   Click Here to Email Brent W     Edit/Delete Message
All,

As an enhancement to our Linux support, we have undertaken a development effort to update, enhance, and package the existing CP2101 driver that is currently in the public domain at:

http://www.kernel.org/

These enhancements include adding support for CP2102 and CP2103 devices in addition to porting the source to work with Linux kernel version 2.4. The current version supports Linux 2.6.

Once the work is completed, the source will be updated and made available in the public domain. The estimated release schedule is before the end of Q1 2006.

Regards,

Brent

IP: Logged

Tsuneo
Member
posted November 20, 2005 01:38 AM     Click Here to See the Profile for Tsuneo   Click Here to Email Tsuneo     Edit/Delete Message
Brent,
Thank you for clarifying the situation of the Linux driver.

If this means SiLabs continues to release the Linux driver by themselves, I don't think it's a good way. I suppose following story is better.
a) SiLabs opens the USB protocol of CP210x on demand under the prohibition such as SiLabs always attaches to their email.
b) A volunteer makes a Linux driver using SiLabs document at his own risk as usual as Linux way.
c) SiLabs refers the Linux driver by courtesy of the volunteer.

As a programmer, I highly appreciate Linux and the open-source movement. I've learnt much from their source code, I enjoy benefit from them in daily life. At the same time, however, I don't think they are all of the world.
Linux and the open-source movement is based on the spirit of "at my own risk". On the other hand, enterprise activity is based on "at the companies' risk". We pay our money for the companies' accomplishment to reduce our risk. If a company try to cross this boundary without correct recognition, it often brings a miserable result for both world such as SiLabs(MCCI) made on their Linux source code. So, I suppose the above way is happier solution for this problem.

If SiLabs hesitates to open the USB protocol of CP210x on demand, I should say SiLabs fears are utterly groundless.
If a mean engineer would try to reverse-engineer it, it doesn't take a day using an USB protocol analyzer with small cost. Nowadays, USB protocol analyzer costs as cheap as $400.
On the other hand, if SiLabs opens the protocol on demand under the prohibition, SiLabs can still reserve the proprietary right on the protocol.

So, I recommend you to reconsider the way SiLabs supports Linux.

Tsuneo

[This message has been edited by Tsuneo (edited November 20, 2005).]

IP: Logged

Tsuneo
Member
posted November 25, 2005 03:28 PM     Click Here to See the Profile for Tsuneo   Click Here to Email Tsuneo     Edit/Delete Message
I received several e-mails that point out my claim on the above post is not clear.
OK, I'll elaborate.
1) Encrypted Linux source code
2) What I meant with the term "on demand"

1) Encrypted Linux source code
In the SiLabs(MCCI) source code for CP210x Linux driver, following five files are encrypted as follows.
mcci_usb_ids.c, mcci_usb.c, usbif.h, vspctlda.h, vspwire.h


//------ mcci_usb_ids.c ------
#define ¥
l111110100 ¥
¥
(010304)
#define ¥
l111110101 ¥
¥
(0xea60)
#define ¥
l111110110 ¥
¥
(1)
int
mcci_vids
[
]
=
{
l111110100
,
l111110100
,
0
}
;
int
mcci_pids
[
]
=
{
l111110101
,
l111110110
,
0
}
;
//------ end of mcci_usb_ids.c ------

This disorder is not caused by the forum engine. It is displayed as it is.
Can you understand what this "source code" describes? OK, I'll reformat it as follows
#define l111110100   (010304)
#define l111110101 (0xea60)
#define l111110110 (1)
int mcci_vids[]={l111110100,l111110100,0};
int mcci_pids[]={l111110101,l111110110,0};

It seems a little better, still "l111110101" is annoying.

Please consider what will happen if many companies would follow the way SiLabs(MCCI) encrypted the source code. It will threaten the open-source community. Therefore, it was accused as an outlaw.

If SiLabs still continues to release this kind of encrypted code in future version, it will never be accepted from Linux community. Linux 2.6 adopted the driver written by Craig Shelley instead of SiLabs one. Greg K-H, the maintainer of "USB SERIAL DRIVER" part of the Linux kernel, wrote as follows. "Linux support for SiLabs CP210x devices, take 2" Actually he has authority to decide which driver is included in Linux release.


2) "On demand"
With the term "on demand", I meant following situation.
a) The protocol is not published as a document such as an appnote on the web.
b) However, the protocol is opened when an user requests to SiLabs by mail.
c) SiLabs limits the usage of the information opened by email.
- SiLabs prohibits for the user to open the information itself.
- SiLabs allows for the user to make a software such as a Linux device driver using the information.
- SiLabs allows for the user to open their software.

I suppose the actual case such as the FLASH programming protocol over the JTAG on 'F12x. I received a kind reply when I asked SiLabs about this protocol.
a) The 'F12x programming protocol is not opened publicly on SiLabs documents, though 'F00x-02x protocol is published as an appnote.
b) However, it is opened to the user when (s)he asks it to SiLabs by email.
c) The usage of the information is limited by SiLabs statement attached to the reply.

If SiLabs provides the correct information on the CP210x protocol to the Linux driver authors, they will make their driver more reliable. Linux 2.6 has "CP2101" driver, independently coded by Craig Shelley. He wrote in the release note as follows.


------ "2.6.12-rc2 long-format changelog" -----
http://lwn.net/Articles/130476/

[PATCH] USB: add driver for CP2101/CP2102 RS232 adaptors

This patch against 2.6.10 provides the driver for the CP2101 and CP2102
USB to RS232 adaptor chips which are found in some serial converter
cables and usb mobile phone cables.

It provides cp2101.c, and patches Kconfig and Makefile in
drivers/usb/serial Since there is no technical data sheet freely
available for these chips, much of the code in this driver has been
based on protocol analysis, assumptions and guesswork.

The cp210x family of devices have OEM programmable device IDs so updates
will be required as and when new devices are found.

The driver currently only supports configuration of baud rate, data
bits, stop bits and parity mode. While this is enough to enable the use
of a wide range of devices based on this chip, the driver is still
incomplete in many areas such as flow control. Unfortunately without
technical datasheets, implementing these features is made very difficult
indeed.

Signed-off-by: Craig Shelley craig@microtron.org.uk
Signed-off-by: Greg Kroah-Hartman
------ "More USB bugfixes for 2.6.12-rc5" -----
http://lkml.org/lkml/2005/6/3/37
Craig Shelley:
o USB: CP2101 Add support for flow control
------------------------

Surely, even under the prohibition, the protocol would be flowed out to the web. But the prohibition clearly declares the SiLabs right on the information. It is better for SiLabs than current situation in which a reverse-engineered protocol spreads over the web without declaration.

Tsuneo

IP: Logged

xellos
New Member
posted December 14, 2005 10:34 AM     Click Here to See the Profile for xellos     Edit/Delete Message
Is there are driver package for the CP210x package for Linux 2.6 kernels prior to the 2.6.12 kernel release?

I would like to use this driver under the standard release of Red Hat Enterprise Linux 4 which is running a 2.6.9 kernel without native Linux support. Do you have a package that can be compiled and inserted into the kernel?

IP: Logged

All times are CT (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply
Hop to:

Contact Us | MCU User Forum

Have you seen our MCU Knowledge Base?


Ultimate Bulletin Board 5.47b