linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* USB serial support / Prolific PL2303 Driver
@ 2013-04-08 13:37 Hans Beckérus
  2013-04-08 15:03 ` Greg KH
  0 siblings, 1 reply; 9+ messages in thread
From: Hans Beckérus @ 2013-04-08 13:37 UTC (permalink / raw)
  To: linux-serial

I have some problems getting a USB serial adapter to work on our
embedded Linux platform.
At installation of the driver I can see the following:

usbcore: registered new interface driver usbserial
usbserial: USB Serial Driver core
usbcore: registered new interface driver pl2303
USB Serial support registered for pl2303
pl2303 1-1.4:1.0: pl2303 converter detected
usb 1-1.4: pl2303 converter now attached to ttyUSB0

And there is such a device node created under /dev

crw--w--w-    1 root     root      188,   0 Apr  8 12:35 /dev/ttyUSB0


But I am not able to connect to it through putty :(
What I tried on the Linux end was (getty is from busybox):

/sbin/getty 115200 ttyUSB0

The serial adapter is connected through a USB HUB. Can that affect the
functionality?
The USB Ethernet we use is also connected to the same HUB and is working fine.

Is there something I can try to debug this further? Or is it something
obvious that I have overlooked?

Regards,
Hans

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

* Re: USB serial support / Prolific PL2303 Driver
  2013-04-08 13:37 USB serial support / Prolific PL2303 Driver Hans Beckérus
@ 2013-04-08 15:03 ` Greg KH
  2013-04-08 15:06   ` Re[2]: " Alexander Shiyan
  0 siblings, 1 reply; 9+ messages in thread
From: Greg KH @ 2013-04-08 15:03 UTC (permalink / raw)
  To: Hans Beckérus; +Cc: linux-serial

On Mon, Apr 08, 2013 at 03:37:42PM +0200, Hans Beckérus wrote:
> I have some problems getting a USB serial adapter to work on our
> embedded Linux platform.

What kernel version are you using?

> At installation of the driver I can see the following:
> 
> usbcore: registered new interface driver usbserial
> usbserial: USB Serial Driver core
> usbcore: registered new interface driver pl2303
> USB Serial support registered for pl2303
> pl2303 1-1.4:1.0: pl2303 converter detected
> usb 1-1.4: pl2303 converter now attached to ttyUSB0
> 
> And there is such a device node created under /dev
> 
> crw--w--w-    1 root     root      188,   0 Apr  8 12:35 /dev/ttyUSB0
> 
> 
> But I am not able to connect to it through putty :(

putty is a Windows program, how are you talking to it through your Linux
box?

> What I tried on the Linux end was (getty is from busybox):
> 
> /sbin/getty 115200 ttyUSB0

Can you run something like minicom on the Linux side?

Are you sure you have the hardware line settings correct for the device?

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re[2]: USB serial support / Prolific PL2303 Driver
  2013-04-08 15:03 ` Greg KH
@ 2013-04-08 15:06   ` Alexander Shiyan
  2013-04-08 15:57     ` Hans Beckérus
  0 siblings, 1 reply; 9+ messages in thread
From: Alexander Shiyan @ 2013-04-08 15:06 UTC (permalink / raw)
  To: Greg KH; +Cc: Hans Beck�rus, linux-serial

Hello.

> On Mon, Apr 08, 2013 at 03:37:42PM +0200, Hans Beckérus wrote:
> > I have some problems getting a USB serial adapter to work on our
> > embedded Linux platform.
...
> > But I am not able to connect to it through putty :(
> 
> putty is a Windows program, how are you talking to it through your Linux
> box?

Putty is a cross-platform. I am using it on Gentoo ;)

---

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

* Re: Re[2]: USB serial support / Prolific PL2303 Driver
  2013-04-08 15:06   ` Re[2]: " Alexander Shiyan
@ 2013-04-08 15:57     ` Hans Beckérus
  2013-04-08 16:03       ` Greg KH
  0 siblings, 1 reply; 9+ messages in thread
From: Hans Beckérus @ 2013-04-08 15:57 UTC (permalink / raw)
  To: Alexander Shiyan; +Cc: Greg KH, linux-serial

Thanks for the quick response guys.
Yes, putty is cross-platform, but I am actually running putty on
Windows ;) It connects over the serial device on my laptop to the
board running Linux. But Greg, you actually triggered me to check my
hardware configuration and guess what? I was using the wrong kind of
cable :) I used a simple male-female converter when I in fact had to
use a cable that swapped Rx/Tx. My bad! But I have yet one more issue
now. If I tell Linux to use my ttyUSB0 as console device on the boot
cmdline, would it actually be able to start it in time?

I am running with a 3.6 kernel btw.

Regards,
Hans


On Mon, Apr 8, 2013 at 5:06 PM, Alexander Shiyan <shc_work@mail.ru> wrote:
> Hello.
>
>> On Mon, Apr 08, 2013 at 03:37:42PM +0200, Hans Beckérus wrote:
>> > I have some problems getting a USB serial adapter to work on our
>> > embedded Linux platform.
> ...
>> > But I am not able to connect to it through putty :(
>>
>> putty is a Windows program, how are you talking to it through your Linux
>> box?
>
> Putty is a cross-platform. I am using it on Gentoo ;)
>
> ---
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: Re[2]: USB serial support / Prolific PL2303 Driver
  2013-04-08 15:57     ` Hans Beckérus
@ 2013-04-08 16:03       ` Greg KH
  2013-04-08 16:20         ` Hans Beckérus
  0 siblings, 1 reply; 9+ messages in thread
From: Greg KH @ 2013-04-08 16:03 UTC (permalink / raw)
  To: Hans Beckérus; +Cc: Alexander Shiyan, linux-serial


A: No.
Q: Should I include quotations after my reply?

http://daringfireball.net/2007/07/on_top

On Mon, Apr 08, 2013 at 05:57:53PM +0200, Hans Beckérus wrote:
> Thanks for the quick response guys.
> Yes, putty is cross-platform, but I am actually running putty on
> Windows ;) It connects over the serial device on my laptop to the
> board running Linux. But Greg, you actually triggered me to check my
> hardware configuration and guess what? I was using the wrong kind of
> cable :) I used a simple male-female converter when I in fact had to
> use a cable that swapped Rx/Tx. My bad! But I have yet one more issue
> now. If I tell Linux to use my ttyUSB0 as console device on the boot
> cmdline, would it actually be able to start it in time?

Start in time for what?

You can use USB to serial devices as console devices just fine.  I
really don't recommend them, but if you have no other way to get a
console, it's better than nothing.

> I am running with a 3.6 kernel btw.

That's a bit out-of-date :)

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: Re[2]: USB serial support / Prolific PL2303 Driver
  2013-04-08 16:03       ` Greg KH
@ 2013-04-08 16:20         ` Hans Beckérus
  2013-04-08 16:29           ` Greg KH
  0 siblings, 1 reply; 9+ messages in thread
From: Hans Beckérus @ 2013-04-08 16:20 UTC (permalink / raw)
  To: Greg KH; +Cc: Alexander Shiyan, linux-serial

On Mon, Apr 8, 2013 at 6:03 PM, Greg KH <gregkh@linuxfoundation.org> wrote:
>
> A: No.
> Q: Should I include quotations after my reply?
>
> http://daringfireball.net/2007/07/on_top
>
> On Mon, Apr 08, 2013 at 05:57:53PM +0200, Hans Beckérus wrote:
>> Thanks for the quick response guys.
>> Yes, putty is cross-platform, but I am actually running putty on
>> Windows ;) It connects over the serial device on my laptop to the
>> board running Linux. But Greg, you actually triggered me to check my
>> hardware configuration and guess what? I was using the wrong kind of
>> cable :) I used a simple male-female converter when I in fact had to
>> use a cable that swapped Rx/Tx. My bad! But I have yet one more issue
>> now. If I tell Linux to use my ttyUSB0 as console device on the boot
>> cmdline, would it actually be able to start it in time?
>
> Start in time for what?
>
Start in time for displaying boot progress. Sure, dmesg will show me
the details, but I would really like to have it in real-time ;)
Actually when I set console=ttyUSB0,115200 all I get is the prompt :(
Nothing comes out from the boot, and it does not seem to act as a real
console either since any thing that usually pops up there are only
showing in dmesg now.
Do I need to configure the kernel in some specific way to support USB
console mode? This is my current cmdline btw:

console=ttyUSB0,115200 root=/dev/ram rw ip=:::::eth0:off earlyprintk

Ignore the ip section for now. It is just some old left overs ;)

> You can use USB to serial devices as console devices just fine.  I
> really don't recommend them, but if you have no other way to get a
> console, it's better than nothing.
>
Agree. But in this case a USB serial device is my only option :(

Regards,
Hans


On Mon, Apr 8, 2013 at 6:03 PM, Greg KH <gregkh@linuxfoundation.org> wrote:
>
> A: No.
> Q: Should I include quotations after my reply?
>
> http://daringfireball.net/2007/07/on_top
>
> On Mon, Apr 08, 2013 at 05:57:53PM +0200, Hans Beckérus wrote:
>> Thanks for the quick response guys.
>> Yes, putty is cross-platform, but I am actually running putty on
>> Windows ;) It connects over the serial device on my laptop to the
>> board running Linux. But Greg, you actually triggered me to check my
>> hardware configuration and guess what? I was using the wrong kind of
>> cable :) I used a simple male-female converter when I in fact had to
>> use a cable that swapped Rx/Tx. My bad! But I have yet one more issue
>> now. If I tell Linux to use my ttyUSB0 as console device on the boot
>> cmdline, would it actually be able to start it in time?
>
> Start in time for what?
>
> You can use USB to serial devices as console devices just fine.  I
> really don't recommend them, but if you have no other way to get a
> console, it's better than nothing.
>
>> I am running with a 3.6 kernel btw.
>
> That's a bit out-of-date :)
>
> thanks,
>
> greg k-h


On Mon, Apr 8, 2013 at 6:03 PM, Greg KH <gregkh@linuxfoundation.org> wrote:
>
> A: No.
> Q: Should I include quotations after my reply?
>
> http://daringfireball.net/2007/07/on_top
>
> On Mon, Apr 08, 2013 at 05:57:53PM +0200, Hans Beckérus wrote:
>> Thanks for the quick response guys.
>> Yes, putty is cross-platform, but I am actually running putty on
>> Windows ;) It connects over the serial device on my laptop to the
>> board running Linux. But Greg, you actually triggered me to check my
>> hardware configuration and guess what? I was using the wrong kind of
>> cable :) I used a simple male-female converter when I in fact had to
>> use a cable that swapped Rx/Tx. My bad! But I have yet one more issue
>> now. If I tell Linux to use my ttyUSB0 as console device on the boot
>> cmdline, would it actually be able to start it in time?
>
> Start in time for what?
>
> You can use USB to serial devices as console devices just fine.  I
> really don't recommend them, but if you have no other way to get a
> console, it's better than nothing.
>
>> I am running with a 3.6 kernel btw.
>
> That's a bit out-of-date :)
>
> thanks,
>
> greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: Re[2]: USB serial support / Prolific PL2303 Driver
  2013-04-08 16:20         ` Hans Beckérus
@ 2013-04-08 16:29           ` Greg KH
  2013-04-08 17:35             ` Hans Beckerus
  0 siblings, 1 reply; 9+ messages in thread
From: Greg KH @ 2013-04-08 16:29 UTC (permalink / raw)
  To: Hans Beckérus; +Cc: Alexander Shiyan, linux-serial

On Mon, Apr 08, 2013 at 06:20:23PM +0200, Hans Beckérus wrote:
> Sure, dmesg will show me the details, but I would really like to have
> it in real-time ;) Actually when I set console=ttyUSB0,115200 all I
> get is the prompt :( Nothing comes out from the boot, and it does not
> seem to act as a real console either since any thing that usually pops
> up there are only showing in dmesg now.  Do I need to configure the
> kernel in some specific way to support USB console mode?

You do have:
	CONFIG_USB_SERIAL_CONSOLE
enabled, right?

USB starts as one of the last things in the kernel boot process, so the
best you can ever get is a summary of what happened during the boot, not
the kernel boot messages as they happen because they happen before the
USB device is initialized.

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: USB serial support / Prolific PL2303 Driver
  2013-04-08 16:29           ` Greg KH
@ 2013-04-08 17:35             ` Hans Beckerus
  2013-04-08 18:19               ` Greg KH
  0 siblings, 1 reply; 9+ messages in thread
From: Hans Beckerus @ 2013-04-08 17:35 UTC (permalink / raw)
  To: Greg KH; +Cc: Alexander Shiyan, linux-serial

On 2013-04-08 6:29, Greg KH wrote:
> On Mon, Apr 08, 2013 at 06:20:23PM +0200, Hans Beckérus wrote:
>> Sure, dmesg will show me the details, but I would really like to have
>> it in real-time ;) Actually when I set console=ttyUSB0,115200 all I
>> get is the prompt :( Nothing comes out from the boot, and it does not
>> seem to act as a real console either since any thing that usually pops
>> up there are only showing in dmesg now.  Do I need to configure the
>> kernel in some specific way to support USB console mode?
> You do have:
> 	CONFIG_USB_SERIAL_CONSOLE
> enabled, right?
Hmm. Coming to think about it, no ;)
Will try it first thing tomorrow! Thanks.
> USB starts as one of the last things in the kernel boot process, so the
> best you can ever get is a summary of what happened during the boot, not
> the kernel boot messages as they happen because they happen before the
> USB device is initialized.
Sure. That is an acceptable limitation. However, I wonder if this will 
be different once we get U-Boot USB console support on this platform?
Question though is if Linux  ever will be able to benefit from a first 
stage driver already being kicked-off by U-Boot.

Hans

--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: USB serial support / Prolific PL2303 Driver
  2013-04-08 17:35             ` Hans Beckerus
@ 2013-04-08 18:19               ` Greg KH
  0 siblings, 0 replies; 9+ messages in thread
From: Greg KH @ 2013-04-08 18:19 UTC (permalink / raw)
  To: Hans Beckerus; +Cc: Alexander Shiyan, linux-serial

On Mon, Apr 08, 2013 at 07:35:49PM +0200, Hans Beckerus wrote:
> >USB starts as one of the last things in the kernel boot process, so the
> >best you can ever get is a summary of what happened during the boot, not
> >the kernel boot messages as they happen because they happen before the
> >USB device is initialized.
> Sure. That is an acceptable limitation. However, I wonder if this
> will be different once we get U-Boot USB console support on this
> platform?
> Question though is if Linux  ever will be able to benefit from a
> first stage driver already being kicked-off by U-Boot.

For USB, no, that can't really happen, as the whole USB stack has to be
started up "from scratch" after u-boot starts Linux up.  There's no way
that Linux can take a "already discovered" usb stack and continue it's
usage.

Unless you possibly use Linux for your bootloader, and if so, in that
case, you don't need u-boot, and only do all device discovery once,
which is the ideal thing from a speed standpoint.

Good luck,

greg k-h

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

end of thread, other threads:[~2013-04-08 18:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-08 13:37 USB serial support / Prolific PL2303 Driver Hans Beckérus
2013-04-08 15:03 ` Greg KH
2013-04-08 15:06   ` Re[2]: " Alexander Shiyan
2013-04-08 15:57     ` Hans Beckérus
2013-04-08 16:03       ` Greg KH
2013-04-08 16:20         ` Hans Beckérus
2013-04-08 16:29           ` Greg KH
2013-04-08 17:35             ` Hans Beckerus
2013-04-08 18:19               ` Greg KH

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 NNTP newsgroup(s).