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 ?