# VUSB + Ardunio Problem

Here’s the useful part of my code:

#include “usbdrv.h”

void setup() {
TIMSK0 &= !(1<TOIE0);
cli();
usbDeviceDisconnect(); /* enforce re-enumeration, do this while interrupts are disabled! */
usbDeviceConnect();
usbInit();
sei();
}

void loop() {
usbPoll();

}

}

I’m able to send data back and forth fine for a minute or so, but then it seems to become unresponsive to the OS(linux) and requires me to reset the Ardunio or unplug the USB cable. The device never shows a USB disconnect in dmesg when it’s this unresponsive state and still shows up in lsusb. Also, when I lsusb -v the usb device in this bad state, i get an error when trying to read the vendor/product strings. These strings show correctly when it’s responding. I’m using the schematic from http://code.rancidbacon.com/ProjectLogArduinoUSB. Is this just a code problem? I’ve tried asking this on the vusb forums, but they are not quite as active as here.