Issue opened for @ZeThomas and @ravepants
Description: Unit was working initially. User attempted to register with codebender online ide - http://codebender.cc. Last part of registration involves uploading a blink test to the unit as a test. User uploaded this piece of code and ran it. After uploading the code the unit is no longer recognized by the OS. Arduboy unit no longer recognized on same computer in multiple ports, even after a reboot. Unit no longer is recognized on any other machine.
Source code in question: https://github.com/codebendercc/arduino-library-files/blob/master/examples/01.Basics/Blink/Blink.ino
[ 3796.660946] usb 3-4: new full-speed USB device number 45 using xhci_hcd
[ 3796.661147] usb 3-4: Device not responding to set address.
[ 3796.865200] usb 3-4: Device not responding to set address.
[ 3797.069114] usb 3-4: device not accepting address 45, error -71
[ 3797.181285] usb 3-4: new full-speed USB device number 46 using xhci_hcd
[ 3797.181460] usb 3-4: Device not responding to set address.
[ 3797.385490] usb 3-4: Device not responding to set address.
[ 3797.589591] usb 3-4: device not accepting address 46, error -71
[ 3797.701755] usb 3-4: new full-speed USB device number 47 using xhci_hcd
[ 3797.701919] usb 3-4: Device not responding to set address.
[ 3797.905987] usb 3-4: Device not responding to set address.
[ 3798.110009] usb 3-4: device not accepting address 47, error -71
[ 3798.222222] usb 3-4: new full-speed USB device number 48 using xhci_hcd
[ 3798.222398] usb 3-4: Device not responding to set address.
[ 3798.426497] usb 3-4: Device not responding to set address.
[ 3798.630402] usb 3-4: device not accepting address 48, error -71
[ 3798.630534] hub 3-0:1.0: unable to enumerate USB device on port 4
(an asus eeebook x205ta for reference): in system information, components -> problem devices:
"Unknown USB Device (Device Descriptor Request Failed) -- Error Code 43"
- OS: Linux distribution and Windows
- Set XHCI pre-boot mode in UEFI bios to disabled. No effect.
- Try a different cable: no effect.
It looks like code bender is to blame here, I think its due to trying to program the device as an arduino UNO. User should instead select the leonardo… and if they are using ubuntu there is supposedly some bug where you can’t actually program the device at all because of driver conflicts… I have to hop over to my windows machine to use code bender with the Arduboy.
Looking into it more…
As a solution if user has another arduino available then it is possible to solder wires to the test pins in the back and refresh the boot loader to bring the device back to life. We will post a tutorial on this very soon on how to perform this.
Just checked the following and none of these bricked the device:
- Arduino IDE: Breakout Game (as Leonardo) = Success
- Arduino IDE: Blink sketch (as Leonardo) = Success (but nothing on the screen)
- Arduino IDE: Breakout Game (as UNO) = Error, does not program
- Arduino IDE: Blink sketch (as UNO) = Error, does not program
- Codebender on Windows: Flappyball Game (as Leonardo) = Success
- Codebender on Windows: Blink sketch (as Leonardo) = Success (but nothing on screen)
- Codebender on Windows: Blink sketch (as UNO) = Error, does not program
- Codebender on Linux: Blink sketch (as Leonardo) = Success (but nothing on screen)
- Codebender on Linux: Flappyball Game (as Leonardo) = Success
- Codebender on Linux: Blink sketch (as UNO) = Error, does not program
So through all of these tests, have not been able to brick the device. It would be useful to know more details about how the user configured the programming through code bender, if they just left it on a default board.
Questions to ask:
- What board was selected when the device was programmed via code bender?
- Does the user have a multimeter able to test some resistors on the board?
- Can the user try to short out two of the programming pins together (Feel comfortable poking wires on the board)?
More details on how to perform these tests coming soon!
- I selected Arduino Pro Micro as chipset, and the other IRC user (Ravepants) confirmed to having selected Leonardo.
- I am equipped with multimeter, and
- I am comfortable with general poking around
I don’t think it is a Linux problem (or my system specifically), as I have a Leonardo and a Pro Micro lying around, and they are still fully functioning/programmable.
Thanks for the response.
I first used the code bender site and it detected the board as a Leonardo on the correct com port (windows 10) I went through the motions and it uploaded the blink sketch, this was when the arduboy appeared to go dead.
I rebooted and and it showed up in device manager as a usb serial device instead of the Leonardo.
I downloaded the arduino ide and tried to view it in that but it didn’t detect as the correct board so I manually installed the Leonardo driver from the ide install and then It picked it up correctly in device manager and the ide, after that I cloned the repo as suggested buy ekem in the welcome post and used the official arduino ide to to flash the arkanoid demo which worked perfectly.
So it does work again now, and I suspect it was a driver issue.
However I have noticed that a few of the codebender examples do not flash to the arduboy from the site, and I have downloaded a few and tried to use the ino files to flash from the arduino ide and they fail to compile, the only one I have got to work so far are the default arkanoid and flappy ball. I mostly seem to get some sort of font errors on compile with the others which in my limited arduino knowledge think may be due to libraries? But I’m still pretty new to all this!
Hope this helps.
Thanks for the update @ravepants, glad it worked out. I think we are still waiting on a guide to resetting the dev unit from @bateske for @ZeThomas though. Glad you don’t fall in that category.
Try this tutorial on resetting the device. Chances are the ability for the sketch to enumerate as a USB device is incorrect. Resetting the device activates the boot loader for a few seconds.
I’m getting the below message when I try to upload the sketch on Arduino IDE 1.6.3 on Windows 8
I was previously able to upload my own sketches and I still see it running on Arduboy.
I tried the reset method, but the problem seems to be that Arduboy is not being listed in the device manager.
Sketch uses 17,718 bytes (61%) of program storage space. Maximum is 28,672 bytes.
Global variables use 1,671 bytes (65%) of dynamic memory, leaving 889 bytes for local variables. Maximum is 2,560 bytes.
processing.app.debug.RunnerException: Couldn’t find a Board on the selected port. Check that you have the correct port selected. If it is correct, try pressing the board’s reset button after initiating the upload.
Couldn’t find a Board on the selected port. Check that you have the correct port selected. If it is correct, try pressing the board’s reset button after initiating the upload.
What board do you have selected? You should choose Leonardo in the options.
Does the serial port show up?
I have selected Leonardo from the list of board. In Device manager, I do not see Ports at all for some reason and consequently, the ‘Ports’ link in Arduino IDE is frozen
Update: I tried restarting the PC - still does not work
The device is only available for program for 8 seconds after pressing reset, Arduino or Codebender should try to upload at the same time you press the reset button the timing is very important.
You can also try to reset the device, and for 8 seconds see if it shows up in device manager.
Does the LED flash after resetting?
I tried reset as per your reset tutorial in this forum. Still not being recognized in the COM ports.
LED is NOT flashing after reset!
I’m trying reinstall of Arduino IDE and drivers.
@bateske: reinstallation of Arduino IDE and PC restart isn’t helping. I still don’t see the device on the COM ports. Any other workarounds?
You’re checking here too?
It might not automatically choose the right port there for you. When the Arduboy is plugged in, look at that section under tools. Mine isn’t plugged in right now so it doesn’t show one connected, but it would say something like “COM1 (Arduino Leonardo).”
Try plugging it into a different USB port from the first one you used too too, while the arduino program isn’t running yet, let it install the drivers etc.
Thanks @unclesporky and @bateske: The issue got fixed after reinstalling the drivers too. Worked fine just now!
HOORAY! 20 more characters!