yashsingh1/xdaforums huggingface dataset:
[Galaxy S I9000 Accessories] vinclar:
Does anybody try with 365K seems to be the microusb to hdmi not?

RID_AUD_VDO_CABLE,	/* 1 1 0 1 0	365K	Audio/Video Cable */

Anyone had luck?

Edit: Well it triggers to home dock too!

Don't you think we need to put a table for see the triggered modes clearly.

Triggered Mode / Resistor Value / Resistor Pin Position (5 4 3 2 1)

Car dock / 619 K / 1 1 0 0 0

Downloading mode / 301K / 1 1 0 0 0

Launch Desk Home app / 1K / 1 1 0 0 0

Launch Desk Home app / 365K / 1 1 0 0 0

Finally I found the modes:D, hopes it helps.
[Galaxy S I9000 Accessories] TheBeano:
I updated the first post with a summary and link to the audio out details.
[Galaxy S I9000 Accessories] grygrygry:
Do you think that is possible to convert the audio video output to audio video input?

Sorry but i'm noobie..
[Galaxy S I9000 Accessories] TheBeano:
No, we confirmed from the circuit diagram earlier in this thread that there's no video connection to the USB port.
[Galaxy S I9000 Accessories] grygrygry:
I'm not talking about usb port but analogic port, if there is a DA codec maybe it can be used for DA convertion (?)
[Galaxy S I9000 Accessories] TheBeano:
I don't understand, what do you want to connect the phone to on which ports, and how does a D-to-A conversion come into it? The audio output I'm talking about on this thread is the output from the USB port, which is just the audio chip's normal analog audio output that gets connected to the USB port pins by a switching chip.
[Galaxy S I9000 Accessories] grygrygry:
There is a DA (Digital to Analogic) codec That convert digital signal (display video informations) into analogic via RCA (the yellow pin That we connect to tv input).

The same think for audio, for example from mp3 (digital) to earphone or tv input (analogic).

Maybe this codec can be used to convert analogic signal to digital (AD) so we can use the there rca (yellow-white-red) as video input and not as video output.

It's Clear now?
[Galaxy S I9000 Accessories] TheBeano:
I see, as far as I know the only A-to-D converter is for the microphones (including external mic) but it would not work for video. When it's not in TV out mode the video out pin on the headphone socket becomes a microphone input.
[Galaxy S I9000 Accessories] dadonjohn:
Hi,

First of all I hope my english is understandable, don't hesitate to ask me if something is not understandable, I will try to explain it in other words.

I don't know if thats's interesting for the following information, but I have stock froyo-kernel on my phone (no mods, just z4root):

pda: xwjpa

phone: xxjpp

csc: mobjp1

build: 2010-10

Here is something I found out about the UART thing...

You can also switch the UART Owner via *#7284#, there you can also switch the USB Owner. This is maybe easier than the solution above (I also think no root is needed for that)

I think it's not necessary to create a device node with mknod command, because there already exist some device nodes, at least on my phone:

ttygs0

s3c2410_serial0

s3c2410_serial1

s3c2410_serial2

s3c2410_serial3

When I connect my phone to PC (Ubuntu 10.04) via USB-cable (no resistor between pin 4 and 5, just the common samsung usb cable) a new device node ttyACM0 appears in /dev.

If i switch the UART Owner on my phone to PDA and start the serialport app (from android-serialport-api, code.google.com/p/android-serialport-api/ ) i can talk to my phone with a serial-port-monitor program on my pc (e.g. STermPro). I therefore use the ttygs0 device node on the phone and the ttyACM0 device node on my pc and a arbitrary baudrate.

I've also tried to talk to my phone with minicom and AT-commands, and MODEM as the UART-Owner. That also works. I can see the phone response as TheBeano mentioned above.

And also when I use minicom I think the phones ttygs0 device node is being used for communication, because I can see the commands in the serialport app on my phone. So when I send for instance "ATIO" from my pc with minicom, this command appears in the serialport app receive box ...

Finally I have also tried some other AT-commands but only few of them seem to work.

My question now is what I can do with this knowledge? ^^

What could it be usefull for?
[Galaxy S I9000 Accessories] TheBeano:
This is a different mode from the UART mode. The USB port is in USB mode, and you're using the composite USB device which includes a serial port, which is what Odin uses to communicate with the phone. This is not the same as having a serial connection directly to the UART. I don't think you can get a boot log or access the bootloader console from it, for example, and you couldn't use it to control hardware through the serial port without having a PC or some other USB host at the other end.

Ummm... pass? :-)
[Galaxy S I9000 Accessories] dadonjohn:
Do you mean the fsa9480 chip when you talk about composite usb device? So it "connects" the USB Port D+/D- wires to the UART Rx/Tx?

I don't understand how to achieve a serial connection directly to UART, please explain!
[Galaxy S I9000 Accessories] TheBeano:
The FSA9480 chip is what does the switching, yes. It connects the USB port D- and D+ directly to the UART serial lines when it has the right resistor on the ID pin. If you look back in this thread there are circuit diagrams etc.

The composite USB device is what you get when the FSA9480 is in USB mode. The PC will see multiple devices on the phone's USB port, depending on what mode the USB port is configured for on the phone.
[Galaxy S I9000 Accessories] dadonjohn:
Ok, I think I got it, thank's for explaining! Just to make sure I got it right ...

When the FSA9480 is in USB mode the PC sees multiple devices means Samsung Kies, Media Player, Mass Storage, right?

I need the resistor to trigger the FSA9480 to switch to UART Mode, and then I have to mknod the device node you mentioned manually to communicate with a serial device?

Please correct me if I'm wrong!
[Galaxy S I9000 Accessories] TheBeano:
Yes, you got it. :) And you need to make sure the serial hardware you are connecting it to is 3.3V level hardware.
[Galaxy S I9000 Accessories] SkinBobUk:
Please forgive my noobishness, i've been reading this great thread and all the investigation you've put in but im wondering one simple thing.

Do any of the pins out provide any voltage out?

Not huge voltage, only a few volts.

I can see GND but not quite understanding the rest. Many Thanks.

Edit: Found it lol, was having a blonde moment.
[Galaxy S I9000 Accessories] SkinBobUk:
Hmmm looks like i was getting ahead of myself.

From reading up the phone needs to be triggered into usb host mode to allow the voltage out pin to be activated.

From reading up this is possible in some kernals, looks like my master plan has failed unless anyone knows any differant?

Edit: Done a lot more reading and it seems power from the usb port is a no go. What a shame.
[Galaxy S I9000 Accessories] TheBeano:
Over on the USB Host thread someone mentioned that you can get voltage by outputting a loud sound from the headphone output and converting it to DC, which is ingenious. :)
[Galaxy S I9000 Accessories] dadonjohn:
control hardware trough serial port

Hi!

As said in the title I want to control some hardware with my sgs trough a serial connection. Has anyone tried that already? I just found androidserial-port-api on the net but it seems that there is a problem with the incoming data...

I used the following device node "s3c2410_serial2 c 204 66" which already existed on my phone, no mknod needed. And a baudrate of 19200 within android-serialport-api sample application.

I managed to talk to the hardware already and it seems that the sgs receives some data from the hardware too, but there is some kind of jam in the inputstream, at least it seems to me like one...

The Problem is that I do not receive the data from the hardware immediately, but at random times and then in huge loads ... maybe a software problem?

If anyones working on something similar, I would appreciate every kind of support!
[Galaxy S I9000 Accessories] Nate River:
haha this is just awesome, never thought that this would be possible XD
[Galaxy S I9000 Accessories] DaWizard:
Guys I'm a newbie here, my phone got stuck with google pattern and i can';t use also the 3 button to put the phone to download mode, so i would like to ask you guys why samsung kies updated my device and send some command and the phone just went to download mode. Is someone here knows the command on how to put the unit into download mode? i've tried the adb but it was not working as well for me.
[Galaxy S I9000 Accessories] dadonjohn:
I don't know the command sent by Kies, but maybe this will help you:

http://xdaforums.com/showthread.php?t=819551
[Galaxy S I9000 Accessories] AdamOutler:
TheBeano, what type of board is that which you have hooked to USB? What chip is that in the middle?
[Galaxy S I9000 Accessories] derd85:
This is awesome. Def need to build such a plug tomorrow :)
[Galaxy S I9000 Accessories] TheBeano:
Updated first post with two new values (80k and 150k) that also enable serial output.
[Galaxy S I9000 Accessories] TheBeano:
It is a Seeedstudio UARTSB board. See also this thread for an alternative serial board and setup.
[Galaxy S I9000 Accessories] AdamOutler:
I built an ultra jig with otg, and all factory modes on it. I'm going to attempt communications using an arduino as an interperater.

just thought I'd share.
[Galaxy S I9000 Accessories] tiuk:
Have you got otg working? If so, what is the procedure? I was under the impression that this would have to be supported in the kernel and was not yet possible. Any links or information would be much appreciated, I'd love to be able to use otg.
[Galaxy S I9000 Accessories] TheBeano:
This thread is about the quest for OTG. Summary: not working yet.
[Galaxy S I9000 Accessories] zedgar:
Noob question but on the list of resistor values does the */11101 indicate the usb pins to connect? or is it always 4 and 5?
[Galaxy S I9000 Accessories] TheBeano:
It is always pins 4 & 5. The binary bits indicate the value in the ADC (Analog to Digital Converter) register on the chip, under "//CR7 : ADC Register" in the fsa9480_i2c.h file.
[Galaxy S I9000 Accessories] TheBeano:
There was a complete rewrite of the FSA9480 driver for Gingerbread, and all the resistor values have been expunged from the source. Fortunately you can't rewrite hardware. ;)
[Galaxy S I9000 Accessories] AdamOutler:
^^good thing you did the research when you did :D

Here's some real fun with resistors.

[youtube]GGrFAU1sig8[/youtube]
[Galaxy S I9000 Accessories] AdamOutler:
I just wanted to add a new pin we need to play with.

The middle battery terminal. it is readadc 4 in the SBL prompt. By disconnecting this pin you can trigger a cyclic boot-loop. By applying resistance values to this pin, you can cause the phone to activate EXT_I2C.

This log was recorded with a piece of paper in front of the middle battery terminal to prevent contact with the battery and a resistor on the pin to ground.

loke_init: j4fs_open success..
load_lfs_parameters valid magic code and version.
reading nps status file is successfully!.
nps status=0x504d4f43
load_debug_level reading debug level from file successfully(0x574f4c44).
init_fuel_gauge: vcell = 4188mV, soc = 94
check_quick_start_condition_with_charger- Voltage: 4188.75000, Linearized[72/87/100], Capacity: 98
init_fuel_gauge: vcell = 4188mV, soc = 94, rcomp = d01f
EXT_I2C(0) -> No ACK
EXT_I2C(0) -> No ACK
EXT_I2C(0) -> No ACK
reading nps status file is successfully!.
nps status=0x504d4f43
PMIC_IRQ1 = 0x0
PMIC_IRQ2 = 0x0
PMIC_IRQ3 = 0x0
PMIC_IRQ4 = 0x0
PMIC_STATUS1 = 0x40
PMIC_STATUS2 = 0x2c
get_debug_level current debug level is 0x574f4c44.
aries_process_platform: Debug Level Low
keypad_scan: key value ----------------->= 0x0
CONFIG_ARIES_REV:48 , CONFIG_ARIES_REV03:48
EXT_I2C(0) -> No ACK
EXT_I2C(0) -> No ACK
EXT_I2C(0) -> No ACK
check_download: micorusb_status1 = 4ff, key_value = 0
DISPLAY_PATH_SEL[MDNIE 0x1]is on
MDNIE setting Init start!!
vsync interrupt is off
video interrupt is off
[fb0] turn on
MDNIE setting Init end!!
set_boot_mode: boot mode = 1
aries_process_platform: final s1 booting mode = 1
aries_check_vf_status() ----- aver_vf_adc : 3680
main: booting stop and power off..
loke_exit: bye~ bye!
aries_power_off: TA or USB connected
aries_power_off: WDT reset

This was taken with a 619Kohm resistor between pins 4 and 5 on the USB cable and a resistor between ground and the middle battery terminal. The resistance value was about 3.1kohms, however I think it should be higher because the I2C value was hit and miss and lower values would not reproduce the I2C value

So, now we may have access to the I2c bus. The only question is how to use it.
[Galaxy S I9000 Accessories] lemoi:
I do not know if it is still relevant but I do have an original dock and have the same problem. No audio on the audio out of the dock (and my assumption was that the telephone didn't route the audio to the USB). I found an app on the android market which just does this: it routes the audio via the USB to the dock output. I can't remember the programs name as I do not use it anymore. But just do some search and you will find it. If I have the name again I'll post it here if there is still an need for it.
[Galaxy S I9000 Accessories] AdamOutler:
All resistor values are now known. There can be only 32 recognized.

3000 is the same as opened to the FSA chip.
[Galaxy S I9000 Accessories] tiuk:
Anyone have a schematic/guide for building an audio out cable?
[Galaxy S I9000 Accessories] AdamOutler:
http://xdaforums.com/showthread.php?t=1108096
[Galaxy S I9000 Accessories] tiuk:
Thanks
[Galaxy S I9000 Accessories] kapollo:
I just wanted to refer to one thing concerning statement that Samsung is able to bring up bricks without JTAG access.

Some time ago I had a chance to work in a project that had a hardware recovery mode sewn into CPU itself, this I guess is a pretty standard thing among certain SOCs.

What the documentation said was that the CPU's UART line is activated when a certain pin's level changes, this was done by simply short circuiting two soldering points on the PCB, my guess is that if Samsung really does this sort of thing then the JIG actually would have to be connected to serial and now a really simple handshake takes place like:

- ready to receive data

- ok sending data

then the phone loads whatever binary to ram and runs it and then it's pure creativity what it can be, starting from U-Boot ending on SBL and download mode. This is my wild guess, other way I cannot fathom what they've might have use to pull it through (well in manner of easy way of course)

I think this would even be possible to achieve via preprogrammed dongle (or Arduino ;) )

But, ... hehe we would still know how they enable this

cheers
[Galaxy S I9000 Accessories] AdamOutler:
its not a really simple handshake... its hex.

AA

AA

something

Something

string of chars

String of chars

ready to receive...

We have the code, by we don't know how to activate that section of the iron.
[Galaxy S I9000 Accessories] canedha:
to be deleted...
[Galaxy S I9000 Accessories] debaba:
Very fine

Worked very fine on the original Samsung Dock

Thanks for your fine work:D
[Galaxy S I9000 Accessories] Samuel Rozenberg:
OTG Cable USB (B) to Micro USB (A) Powered with AAA batteries?

As one knows, Samsung has promised a HMI Cable

You noticed it is not only a cable but a box out of which you may plug in an extra power supply.

The obvious reason is if the passive monitor does not furnish 5V, the phone will rapidly be out of power.

Now you know that to obtain video rather than anything less, Pin 4 (sense) and 5 (Ground) of micro USB (male A) must be connected with a 365K resistance.

I suppose the dock Samsung is selling for I9100 (yes, I have it) is grounded at 1000K as it provides audio with remote, and yes, the dock provides power supply via extra micro USB as well.

I come to my point: If I want to access any USB data On the Go, I need a cable OTG with 2 ports: USB 2.0/3.0 (female, B sided) to a micro USB (male, A sided, grounded but with no resistance = 0K). Many of them exist on the market out there.

But it is quite impossible to use because of lack of power supply in the passive device (let’s say a handy 1T HDD usually powered via Host connexion !

Would it be possible to insert some sort of receptacle for AAA battery in the middle of such a cable to provide for power while you are for a long time out of access to an electric plug ? Does such a cable exist somewhere to buy ? What would be the sheme to mount this ? HELP !

:confused:
[Galaxy S I9000 Accessories] TheBeano:
USB OTG isn't supported by the operating system on the I9000 yet. Support for that is supposed to be coming in Android Ice Cream.
[Galaxy S I9000 Accessories] Samuel Rozenberg:
Was thinking of I9100 wich is supposed to be supported
[Galaxy S I9000 Accessories] pspilot:
Can anyone help out with these 'charger modes' at 200K and 442K? What are these different chargers, type-1 and 2? I've heard, that there's a kinda fast charge mode, if enought current is available. I'd like to use that. Any details on that subject would be appreciated :).

... one day later ... EDIT:

I fiddled a bit myself with these resistors: neither 200K, nor 442K are influencing anything obvious, with 442K the S2 doesn't even enter the charge state! But the charge current stays always at 400mA. I have a cradle with an open ID-Pin on the output (Pin 4 of the Micro-USB), they use it that way and it can charge and syncronize. So I soldered 2 wires to pin 4 & 5, led them outside the cradle and started playing :). But the results are confusing (for me at least :rolleyes:).

The first and most confusing fact is, that an open PIN 4 (as the cradle is sold) starts not only the charging, but also this 'MTP-Init'. So the S2 thinks, there's a sync cable attached, even if it's not. That's obviously triggered by some resistors in the data lines of the USB D+ & D-. Remember, ID pin 4 is still open. Now, the original charger supplied by Samsung doesn't even bother to HAVE a pin 4 in its plug. So with that, pin 4 HAS to be open, though the data lines are probably open too. A cheap (3rd party) car charger I have too, is using a 200K ID-pin resistor. And what happens? All of these varieties are causing the same charge current of ~400mA at 5V, never more, never less (when the battery is at about 50% which means, the max. charging current is applied. Later, for filling up the rest after 80-90%, the current sink anyway). I find 400mA at 5V quite weak for a good 6 Wh battery. That means, even if the charger ist very effective and the device is off, a full charge takes at least over 3, more 4 hours (considering the end-of-charge characteristic of LiIon cells). Is that true?? Is there no faster full charge than nearly 4 hours?

For me all of that 'smells' like a limitation for charging the device from a standard USB-port, which delivers a max. of 500mA (according the standards). But most smart phones can charge with higher currents, when they are supplied from an external power supply. A battery of 1650mAh also can easily absorb over 1A charge current in the constant current phase.

As I said, any thoughts on the subject are welcome.
[Galaxy S I9000 Accessories] tiuk:
I've modified several chargers (including a few ports on a powered usb hub) by simply bridging the usb data pins (2 and 3). The usb spec specifies that a resistance of less than 200 ohms between those pins signifies a power only mode that allows for up to 1A. When I do this, the phone always identifies that it is AC charging and the charging time is decreased.

I have also read that the SGS will never draw more than 750ma when charging, most likely to prevent over heating. It will stop charging if the battery temperature is too high.

Bridging the pins in the female usb connector allows you to use any cable you like without modification or resistors. I've even made dongles (male and female usb connectors soldered together) and short cables that allow me to use my unmodified micro usb cables for charging with chargers/ports that haven't been modified.
[Galaxy S I9000 Accessories] pspilot:
That's interesting, thanks for that input. Maybe Samsung does that on their original chargers, too? They are rated 700mA output which would be useless, if no more than 400mA are used. As I said, they don't have pin 4 fitted in their micro-USB plug, but I didn't check the data lines. Actually I can hardly measure 'in' that tiny USB-plug, I'm missing a micro-USB socket but it's ordered. I want to build a few adapters, also to measure 'between' the original charger and the device.

What I have found out meanwhile is, the car mode (619K) is using a higher charge current. With half empty battery I get about 620mA charge current (on the 5V side), which obviously also ensures, that the device is not emptying its battery while in the car dock running consumers like GPS and CPU-hungry navigation apps.

The dilemma seems to be, that with all these nifty modes, there's no possibility to have the Galaxy in a cradle, ready to sync if you want and still fast charging, let alone an audio output AND syncing. I wonder anyway, why they do all that line-sharing among so many functions. Why not just using a multicore plug? Ok, that's no subject here :).
[Galaxy S I9000 Accessories] tiuk:
I'm thinking it would be possible with a double USB A male to micro USB male cable, similar to those you sometimes see with external laptop drives. That would definitely ensure enough current is supplied, though you would still have the problem of the phone not detecting that high current charging is enabled. This is likely the purpose of the resistors you mentioned. In my experience, I used the "car" mode resistor values and with data, gps nav, and bluetooth all on it still drained faster than it could charge (though slower than with no resistor). This would support your findings of 620ma, the phone really needs the full 750ma to charge enough to overcome the drain. My car charger supplies 1A, so any limitation is definitely caused by the resistor.

Underclocking and undervolting do help in this case.
[Galaxy S I9000 Accessories] pspilot:
That IS a totally strange matter. I mean, Samsung is offering an official car cradle and it seems strange, that the phone comes out of it discharged, if only the travel is long enough :confused:?!? I've heard also - and BTW, thats supported by own tests - that the hardware alone + some onboard navigation is not exceeding the supplied current. Only 3rd party apps like Navigon are producing the 'over-heavy' load.

I still find the whole subject strange. 5V@1A is nearly a standard supply nowadays, even from small cigarette lighter adapters. Distinguishing an external power supply from the limited USB-port is done since years by alot of gear and the chip industry has wonderful charger & supply chips for that :D. So in a 'super hardware' like the S2, this 600 or even 750mA limitation seems to be ... 'awkward'?!

Anyway, I still have to try the 'short-data-lines' trick from tiuk. The car cradle mode is not optimal for quick charging at home.

P.S.: Off-topic question: why can't I find a 'thanks-button' here? Me blind or gone???
[Galaxy S I9000 Accessories] pspilot:
Another big 'thanks' (to tiuk), if I'd find a button :). Shorting out the 2 USB data lines does the trick too. The charge current increases from 400 to 650mA (at 50% battery) WITHOUT entering any special mode. Especially that MTP-Mode is not triggered (with open data lines), which always causes a more or less 'lengthly' media scanning afterwards - quite useless if you only recharge the device.

Knowing all of that, the problem remains, that you'd need different cradles for different jobs. A fast charging cradle with shortened data lines can neither sync nor output audio. An audio cradle can't snyc either ... etc. etc. ... I really wish, they hadn't shared these 2 lousy lines for everything.