usb library error message

i keep getting this error message when uploading the PS3BT.h file. i enabled the serial debugging in the settings.h file. when i open the serial monitor window it just says the library has started but nothing else. thank you

I/home/shaun/Arduino/libraries/USB_Host_Shield_2.0-master" “-I/home/shaun/Desktop/arduino-1.6.8/hardware/arduino/avr/libraries/SPI/src” “/home/shaun/Arduino/libraries/USB_Host_Shield_2.0-master/usbh_midi.cpp” -o “/tmp/build8a2f3c508e7d23f039889a17f20a0457.tmp/libraries/USB_Host_Shield_2.0-master/usbh_midi.cpp.o”
/home/shaun/Arduino/libraries/USB_Host_Shield_2.0-master/usbh_midi.cpp: In member function ‘void USBH_MIDI::parseConfigDescr(byte, byte)’:
/home/shaun/Arduino/libraries/USB_Host_Shield_2.0-master/usbh_midi.cpp:298:63: error: ‘PrintEndpointDescriptor’ was not declared in this scope
PrintEndpointDescriptor(epDesc);
^
/home/shaun/Arduino/libraries/USB_Host_Shield_2.0-master/usbh_midi.cpp: At global scope:
/home/shaun/Arduino/libraries/USB_Host_Shield_2.0-master/usbh_midi.cpp:421:80: error: no ‘void USBH_MIDI::PrintEndpointDescriptor(const USB_ENDPOINT_DESCRIPTOR*)’ member function declared in class ‘USBH_MIDI’
void USBH_MIDI::PrintEndpointDescriptor( const USB_ENDPOINT_DESCRIPTOR* ep_ptr )

Don't bother looking at the board - it's not uploading anything to the board because it can't compile. Failed compile means that the IDE has nothing to upload.

Fix the compile error - I'm not sure at a glance what's wrong under the covers, other than the obvious, that it's trying to call a function named PrintEndpointDescriptor() which doesn't exist (at least within scope). Maybe library installation problem.

What code are you trying to compile when you encounter this error? Is it one of the examples? If so, which one? If not then post the code using code tags(</> button).

I'm using ps3bt example for usb host shield 2.0. My original problem was the serial monitor would only say "ps3 library started", when there's suppose to be four more lines printed. I found a video that said I could change settings.h to enable serial debug and then these error codes popped up

What do you have selected in the Tools > Board menu?

If you read the instructions for installing the library they tell you to rename the library folder to USB_Host_Shield_20 I did that and it compiles without errors.

tf68:
If you read the instructions for installing the library they tell you to rename the library folder to USB_Host_Shield_20 I did that and it compiles without errors.

Were you able to reproduce the error? I tried compiling for Uno using Arduino IDE 1.6.8 with the same folder name as @reed598970 is using and it still compiles without error for me.

I only get when I enable serial debugging so I can get the mac address. I got the ps3 controller sync to the arduino but I don't have a mac address displayed. My thought is maybe the ps3 controller can request and store the address. I haven't been able to find other way to discover the address so I can get two arduinos to communicate. I renamed the folder correctly tf68.

@reed598970 you still haven't answered my question:

pert:
What do you have selected in the Tools > Board menu?

Also, which version of the Arduino IDE are you using?

reed598970:
I found a video that said I could change settings.h to enable serial debug and then these error codes popped up

What exactly did you do to enable serial debug?

I'm trying to reproduce your error so I can find a solution for you but I need enough information from you to do this.

reed598970:
I renamed the folder correctly tf68.

And what was the result? Do you still encounter the error you reported?

i renamed the folder as soon as i downloaded it. using 1.6.8. in the host shield master folder is a file settings.h and change the serial debugging, i pasted the line below

////////////////////////////////////////////////////////////////////////////////
// DEBUGGING
////////////////////////////////////////////////////////////////////////////////

/* Set this to 1 to activate serial debugging */
#define ENABLE_UHS_DEBUGGING 1

LOL, and you still won’t answer my question about which board you’re compiling for. It’s really hard to help you if you won’t provide the necessary information.

reed598970:
i renamed the folder as soon as i downloaded it.

Your error messages indicate that’s not true:

reed598970:
/home/shaun/Arduino/libraries/USB_Host_Shield_2.0-master/usbh_midi.cpp: In member function ‘void USBH_MIDI::parseConfigDescr(byte, byte)’:
/home/shaun/Arduino/libraries/USB_Host_Shield_2.0-master/usbh_midi.cpp:298:63: error: ‘PrintEndpointDescriptor’ was not declared in this scope
PrintEndpointDescriptor(epDesc);
^
/home/shaun/Arduino/libraries/USB_Host_Shield_2.0-master/usbh_midi.cpp: At global scope:
/home/shaun/Arduino/libraries/USB_Host_Shield_2.0-master/usbh_midi.cpp:421:80: error: no ‘void USBH_MIDI::PrintEndpointDescriptor(const USB_ENDPOINT_DESCRIPTOR*)’ member function declared in class ‘USBH_MIDI’
void USBH_MIDI::PrintEndpointDescriptor( const USB_ENDPOINT_DESCRIPTOR* ep_ptr )

You see how they show your library folder is named USB_Host_Shield_2.0-master. If you had renamed it according to the instructions at GitHub - felis/USB_Host_Shield_2.0: Revision 2.0 of USB Host Library for Arduino.

uncompress the zip folder and rename the directory to “USB_Host_Shield_20”

Then the library folder would be named USB_Host_Shield_20. However I have tried compiling with the debugging turned on and the same folder name as you and I still don’t have any errors.

reed598970:
i pasted the line below

////////////////////////////////////////////////////////////////////////////////
// DEBUGGING
////////////////////////////////////////////////////////////////////////////////

/* Set this to 1 to activate serial debugging */
#define ENABLE_UHS_DEBUGGING 1

You’re not supposed to paste that, you’re supposed to change line 27 of the settings.h:

#define ENABLE_UHS_DEBUGGING 0

to

#define ENABLE_UHS_DEBUGGING 1

I suggest that you do the following:

  • Delete the folder /home/shaun/Arduino/libraries/USB_Host_Shield_2.0-master.
  • Restart the Arduino IDE if it’s running.
  • Sketch > Include Library > Manage Libraries… > Filter your search… > type “usb host 2.0” > USB Host Shield Library 2.0(click on it) > Install
  • Turn on serial debug output as I described above.
  • File > Examples > USB Host Shield Library 2.0 > Bluetooth > PS3BT
  • Sketch > Verify/Compile
  • If there is an error then click on the Copy error messages button on the right side of the orange bar and then paste it into a message here using code tags(</> button).

i didnt copy and paste the code in the sketch, was just showing what i change. but i did what you recommended right before you posted it. so i guess something got out of whack originally but it works fine now. thanks