From: Magnus <magnus-swe@telia.com>
To: linux-serial@vger.kernel.org
Subject: USB to Serial converter code pl2303
Date: Tue, 18 Feb 2014 02:57:45 +0100 [thread overview]
Message-ID: <1392688665.7323.32.camel@mange> (raw)
Hi,
I just bought a Plexgear USB to serial adapter that i wanted to use
for a robot that im building.
This works fine via a serial connection, but now i want my new
Raspberry PI mini computer to handle the chip and it only has USB
unless i connect some special Raspberry converter that i cant buy
where i live atm and dont know if itll work for this kind of
controller chip.
After plugging in the plexgear adapter into my linux boxes:
Fedora 18, Debian 3.11.0-15-generic #25-Ubuntu and weezy it doesnt
send any commands to the servo controller chip on the other side
of the converter.
I can open the port /dev/ttyUSB0 and send to it with stty, but not
a beep on the other side. I have also set the tty Baudrate manually to
2400 but this made no difference. My code does this as well including
setting stopbit
parity and so on.
The robot controller chip only handles 2400 Baud but is fast enough
for the connected servos to spin around as fast as possible.
Those are up to 5 regular rc-servos running on 9 volts and
controlled via a FT639/EDE639 chip that i made some code for
many years ago for Linux.
Some data i get from Linux and Plexgear converter follows:
$ lsmod | grep pl2303
pl2303 18527 0
usbserial 38603 1 pl2303
$ lsusb
Bus 005 Device 007: ID 067b:2303 Prolific Technology, Inc.
PL2303 Serial Port
$ lsusb -v
Bus 005 Device 007: ID 067b:2303 Prolific Technology, Inc.
PL2303 Serial Port
Couldn't open device, some information will be missing
(My comment... hmm, but it can read from it ?)..
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x067b Prolific Technology, Inc.
idProduct 0x2303 PL2303 Serial Port
bcdDevice 3.00
iManufacturer 1
iProduct 2
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 39
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 3
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x000a 1x 10 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
I can code some, but i dont know where to start so any
help on this is highly appreciated.
When i google to find info on adapters i read that
"bMaxPacketSize0 64" indicates that its a counterfeit product
but i paid 250 Swedish for it and that not very cheap for a
univeristy student i think.
This is what it looks like,
(It has a sticker on it saying its from China):
https://serialio.com/sites/default/files/images/USB-RS232-Cable-med-wm1.jpg
Sincerely,
Magnus-swe
next reply other threads:[~2014-02-18 2:03 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-18 1:57 Magnus [this message]
2014-02-18 9:09 ` USB to Serial converter code pl2303 Johan Hovold
2014-02-19 16:44 ` Magnus
2014-02-19 17:00 ` Johan Hovold
2014-02-19 17:05 ` Karsten Malcher
[not found] ` <5304E472.2000203-QdlBTFngBEMsCylrc8G9yg@public.gmane.org>
2014-02-19 17:14 ` Johan Hovold
2014-02-19 17:21 ` Karsten Malcher
2014-02-20 18:19 ` Frank Schäfer
[not found] ` <53064721.3080905-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2014-02-20 20:02 ` Johan Hovold
2014-02-21 8:47 ` Karsten Malcher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1392688665.7323.32.camel@mange \
--to=magnus-swe@telia.com \
--cc=linux-serial@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).