Chinaunix首页 | 论坛 | 博客
  • 博客访问: 235728
  • 博文数量: 25
  • 博客积分: 643
  • 博客等级: 上士
  • 技术积分: 359
  • 用 户 组: 普通用户
  • 注册时间: 2008-11-03 13:18
文章分类

全部博文(25)

文章存档

2017年(1)

2013年(1)

2012年(7)

2011年(16)

分类: LINUX

2011-04-22 12:52:02

插上E1750后,可以看到E1750的ID信息:
  1. # lsusb
  2. Bus 001 Device 001: ID 1d6b:0002
  3. Bus 002 Device 001: ID 1d6b:0002
  4. Bus 001 Device 003: ID 12d1:1446
挂在usbfs:
  1. # mount -t usbfs none /proc/bus/usb

在/dev下还没有E1750转换成的tty串口设备

  1. # ls dev/tty
  2. dev/tty dev/tty17 dev/tty26 dev/tty35 dev/tty44 dev/tty53 dev/tty62
  3. dev/tty0 dev/tty18 dev/tty27 dev/tty36 dev/tty45 dev/tty54 dev/tty63
  4. dev/tty1 dev/tty19 dev/tty28 dev/tty37 dev/tty46 dev/tty55 dev/tty7
  5. dev/tty10 dev/tty2 dev/tty29 dev/tty38 dev/tty47 dev/tty56 dev/tty8
  6. dev/tty11 dev/tty20 dev/tty3 dev/tty39 dev/tty48 dev/tty57 dev/tty9
  7. dev/tty12 dev/tty21 dev/tty30 dev/tty4 dev/tty49 dev/tty58 dev/ttyS0
  8. dev/tty13 dev/tty22 dev/tty31 dev/tty40 dev/tty5 dev/tty59 dev/ttyS1
  9. dev/tty14 dev/tty23 dev/tty32 dev/tty41 dev/tty50 dev/tty6 dev/ttyS2
  10. dev/tty15 dev/tty24 dev/tty33 dev/tty42 dev/tty51 dev/tty60 dev/ttyS3
  11. dev/tty16 dev/tty25 dev/tty34 dev/tty43 dev/tty52 dev/tty61

使用usb_modeswitch转换模块:

1>出现错误:

USB error: error sending control message: Protocol error
Error: getting the current configuration failed (error -71). Aborting.

  1. # ./usb_modeswitch -W -c usb_modeswitch.conf

  2. Reading config file: usb_modeswitch.conf

  3.  * usb_modeswitch: handle USB devices with multiple modes
  4.  * Version 1.1.6 (C) Josua Dietze 2010
  5.  * Based on libusb0 (0.1.12 and above)

  6.  ! PLEASE REPORT NEW CONFIGURATIONS !

  7. DefaultVendor= 0x12d1
  8. DefaultProduct= 0x1446
  9. TargetVendor= 0x12d1
  10. TargetProduct= 0x1001
  11. TargetClass= not set
  12. TargetProductList=""

  13. DetachStorageOnly=0
  14. HuaweiMode=0
  15. SierraMode=0
  16. SonyMode=0
  17. GCTMode=0
  18. KobilMode=0
  19. MessageEndpoint= not set
  20. MessageContent="55534243123456780000000000000011060000000000000000000000000000"
  21. NeedResponse=0
  22. ResponseEndpoint= not set
  23. Interface=0x00

  24. InquireDevice enabled (default)
  25. Success check enabled, max. wait time 5 seconds
  26. System integration mode disabled

  27. usb_set_debug: Setting debugging level to 15 (on)
  28. usb_os_find_busses: Found 002
  29. usb_os_find_busses: Found 001
  30. usb_os_find_busses: Skipping non bus directory devices
  31. usb_os_find_devices: Found 001 on 002
  32. usb_os_find_devices: Found 003 on 001
  33. usb_os_find_devices: Found 001 on 001
  34. error obtaining child information: Inappropriate ioctl for device

  35. Looking for target devices ...
  36.   searching devices, found USB ID 1d6b:0002
  37.   searching devices, found USB ID 12d1:1446
  38.    found matching vendor ID
  39.   searching devices, found USB ID 1d6b:0002
  40.  No devices in target mode or class found
  41. Looking for default devices ...
  42.   searching devices, found USB ID 1d6b:0002
  43.   searching devices, found USB ID 12d1:1446
  44.    found matching vendor ID
  45.    found matching product ID
  46.    adding device
  47.   searching devices, found USB ID 1d6b:0002
  48.  Found devices in default mode, class or configuration (1)
  49. Accessing device 003 on bus 001 ...
  50. Getting the current device configuration ...
  51. USB error: error sending control message: Protocol error
  52. Error: getting the current configuration failed (error -71). Aborting.

  53. # ./usb_modeswitch -W -c usb_modeswitch.conf

  54. Reading config file: usb_modeswitch.conf

  55.  * usb_modeswitch: handle USB devices with multiple modes
  56.  * Version 1.1.6 (C) Josua Dietze 2010
  57.  * Based on libusb0 (0.1.12 and above)

  58.  ! PLEASE REPORT NEW CONFIGURATIONS !

  59. DefaultVendor= 0x12d1
  60. DefaultProduct= 0x1446
  61. TargetVendor= 0x12d1
  62. TargetProduct= 0x1001
  63. TargetClass= not set
  64. TargetProductList=""

  65. DetachStorageOnly=0
  66. HuaweiMode=0
  67. SierraMode=0
  68. SonyMode=0
  69. GCTMode=0
  70. KobilMode=0
  71. MessageEndpoint= not set
  72. MessageContent="55534243123456780000000000000011060000000000000000000000000000"
  73. NeedResponse=0
  74. ResponseEndpoint= not set
  75. Interface=0x00

  76. InquireDevice enabled (default)
  77. Success check enabled, max. wait time 5 seconds
  78. System integration mode disabled

  79. usb_set_debug: Setting debugging level to 15 (on)
  80. usb_os_find_busses: Found 002
  81. usb_os_find_busses: Found 001
  82. usb_os_find_busses: Skipping non bus directory devices
  83. usb_os_find_busses: Skipping non bus directory devices
  84. usb_os_find_devices: Found 003 on 001
  85. usb_os_find_devices: Found 001 on 001
  86. error obtaining child information: Inappropriate ioctl for device

  87. Looking for target devices ...
  88.   searching devices, found USB ID 1d6b:0002
  89.   searching devices, found USB ID 12d1:1446
  90.    found matching vendor ID
  91.   searching devices, found USB ID 1d6b:0002
  92.  No devices in target mode or class found
  93. Looking for default devices ...
  94.   searching devices, found USB ID 1d6b:0002
  95.   searching devices, found USB ID 12d1:1446
  96.    found matching vendor ID
  97.    found matching product ID
  98.    adding device
  99.   searching devices, found USB ID 1d6b:0002
  100.  Found devices in default mode, class or configuration (1)
  101. Accessing device 003 on bus 001 ...
  102. Getting the current device configuration ...
  103. USB error: error sending control message: Protocol error
  104. Error: getting the current configuration failed (error -71). Aborting.

 2>重启系统后在使用usb_modeswitch转换成功

  1. # ./usb_modeswitch -W -c usb_modeswitch.conf

  2. Reading config file: usb_modeswitch.conf

  3.  * usb_modeswitch: handle USB devices with multiple modes
  4.  * Version 1.1.6 (C) Josua Dietze 2010
  5.  * Based on libusb0 (0.1.12 and above)

  6.  ! PLEASE REPORT NEW CONFIGURATIONS !

  7. DefaultVendor= 0x12d1
  8. DefaultProduct= 0x1446
  9. TargetVendor= 0x12d1
  10. TargetProduct= 0x1001
  11. TargetClass= not set
  12. TargetProductList=""

  13. DetachStorageOnly=0
  14. HuaweiMode=0
  15. SierraMode=0
  16. SonyMode=0
  17. GCTMode=0
  18. KobilMode=0
  19. MessageEndpoint= not set
  20. MessageContent="55534243123456780000000000000011060000000000000000000000000000"
  21. NeedResponse=0
  22. ResponseEndpoint= not set
  23. Interface=0x00

  24. InquireDevice enabled (default)
  25. Success check enabled, max. wait time 5 seconds
  26. System integration mode disabled

  27. usb_set_debug: Setting debugging level to 15 (on)
  28. usb_os_find_busses: Found 002
  29. usb_os_find_busses: Found 001
  30. usb_os_find_busses: Skipping non bus directory devices
  31. usb_os_find_devices: Found 001 on 002
  32. usb_os_find_devices: Found 003 on 001
  33. usb_os_find_devices: Found 001 on 001
  34. error obtaining child information: Inappropriate ioctl for device

  35. Looking for target devices ...
  36.   searching devices, found USB ID 1d6b:0002
  37.   searching devices, found USB ID 12d1:1446
  38.    found matching vendor ID
  39.   searching devices, found USB ID 1d6b:0002
  40.  No devices in target mode or class found
  41. Looking for default devices ...
  42.   searching devices, found USB ID 1d6b:0002
  43.   searching devices, found USB ID 12d1:1446
  44.    found matching vendor ID
  45.    found matching product ID
  46.    adding device
  47.   searching devices, found USB ID 1d6b:0002
  48.  Found devices in default mode, class or configuration (1)
  49. Accessing device 003 on bus 001 ...
  50. Getting the current device configuration ...
  51.  OK, got current device configuration (1)
  52. Using endpoints 0x01 (out) and 0x81 (in)
  53. Using endpoints 0x01 (out) and 0x81 (in)
  54. Inquiring device details; driver will be detached ...
  55. Looking for active driver ...
  56.  OK, driver found ("usb-storage")
  57.  OK, driver "usb-storage" detached

  58. SCSI inquiry data (for identification)
  59. -------------------------
  60.   Vendor String: HUAWEI
  61.    Model String: Mass Storage
  62. Revision String: 2.31
  63. -------------------------
  64. USB error: error sending controlusb 1-2: usbfs: process 1420 (usb_modeswitch) di
  65. d not claim interface 0 before use
  66.  message: Connection timed out
  67. Error: could not get description string "manufacturer"

  68. USB deusb 1-2: USB disconnect, address 3
  69. scription data (for identification)
  70. -------------------------
  71. Manufacturer:
  72.      Product: HUAWEI Mobile
  73.   Serial No.: not provided
  74. -------------------------
  75. Setting up communication with interface 0 ...
  76. Using endpoint 0x01 for message sending ...
  77. Trying to send message 1 to endpoint 0x01 ...
  78. USB error: error reaping URB: No such device
  79.  Device seems to have vanished right after sending. Good.
  80.  Device is gone, skipping any further commands

  81. Checking for mode switch (max. 5 times, once per second) ...
  82.  Searching for target devices ...
  83. usb_os_find_busses: Found 002
  84. usb_os_find_busses: Found 001
  85. usb_os_find_busses: Skipping non bus directory devices
  86. usb_os_find_devices: Found 001 on 002
  87. usb_os_find_devices: Found 001 on 001
  88.   searching devices, found USB ID 1d6b:0002
  89.   searching devices, found USB ID 1d6b:0002
  90. usb 1-2: new high speed USB device using ehci-omap and address 4
  91.  Searching for target devices ...
  92. usb_os_find_busses: Found 002
  93. usb_os_find_busses: Found 001
  94. usb_os_find_busses: Skipping non bus directory devices
  95. usb_os_find_devices: Found 001 on 002
  96. usb 1-2: New USB device found, idVendor=12d1, idProduct=1001
  97. usb 1-2: New USB device strings: Mfr=3, Product=2, SerialNumber=0
  98. usb 1-2: Product: HUAWEI Mobile
  99. usb 1-2: Manufacturer: HUAWEI Technology
  100. option 1-2:1.0: GSM modem (1-port) converter detected
  101. usb 1-2: GSM modem (1-port) converter now attached to ttyUSB0
  102. option 1-2:1.1: GSM modem (1-port) converter detected
  103. usb 1-2: GSM modem (1-port) converter now attached to ttyUSB1
  104. option 1-2:1.2: GSM modem (1-port) converter detected
  105. usb 1-2: GSM modem (1-port) converter now attached to ttyUSB2
  106. scsi5 : usb-storage 1-2:1.3
  107. scsi6 : usb-storage 1-2:1.4
  108. usb_os_find_devices: Found 001 on 001
  109.   searching devices, found USB ID 1d6b:0002
  110.   searching devices, found USB ID 1d6b:0002
  111.  Searching for target devices ...
  112. usb_os_find_busses: Found 002
  113. usb_os_find_busses: Found 001
  114. usb_os_find_busses: Skipping non bus directory devices
  115. usb_os_find_devices: Found 001 on 002
  116. usb_os_find_devices: Found 004 on 001
  117. usb_os_find_devices: Found 001 on 001
  118. error obtaining child information: Inappropriate ioctl for device
  119.   searching devices, found USB ID 1d6b:0002
  120.   searching devices, found USB ID 12d1:1001
  121.    found matching vendor ID
  122.    found matching product ID
  123.    adding device
  124.   searching devices, found USB ID 1d6b:0002

  125. Found target device, now opening

  126. Found target device 004 on bus 001

  127. Target device description data
  128. -------------------------
  129. Manufacturer: HUAWEI Technology
  130.      Product: HUAWEI Mobile
  131.   Serial No.: not provided
  132. -------------------------
  133.  Found correct target device

  134. Mode switch succeeded. Bye.

又打印出disconnect的信息:

  1. # scsi 5:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2
  2. hub 1-0:1.0: port 2 disabled by hub (EMI?), re-enabling...
  3. usb 1-2: USB disconnect, address 4
  4. option: option_instat_callback: error -108
  5. option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0
  6. option 1-2:1.0: device disconnected
  7. option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1
  8. option 1-2:1.1: device disconnected
  9. option1 ttyUSB2: GSM modem (1-port) converter now disconnected from ttyUSB2
  10. option 1-2:1.2: device disconnected

  

有时会出现这个这个错误: 

  1. # option: option_instat_callback: error -71
  2. loption: option_instat_callback: error -71
  3. option: option_instat_callback: error -71
  4. option: option_instat_callback: error -71
  5. option: option_instat_callback: error -71
  6. option: option_instat_callback: error -71
  7. option: option_instat_callback: error -71
  8. option: option_instat_callback: error -71
  9. option: option_instat_callback: error -71
  10. option: option_instat_callback: error -71
  11. option: option_instat_callback: error -71
  12. option: option_instat_callback: error -71
  13. option: option_instat_callback: error -71
  14. option: option_instat_callback: error -71
  15. option: option_instat_callback: error -71
  16. option: option_instat_callback: error -71
  17. option: option_instat_callback: error -71
  18. option: option_instat_callback: error -71
  19. option: option_instat_callback: error -71
  20. option: option_instat_callback: error -71
  21. option: option_instat_callback: error -71
  22. option: option_instat_callback: error -71
  23. option: option_instat_callback: error -108
  24. option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0
  25. option 1-2:1.0: device disconnected
  26. option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1
  27. option 1-2:1.1: device disconnected
  28. option1 ttyUSB2: GSM modem (1-port) converter now disconnected from ttyUSB2
  29. option 1-2:1.2: device disconnected
  30. ehci-omap ehci-omap.0: port 2 reset error -110
  31. hub 1-0:1.0: hub_port_status failed (err = -32)
  32. ehci-omap ehci-omap.0: port 2 reset error -110
  33. hub 1-0:1.0: hub_port_status failed (err = -32)
  34. ehci-omap ehci-omap.0: port 2 reset error -110
  35. hub 1-0:1.0: hub_port_status failed (err = -32)
  36. ehci-omap ehci-omap.0: port 2 reset error -110
  37. hub 1-0:1.0: hub_port_status failed (err = -32)
  38. ehci-omap ehci-omap.0: port 2 reset error -110
  39. hub 1-0:1.0: hub_port_status failed (err = -32)
  40. hub 1-0:1.0: Cannot enable port 2. Maybe the USB cable is bad?
  41. ehci-omap ehci-omap.0: port 2 reset error -110
  42. hub 1-0:1.0: hub_port_status failed (err = -32)
  43. ehci-omap ehci-omap.0: port 2 reset error -110
  44. hub 1-0:1.0: hub_port_status failed (err = -32)
  45. ehci-omap ehci-omap.0: port 2 reset error -110
  46. hub 1-0:1.0: hub_port_status failed (err = -32)
  47. ehci-omap ehci-omap.0: port 2 reset error -110
  48. hub 1-0:1.0: hub_port_status failed (err = -32)
  49. ehci-omap ehci-omap.0: port 2 reset error -110
  50. hub 1-0:1.0: hub_port_status failed (err = -32)
  51. hub 1-0:1.0: Cannot enable port 2. Maybe the USB cable is bad?
  52. ehci-omap ehci-omap.0: port 2 reset error -110
  53. hub 1-0:1.0: hub_port_status failed (err = -32)
  54. ehci-omap ehci-omap.0: port 2 reset error -110
  55. hub 1-0:1.0: hub_port_status failed (err = -32)
  56. ehci-omap ehci-omap.0: port 2 reset error -110
  57. hub 1-0:1.0: hub_port_status failed (err = -32)
  58. ehci-omap ehci-omap.0: port 2 reset error -110
  59. hub 1-0:1.0: hub_port_status failed (err = -32)
  60. ehci-omap ehci-omap.0: port 2 reset error -110
  61. hub 1-0:1.0: hub_port_status failed (err = -32)
  62. hub 1-0:1.0: Cannot enable port 2. Maybe the USB cable is bad?
  63. ehci-omap ehci-omap.0: port 2 reset error -110
  64. hub 1-0:1.0: hub_port_status failed (err = -32)
  65. ehci-omap ehci-omap.0: port 2 reset error -110
  66. hub 1-0:1.0: hub_port_status failed (err = -32)
  67. ehci-omap ehci-omap.0: port 2 reset error -110
  68. hub 1-0:1.0: hub_port_status failed (err = -32)
  69. ehci-omap ehci-omap.0: port 2 reset error -110
  70. hub 1-0:1.0: hub_port_status failed (err = -32)
  71. ehci-omap ehci-omap.0: port 2 reset error -110
  72. hub 1-0:1.0: hub_port_status failed (err = -32)
  73. hub 1-0:1.0: Cannot enable port 2. Maybe the USB cable is bad?
  74. usb 1-2: USB disconnect, address 3
  75. ehci-omap ehci-omap.0: port 2 reset error -110
  76. hub 1-0:1.0: hub_port_status failed (err = -32)
  77. ehci-omap ehci-omap.0: port 2 reset error -110
  78. hub 1-0:1.0: hub_port_status failed (err = -32)
  79. ehci-omap ehci-omap.0: port 2 reset error -110
  80. hub 1-0:1.0: hub_port_status failed (err = -32)
  81. ehci-omap ehci-omap.0: port 2 reset error -110
  82. hub 1-0:1.0: hub_port_status failed (err = -32)
  83. ehci-omap ehci-omap.0: port 2 reset error -110
  84. hub 1-0:1.0: hub_port_status failed (err = -32)
  85. hub 1-0:1.0: Cannot enable port 2. Maybe the USB cable is bad?
  86. ehci-omap ehci-omap.0: port 2 reset error -110
  87. hub 1-0:1.0: hub_port_status failed (err = -32)
  88. ehci-omap ehci-omap.0: port 2 reset error -110
  89. hub 1-0:1.0: hub_port_status failed (err = -32)
  90. ehci-omap ehci-omap.0: port 2 reset error -110
  91. hub 1-0:1.0: hub_port_status failed (err = -32)
  92. ehci-omap ehci-omap.0: port 2 reset error -110
  93. hub 1-0:1.0: hub_port_status failed (err = -32)
  94. ehci-omap ehci-omap.0: port 2 reset error -110
  95. hub 1-0:1.0: hub_port_status failed (err = -32)
  96. hub 1-0:1.0: Cannot enable port 2. Maybe the USB cable is bad?
  97. ehci-omap ehci-omap.0: port 2 reset error -110
  98. hub 1-0:1.0: hub_port_status failed (err = -32)
  99. ehci-omap ehci-omap.0: port 2 reset error -110
  100. hub 1-0:1.0: hub_port_status failed (err = -32)
  101. ehci-omap ehci-omap.0: port 2 reset error -110
  102. hub 1-0:1.0: hub_port_status failed (err = -32)
  103. ehci-omap ehci-omap.0: port 2 reset error -110
  104. hub 1-0:1.0: hub_port_status failed (err = -32)
  105. ehci-omap ehci-omap.0: port 2 reset error -110
  106. hub 1-0:1.0: hub_port_status failed (err = -32)
  107. hub 1-0:1.0: Cannot enable port 2. Maybe the USB cable is bad?
  108. ehci-omap ehci-omap.0: port 2 reset error -110
  109. hub 1-0:1.0: hub_port_status failed (err = -32)
  110. ehci-omap ehci-omap.0: port 2 reset error -110
  111. hub 1-0:1.0: hub_port_status failed (err = -32)
  112. ehci-omap ehci-omap.0: port 2 reset error -110
  113. hub 1-0:1.0: hub_port_status failed (err = -32)
  114. ehci-omap ehci-omap.0: port 2 reset error -110
  115. hub 1-0:1.0: hub_port_status failed (err = -32)
  116. ehci-omap ehci-omap.0: port 2 reset error -110
  117. hub 1-0:1.0: hub_port_status failed (err = -32)
  118. hub 1-0:1.0: Cannot enable port 2. Maybe the USB cable is bad?
  119. hub 1-0:1.0: unable to enumerate USB device on port 2

    这个问题搞了好久了,还不知道是哪里的问题,如果有那个大虾知道是什么原因的话,请指定指点,谢谢……

 

 

 

 

 

 

阅读(7436) | 评论(5) | 转发(1) |
给主人留下些什么吧!~~

coollu9252011-12-27 09:16:54

zjsx133: 楼主有拨号的脚本么,我现在已经转换成功了,需要ppp和usb串口连接拨号,可否共享下?.....
只要串口转换成功了,那么连接上网就简单了。ppp可能需要自己编译,连接串口节点的脚本网上很多,不过你拿过来可能需要自己修改~

zjsx1332011-12-23 11:00:10

楼主有拨号的脚本么,我现在已经转换成功了,需要ppp和usb串口连接拨号,可否共享下?

coollu9252011-08-02 21:05:00

匿名: 博主你好,我也在做嵌入式的3G上网卡,我用modeswitch转换后没有出现那些串口信息,用cat /proc/bus/usb/devices查看driver=none,但是ID已经变了,系统提示转换.....
modeswitch转换只是用来将相当于存储器的3G模块转换成能够上网的USB modem节点;转换后只是说你的3G模块有modem的功能了,但是你还要3G模块驱动(通常用option.c)来将3G的modem虚拟成串口节点,以供我们收发AT指令,才能上网。
    所以,你用modeswitch转换后,还需要编译3G模块驱动程序option.c,当然有相应的USB转串口驱动程序也需要哦~

2011-08-02 16:22:27

博主你好,我也在做嵌入式的3G上网卡,我用modeswitch转换后没有出现那些串口信息,用cat /proc/bus/usb/devices查看driver=none,但是ID已经变了,系统提示转换成功,我觉得只是ID变了,modem的驱动没有加载成功,博主是怎么做的给提示下吧

coollu9252011-04-27 23:25:01

之前是在nand flash上启动的android系统,可能是什么参数没配置好的缘故,使得系统不稳定,出现了如上的N多不确定性错误。之后在mmc卡上启动android系统,使用同样的转换脚本,同样的方法,就没有在出现过如上的错误了
至于在nand上启动的系统为什么会不稳定,还不知道为什么……