Trick USB Device Into Thinking it is Plugged Into a Computer - Page 1
Forum section: electronics / projects

author: Bigjoe11
author_rank: Newbie
timestamp: May 14, 2020, 05:03:25 pm
content: I was wondering if anyone knew how I could potentially trick a USB device into thinking it's plugged into a computer when, in reality, I am only providing it with power.The device in question is the following (I am not advertising this product):https://www.amazon.com/EACHINE-ROTG02-Receiver-Android-Smartphone/dp/B07NNH93NXThere are USB and AVI outputs on the device. I would like to use the AVI output only, but the device won't power up unless the micro-USB is plugged into a computer.or a phone. Even if I provide power through the micro-USB or AVI ports, it will not power up unless the micro-usb is plugged into a phone or a laptop. The phone/laptop recognizes the device as a webcam.This is a huge pain, so if there is any way I could modify the device or the plug to trick it that would be awesome. I have already attempted to make it work by connecting the sense pin to ground through a resistor and by connecting resistors between the data and ground pins to no avail.Here is a guide for the USB pinouts:https://www.electroschematics.com/usb-how-things-work/Has anyone done something like this before? I have done extensive searches and creating this account is my last resort.Please let me know if pictures or more info would help. Thanks!

author: tooki
author_rank: Super Contributor
timestamp: May 14, 2020, 09:07:21 pm
content: It sounds to me like the AV output* is a secondary function of that webcam chipset, and that the chipset is correctly only drawing >100mAafternegotiating with the USB host.If they never intended for it to be used without a computer host, then they likely never designed it to look for a dumb battery charger (i.e. using the USB Battery Charging protocol, like the bridged data pins). My hunch is that what you're seeking to do is categorically impossible.*When you say "AVI", I assume you mean something like analog (CVBS/composite) video. (AVI is a file format.)

author: Bigjoe11
author_rank: Newbie
timestamp: May 14, 2020, 09:58:27 pm
content: Hi tooki,Thank you so much for the reply. Yes, I did mean AV, not AVI. I know that it does not work with a dumb battery charger, but I came here to see if I could trick it by adding resistors or some type of simple logic. Are you familiar with the protocol it would use establish and confirm a connection with a computer?

author: NiHaoMike
author_rank: Super Contributor
timestamp: May 14, 2020, 10:21:16 pm
content: Open it up and take a picture of both sides of the board. There might be an easy mod to bypass the switching so that the receiver part just needs power to run.

author: tooki
author_rank: Super Contributor
timestamp: May 14, 2020, 11:53:55 pm
content: Quote from: Bigjoe11 on May 14, 2020, 09:58:27 pm"Adding resistors" is what a dumb charger already does, other than the basic 1A current level signaled by shorting the D+/D- lines.I don't know theexacthandshaking process, but you'd be getting into the nitty-gritty of USB signaling, which is decidedly non-trivial. When you plug a device in, the device is only allowed to draw 100mA of power initially. If it wants more, then it has to talk to the USB host (possibly even involving the driver; I'm quite unsure about this point), and request a higher power level (500mA in USB 1-2, up to 900mA in USB 3, and higher current and voltage in USB Power Delivery with USB-C). If declined, the device is not supposed to draw any extra power and the port may shut down if it tries anyway. If the device gets the OK, then it fully powers up and continues configuration.USB is nothing close to what can be done with "simple logic", alas. Heck, even just looking at the signals requires very expensive oscilloscopes. (It's kinda crazy that a USB host IC that costs just a few bucks can decode the multi-GHz USB 3 signals, but visualizing them requires a scope worth more than a Tesla…)It'd be infinitely simpler to just get a tiny USB host (like a Raspberry Pi or some dirt-cheap Android phone) that it can talk to.

author: vk6zgo
author_rank: Super Contributor
timestamp: May 15, 2020, 02:22:39 am
content: Quote from: tooki on May 14, 2020, 11:53:55 pmOr an unused phone somebody has moved on from!

author: kjpye
author_rank: Contributor
timestamp: May 15, 2020, 04:02:36 am
content: There are some devices which refuse to charge without an intelligent charger. I've had trouble trying to charge things in the car for example. Fortunately there are chargers which provide that intelligence.Perhaps something like that would work. I've found some electronics type shops (some Jaycar stores and distributors for example) actually have people who know what they're doing, and even have car power outlets on their counter for testing such things. Can you find such a place that will let you test it before purchase?

author: MosherIV
author_rank: Super Contributor
timestamp: May 15, 2020, 08:03:21 am
content: Based on the description of the device, I think Tooki is right, it is NOT a simple case of providing power to it.It sounds like the device converts video sent by drones into video and output over USB.This means it has some kind of USB video converter.It probably needs the full USB hand shake before it will start working.

author: magic
author_rank: Super Contributor
timestamp: May 15, 2020, 09:22:37 am
content: Quote from: Bigjoe11 on May 14, 2020, 09:58:27 pmI would try those two 15k resistor to ground but chances are that the device will still keep waiting until some hosts enumerates it. Enumeration is not trivial and involves sending a few messages back and forth.https://www.beyondlogic.org/usbnutshell/usb2.shtml#SpeedIdentification

author: Daixiwen
author_rank: Frequent Contributor
timestamp: May 15, 2020, 09:44:49 am
content: If the point is just not to take out a computer, you could probably also just connect it to a cheap SoC board such as a raspberry pi/orange pi that will do all the necessary USB handshaking for you

author: Bigjoe11
author_rank: Newbie
timestamp: May 15, 2020, 02:47:45 pm
content: Thank you for all the great replies, being that I have already attempted the resistor approach, I have purchased a smart charger that is supposed to negotiate the current:https://www.amazon.com/dp/B07XM9GQPJ/ref=cm_sw_r_other_apa_i_.SQVEb628V9ZXI will be hooking this up to a 12v input source and testing. Thank you all for the input!

author: georges80
author_rank: Frequent Contributor
timestamp: May 15, 2020, 03:07:11 pm
content: ^ that amazon unit is similar to a truckload of cheap car chargers. It won't be doing any USB enumeration, just relying on resistors on the D+/D- lines.cheers,george.

author: Bigjoe11
author_rank: Newbie
timestamp: May 15, 2020, 03:54:08 pm
content: I thought it might do the power negotiation because of this:

author: georges80
author_rank: Frequent Contributor
timestamp: May 15, 2020, 06:52:16 pm
content: ^ for $6 I highly doubt there's anything special in there. Your expectations are much higher than minecheers,george.

author: abyrvalg
author_rank: Frequent Contributor
timestamp: May 15, 2020, 06:52:48 pm
content: That could be just some MCU switching various resistor combinations to find out the one with max current. Seen such kind of charger already.

author: MosherIV
author_rank: Super Contributor
timestamp: May 15, 2020, 07:14:06 pm
content: What exactly are you trying to do?Have you already bought the device?As I said, I do no think you can trick the device into working just by powering it.It is an audio radio receiver to USB converter, probably the bulk of the work being done in a single chip device that needs to connecter to a usb host before it will do anything.Why not just buy an audio receiver if that is what you needhttps://fpvdronereviews.com/guides/best-fpv-receiver/

author: tooki
author_rank: Super Contributor
timestamp: May 15, 2020, 08:58:02 pm
content: Quote from: Bigjoe11 on May 15, 2020, 03:54:08 pmNope. There are charger ICs out there that do just what abyrvalg said: simulate different resistors to get each device to draw maximum current. It’s not power negotiation.The ONLY chargers that do power negotiation are the ones that support high-voltage charging schemes, namely Qualcomm QuickCharge or USB-PD, neither of which is relevant here.Would have been smarter to put the $10 towards a raspberry pi like I told you.

author: tooki
author_rank: Super Contributor
timestamp: May 15, 2020, 09:12:09 pm
content: Quote from: abyrvalg on May 15, 2020, 06:52:48 pmYep, except that it’s not an MCU, but rather a dedicated USB charger IC built specifically to do that, like the TI TPS2514. The feature is called “DCP Auto-Detect”.

author: alaindesjardins
author_rank: Newbie
timestamp: June 26, 2020, 12:28:12 am
content: I am trying to do the same thing. My issue is with Dell AC511 soundbar. It requires to be plugged into a computer before it even turns on but all I want is to pass through audio from the HDMI (via extractor) so I can play whatever I have plugged into HDMI into the sound bar. The whole purpose of the sound bar is that it mounts underneath the monitor and doesn't require separate speakers since I have it mounted on the wall. If I plug it into a device the sound bar will turn on and work fine once unplugged from that device until the monitor turns off and the power is cut to the sound bar. I need to repeat the process to get sound working again when I first power on the monitor. A work around would be to use a raspberry pi but I would rather have a more elegant solution if at all possible.