USB - Wiring for ADB? - Hardware Hacking General

Hi folks!
I want to connect an android device (it has usb slots... i can plug there 3g dongles, keyboards, wifi etc) with my computer to try to establish an adb session.
Is that possible like that (usb male - male)? Do i have to solder a custom cable - and how would he wiring be to force the android into "client mode"?
Any help is highly appreciated!

licht77 said:
Hi folks!
I want to connect an android device (it has usb slots... i can plug there 3g dongles, keyboards, wifi etc) with my computer to try to establish an adb session.
Is that possible like that (usb male - male)? Do i have to solder a custom cable - and how would he wiring be to force the android into "client mode"?
Any help is highly appreciated!
Click to expand...
Click to collapse
to wiring an usb cable is not so hard. normally you only need to solder the same coloured wire together, red to red, white to white, green to green and black to black. but there are already male to male cable to buy.
www.dx.com/p/ult-unite-ult-1234-usb...lated-data-connection-cable-white-60cm-269067
what does your android device have for an usb? is it micro usb or standard (type a)?
if you have a micro usb port so use an usb data cable, most of the charging cable does have data transfer support.
your computer even needs a driver for your android device to get working the adb.
good luck!
ps. on ytube there a lot vids how to... only search and destroy ( your android)

KindsKoPP said:
to wiring an usb cable is not so hard. normally you only need to solder the same coloured wire together, red to red, white to white, green to green and black to black.
ps. on ytube there a lot vids how to... only search and destroy ( your android)
Click to expand...
Click to collapse
Hi! Thanks for your help! Its a type A jack on that device just like on the computer. Adbd daemon is on the device running but my windows machine cannot detect an usb device with direct soldered pins (or a bought cable which seems to have the same wiring)
I read about possible collitions when both devices of an usb connection are in host mode and that maybe pullup resistors on the data lines are needed - but i didnt fully understand that part. (Its different to the pin shortening of an usb otg wiring which can be found thousand times on google *G*)

can u describe exactly which cable u have used? and sometime the colors of the cable are not correct e.g. red is not +. those are build by chinese manufactures for cheaps goods. so u have even to measure the cable with a voltmeter.
and describe what happen when u plug the cable in the pc. normally windows is always running as main and android as slave.
as you describe u have an usb a type so i guess your android version is minimum 4.x and is already automatically on host status because you said u can put in a 3g dongle...so u have to go to the android command change from inside. i dont know much about linux programming so have to ask a developer. i only do developing hardwares not softwares, sorry for that.
what is your android device? with a datasheet is it better to solve your problem.

Hi KindsKoPP!
Thanks for your help and interest!
Basically I tested with a 1 to 1 wired cable I soldered by cutting 2 usb cables. I double checked colors (measured their output when connected to the computer) and found them ok. Then I connected them 1 to 1 (red-red, black-black, green-green, white-white).
But no usb device showing up or asking for drivers...
I know that adbd is running on the target device.
I pulled up some info here: http://www.valki.com/2014/12/04/analyse-av7/
I am still hoping that those usb devices who are in a double role (like our phones too with their usb otg host mode and client mode for mtp, adb...) are triggerable externally by using special soldered cables (resistors?) ... like "when resistor xy is on D+ -> go to client mode"?

Related

Mini USB to Serial Cable?

Hey guys!
I've searched and searched for something to allow me to transfer data via a serial cable from my phone to device.
Let me try to explain this.
HTC Wizard
Windows Mobile 6 (Explore 1.1)
I have style tap (palm os emulator)
Software for palm os for a stand alone fuel managment system (msefi.com)
So on my car, I use a serial cable to program and get realtime data.
Now I know they make bluetooth to serial adapters for around 70, but I was wondering if they make a mini usb to serial cable for the Mobile OS.
Anyone have any ideas?
Thanks
Chris
Well, you could theoretically get a USB to serial adapter that has a cable. Then cut the USB connector that goes to the PC off the cable and just splice the miniusb plug onto the end. I don't know about device support though I'm going to guess you would have to at least come up with a driver and the device might not support that type of functionality at all anyways.
Since the Wizard doesn't have a USB Host (aka USB OTG) the short answer is no. Even more importantly, the wizard won't power the serial adapter so the device is a dud to begin with.
The odds that the BT to RS232 connector method will work are far greater than the USB method.

DEV: USB Experts

Ok,
If I were to make up an appropriate USB cable.....
1) Could I get my P3600 to talk to a USB control box that controls a light display which is normally driven by a Windows PC?
2) Is there any API facility in the Windows Mobile OS that allows a programmer to send and receive USB data packets or would I have to hit the PocketPC device hardware and bypass the OS?
3) Is any of the above possible?
Thank you very much
using usb it would not be posible
usb comes in 2 types masters and slaves
htc pda's are slaves they cant init comm with usb devices
much like that you cant connect an usb harddisk with an usb webcam
trinity have usb host...
you can see in samsung -
http://www.samsung.com/global/syste...roduct/2007/7/7/324600sc32442x__schamatic.pdf
in page 6 you have usb connection,
in trinity we have usb device, if you want to have usb host you will have to change the wiring inside the trinity.
for this change you will need to replace R75 from 470K to 15K, disconnect R83 and make a short from R76 to gnd with 15K(ohm), disconnect R82 and connect Vbus to 5V
(all the numbers of the resistors are for the Evaluation Board, in the trinity it will be diffrent numbers/connections)!!!!!
this will NOT work with your pc!!!! (need more modifications but can be done)
only host option!!!
you wont able to charge your trinity!!! (need more modifications but can be done)
but you can make switch like in the PDF
and then you will have usb host.
i have done some work on the sc32442 chip and it worked with usb host
(not the trinity).
no because the cpu have something dont mean that it's map'd out in the pcb of the manufacturers
and doing a hardware mod can kill the device and will 100% surely void the warrenty
and when all the hardware changes are then don then he needs to write a usb driver for wm to support the
hardware he want to talk to if non already exist
htc seem to use an external chip to do the usb stuff which is basic
only Athena and flame support it
tbuaron said:
trinity have usb host...
you can see in samsung -
http://www.samsung.com/global/syste...roduct/2007/7/7/324600sc32442x__schamatic.pdf
in page 6 you have usb connection,
in trinity we have usb device, if you want to have usb host you will have to change the wiring inside the trinity.
for this change you will need to replace R75 from 470K to 15K, disconnect R83 and make a short from R76 to gnd with 15K(ohm), disconnect R82 and connect Vbus to 5V
(all the numbers of the resistors are for the Evaluation Board, in the trinity it will be diffrent numbers/connections)!!!!!
this will NOT work with your pc!!!! (need more modifications but can be done)
only host option!!!
you wont able to charge your trinity!!! (need more modifications but can be done)
but you can make switch like in the PDF
and then you will have usb host.
i have done some work on the sc32442 chip and it worked with usb host
(not the trinity).
Click to expand...
Click to collapse
uhm ... very nice impact!
are you know the jtag pins? must be the same like your embedded board.
This is not good...
What is the first HTC device to support USB Host?
Is it that big fat thing with a detachable keyboard (can't remember the name )?
Thanks for the replies.
PS One last question....
Does anyone make an SD or miniSD port based USB controller card?
Thanks again
Is it that big fat thing with a detachable keyboard (can't remember the name )? == Athena
and yes

LEO USB Host

LEO USB Host
0. The start
haha, USB host can work on HTC Leo, but with external 5V (VBUS) supply.
I already able to finish some proof-of-concept and it's working
1. About cable
First of all, about my cable: I made my own cable by hands.
You must have external 5V supply, I used output from PC USB (not mobile, but good for testing)
photo of my cable:
scheme of my cable:
(actually miniUSB have 5pins, but it doesn't matter here)
2. Software
You need USBH driver, otherwise USB Host won't work!
I am developing my own driver, based on EHCI standard.
Driver doesn't available for community yet, because it's BUGGY.
3. Some testing
I was able to connect and use:
1)USB Reader with SD card
2)USB Keyboard
3)USB Mouse
4)USB Stick memory
At the end you can connect any USB device, if you have CE USB drivers for it, of course.
Leo display driver doesn't support mouse cursor, so mouse is working without cursor...
Because Windows CE support only FAT filesystem, NTFS partitions can't be used.
Also HTC's XT9 not very friendly for USB keyboard input.
4. Look
Some videos (haha, the Flame's camera is too bad and I couldn't use Leo's camera, because it's main object in my small cinema )
so, sorry for bad quality.
http://www.youtube.com/watch?v=wwq8Ia3o0UE
http://www.youtube.com/watch?v=1XrCUS_WDaU
5. Status
At this moment the USBH stuffs are not stable. Sometimes device can hang, so you need perform soft reset. Sometimes it can't detect any device. Also you can't switch mode back from Host to Client...
When I make it at least usable, I will release it
-CotullaCode
Fantastic!! You're a genius.
wow! first HSPL, now USB Host! Legend!
nice job, keep it up!
Is there theoretically a limit on the size of the SD card that can be used? Can I order my 64 Gb card already? lol
This is great! Wait... not just great - this is insane!!!
Keep up the good work!
Hahaha epic win. Dude you gave us HSPL, now this... wtf comes next?? TV OUT? FM radio transmitter or RDS?
damn nice!!!
where do you have the knowledge from? where do you work??
are these "creations" hobby - based?
keep up your work, its really fantastic
Well done Cotulla!
unfortunatelly i cannot understand well your suggestions regarding the cable.
In the drawing in fact you show a "miniusb connector" (htc uses a microusb) , a "usb plug" [that seems being a male usb connector] and a sort of "power injector" adapter.
On the contrary in the images (and in the videos) we can see see two "female usb" connectors and a "male usb" connector (i understand that is to get power from the pc. is this correct?).
Can you please clarify/better explain pin connections.
Looking forward to have the chance to test your new driver
i would in fact like to start testing your cable with available ones.
thanks
with the linux sources of the QSD8* driver available it's a good base.
wait until we have linux working on the leo. then you can also make use of all those devices you attach
e.g. you can use mass storage devices with all file systems known to man, any input device.. etc
Hahaha epic win. Dude you gave us HSPL, now this... wtf comes next?? TV OUT? FM radio transmitter or RDS?
Click to expand...
Click to collapse
built in coffee-maker?
where do you have the knowledge from? where do you work??
are these "creations" hobby - based?
keep up your work, its really fantastic
Click to expand...
Click to collapse
I am still studing Yes, it's my hobby
but I already have big experience with CE hacking/coding (few years...), so it's possible for me do such things...
miniusb connector" (htc uses a microusb)
Click to expand...
Click to collapse
this scheme is old. It was designed for Diamond. (Dmd have MiniUSB, not MicroUSB) but my diamond died later (oh, I will remember him in my heart when I got leo I continue to develop USBH...
On the contrary in the images (and in the videos) we can see see two "female usb" connectors and a "male usb" connector (i understand that is to get power from the pc. is this correct?).
Click to expand...
Click to collapse
yes. my cable have two female usb connectors and one male usb connector.
I connect USB device (mouse, kbd, reader) to one female and connect HTC MicroUSB -> USB cable to another female connector.
Male connector used as power source from PC.
clear? if not, I can make better scheme....
Also maybe instead of such cable we can use USB self powered Hub.
Woow, you know I have only two words: YOU ROCK !!!
Thumbs up, wish you fix the driver bugs soon and thanks for the great news.
P.S.: Might sound stupid, but do you think there's any chance, that other chipsets like QC MSM7500 have the hidden USB-host function too?
thank you for quick and kind answer.
A clearer full scheme of your cable as is (don't worry of microusb) would be welcome. i would like to understand which wires are connected to which pin and which are eventually unused.
I have tested various "powered" test connections [and also a powered hub) with some old drivers i still have from my old pda's and recently also with Zeno USB Host Drivers v6.0a (2009-02-12) but without any success.
regards
antoniof said:
A clearer full scheme of your cable as is (don't worry of microusb) would be welcome. I would like to understand which wires are connected to which pin and which are eventually unused...
Click to expand...
Click to collapse
At the first scheme it looks easy. You just connect the to DATA wires from a female-USB to a microUSB DATA wires and then to get the external power you need to rip up a USB male cable and connect the black and the red wire to the black & the red wire of the USB female. Data wires of the male USB remain unsused. Hope I understood it right.
Hey cotulla were did you find these hidden usb host functionalities? on what dll? is it specific to qsd8xxx devices? i would like to study it, see if i can find it on my acer s200.
thank you farokh, but i'm afraid some piece of info is still missing:
a) are the data wires in the picture "straight" (standard microusb data pin to standard female usb data pin) or eventually crossed
b) what about power wires between microusb and the female usb? have they to be connected or not.
Since the handmade cabling by Cotulla seems to be working i would highly appreciate to have from him his very scheme female/female/plug with specification of the used pinouts of each connector to try exactly replicating it.
as alexnvidia said, your a legend ,,,,, thnx... will be waiting to give it a try
wow you kick htc's a**, you are our hero
great work looking forward for final release ...
Very nice work you are doing there. Keep up the good work!

trying ZTE BLADE as USB HOST

Hi all.
I heard that zte blade has the capability of USB HOST. Also heard it can't power the usb slave device attached to it. Instead of purchasing a usb power hub, i manually tried making a cable which has the similar function but draws power from PC usb port (don't know how far it works. I haven't been successful).
The description of the cable i made is in the picture attached below.
PLEASE SEE THE PICTURE ATTACHED.
For a device with native usb host (such as galaxy note) i guess the device USB-CABLE coupled with USB-FEMALE-TO-FEMALE-BRIDGE is enough to attach slave devices. But for the devices which cannot give power supply in USB HOST mode i assumed and tried the cable which was described in the picture.
Blade was my handset. My friend had galaxy note. I tried connecting blade as a slave to galaxy note with a NATIVE USB-OTG CABLE. But it said the slave device is high powered and needs seperate power supply. In such case i think the cable i prepared might work (if it works) replacing usb powered hub.
Ok, coming to our zte blade device. I prepared a usb female to female bridge and connected it to usb plug of usb cable. Then i connected only the data + and data - of USB PERIPHERAL DEVICE to zte blade. The VCC +5V (red) and GND (black) are supplied from a PC usb port.
And im sure i connected data+ to data+ only. And similarly (data- to data- only) , (vcc to vcc only) , (GND to GND only).
And i tested it with a usb keyboard and a memory card reader. I tested on cm7.1.0 because i heard this build has kernel supporting usb host (? Is it not?). Im unsuccessful with both tests. When i connected memory card reader the led light in the card reader turned on but i cant see any drive/folder/notification on m phone. And with usb keyboard there is not even NUM LOCK led on. Am i missing the kernel support or something. If so pls tell me what kernel should i use.
And is it the thing i prepared wont work at all.??
Please give me suggestions... Thanks.
WARNING :
This is not a (how-to-make-something) post. If you are experimenting with some cables, make sure that you connect the connections correctly. Changing polarity can brick your device. Im not responsible for anything.

How to attach usb powered hub to android stick? Which port

I have an andrid. Stick mx2 imito and I have a powered USB hub but I can't configure how I am meant to to get it to read from the hub. I have 2 ports on the stick, one full sized usb and one mini usb .
And In terms of devices I have my keyboard I want to add
1 external usb hard drive
And if I can get it to work a USB wifi dongle
Huh!
Since there is only one full sized USB port, I would think that is the solution. That's how it runs on mine anyway. Connect all your devices to the powered hub. Should be straight forward
So I would need a usb cable male to make? To connect to the hub. Do they exist ? I will try find the cable .
i cantget it to work
so the large usb port. i need a cable from that to connect to the hub? usb port
but i dont have a usb port with the same end? male to male etc
Get a USB powered hib
wakkaday said:
i cantget it to work
so the large usb port. i need a cable from that to connect to the hub? usb port
but i dont have a usb port with the same end? male to male etc
Click to expand...
Click to collapse
The hub will come with one male USB to connect to the stick.
http://gadgets.softpedia.com/images/news/How-to-Charge-your-USB-Devices-Quick-and-Easy-4.jpg
Make sure to get a powered hub so that all the devices can be supported properly.
gsurath said:
The hub will come with one male USB to connect to the stick.
http://gadgets.softpedia.com/images/news/How-to-Charge-your-USB-Devices-Quick-and-Easy-4.jpg
Make sure to get a powered hub so that all the devices can be supported properly.
Click to expand...
Click to collapse
this was an old hub i had, i dont have that wire. its a mini usb to full usb type connection isn't it?
Plenty of such options available
Here is another on ebay. Just search for powered USB hub and choose one
http://www.ebay.com/itm/10-PORT-USB-2-0-EXTERNAL-HUB-W-POWER-ADAPTER-FOR-PC-MAC-WITH-cable-SILVER-/370772094009?pt=US_USB_Cables_Hubs_Adapters&hash=item5653bd2c39
gsurath said:
Here is another on ebay. Just search for powered USB hub and choose one
http://www.ebay.com/itm/10-PORT-USB-2-0-EXTERNAL-HUB-W-POWER-ADAPTER-FOR-PC-MAC-WITH-cable-SILVER-/370772094009?pt=US_USB_Cables_Hubs_Adapters&hash=item5653bd2c39
Click to expand...
Click to collapse
ok great, so the port next to the power socket, is the cable i need to attach to and from the imito android stick? so that will be the main one and any other usb devices can go on the hub.
m confused on where i need to connect from on the android stick. which has 1 full sized usb, 1 mini usb otg socket and 1 mini usb (power)
It should also be possible to modify a USB hub to back feed power to the HDMI stick.
You would then power the hub with a sufficiently large USB power supply to power both the stick and all of the USB devices. In most cases, a single 2.1 Amp USB "wall wart" would work to power everything, unless you are really running something outrageous.
My NX003 (Same as MX1) can be powered from either the dedicated USB power jack, or the MicroUSB (OTG) connector.
So to build something like this, here is what I would do:
1. Obtain a USB hub I was willing to modify (destroy, as far as any other use is concerned)
2. Disassemble it.
3. Remove the input (Host) cable or connector.
4. Attach a short cable with a MicroUSB plug. Connect all 4 wires correctly.
5. Find "The diode" - Buy "The diode" I mean the one that that allows USB power to flow from the host to the peripherals when used in non-powered mode, but prevents power from flowing upstream to the host when an external power supply is used. (see referenced link).
6. Remove this diode, and replace it with a wire, jumper, or solder bridge.
7. Ensure all power circuity in the hub can handle 2 amps. Add solder to traces, or add jumper wire if needed to beef up current capability.
8. Reassemble, and clearly mark so that this hub is never used with anything else.
If the HDMI stick were powered via a coaxial connection, but is still powered by 5 Volts, I'd add a lead and coaxial plug off of the +5 in the hub. you'll have 2 wires, but it will still work. (Watch polarity.)
I have done this successfully for a prior, similar project. Reference Here: (Scroll to section about power.)
http://linuxslate.com/N770DockingStation.html
So why don't I actually do this to power my NX003? I did it an easier way. I bought a Tronsmart Prometheus. It has 3 full USB ports built-in.
-
Linuxslate said:
It should also be possible to modify a USB hub to back feed power to the HDMI stick.
You would then power the hub with a sufficiently large USB power supply to power both the stick and all of the USB devices. In most cases, a single 2.1 Amp USB "wall wart" would work to power everything, unless you are really running something outrageous.
My NX003 (Same as MX1) can be powered from either the dedicated USB power jack, or the MicroUSB (OTG) connector.
So to build something like this, here is what I would do:
1. Obtain a USB hub I was willing to modify (destroy, as far as any other use is concerned)
2. Disassemble it.
3. Remove the input (Host) cable or connector.
4. Attach a short cable with a MicroUSB plug. Connect all 4 wires correctly.
5. Find "The diode" - Buy "The diode" I mean the one that that allows USB power to flow from the host to the peripherals when used in non-powered mode, but prevents power from flowing upstream to the host when an external power supply is used. (see referenced link).
6. Remove this diode, and replace it with a wire, jumper, or solder bridge.
7. Ensure all power circuity in the hub can handle 2 amps. Add solder to traces, or add jumper wire if needed to beef up current capability.
8. Reassemble, and clearly mark so that this hub is never used with anything else.
If the HDMI stick were powered via a coaxial connection, but is still powered by 5 Volts, I'd add a lead and coaxial plug off of the +5 in the hub. you'll have 2 wires, but it will still work. (Watch polarity.)
I have done this successfully for a prior, similar project. Reference Here: (Scroll to section about power.)
http://linuxslate.com/N770DockingStation.html
So why don't I actually do this to power my NX003? I did it an easier way. I bought a Tronsmart Prometheus. It has 3 full USB ports built-in.
-
Click to expand...
Click to collapse
Thank you for the informatiom, but its a bit too technical for what i want... but i appreciate you efforts in writing this.
my stick can also power via both usb ports (mini) i have connected the cable from the stick to the hub which has been powered to the mains and it works, but the problem i have is when i put another usb device in the hub, it doesnt detect it e.g. keyboard wireless and i don't think the device has enough power to run my usb 2.0 portable harddrive (not main powered) - how can i get this to work? i have tried connecting this directly to the stick, but it just makes a beep sound. im guessing its lack of power... and i was hoping a hub would help.
my hub is powered 3.5 or 4 watts i believe...
Strange
Wakkaday,
This is very strange. On my MK802III I connect the powered USB hub (4 ports) to the full USB port.
I connect my bluetooth keyboard, 1 TB HDD and USB ethernet to the hub.
I power my Android stick using the 4rth port in the USB hub.
If I want USB audio, I replace the Ethernet/HDD with a USB audio peripheral.
All my peripherals work right out of the box. The only thing I am considering now is to have a separate power supply to the Android stick so that I can use all 4 ports on my hub.
It seems your device is not supporting the peripherals? Are the working when you connect directly?
gsurath said:
Wakkaday,
This is very strange. On my MK802III I connect the powered USB hub (4 ports) to the full USB port.
I connect my bluetooth keyboard, 1 TB HDD and USB ethernet to the hub.
I power my Android stick using the 4rth port in the USB hub.
If I want USB audio, I replace the Ethernet/HDD with a USB audio peripheral.
All my peripherals work right out of the box. The only thing I am considering now is to have a separate power supply to the Android stick so that I can use all 4 ports on my hub.
It seems your device is not supporting the peripherals? Are the working when you connect directly?
Click to expand...
Click to collapse
I'm also trying to use a powered 4 port usb hub with my android stick, but it doesnot recognises the hub. Do i need to have any usb host drivers or change any setting to get it work? My stick is on Android ICS.. Thanks in advance

Categories

Resources