Switching device types in a USB device

Hi there,

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.

Thank you!

Reply to
hectorhg
Loading thread data ...

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.

Reply to
larwe

",

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

Reply to
Paul Carpenter

Does this happen often?

Andrew

Reply to
Andrew Jackson

or

now",

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.

Reply to
hectorhg

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
 Click to see the full signature
Reply to
Paul Carpenter

u
t

Look at Cypress's app notes. It is definitely not USB2.0 specific, these are 1.x devices.

Reply to
larwe

I meant when using the Picotech stuff. I wouldn't be very happy having to unplug/plug a commercial product all the time.

Andrew

Reply to
Andrew Jackson

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
 Click to see the full signature
Reply to
Paul Carpenter

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.

Peter

Reply to
Peter Dickerson

Thank you: that was what I wanted to know (it was what I thought that you meant).

Andrew

Reply to
Andrew Jackson

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.