FTDI Community

Please login or register.

Login with username, password and session length.
Advanced Search  

News:

Welcome to the FTDI Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ FTDI Support


New Bridgetek Community is now open

Please note that we have created the Bridgetek Community to discuss all Bridgetek products e.g. EVE, MCU.

Please follow this link and create a new user account to get started.

Bridgetek Community

Show Posts

You can view here all posts made by this member. Note that you can only see posts made in areas to which you currently have access.

Messages - tomekkicaj700

Pages: [1]
1
Discussion - Software / Re: USB Keyboard Host on VNCII
« on: April 04, 2020, 05:46:22 PM »
Hi!

Thank you for your response.
Would the FT90x work  with a USB hub? If not, what is the best way to multiplex the D+/- pins of the FT90x? I will always have the barcode reader connected  and usb flash  drive will be connected  occasionally. I will have 2 separate USB connectors on the PCB, one for  the reader and another for the flash drive.
Do you think the attached schematic would work?

When the flash drive needs to be used I could reset the FT90 and change it's configuration in software to switch from HID to MSC Host. When flash drive is removed I reset the FT90 again, switch it to HID Host so that it enumerates again the keyboard/barcode reader.

Best regards
Tom

2
Discussion - Software / Re: USB Keyboard Host on VNCII
« on: April 02, 2020, 11:45:18 AM »
Hi!
Great, many thanks for this, I've also found AN_185 Vinculum-II UART to USB HID Class and got it to run on my VNC2 board and was able to read data from low speed usb keyboard. I'm getting data on each keypress and sent them to uart.
However, when I attached a Full-speed usb Barcode reader it didn't enumerate.  Below are the device descriptors for the barcode reader:
Code: [Select]
Connection Status Device connected
Current Configuration 1
Speed Full (12 Mbit/s)
Device Address 18
Number Of Open Pipes 3

Device Descriptor HID Keyboard
Offset Field Size Value Description
0 bLength 1 12h 
1 bDescriptorType 1 01h Device
2 bcdUSB 2 0200h USB Spec 2.0
4 bDeviceClass 1 00h Class info in Ifc Descriptors
5 bDeviceSubClass 1 00h 
6 bDeviceProtocol 1 00h 
7 bMaxPacketSize0 1 40h 64 bytes
8 idVendor 2 0111h 
10 idProduct 2 0111h 
12 bcdDevice 2 7008h 70.08
14 iManufacturer 1 01h " "
15 iProduct 1 02h "HID Keyboard"
16 iSerialNumber 1 03h "1.000"
17 bNumConfigurations 1 01h 

Configuration Descriptor 1
Offset Field Size Value Description
0 bLength 1 09h 
1 bDescriptorType 1 02h Configuration
2 wTotalLength 2 0042h 
4 bNumInterfaces 1 02h 
5 bConfigurationValue 1 01h 
6 iConfiguration 1 00h 
7 bmAttributes 1 C0h Self Powered
 4..0: Reserved  ...00000   
 5: Remote Wakeup  ..0.....  No
 6: Self Powered  .1......  Yes
 7: Reserved (set to one)
(bus-powered for 1.0)  1.......   
8 bMaxPower 1 32h 100 mA

Interface Descriptor 0/0 HID, 2 Endpoints
Offset Field Size Value Description
0 bLength 1 09h 
1 bDescriptorType 1 04h Interface
2 bInterfaceNumber 1 00h 
3 bAlternateSetting 1 00h 
4 bNumEndpoints 1 02h 
5 bInterfaceClass 1 03h HID
6 bInterfaceSubClass 1 01h Boot Interface
7 bInterfaceProtocol 1 01h Keyboard
8 iInterface 1 00h 

HID Descriptor
Offset Field Size Value Description
0 bLength 1 09h 
1 bDescriptorType 1 21h HID
2 bcdHID 2 0100h 1.00
4 bCountryCode 1 00h 
5 bNumDescriptors 1 01h 
6 bDescriptorType 1 22h Report
7 wDescriptorLength 2 0041h 65 bytes

Endpoint Descriptor 81 1 In, Interrupt, 5 ms
Offset Field Size Value Description
0 bLength 1 07h 
1 bDescriptorType 1 05h Endpoint
2 bEndpointAddress 1 81h 1 In
3 bmAttributes 1 03h Interrupt
 1..0: Transfer Type  ......11  Interrupt
 7..2: Reserved  000000..   
4 wMaxPacketSize 2 0008h 8 bytes
6 bInterval 1 05h 5 ms

Endpoint Descriptor 01 1 Out, Interrupt, 5 ms
Offset Field Size Value Description
0 bLength 1 07h 
1 bDescriptorType 1 05h Endpoint
2 bEndpointAddress 1 01h 1 Out
3 bmAttributes 1 03h Interrupt
 1..0: Transfer Type  ......11  Interrupt
 7..2: Reserved  000000..   
4 wMaxPacketSize 2 0008h 8 bytes
6 bInterval 1 05h 5 ms

Interface Descriptor 1/0 HID, 1 Endpoint
Offset Field Size Value Description
0 bLength 1 09h 
1 bDescriptorType 1 04h Interface
2 bInterfaceNumber 1 01h 
3 bAlternateSetting 1 00h 
4 bNumEndpoints 1 01h 
5 bInterfaceClass 1 03h HID
6 bInterfaceSubClass 1 00h 
7 bInterfaceProtocol 1 00h 
8 iInterface 1 00h 

HID Descriptor
Offset Field Size Value Description
0 bLength 1 09h 
1 bDescriptorType 1 21h HID
2 bcdHID 2 0110h 1.10
4 bCountryCode 1 00h 
5 bNumDescriptors 1 01h 
6 bDescriptorType 1 22h Report
7 wDescriptorLength 2 002Fh 47 bytes

Endpoint Descriptor 82 2 In, Interrupt, 5 ms
Offset Field Size Value Description
0 bLength 1 07h 
1 bDescriptorType 1 05h Endpoint
2 bEndpointAddress 1 82h 2 In
3 bmAttributes 1 03h Interrupt
 1..0: Transfer Type  ......11  Interrupt
 7..2: Reserved  000000..   
4 wMaxPacketSize 2 0008h 8 bytes
6 bInterval 1 05h 5 ms


The reader works fine as HID Keyboard with my PC but VNC2 fails at the enumeration:

Code: [Select]
      // find first HID on USB Port 1
      hc_ioctlClass.dev_class = USB_CLASS_HID; //USB_CLASS_HID;
      hc_ioctlClass.dev_subclass = USB_SUBCLASS_ANY; //USB_CLASS_HID; //USB_SUBCLASS_ANY;
      hc_ioctlClass.dev_protocol = USB_PROTOCOL_ANY;

      // user ioctl to find first hub device

     
      hc_iocb.ioctl_code = VOS_IOCTL_USBHOST_DEVICE_FIND_HANDLE_BY_CLASS;
      hc_iocb.handle.dif = NULL;
      hc_iocb.set = &hc_ioctlClass;
      hc_iocb.get = &ifDev;

      printmsg("VNCLII: ioctl to find first hub device ");
      status = vos_dev_ioctl(hUSBHOST_1, &hc_iocb);

      if (status != USBHOST_OK)
      {
         printmsg("fail. Error:");
         
         itoa(status,buffer,10);    //  FAILS! status=1  (USBHOST_NOT_FOUND)
         
         printmsg(buffer); printmsg("\r\n");   
         
         continue;
      }
      else {
         
          printmsg("OK!\r\n");
         //continue;         
         
         
      }

The USB host configuration:

Code: [Select]
// Initialise USB Host
usbhostContext.if_count = 8;
usbhostContext.ep_count = 16;
usbhostContext.xfer_count = 2;
usbhostContext.iso_xfer_count = 2;
usbhost_init(VOS_DEV_USBHOST_1, -1, &usbhostContext);

Could it be that VNC2 may have a problem with Full speed HID device? 

This is a descriptor of my low speed keyboard:

Code: [Select]
Connection Status Device connected
Current Configuration 1
Speed Low (1.5 Mbit/s)
Device Address 1
Number Of Open Pipes 2

Device Descriptor USB Keyboard
Offset Field Size Value Description
0 bLength 1 12h 
1 bDescriptorType 1 01h Device
2 bcdUSB 2 0110h USB Spec 1.1
4 bDeviceClass 1 00h Class info in Ifc Descriptors
5 bDeviceSubClass 1 00h 
6 bDeviceProtocol 1 00h 
7 bMaxPacketSize0 1 08h 8 bytes
8 idVendor 2 1A2Ch 
10 idProduct 2 0B23h 
12 bcdDevice 2 0110h 1.10
14 iManufacturer 1 01h "USB"
15 iProduct 1 02h "USB Keyboard"
16 iSerialNumber 1 00h 
17 bNumConfigurations 1 01h 

Configuration Descriptor 1 Bus Powered, 100 mA
Offset Field Size Value Description
0 bLength 1 09h 
1 bDescriptorType 1 02h Configuration
2 wTotalLength 2 003Bh 
4 bNumInterfaces 1 02h 
5 bConfigurationValue 1 01h 
6 iConfiguration 1 00h 
7 bmAttributes 1 A0h Bus Powered, Remote Wakeup
 4..0: Reserved  ...00000   
 5: Remote Wakeup  ..1.....  Yes
 6: Self Powered  .0......  No, Bus Powered
 7: Reserved (set to one)
(bus-powered for 1.0)  1.......   
8 bMaxPower 1 32h 100 mA

Interface Descriptor 0/0 HID, 1 Endpoint
Offset Field Size Value Description
0 bLength 1 09h 
1 bDescriptorType 1 04h Interface
2 bInterfaceNumber 1 00h 
3 bAlternateSetting 1 00h 
4 bNumEndpoints 1 01h 
5 bInterfaceClass 1 03h HID
6 bInterfaceSubClass 1 01h Boot Interface
7 bInterfaceProtocol 1 01h Keyboard
8 iInterface 1 00h 

HID Descriptor
Offset Field Size Value Description
0 bLength 1 09h 
1 bDescriptorType 1 21h HID
2 bcdHID 2 0110h 1.10
4 bCountryCode 1 00h 
5 bNumDescriptors 1 01h 
6 bDescriptorType 1 22h Report
7 wDescriptorLength 2 0036h 54 bytes

Endpoint Descriptor 81 1 In, Interrupt, 10 ms
Offset Field Size Value Description
0 bLength 1 07h 
1 bDescriptorType 1 05h Endpoint
2 bEndpointAddress 1 81h 1 In
3 bmAttributes 1 03h Interrupt
 1..0: Transfer Type  ......11  Interrupt
 7..2: Reserved  000000..   
4 wMaxPacketSize 2 0008h 8 bytes
6 bInterval 1 0Ah 10 ms

Interface Descriptor 1/0 HID, 1 Endpoint
Offset Field Size Value Description
0 bLength 1 09h 
1 bDescriptorType 1 04h Interface
2 bInterfaceNumber 1 01h 
3 bAlternateSetting 1 00h 
4 bNumEndpoints 1 01h 
5 bInterfaceClass 1 03h HID
6 bInterfaceSubClass 1 01h Boot Interface
7 bInterfaceProtocol 1 02h Mouse
8 iInterface 1 00h 

HID Descriptor
Offset Field Size Value Description
0 bLength 1 09h 
1 bDescriptorType 1 21h HID
2 bcdHID 2 0110h 1.10
4 bCountryCode 1 00h 
5 bNumDescriptors 1 01h 
6 bDescriptorType 1 22h Report
7 wDescriptorLength 2 006Ch 108 bytes

Endpoint Descriptor 82 2 In, Interrupt, 10 ms
Offset Field Size Value Description
0 bLength 1 07h 
1 bDescriptorType 1 05h Endpoint
2 bEndpointAddress 1 82h 2 In
3 bmAttributes 1 03h Interrupt
 1..0: Transfer Type  ......11  Interrupt
 7..2: Reserved  000000..   
4 wMaxPacketSize 2 0005h 5 bytes
6 bInterval 1 0Ah 10 ms


Major difference is the speed and packet size (bMaxPacketSize0: 64B with the reader) but it shouldn't matter for VNC2?

best regards
Tom





3
Discussion - Software / USB Keyboard Host on VNCII
« on: March 31, 2020, 10:32:55 AM »
I have been using VNCII 32L for many years as USB flash drive host but now I'd like to use it as a host for hid keyboard or barcode reader.  I would like to  use USB1 interface as  flash drive host and  as HID host on USB2. I haven't found  any software example of USB  HID host on FTDI website, has anyone used the  VNCII chip that way?

Best regards
Tom

Pages: [1]