EmbeddedRelated.com
Forums
Memfault Beyond the Launch

VirtualCOM port Host side-Driver problem- PLPU-S2K

Started by Yusuf Husainy June 10, 2013
--- In l..., Naresh Panchal wrote:
>
> Hi Yusuf,
>
> Can you share working code of virtual com? I also want to implement it.
> On Jun 13, 2013 10:54 AM, "Yusuf Husainy" wrote:
>

People come here to get help with THEIR problems. They seldom provide any feedback on whether the help they received solved the problem.

Most will claim that "my company owns the code" even though they got it from us or it was provided by a company.

Some days I like to rant...

Richard

An Engineer's Guide to the LPC2100 Series

Hi Naresh,

The code I was using is from the VirtualCOM.zip file hosted on this group's files section. I just modified the SetSIOBaudrate() function in vcomuser.c, to the correct values, i.e., modified the U0DLL, U0DLM, U1DLL and U1DLM values to match the requests send by the host side PLPU-S2K driver.

If you explore the source code in the above .zip file, you will understand how it works. After modifying this, it worked great.

Again, thanks everyone for their replies.

Regards,
Yusuf Husainy.
________________________________
From: Naresh Panchal
To: l...
Sent: Thursday, 13 June 2013 9:42 PM
Subject: Re: [lpc2000] Re: VirtualCOM port Host side-Driver problem- PLPU-S2K


Hi Yusuf,

Can you share working code of virtual com? I also want to implement it.
On Jun 13, 2013 10:54 AM, "Yusuf Husainy" wrote:

> **
> Hi,
>
> I have solved my problem.
>
> I did not look closely at the LPC VCOM code provided by Philips. There
> were errors in the BaudRate calculation, when a Vendor request was received
> to change the baud rate.
>
> Everything is working great now.
>
> Thanks to everyone who repled to my post, it gave me insights and
> solutions.
>
> Regards,
> Yusuf Husainy.
>
> ________________________________
> From: Xiaofan Chen
> To: l...
> Sent: Wednesday, 12 June 2013 6:43 AM
> Subject: Re: [lpc2000] Re: VirtualCOM port Host side-Driver problem-
> PLPU-S2K
>
> On Wed, Jun 12, 2013 at 8:40 AM, boB G wrote:
> > I didn't think that changing the baud rate in windows for
> > a virtual com port did anything at all.
>
> If it is pure virtual com port, then that is true. If there is a
> real serial port after, then it can use useful. You may want
> to read the spec for USB CDC class from usb.org.
>
> > As far as how windows USB drivers work and integrate together, I
> > believe that all engineers and programmers that know about how
> > this all works are either retired or dead.
>
> That is certainly not true. If you head to the ntdev mailing list,
> then you will know quite a few experts there, one of them
> is Tim Roberts.
> http://www.osronline.com/showlists.cfm?list=ntdev
>
> > BTW, we find that windows 8 works much better overall with our
> > LPCUSB implementation of CDC virtual com ports than other
> > versions of windoze for some unknown reason.
> > --
> Xiaofan
>
> [Non-text portions of this message have been removed]
>
>
>
[Non-text portions of this message have been removed]

Hi Yusuf,

Thanks.
On Jun 19, 2013 12:29 PM, "Yusuf Husainy" wrote:

> **
> Hi Naresh,
>
> The code I was using is from the VirtualCOM.zip file hosted on this
> group's files section. I just modified the SetSIOBaudrate() function in
> vcomuser.c, to the correct values, i.e., modified the U0DLL, U0DLM, U1DLL
> and U1DLM values to match the requests send by the host side PLPU-S2K
> driver.
>
> If you explore the source code in the above .zip file, you will understand
> how it works. After modifying this, it worked great.
>
> Again, thanks everyone for their replies.
>
> Regards,
> Yusuf Husainy.
>
> ________________________________
> From: Naresh Panchal
> To: l...
> Sent: Thursday, 13 June 2013 9:42 PM
> Subject: Re: [lpc2000] Re: VirtualCOM port Host side-Driver problem-
> PLPU-S2K
> Hi Yusuf,
>
> Can you share working code of virtual com? I also want to implement it.
> On Jun 13, 2013 10:54 AM, "Yusuf Husainy" wrote:
>
> > **
> >
> >
> > Hi,
> >
> > I have solved my problem.
> >
> > I did not look closely at the LPC VCOM code provided by Philips. There
> > were errors in the BaudRate calculation, when a Vendor request was
> received
> > to change the baud rate.
> >
> > Everything is working great now.
> >
> > Thanks to everyone who repled to my post, it gave me insights and
> > solutions.
> >
> > Regards,
> > Yusuf Husainy.
> >
> > ________________________________
> > From: Xiaofan Chen
> > To: l...
> > Sent: Wednesday, 12 June 2013 6:43 AM
> > Subject: Re: [lpc2000] Re: VirtualCOM port Host side-Driver problem-
> > PLPU-S2K
> >
> >
> >
> > On Wed, Jun 12, 2013 at 8:40 AM, boB G wrote:
> > > I didn't think that changing the baud rate in windows for
> > > a virtual com port did anything at all.
> >
> > If it is pure virtual com port, then that is true. If there is a
> > real serial port after, then it can use useful. You may want
> > to read the spec for USB CDC class from usb.org.
> >
> > > As far as how windows USB drivers work and integrate together, I
> > > believe that all engineers and programmers that know about how
> > > this all works are either retired or dead.
> >
> > That is certainly not true. If you head to the ntdev mailing list,
> > then you will know quite a few experts there, one of them
> > is Tim Roberts.
> > http://www.osronline.com/showlists.cfm?list=ntdev
> >
> > > BTW, we find that windows 8 works much better overall with our
> > > LPCUSB implementation of CDC virtual com ports than other
> > > versions of windoze for some unknown reason.
> > >
> >
> > --
> > Xiaofan
> >
> > [Non-text portions of this message have been removed]
> >
> >
> > [Non-text portions of this message have been removed]
>
>
--- In l..., Xiaofan Chen wrote:
>
> On Wed, Jun 12, 2013 at 8:40 AM, boB G wrote:
> > I didn't think that changing the baud rate in windows for
> > a virtual com port did anything at all.
>
> If it is pure virtual com port, then that is true. If there is a
> real serial port after, then it can use useful. You may want
> to read the spec for USB CDC class from usb.org.
>
> > As far as how windows USB drivers work and integrate together, I
> > believe that all engineers and programmers that know about how
> > this all works are either retired or dead.
>
> That is certainly not true. If you head to the ntdev mailing list,
> then you will know quite a few experts there, one of them
> is Tim Roberts.
> http://www.osronline.com/showlists.cfm?list=ntdev
Thank you for that forum link and name !! That is the kind of
dialog I like to see ! OK, so there is one person living !

Seriously, I have found it next to impossible to find anyone
that knew anything about how USB drivers, windows incorporation
really worked.

Next thing I need to find out, and maybe that forum is
the place, is to see how, when I plug in a virtual com port,
how to automatically find the virtual com port it has been
plugged in to so the user does not have to open up control
panel and device manager and manually change ports, etc.

I have googled my pants off trying to find information
like that and nothing appeared. That of course in addition
to other information regarding setup and restting, etc.

boB

>
> > BTW, we find that windows 8 works much better overall with our
> > LPCUSB implementation of CDC virtual com ports than other
> > versions of windoze for some unknown reason.
> >
> --
> Xiaofan
>

Hello boB,

> Next thing I need to find out, and maybe that forum is
> the place, is to see how, when I plug in a virtual com port,
> how to automatically find the virtual com port it has been
> plugged in to so the user does not have to open up control
> panel and device manager and manually change ports, etc.

question is "what is the right com port?".
You can enumerate com ports. You find all,
but what is the one you want to connect?
Or do you have only one and then want to automatically select this?

Best regards,

Martin

I ~think~ that I would like to be able to read the ID of whatever has connected to each living comm port and based on what info has been enumerated to windows, I can detect if my unit is occupying one or more of those ports. I think that might work. But that information I'm not sure where to find. Maybe that is in a progamming windows book ?

boB

--- In l..., "capiman26061973" wrote:
>
> Hello boB,
>
> > Next thing I need to find out, and maybe that forum is
> > the place, is to see how, when I plug in a virtual com port,
> > how to automatically find the virtual com port it has been
> > plugged in to so the user does not have to open up control
> > panel and device manager and manually change ports, etc.
>
> question is "what is the right com port?".
> You can enumerate com ports. You find all,
> but what is the one you want to connect?
> Or do you have only one and then want to automatically select this?
>
> Best regards,
>
> Martin
>


Memfault Beyond the Launch