Bulk OUT endpoint (usbFunctionWriteOut)

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply
miroslav.talasek
Posts: 5
Joined: Mon May 19, 2008 8:19 am

Bulk OUT endpoint (usbFunctionWriteOut)

Post by miroslav.talasek » Mon May 19, 2008 1:52 pm

i want use endpoint 2 to writeOut bulk but id doesnt work

i have

Code: Select all

void usbFunctionWriteOut(uchar *data, uchar len){
....

}

and

Code: Select all

#define USB_CFG_IMPLEMENT_FN_WRITEOUT   1

but lsusb -v return

Code: Select all

Bus 004 Device 100: ID 16c0:3e08
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass          255 Vendor Specific Class
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0         8
  idVendor           0x16c0
  idProduct          0x3e08
  bcdDevice            1.00
  iManufacturer           1 miREC.ta
  iProduct                2 USBLcd
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           18
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0x80
      (Bus Powered)
    MaxPower               40mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         0 (Defined at Interface level)
      bInterfaceSubClass      0
      bInterfaceProtocol      0
      iInterface              0
Device Status:     0x0000
  (Bus Powered)

there is zero endpoints
must i uncomment or change any other in usbconfig.h ?

on host side

Code: Select all

 usb_claim_interface(handle, 0);
char bufferOut[255];
   memset(bufferOut,0xff,0xff);
   usb_bulk_write(
            handle,             // handle obtained with usb_open()
           USB_ENDPOINT_OUT | 2,// identifies endpoint
           bufferOut,             // data buffer
           200,     // legth
           1000
       );



but messages to ENDPOINT_IN 0 works perfectly

christian
Objective Development
Objective Development
Posts: 1443
Joined: Thu Nov 09, 2006 11:46 am

Post by christian » Wed May 28, 2008 5:12 pm

You need to supply your own configuration descriptor since the default one does not include additional endpoints. See AVR-Doper for an example.

Post Reply