I would like to know whether is possible to switch the device type fro the device(USB), i mean, if it is possible to issue a event, command o similar to the host to say something like "i am going to disconnect now" and "now i am connected", so the host may ask the device for it descriptors. i can handle only one address, this is, one device descripto at a time. I would appreciate any advice.
I don't think there is an "event" as such but with appropriate hardware support it is possible to disconnect and reconnect without losing power. Cypress' EZ-USB chips do this - in general it's fairly common practice to have devices that enumerate as say a HID when you plug them in, then the driver uploads firmware for some other function and issues a reset, at which time the device re-enumerates as whatever it really is.
A similar technique used by people like Picotech for their scopes.
Enumerate as V1.1 device with next to no endpoints. Will only do anything after driver initialised to load firmware, and then if possible=20 reenumerate as USB 2.0 device with LOTS and LOTS of endpoints. Really ridiculous as Flash memory is not that expensive and would be easier to upload the code when it changes, and make for easier use! Having seen USB 2.0 systems wait for the USB V1.1 transfer to complete the transfer several times, when it gets confused (just today saw one logging error codes as data so upto -150V data points for device=20 being monitored that could only produce -12V MAX!
That system needs more recycling for USB drivers than anything else.
--=20 Paul Carpenter | snipped-for-privacy@pcserviceselectronics.co.uk PC Services Timing Diagram Font GNU H8 - compiler & Renesas H8/H8S/H8 Tiny For those web sites you hate
With "event" i tried to refer to asynchronous events that may appear i any of the SCSI specifications such us RBC for example,but i think that yo are right, and there's no event related with this.... That hardware suppor that you mention, is related with USB 2.0? i would like to know if it ma exist something similar in USB 1.1, since as far as i know that "hardwar features" are only avaiable in USB 2.0. please, correct me if i'm wrong.
I though something similar but with a mass storage/rndis device instead o with a HID, but thanks you very much anyway.
If yo mean recycling the system to reenumerate because the drivers are out of sync, for those devices too often for my liking. Whne developing it can be many times a day. Sometimes pulling lead out and reenumerating sorts it out but not always.
--
Paul Carpenter | paul@pcserviceselectronics.co.uk
PC Services
I was talking about the Picotech stuff, they are the reason for the re- enumerations and sonetimes system cycling. I *personally* would not use them, however I have a customer who loves them.
If it stays in sync (driver and device) it is fine, otherwise it is just as bad as many inkjet USB printers.
There are other reasons as well why I would not use them, that I will not discuss here.
--
Paul Carpenter | paul@pcserviceselectronics.co.uk
PC Services
The unplug/plug can be simulated by disconnecting the 1k5 pullup from D+ or D- (depending on speed). When there is no pull-up both lines are pulled to ground by 15k pull-downs in the host (or hub) and this looks exactly the same as unplugged.
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.