Linux下安装USB转串口驱动(PL2303)


主机:Gentoo Linux 11.2

内核版本:Linux 3.0.6

以前在Ubuntu下USB转串口驱动已经编译进内核,而编译的Gentoo内核没有编译进去,这里将内核中PL2303驱动 copy出来单独编译出pl2303.ko然后将其复制进/usr/src/linux/drivers/usb/serial/目录下

然后使用命令

modprobe usbserial

modprobe pl2303

然后将usb转串口接口插入usb,使用命令查看dmesg | tail查看如下


查看内核中驱动,看到usbserial.ko驱动,下面单独编译pl2303.ko

从内核中拷贝的pl2303.h

[cpp]
  1. /* 
  2.  * Prolific PL2303 USB to serial adaptor driver header file 
  3.  * 
  4.  *  This program is free software; you can redistribute it and/or modify 
  5.  *  it under the terms of the GNU General Public License as published by 
  6.  *  the Free Software Foundation; either version 2 of the License, or 
  7.  *  (at your option) any later version. 
  8.  * 
  9.  */  
  10.   
  11. #define BENQ_VENDOR_ID          0x04a5   
  12. #define BENQ_PRODUCT_ID_S81     0x4027   
  13.   
  14. #define PL2303_VENDOR_ID    0x067b   
  15. #define PL2303_PRODUCT_ID   0x2303   
  16. #define PL2303_PRODUCT_ID_RSAQ2     0x04bb   
  17. #define PL2303_PRODUCT_ID_DCU11     0x1234   
  18. #define PL2303_PRODUCT_ID_PHAROS    0xaaa0   
  19. #define PL2303_PRODUCT_ID_RSAQ3     0xaaa2   
  20. #define PL2303_PRODUCT_ID_ALDIGA    0x0611   
  21. #define PL2303_PRODUCT_ID_MMX       0x0612   
  22. #define PL2303_PRODUCT_ID_GPRS      0x0609   
  23. #define PL2303_PRODUCT_ID_HCR331    0x331a   
  24. #define PL2303_PRODUCT_ID_MOTOROLA  0x0307   
  25.   
  26. #define ATEN_VENDOR_ID      0x0557   
  27. #define ATEN_VENDOR_ID2     0x0547   
  28. #define ATEN_PRODUCT_ID     0x2008   
  29.   
  30. #define IODATA_VENDOR_ID    0x04bb   
  31. #define IODATA_PRODUCT_ID   0x0a03   
  32. #define IODATA_PRODUCT_ID_RSAQ5 0x0a0e   
  33.   
  34. #define ELCOM_VENDOR_ID     0x056e   
  35. #define ELCOM_PRODUCT_ID    0x5003   
  36. #define ELCOM_PRODUCT_ID_UCSGT  0x5004   
  37.   
  38. #define ITEGNO_VENDOR_ID    0x0eba   
  39. #define ITEGNO_PRODUCT_ID   0x1080   
  40. #define ITEGNO_PRODUCT_ID_2080  0x2080   
  41.   
  42. #define MA620_VENDOR_ID     0x0df7   
  43. #define MA620_PRODUCT_ID    0x0620   
  44.   
  45. #define RATOC_VENDOR_ID     0x0584   
  46. #define RATOC_PRODUCT_ID    0xb000   
  47.   
  48. #define TRIPP_VENDOR_ID     0x2478   
  49. #define TRIPP_PRODUCT_ID    0x2008   
  50.   
  51. #define RADIOSHACK_VENDOR_ID    0x1453   
  52. #define RADIOSHACK_PRODUCT_ID   0x4026   
  53.   
  54. #define DCU10_VENDOR_ID     0x0731   
  55. #define DCU10_PRODUCT_ID    0x0528   
  56.   
  57. #define SITECOM_VENDOR_ID   0x6189   
  58. #define SITECOM_PRODUCT_ID  0x2068   
  59.   
  60. /* Alcatel OT535/735 USB cable */  
  61. #define ALCATEL_VENDOR_ID   0x11f7   
  62. #define ALCATEL_PRODUCT_ID  0x02df   
  63.   
  64. /* Samsung I330 phone cradle */  
  65. #define SAMSUNG_VENDOR_ID   0x04e8   
  66. #define SAMSUNG_PRODUCT_ID  0x8001   
  67.   
  68. #define SIEMENS_VENDOR_ID   0x11f5   
  69. #define SIEMENS_PRODUCT_ID_SX1  0x0001   
  70. #define SIEMENS_PRODUCT_ID_X65  0x0003   
  71. #define SIEMENS_PRODUCT_ID_X75  0x0004   
  72. #define SIEMENS_PRODUCT_ID_EF81 0x0005   
  73.   
  74. #define SYNTECH_VENDOR_ID   0x0745   
  75. #define SYNTECH_PRODUCT_ID  0x0001   
  76.   
  77. /* Nokia CA-42 Cable */  
  78. #define NOKIA_CA42_VENDOR_ID    0x078b   
  79. #define NOKIA_CA42_PRODUCT_ID   0x1234   
  80.   
  81. /* CA-42 CLONE Cable www.ca-42.com chipset: Prolific Technology Inc */  
  82. #define CA_42_CA42_VENDOR_ID    0x10b5   
  83. #define CA_42_CA42_PRODUCT_ID   0xac70   
  84.   
  85. #define SAGEM_VENDOR_ID     0x079b   
  86. #define SAGEM_PRODUCT_ID    0x0027   
  87.   
  88. /* Leadtek GPS 9531 (ID 0413:2101) */  
  89. #define LEADTEK_VENDOR_ID   0x0413   
  90. #define LEADTEK_9531_PRODUCT_ID 0x2101   
  91.   
  92. /* USB GSM cable from Speed Dragon Multimedia, Ltd */  
  93. #define SPEEDDRAGON_VENDOR_ID   0x0e55   
  94. #define SPEEDDRAGON_PRODUCT_ID  0x110b   
  95.   
  96. /* DATAPILOT Universal-2 Phone Cable */  
  97. #define DATAPILOT_U2_VENDOR_ID  0x0731   
  98. #define DATAPILOT_U2_PRODUCT_ID 0x2003   
  99.   
  100. /* Belkin "F5U257" Serial Adapter */  
  101. #define BELKIN_VENDOR_ID    0x050d   
  102. #define BELKIN_PRODUCT_ID   0x0257   
  103.   
  104. /* Alcor Micro Corp. USB 2.0 TO RS-232 */  
  105. #define ALCOR_VENDOR_ID     0x058F   
  106. #define ALCOR_PRODUCT_ID    0x9720   
  107.   
  108. /* Willcom WS002IN Data Driver (by NetIndex Inc.) */  
  109. #define WS002IN_VENDOR_ID   0x11f6   
  110. #define WS002IN_PRODUCT_ID  0x2001   
  111.   
  112. /* Corega CG-USBRS232R Serial Adapter */  
  113. #define COREGA_VENDOR_ID    0x07aa   
  114. #define COREGA_PRODUCT_ID   0x002a   
  115.   
  116. /* Y.C. Cable U.S.A., Inc - USB to RS-232 */  
  117. #define YCCABLE_VENDOR_ID   0x05ad   
  118. #define YCCABLE_PRODUCT_ID  0x0fba   
  119.   
  120. /* "Superial" USB - Serial */  
  121. #define SUPERIAL_VENDOR_ID  0x5372   
  122. #define SUPERIAL_PRODUCT_ID 0x2303   
  123.   
  124. /* Hewlett-Packard LD220-HP POS Pole Display */  
  125. #define HP_VENDOR_ID        0x03f0   
  126. #define HP_LD220_PRODUCT_ID 0x3524   
  127.   
  128. /* Cressi Edy (diving computer) PC interface */  
  129. #define CRESSI_VENDOR_ID    0x04b8   
  130. #define CRESSI_EDY_PRODUCT_ID   0x0521   
  131.   
  132. /* Zeagle dive computer interface */  
  133. #define ZEAGLE_VENDOR_ID    0x04b8   
  134. #define ZEAGLE_N2ITION3_PRODUCT_ID  0x0522   
  135.   
  136. /* Sony, USB data cable for CMD-Jxx mobile phones */  
  137. #define SONY_VENDOR_ID      0x054c   
  138. #define SONY_QN3USB_PRODUCT_ID  0x0437   
  139.   
  140. /* Sanwa KB-USB2 multimeter cable (ID: 11ad:0001) */  
  141. #define SANWA_VENDOR_ID     0x11ad   
  142. #define SANWA_PRODUCT_ID    0x0001   
  143.   
  144. /* ADLINK ND-6530 RS232,RS485 and RS422 adapter */  
  145. #define ADLINK_VENDOR_ID        0x0b63   
  146. #define ADLINK_ND6530_PRODUCT_ID    0x6530   
  147.   
  148. /* WinChipHead USB->RS 232 adapter */  
  149. #define WINCHIPHEAD_VENDOR_ID       0x4348   
  150. #define WINCHIPHEAD_USBSER_PRODUCT_ID   0x5523  
  • 1
  • 2
  • 下一页

相关内容