public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* usb-serial: how to let ch341 work with baudrate 57600 ?
@ 2008-12-21  3:27 arrow.ebd
  2008-12-21 14:19 ` Matan Ziv-Av
  0 siblings, 1 reply; 3+ messages in thread
From: arrow.ebd @ 2008-12-21  3:27 UTC (permalink / raw)
  To: linux_kernel; +Cc: frank

dear frank,

	I have a USB-to-RS232 connector with chip ch341, but it
can not work under baud rate 57600.

	I checked baud rate is set in function "ch341_set_baudrate".

	How can I setup it with baudrate 57600 ?

	I would like hear from you, Or give me some suggestion
to hack it.

						Thanks

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

* Re: usb-serial: how to let ch341 work with baudrate 57600 ?
  2008-12-21  3:27 usb-serial: how to let ch341 work with baudrate 57600 ? arrow.ebd
@ 2008-12-21 14:19 ` Matan Ziv-Av
  2008-12-22  5:18   ` arrow.ebd
  0 siblings, 1 reply; 3+ messages in thread
From: Matan Ziv-Av @ 2008-12-21 14:19 UTC (permalink / raw)
  To: arrow.ebd; +Cc: linux_kernel, frank

On Sun, 21 Dec 2008, arrow.ebd@gmail.com wrote:

> dear frank,
>
> 	I have a USB-to-RS232 connector with chip ch341, but it
> can not work under baud rate 57600.
>
> 	I checked baud rate is set in function "ch341_set_baudrate".
>
> 	How can I setup it with baudrate 57600 ?
>
> 	I would like hear from you, Or give me some suggestion
> to hack it.

See here: http://lkml.org/lkml/2008/9/21/17 for a patch that allows 
arbitrary baud rate.


-- 
Matan Ziv-Av.                         matan@svgalib.org



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

* Re: usb-serial: how to let ch341 work with baudrate 57600 ?
  2008-12-21 14:19 ` Matan Ziv-Av
@ 2008-12-22  5:18   ` arrow.ebd
  0 siblings, 0 replies; 3+ messages in thread
From: arrow.ebd @ 2008-12-22  5:18 UTC (permalink / raw)
  To: Matan Ziv-Av; +Cc: arrow.ebd, linux_kernel, frank

On Sun, Dec 21, 2008 at 04:19:01PM +0200, Matan Ziv-Av wrote:
> On Sun, 21 Dec 2008, arrow.ebd@gmail.com wrote:
>> dear frank,
>>
>> 	I have a USB-to-RS232 connector with chip ch341, but it
>> can not work under baud rate 57600.
>>
>> 	I checked baud rate is set in function "ch341_set_baudrate".
>>
>> 	How can I setup it with baudrate 57600 ?
>>
>> 	I would like hear from you, Or give me some suggestion
>> to hack it.
>
> See here: http://lkml.org/lkml/2008/9/21/17 for a patch that allows  
> arbitrary baud rate.
> -- 
> Matan Ziv-Av.                         matan@svgalib.org

Thanks for your information, I have tried it, but can not work, dmesg
as below:(what should me to do)

[ 2416.718758] drivers/usb/serial/ch341.c: ch341_open()
[ 2416.718766] drivers/usb/serial/ch341.c: ch341_configure()
[ 2416.718774] drivers/usb/serial/ch341.c: ch341_control_in(c0,5f,0000,0000,f60f9838,8)
[ 2416.720055] drivers/usb/serial/ch341.c: ch341_control_out(40,a1,0000,0000)
[ 2416.721035] drivers/usb/serial/ch341.c: ch341_set_baudrate(2400)
[ 2416.721042] drivers/usb/serial/ch341.c: ch341_control_out(40,9a,1312,d901)
[ 2416.722028] drivers/usb/serial/ch341.c: ch341_control_out(40,9a,0f2c,0006)
[ 2416.723068] drivers/usb/serial/ch341.c: ch341_control_in(c0,95,2518,0000,f60f9838,8)
[ 2416.724035] drivers/usb/serial/ch341.c: ch341_control_out(40,9a,2518,0050)
[ 2416.725062] drivers/usb/serial/ch341.c: ch341_get_status()
[ 2416.725069] drivers/usb/serial/ch341.c: ch341_control_in(c0,95,0706,0000,f60f9840,8)
[ 2416.726030] drivers/usb/serial/ch341.c: ch341_control_out(40,a1,501f,d90a)
[ 2416.727114] drivers/usb/serial/ch341.c: ch341_set_baudrate(2400)
[ 2416.727121] drivers/usb/serial/ch341.c: ch341_control_out(40,9a,1312,d901)
[ 2416.727988] drivers/usb/serial/ch341.c: ch341_control_out(40,9a,0f2c,0006)
[ 2416.729062] drivers/usb/serial/ch341.c: ch341_set_handshake(0x60)
[ 2416.729068] drivers/usb/serial/ch341.c: ch341_control_out(40,a4,ff9f,0000)
[ 2416.730287] drivers/usb/serial/ch341.c: ch341_get_status()
[ 2416.730296] drivers/usb/serial/ch341.c: ch341_control_in(c0,95,0706,0000,f60f9840,8)
[ 2416.731064] drivers/usb/serial/ch341.c: ch341_set_handshake(0x60)
[ 2416.731070] drivers/usb/serial/ch341.c: ch341_control_out(40,a4,ff9f,0000)
[ 2416.732064] drivers/usb/serial/ch341.c: ch341_set_baudrate(2400)
[ 2416.732071] drivers/usb/serial/ch341.c: ch341_control_out(40,9a,1312,d901)
[ 2416.733063] drivers/usb/serial/ch341.c: ch341_control_out(40,9a,0f2c,0006)
[ 2416.734064] drivers/usb/serial/ch341.c: ch341_open - submitting interrupt urb
[ 2416.734071] ch341-uart ttyUSB0: ch341_open - failed submitting interrupt urb, error -2
[ 2416.734079] drivers/usb/serial/ch341.c: ch341_close - port 0
[ 2416.734084] drivers/usb/serial/ch341.c: ch341_close - shutting down urbs
[ 2416.734091] drivers/usb/serial/ch341.c: ch341_set_handshake(0x00)
[ 2416.734097] drivers/usb/serial/ch341.c: ch341_control_out(40,a4,ffff,0000)

I have checked the "erro -2" was occured at "usb_submit_urb" "return -ENOENT".

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

end of thread, other threads:[~2008-12-22  5:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-21  3:27 usb-serial: how to let ch341 work with baudrate 57600 ? arrow.ebd
2008-12-21 14:19 ` Matan Ziv-Av
2008-12-22  5:18   ` arrow.ebd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox