Page 1 of 1

hid-data, always 0xff

Posted: Tue Dec 16, 2008 12:15 am
by petrdvor
Hello,
i tried to use hid-data example and if i type into commandline "hidtool.exe write 0x45" and subsequently "hidtool.exe read" i always get 0xff (128 times). System found device correctly:

Code: Select all

bus-0/\\.\libusb0-0008--0x16c0-0x05df     16C0/05DF
- Manufacturer : obdev.at
- Product      : DataStore
  wTotalLength:         34
  bNumInterfaces:       1
  bConfigurationValue:  1
  iConfiguration:       0
  bmAttributes:         80h
  MaxPower:             10
    bInterfaceNumber:   0
    bAlternateSetting:  0
    bNumEndpoints:      1
    bInterfaceClass:    3
    bInterfaceSubClass: 0
    bInterfaceProtocol: 0
    iInterface:         0
      bEndpointAddress: 81h
      bmAttributes:     03h
      wMaxPacketSize:   8
      bInterval:        100
      bRefresh:         0
      bSynchAddress:    0


Can anybody help me, how to send simply data to avr and how to get some data back? My idea is communicate via USB similarly as through UART, but i know, it's more complicated. Does anybody have very very simple project with atmega8 under windows?
I'm beginner in this things. Will anybody have nerves for me?
Thanks

Petr Dvorak

Posted: Fri Dec 19, 2008 12:15 pm
by christian
Yes, something is broken with this example. Don't know what, though. The data arrives at the AVR, as far as I remember, but it's not written to the EEPROM correctly.

Just modify the example to set some I/O pins instead. You'll see that it works.

hid-data, always 0xff

Posted: Tue Dec 30, 2008 2:29 pm
by petrdvor
Thank You, it works now, but i don't know why it didn't work. I changed only frequency in makefile...

Weird message

Posted: Sun Jan 11, 2009 11:10 am
by alan_cv86
I'm a sort of newbie in this USB stuff, I get this message after typing the
"make -f makefile.windows":

gcc -O -Wall -c hidtool.c -o hidtool.o
process_begin: CreateProcess(NULL, gcc -O -Wall -c hidtool.c -o hidtool.o, ...)
failed.
make (e=2): The system cannot find the file specified.
make: *** [hidtool.o] Error 2



I don't have any idea of what does this mean.

Thank you

Alan C.

pd: I'm using windows vista

Posted: Sun Jan 11, 2009 12:04 pm
by christian
This message means that your WinAVR installation is broken. Please check whether you can compile anything else.

mmm how do i solve that broken installation

Posted: Sun Jan 11, 2009 9:20 pm
by alan_cv86
I tried installing again winavr and mingw... is there another way to solve that broken installation, i'm getting that similar message while trying to do another "makefile.windows"

C:\avrusb-20081126\examples\custom-class\commandline>make -f makefile.windows
gcc -I/usr/local/mingw/include -O -g -Wall -c opendevice.c
process_begin: CreateProcess(NULL, gcc -I/usr/local/mingw/include -O -g -Wall -c
opendevice.c, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [opendevice.o] Error 2

I also checked i had my circuit done correctly and flashed the hid-mouse hex after compiling and everything. It just worked perfect, it made the circle stuff. Then I flashed back the hid-data and also installed the hid stuff. But still no good results when i do the makefile.

Thank you

Posted: Fri Jan 30, 2009 7:13 pm
by slotkevitch
I'm getting the same error :?

Posted: Mon Feb 02, 2009 9:00 am
by alan_cv86
The problem is that when you install MINGW you also have to modify the path so that the compiler gcc can be found. To do this follow the next steps: in vista. In XP it might be similar.
-click start
-rightclick computer
-select properties
-click advanced system settings
-select advance tab
-click enviroment variables
-And in system variables search "path". Then edit and paste something like this: "C:\MinGW\bin"