Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/c/58.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在LPC1769微控制器中具有批量传输的USB供应商特定类_C_Usb_Microcontroller_Nxp Microcontroller - Fatal编程技术网

在LPC1769微控制器中具有批量传输的USB供应商特定类

在LPC1769微控制器中具有批量传输的USB供应商特定类,c,usb,microcontroller,nxp-microcontroller,C,Usb,Microcontroller,Nxp Microcontroller,我正在尝试在LPC1769微控制器中实现USB供应商特定类的批量传输。 我有一个USB生物识别模块,提取了它的设备信息。因此,我配置了以下描述符 const uint8_t USB_DeviceDescriptor[]={}; const uint8_t USB_ConfigDescriptor[]={}; const uint8_t USB_StringDescriptor[]={}; 现在,我的USB生物识别设备和我的LPC1769设备具有类似类型的设备信息 (我已经在我的Ubuntu P

我正在尝试在LPC1769微控制器中实现USB供应商特定类的批量传输。 我有一个USB生物识别模块,提取了它的设备信息。因此,我配置了以下描述符

const uint8_t USB_DeviceDescriptor[]={};
const uint8_t USB_ConfigDescriptor[]={};
const uint8_t USB_StringDescriptor[]={};
现在,我的USB生物识别设备和我的LPC1769设备具有类似类型的设备信息 (我已经在我的Ubuntu PC上看到它使用这个命令“lsusb-v”) 但是,当我将其插入windows时,它应该进入设备管理器中的USB类(三叉戟符号列表)。USB生物测量设备列在“通用串行总线控制器”下

我找不到任何文件、流程图 是否有人可以指导我如何在特定于供应商的课程中建立沟通

USB生物识别设备信息

Bus 003 Device 023: ID 16d1:0407  
Couldn't open device, some information will be missing
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x16d1 
  idProduct          0x0407 
  bcdDevice            0.00
  iManufacturer           1 
  iProduct                2 
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              300mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
Bus 003 Device 018: ID 1fc9:2002 NXP Semiconductors 
Couldn't open device, some information will be missing
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x1fc9 NXP Semiconductors
  idProduct          0x2002 
  bcdDevice            1.00
  iManufacturer           1 
  iProduct                2 
  iSerial                 1 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              3 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               1
我的LPC1769 USB设备信息

Bus 003 Device 023: ID 16d1:0407  
Couldn't open device, some information will be missing
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x16d1 
  idProduct          0x0407 
  bcdDevice            0.00
  iManufacturer           1 
  iProduct                2 
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              300mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
Bus 003 Device 018: ID 1fc9:2002 NXP Semiconductors 
Couldn't open device, some information will be missing
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x1fc9 NXP Semiconductors
  idProduct          0x2002 
  bcdDevice            1.00
  iManufacturer           1 
  iProduct                2 
  iSerial                 1 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              3 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               1
先谢谢你

LPC1769仅支持USB全速,因此大容量EPs的最大容量为64字节。只有高速设备支持512字节大容量EPs


要操作“供应商特定”类USB设备,您可以使用特定的内核驱动程序或/WinUSB作为驱动程序与用户模式应用程序一起使用。

每当没有为特定USB设备(VID和PID)安装驱动程序时,它将显示“?其他设备” 在设备管理器中。但是,在我的案例中,它被列在“通信设备类”下,尽管我已经 将我的USB类协议更改为“供应商特定类”。为什么?驱动程序实例正在尝试与 相同的视频和PID。我已将我的设备更改为USB生物测量设备。它表现在“宇宙”中 串行总线控制器列表”

现在,您可以将其与“Android Studio平台”的Android选项卡集成。有一个API称为“UsbManager”


感谢您的参与。

非常感谢。在更改了与USB设备类似的VID/PID后,我将设备放入“通用串行总线”列表中。我忘了以前我已经安装了驱动程序。我正在按照你的建议尝试LibUSB。您能告诉我如何从PC端将数据发送和接收到USB设备吗?