USB to Serial converter code pl2303

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


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




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux