Author Topic: Trick USB Device Into Thinking it is Plugged Into a Computer  (Read 3136 times)

0 Members and 1 Guest are viewing this topic.

Offline Bigjoe11Topic starter

  • Newbie
  • Posts: 4
  • Country: us
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/B07NNH93NX

There 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!
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 13157
  • Country: ch
Re: Trick USB Device Into Thinking it is Plugged Into a Computer
« Reply #1 on: May 14, 2020, 09:07:21 pm »
It sounds to me like the AV output* is a secondary function of that webcam chipset, and that the chipset is correctly only drawing >100mA after negotiating 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.)
 

Offline Bigjoe11Topic starter

  • Newbie
  • Posts: 4
  • Country: us
Re: Trick USB Device Into Thinking it is Plugged Into a Computer
« Reply #2 on: May 14, 2020, 09:58:27 pm »
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?
 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9323
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: Trick USB Device Into Thinking it is Plugged Into a Computer
« Reply #3 on: May 14, 2020, 10:21:16 pm »
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.
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 13157
  • Country: ch
Re: Trick USB Device Into Thinking it is Plugged Into a Computer
« Reply #4 on: May 14, 2020, 11:53:55 pm »
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?
"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 the exact handshaking 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.
 
The following users thanked this post: Someone

Offline vk6zgo

  • Super Contributor
  • ***
  • Posts: 7858
  • Country: au
Re: Trick USB Device Into Thinking it is Plugged Into a Computer
« Reply #5 on: May 15, 2020, 02:22:39 am »
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?
"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 the exact handshaking 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.

Or an unused phone somebody has moved on from!
 

Offline kjpye

  • Contributor
  • Posts: 37
  • Country: au
Re: Trick USB Device Into Thinking it is Plugged Into a Computer
« Reply #6 on: May 15, 2020, 04:02:36 am »
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?
 

Offline MosherIV

  • Super Contributor
  • ***
  • Posts: 1530
  • Country: gb
Re: Trick USB Device Into Thinking it is Plugged Into a Computer
« Reply #7 on: May 15, 2020, 08:03:21 am »
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.
 
The following users thanked this post: tooki

Offline magic

  • Super Contributor
  • ***
  • Posts: 7454
  • Country: pl
Re: Trick USB Device Into Thinking it is Plugged Into a Computer
« Reply #8 on: May 15, 2020, 09:22:37 am »
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?
I 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
 
The following users thanked this post: tooki

Offline Daixiwen

  • Frequent Contributor
  • **
  • Posts: 367
  • Country: no
Re: Trick USB Device Into Thinking it is Plugged Into a Computer
« Reply #9 on: May 15, 2020, 09:44:49 am »
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
 

Offline Bigjoe11Topic starter

  • Newbie
  • Posts: 4
  • Country: us
Re: Trick USB Device Into Thinking it is Plugged Into a Computer
« Reply #10 on: May 15, 2020, 02:47:45 pm »
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_.SQVEb628V9ZX

I will be hooking this up to a 12v input source and testing. Thank you all for the input!
 

Offline georges80

  • Frequent Contributor
  • **
  • Posts: 930
  • Country: us
Re: Trick USB Device Into Thinking it is Plugged Into a Computer
« Reply #11 on: May 15, 2020, 03:07:11 pm »
^ 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.
 

Offline Bigjoe11Topic starter

  • Newbie
  • Posts: 4
  • Country: us
Re: Trick USB Device Into Thinking it is Plugged Into a Computer
« Reply #12 on: May 15, 2020, 03:54:08 pm »
I thought it might do the power negotiation because of this:
 

Offline georges80

  • Frequent Contributor
  • **
  • Posts: 930
  • Country: us
Re: Trick USB Device Into Thinking it is Plugged Into a Computer
« Reply #13 on: May 15, 2020, 06:52:16 pm »
^ for $6 I highly doubt there's anything special in there. Your expectations are much higher than mine :)

cheers,
george.
 

Online abyrvalg

  • Frequent Contributor
  • **
  • Posts: 841
  • Country: es
Re: Trick USB Device Into Thinking it is Plugged Into a Computer
« Reply #14 on: May 15, 2020, 06:52:48 pm »
That could be just some MCU switching various resistor combinations to find out the one with max current. Seen such kind of charger already.
 
The following users thanked this post: tooki

Offline MosherIV

  • Super Contributor
  • ***
  • Posts: 1530
  • Country: gb
Re: Trick USB Device Into Thinking it is Plugged Into a Computer
« Reply #15 on: May 15, 2020, 07:14:06 pm »
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 need
https://fpvdronereviews.com/guides/best-fpv-receiver/
 
The following users thanked this post: tooki

Offline tooki

  • Super Contributor
  • ***
  • Posts: 13157
  • Country: ch
Re: Trick USB Device Into Thinking it is Plugged Into a Computer
« Reply #16 on: May 15, 2020, 08:58:02 pm »
I thought it might do the power negotiation because of this:
Nope. 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.
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 13157
  • Country: ch
Re: Trick USB Device Into Thinking it is Plugged Into a Computer
« Reply #17 on: May 15, 2020, 09:12:09 pm »
That could be just some MCU switching various resistor combinations to find out the one with max current. Seen such kind of charger already.
Yep, 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”.
 

Offline alaindesjardins

  • Newbie
  • Posts: 1
  • Country: us
Re: Trick USB Device Into Thinking it is Plugged Into a Computer
« Reply #18 on: June 26, 2020, 12:28:12 am »
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.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf