Portál AbcLinuxu, 2. května 2025 07:17

USB Serial Cable (RS232 adapter pro USB s PL2303)

Podpora: kompletní
Ovladač: v jádře

Technické parametry

Prevodnik RS232 pro USB 1.1 s chipem Prolific PL-2303
http://www.prolific.com.tw

Identifikace pod Linuxem

lsusb:
Bus 001 Device 006: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
  Language IDs: none (invalid length string descriptor 63; len=127)
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 Interface
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0         8
  idVendor           0x067b Prolific Technology, Inc.
  idProduct          0x2303 PL2303 Serial Port
  bcdDevice            2.00
  iManufacturer           0
  iProduct                0
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           39
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xa0
      Remote Wakeup
    MaxPower              500mA
    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
        wMaxPacketSize         10
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               none
        wMaxPacketSize         64
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               none
        wMaxPacketSize         64
        bInterval               0
  Language IDs: none (invalid length string descriptor 63; len=127)

/var/log/messages: Jun 4 16:52:22 duronek kernel: hub.c: USB new device connect on bus1/1/4, assigned device number 4 Jun 4 16:52:22 duronek kernel: usb.c: USB device 4 (vend/prod 0x67b/0x2303) is not claimed by any active driver. Jun 4 16:52:22 duronek /etc/hotplug/usb.agent: Setup pl2303 for USB product 67b/2303/200 Jun 4 16:52:22 duronek kernel: usb.c: registered new driver serial Jun 4 16:52:22 duronek kernel: usbserial.c: USB Serial support registered for Generic Jun 4 16:52:22 duronek kernel: usbserial.c: USB Serial Driver core v1.4 Jun 4 16:52:22 duronek kernel: usbserial.c: USB Serial support registered for PL-2303 Jun 4 16:52:22 duronek kernel: usbserial.c: PL-2303 converter detected Jun 4 16:52:22 duronek kernel: usbserial.c: PL-2303 converter now attached to ttyUSB0 (or usb/tts/0 for devfs) Jun 4 16:52:22 duronek kernel: pl2303.c: Prolific PL2303 USB to serial adaptor driver v0.9

Postup zprovoznění pod Linuxem

moduly: usbserial, pl2303

Seriovy port je dostupny jako zarizeni /dev/ttyUSB0, /dev/ttyUSB1, ...

konfigurace pomoci stty.

Poznámka

Zajimava muze byt moznost, ze port RS232 na USB sbernici neni limitovan maximalni rychlosti 115200bps, teoreticky by adapter mohl prenaset data rychlosti az 1Mbps, linuxovy driver podporuje maximalne rychlost 460800bps.

Port RS232 na USB sbernici nelze konfigurovat pomoci prikazu setserial. Lze pouzit prikaz stty (stty 115200 -F /dev/ttyUSB0; stty -a -F /dev/ttyUSB0). Bohuzel, v modulu je chyba, ktera konfiguraci neumoznuje (2.4.19mdk jadro je uz opraveno). Pokud je modul chybny, tak uvedeny priklad vypise rychlost 9600, spravne ma vypsat 115200.

Dokument vytvořil: Petr Slansky, 4.6.2002 18:29 | Poslední úprava: ladaan, 27.2.2011 15:09 | Historie změn | Zobrazeno: 8538×

Tiskni Sdílej: Linkuj Jaggni to Vybrali.sme.sk Google Del.icio.us Facebook

ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.