public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] How to enable RNDIS and CDC for USB
@ 2007-09-18  5:27 Imran Khan
  2007-09-18  7:40 ` Andrew Lunn
  0 siblings, 1 reply; 4+ messages in thread
From: Imran Khan @ 2007-09-18  5:27 UTC (permalink / raw)
  To: ecos-discuss

Hi all,
We have ported the RNDIS support code provided in linux-2.4.XX along
with our platform specific USB code into the ecos.
But the design of the code is such that at any time it can support
either RNDIS or CDC but not both at the same time.
Could any one of you please tell us whether is there any possibility of
checking the type of host at run time and doing the initialization
again.
We have tried with advertising two configurations to linux host,the
first configuration being RNDIS but when the host gets a wrong
descriptor it stops sending interrupts.
I have posted this query previously also but I did not get any response.
Any suggestion in this regard is desperately needed.

Thanks & Regards,
Imran



-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ECOS] How to enable RNDIS and CDC for USB
  2007-09-18  5:27 [ECOS] How to enable RNDIS and CDC for USB Imran Khan
@ 2007-09-18  7:40 ` Andrew Lunn
  2007-09-18  8:58   ` Imran Khan
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Lunn @ 2007-09-18  7:40 UTC (permalink / raw)
  To: Imran Khan; +Cc: ecos-discuss

On Tue, Sep 18, 2007 at 10:57:47AM +0530, Imran Khan wrote:
> Hi all,
> We have ported the RNDIS support code provided in linux-2.4.XX along
> with our platform specific USB code into the ecos.

I hope you thought about the licensing issues here. I expect the USB
code is GPL. That makes your whole application now GPL. So you need to
give away all your sources, eCos, USB, and application, to your
customer. If you don't you are violating the GPL license.

> But the design of the code is such that at any time it can support
> either RNDIS or CDC but not both at the same time.
> Could any one of you please tell us whether is there any possibility of
> checking the type of host at run time and doing the initialization
> again.
>
> We have tried with advertising two configurations to linux host,the
> first configuration being RNDIS but when the host gets a wrong
> descriptor it stops sending interrupts.

Using two configurations sounds like the right way to do it. However
if the host is going wrong, maybe your descriptors are wrong. What
does usbview show? Does it look correct? Have you debugged the Linux
host code to work out why it goes wrong?

     Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ECOS] How to enable RNDIS and CDC for USB
  2007-09-18  7:40 ` Andrew Lunn
@ 2007-09-18  8:58   ` Imran Khan
  2007-09-18  9:23     ` Andrew Lunn
  0 siblings, 1 reply; 4+ messages in thread
From: Imran Khan @ 2007-09-18  8:58 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: ecos-discuss

Hi Andrew,
Thank you for your reply.
I agree with you as far as GPL issue is concerned but at the moment
we are not concerned about this issue.
You are correct that host is getting wrong descriptors but such is the 
design of linux code.
Here the compilation is done on the basis of some configuration flags
specific to CDC or RNDIS so you can use your image with either CDC or
RNDIS ,but in our code instead of having compile time flags we are
setting some flags at run time and monitoring the enumeration
process ,if enumeration is not complete within a specific time our
device assumes that host is not right, then we set flags for 
other host and reinitialize the USB part.Our default flag setting is for
RNDIS.
Our problem is that once the host gets wrong descriptor it stops
communication with the device so the new configuration is never used.
Could you please tell me is there any other way of doing this ?

Thanks & Regards,
Imran
On Tue, 2007-09-18 at 09:39 +0200, Andrew Lunn wrote:
> On Tue, Sep 18, 2007 at 10:57:47AM +0530, Imran Khan wrote:
> > Hi all,
> > We have ported the RNDIS support code provided in linux-2.4.XX along
> > with our platform specific USB code into the ecos.
> 
> I hope you thought about the licensing issues here. I expect the USB
> code is GPL. That makes your whole application now GPL. So you need to
> give away all your sources, eCos, USB, and application, to your
> customer. If you don't you are violating the GPL license.
> 
> > But the design of the code is such that at any time it can support
> > either RNDIS or CDC but not both at the same time.
> > Could any one of you please tell us whether is there any possibility of
> > checking the type of host at run time and doing the initialization
> > again.
> >
> > We have tried with advertising two configurations to linux host,the
> > first configuration being RNDIS but when the host gets a wrong
> > descriptor it stops sending interrupts.
> 
> Using two configurations sounds like the right way to do it. However
> if the host is going wrong, maybe your descriptors are wrong. What
> does usbview show? Does it look correct? Have you debugged the Linux
> host code to work out why it goes wrong?
> 
>      Andrew
> 


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ECOS] How to enable RNDIS and CDC for USB
  2007-09-18  8:58   ` Imran Khan
@ 2007-09-18  9:23     ` Andrew Lunn
  0 siblings, 0 replies; 4+ messages in thread
From: Andrew Lunn @ 2007-09-18  9:23 UTC (permalink / raw)
  To: Imran Khan; +Cc: ecos-discuss

On Tue, Sep 18, 2007 at 02:27:55PM +0530, Imran Khan wrote:
> Hi Andrew,
> Thank you for your reply.

> You are correct that host is getting wrong descriptors but such is the 
> design of linux code.
>
> Here the compilation is done on the basis of some configuration flags
> specific to CDC or RNDIS so you can use your image with either CDC or
> RNDIS ,but in our code instead of having compile time flags we are
> setting some flags at run time and monitoring the enumeration
> process ,if enumeration is not complete within a specific time our
> device assumes that host is not right, then we set flags for 
> other host and reinitialize the USB part.Our default flag setting is for
> RNDIS.
> Our problem is that once the host gets wrong descriptor it stops
> communication with the device so the new configuration is never used.
> Could you please tell me is there any other way of doing this ?

So where really is the problem? Wrong descriptors? Broken Linux host
implementation? If the descriptors are broken, fix them. If the Linux
host is broken, fix it.

        Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-09-18  9:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-18  5:27 [ECOS] How to enable RNDIS and CDC for USB Imran Khan
2007-09-18  7:40 ` Andrew Lunn
2007-09-18  8:58   ` Imran Khan
2007-09-18  9:23     ` Andrew Lunn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).