How do I hard-reset usb on beagle-bone with Angstrom distribution

136 views
Skip to first unread message

ma...@verdigristech.com

unread,
Jun 20, 2013, 8:17:31 PM6/20/13
to beagl...@googlegroups.com
Hi I am using a beagle-bone A6a  with angstrom linux,

we have a usbreset script compiled from here. 

#include <stdio.h>
#include <usb.h>

int main(void)
{
      struct usb_bus *busses;
      usb_init();
      usb_find_busses();
      usb_find_devices();
      busses = usb_get_busses();
      struct usb_bus *bus;
      int c, i, a;
      /* ... */
      for (bus = busses; bus; bus = bus->next) {
        struct usb_device *dev;
        int val;
        usb_dev_handle *junk;
        for (dev = bus->devices; dev; dev = dev->next) {
          char buf[1024];
          junk = usb_open ( dev );
          usb_get_string_simple(junk,2,buf,1023);
          if ( junk == NULL ){
            printf("Can't open %p (%s)\n", dev, buf );
          } else {
            val = usb_reset(junk);
            printf( "reset %p %d (%s)\n", dev, val, buf );
          }
          usb_close(junk);
        }
      }
}

It generates output like this

[ 2422.917305] usb 1-1: reset high-speed USB device number 19 using musb-hdrc
[ 2423.080278] cdc_acm 1-1:1.0: ttyACM0: USB ACM device
Reset successful

however it is not actually successfully hard-resetting.

Does anyone know how to hard powercycle the usb host controller?

micha...@googlemail.com

unread,
Jun 9, 2015, 10:07:24 AM6/9/15
to beagl...@googlegroups.com, ma...@verdigristech.com
Hey,

did you have any success with the usb hard reset issue?

Regards,
Michael 
Reply all
Reply to author
Forward
0 new messages