Page 1 of 1

Hid-data example

Posted: Fri Apr 22, 2016 10:25 pm
by fcapozzi
Hi, this is my first message in the forum.
I start experimenting with the v-usb firmware and i choose the hid-data example as a starting point.
I used an Attiny24a with a crystal of 16 Mhz. I choose to use PCINT0 and PCINT1 and I modified the usbconfig.h end section accordingly.
No problem so far. The firmware compiled and run immediately. However i am facing something i don't understand.

Linux consolle reports the new attached device this way :

[ 221.408248] usb 2-3: new full-speed USB device number 4 using ohci-pci
[ 221.705973] usb 2-3: New USB device found, idVendor=16c0, idProduct=05dc
[ 221.705979] usb 2-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 221.705982] usb 2-3: Product: Template
[ 221.705985] usb 2-3: Manufacturer: obdev.at


The problem is that the Product Name is "Template" even if in the usbconfig.h file the device name is defined as

#define USB_CFG_DEVICE_NAME 'D', 'a', 't', 'a', 'S', 't', 'o', 'r', 'e'
#define USB_CFG_DEVICE_NAME_LEN 9


Beeing identified as Template, when i try to use the commandline hidtool program an error is reported

linux-2wjj:/home/fabio/Scaricati/vusb-20121206/examples/hid-data/commandline # ./hidtool write 0x01,0x02,0x03
Vid=16c0 Pid=5dc
error finding DataStore: The specified device was not found


It seems that the Template device name is hardcoded somewhere or is retrieved from the net at enumeration phase ...

Am I wrong in something ?
:-) Fabio.

Re: Hid-data example

Posted: Sat Apr 23, 2016 5:47 pm
by fcapozzi
i answer myself ... my mistake .. i had two copies of the usbconfig.h file one in the main directory and in a sub folder and i was modifying the wrong one.
With the correct usbconfig.h everything is fine.

The only thing i suppose is wrong is that the device is identified as a full speed device even if i have the pull up on D-
However the packet exchange monitor program does not report any error.

Is it normal ??
:-) Fabio,