Using USB Cable with Data/Charge Switch Repeatedly

Our weekly LIVE video chat. Every Wednesday at 8pm ET!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Disco_Makberto
 
Posts: 1
Joined: Fri Dec 29, 2017 3:06 am

Using USB Cable with Data/Charge Switch Repeatedly

Post by Disco_Makberto »

Hi! I am considering buying one of your "USB Extension Cable with Data/Charge Sync Switch" that you are selling here:

https://www.adafruit.com/product/3438 .

However, I can see that towards the end you are advising: "Please note: Devices don't like it when the data lines mysteriously appear and disappear. We recommend setting the cable function and then plugging in your device."

I would like to use this cable with a flash drive at one end and a computer at the other end. Obviously, if I switch the cable to data, I can use the flash drive; and if I switch the cable to charge, I cannot use the flash drive. But what bad effects can I expect by changing the switch while the cable is connected to both the flash drive and the computer? I don't understand what you are saying; you see, after all, I can plug and unplug the flash to/from a USB port of the computer multiple times (within reason), and nothing bad happens.

Thank you,

C.A. "Disco_Makberto"

P.S.: I forgot. I know it is not advisable to unplug a flash drive from a computer when reading from the flash drive or when writing to the flash drive. But I am talking about a flash drive in idle state.

User avatar
devinganger
 
Posts: 72
Joined: Tue Aug 09, 2016 1:09 am

Re: Using USB Cable with Data/Charge Switch Repeatedly

Post by devinganger »

When you unplug a USB drive from a computer, you're unplugging the data lines *and* the power/ground lines all at the same time. I don't know if the USB spec includes any description of what devices are supposed to do if the data lines suddenly disappear -- I suspect that it's not a use case that the spec covers and if so, what any given device does in that scenario is undefined and essentially random, a product of its chipset and firmware.

Locked
Please be positive and constructive with your questions and comments.

Return to “Ask an Engineer! VIDEO CHAT (closed)”