The way that USB detects that the device is present is through a pull-up/down 
resistor on D+/D- line(s) - I can't remember the exact details, but its in the 
USB spec.

Devices I've worked with in the past sometimes have a MOSFET on the resistor, 
which is controlled by a GPIO line, which can allow the resistor to be 
disconnected, which then acts like a cable pull as far as the host is concerned.

You'd need to find out from the phone manufacturer if their device has such a 
gpio line.

Dave Hylands

----- Original Message -----
> From: "Zac Campbell" <[email protected]>
> To: "Mike Habicher" <[email protected]>, [email protected]
> Sent: Tuesday, October 22, 2013 3:11:23 AM
> Subject: Re: [b2g] Software solution for disconnecting the USB cable
> 
> That seems pretty heavy for our test suite. I think we can just do `adb
> restart` via mozdevice and get a similar effect I think.
> 
> We're still not sure if we'll write this test, hard to validate it on
> the host side. Some more experimentation needed.
> 
> 
> 
> 
> 
> On 16/10/13 18:39, Mike Habicher wrote:
> > I haven't tried these methods, but it should be possible to do a soft
> > reset of the device from the host end. A couple of approaches:
> > http://marc.info/?l=linux-usb-users&m=116827193506484
> > http://permalink.gmane.org/gmane.linux.usb.general/55298
> >
> > --m.
> >
> >
> > On 13-10-16 01:18 PM, Zac Campbell wrote:
> >> We want to write an automated test for enabling USB Mass Storage but
> >> we have a problem in the teardown of the test in that turning off USB
> >> Mass storage requires the cable to be removed from the device.
> >>
> >> Restarting the b2g process does not do the trick. 'adb reboot' works
> >> but is a bit heavy for a test teardown.
> >>
> >> Does anybody know of a software method we can use to do this teardown
> >> cleanly and quickly?
> >>
> >> Thanks
> >> Zac
> >> _______________________________________________
> >> dev-b2g mailing list
> >> [email protected]
> >> https://lists.mozilla.org/listinfo/dev-b2g
> >
> 
> _______________________________________________
> dev-b2g mailing list
> [email protected]
> https://lists.mozilla.org/listinfo/dev-b2g
> 
_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to