Fun with resistors (home/car dock mode + more)

Search This thread

CNLiberal

Senior Member
Dec 8, 2008
421
50
Centennial, CO
I just finished building a car audio dock cable thanks to a few posts here on XDA. I have an I777 GalaxyS2 from AT&T. I want to run WiFi tether, BlueTooth, and GPS w/ Google Nav, and Auto-Brightness simultaneously and have the phone charge. Currently, I can't do it. The phone seems to be losing charge. Am I reading this thread correctly, and seeing that it isn't possible due to the draw of all those apps/functions? I have a 1A adapter in the car, so it should be getting enough power. Thanks!
 

SanityPreservation

Senior Member
Feb 12, 2012
451
109
In the south.
uboot vs. hboot

Hello all. I am apologizing in advance, I am a real noob at this and not really on topic or the correct device but I came here after searching uboot bootloader on the net and noone else seems to know what it is or anything about its capabilities.

OK, here goes.

An HTC Sensation phone bought online has UBoot Ver. : 2010.06 bootloader on it (most likely a fake or a clone) and my questions are:

-is it possible to replace uboot with another bootloader such as hboot ?
-what can be done with this uboot ? is it able to flash files ?
-is it able to recieve commands via adb and fastboot so I can replace any .img I want?

Thanks in advance.
 

E:V:A

Inactive Recognized Developer
Dec 6, 2011
1,447
2,222
-∇ϕ
...According to table 6.5 and 5.3 in this pdf file i need to place a 124 k resistor between pin 4 and 5 to enter the right mode. Can anyone confirm this? It seems awfully close to the 121 k used for TTY converter on the I9000, but could that be because the I9000 wasn't really designed to be OTG compliant?

You are confused and didn't read the specifications very carefully (and neither did I). But the specifications say that the 124K value is used between D+ and D-. The values you compare to 121K is between GND and ID_CON!
In addition there are some requirements on the presence of a VBUS...
 

kasinatorHH

New member
May 9, 2012
4
0
hi folks,

I wonder if somebody was able to use the resistor combinations RID_AUD_REMOTE_S*_BTN to control some of the standard MP3 players on Galaxy S2.
Second is does somebody tried to apply the corresponding voltage values with a DAC.
I'm asking because I think of making a Bridge between my Car-CAN.BUS and the RID-Pin to be able to control the S2 via the Steering Wheel Switches. All I would then need is a 4-5 pin micro translating the Steering Wheel Messages into DAC-Values in car/dock Mode.
That would be cool:
Just stick the USB-Cable into the mounted S2, Car-Audio goes into AUX-Mode (automatic) and shuffling through the MP3 collection without taking hands of the Steering Wheel while the S2 is charged.

What do you think about that?

Regards
Kasinator
 

CNLiberal

Senior Member
Dec 8, 2008
421
50
Centennial, CO
hi folks,

I wonder if somebody was able to use the resistor combinations RID_AUD_REMOTE_S*_BTN to control some of the standard MP3 players on Galaxy S2.
Second is does somebody tried to apply the corresponding voltage values with a DAC.
I'm asking because I think of making a Bridge between my Car-CAN.BUS and the RID-Pin to be able to control the S2 via the Steering Wheel Switches. All I would then need is a 4-5 pin micro translating the Steering Wheel Messages into DAC-Values in car/dock Mode.
That would be cool:
Just stick the USB-Cable into the mounted S2, Car-Audio goes into AUX-Mode (automatic) and shuffling through the MP3 collection without taking hands of the Steering Wheel while the S2 is charged.

What do you think about that?

Regards
Kasinator

Any music app out there would have to be programmed to "listen" for the remote signals. None out there do that (as far as I know). This is simply because this is a Samsung only remote. Because Android hardware is so fragmented, no manufacturer can come out with something that will work with all devices (Like in the Apple world). It's a shame, but whaddayagonnado.
 

tiuk

Senior Member
Jul 1, 2010
521
61
Would a loud audio file played through the headphone port be enough to drive an LED? If so, would any components other than the LED and headphone connector be required?

Sent from my SAMSUNG-SGH-I727 using xda premium
 

kasinatorHH

New member
May 9, 2012
4
0
Would a loud audio file played through the headphone port be enough to drive an LED? If so, would any components other than the LED and headphone connector be required?

Voltage on headphone out could be sufficient to drive LED but that is depending on the Uf Voltage of the certain LED that is mostly color dependant.
But: actual smartphone do sensing what load is attached to the output: Line-Out / headphones have different impedances. So the phones might adapt drive strength and maybe equalizer setting. Can't predict how the Smartphone will perform.
Usually the headphone outputs should be short-circuit protected so you shouldn't be able to destroy something by attaching LED. But do it at your own risk.
Just try it :D.
 

Frank2

Senior Member
Jan 1, 2004
56
8
Car dock mode (619k):

No problem with Galaxy Note 1, but the new Galaxy Note 2 isn't switching to car mode and there is no charging! When I remove the 619k-resistor the Note 2 is charging in the car dock (but of course no car mode).

What is the correct resistor for the Note 2?
 

TheBeano

Senior Member
Jul 18, 2010
355
218
The source code for the GT-N7100 isn't out yet, there might be a clue in there. Or it could just be a bug.
 

TheBeano

Senior Member
Jul 18, 2010
355
218
Thanks, I had a quick look and they no longer use the FSA9480 chip for the USB interface, instead it looks like they use the MAX77693 chip, same as the Galaxy SIII. There is a resistor table for cable detection in the code that has the same values for the car dock etc.:
Code:
	ADC_DOCK_VOL_DN		= 0x0a, /* 0x01010 14.46K ohm */
	ADC_DOCK_VOL_UP		= 0x0b, /* 0x01011 17.26K ohm */
	ADC_DOCK_PLAY_PAUSE_KEY = 0x0d,
	ADC_SMARTDOCK		= 0x10, /* 0x10000 40.2K ohm */
	ADC_AUDIODOCK		= 0x12, /* 0x10010 64.9K ohm */
	ADC_CEA936ATYPE1_CHG	= 0x17,	/* 0x10111 200K ohm */
	ADC_JIG_USB_OFF		= 0x18, /* 0x11000 255K ohm */
	ADC_JIG_USB_ON		= 0x19, /* 0x11001 301K ohm */
	ADC_DESKDOCK		= 0x1a, /* 0x11010 365K ohm */
	ADC_CEA936ATYPE2_CHG	= 0x1b, /* 0x11011 442K ohm */
	ADC_JIG_UART_OFF	= 0x1c, /* 0x11100 523K ohm */
	ADC_JIG_UART_ON		= 0x1d, /* 0x11101 619K ohm */
	ADC_CARDOCK		= 0x1d, /* 0x11101 619K ohm */
#if defined(CONFIG_MUIC_DET_JACK)
	ADC_EARJACK		= 0x1e, /* 0x11110 1000 or 1002 ohm */

But there are a lot of conditional compile settings e.g.
#if !defined(CONFIG_MUIC_MAX77693_SUPPORT_CAR_DOCK)

So they may have compiled it without this activated for the Note 2. Possibly the SGS III forums have more info?
 

AndreiLux

Senior Member
Jul 9, 2011
3,209
14,598
Thanks, I had a quick look and they no longer use the FSA9480 chip for the USB interface, instead it looks like they use the MAX77693 chip, same as the Galaxy SIII. There is a resistor table for cable detection in the code that has the same values for the car dock etc.:
Code:
	ADC_DOCK_VOL_DN		= 0x0a, /* 0x01010 14.46K ohm */
	ADC_DOCK_VOL_UP		= 0x0b, /* 0x01011 17.26K ohm */
	ADC_DOCK_PLAY_PAUSE_KEY = 0x0d,
	ADC_SMARTDOCK		= 0x10, /* 0x10000 40.2K ohm */
	ADC_AUDIODOCK		= 0x12, /* 0x10010 64.9K ohm */
	ADC_CEA936ATYPE1_CHG	= 0x17,	/* 0x10111 200K ohm */
	ADC_JIG_USB_OFF		= 0x18, /* 0x11000 255K ohm */
	ADC_JIG_USB_ON		= 0x19, /* 0x11001 301K ohm */
	ADC_DESKDOCK		= 0x1a, /* 0x11010 365K ohm */
	ADC_CEA936ATYPE2_CHG	= 0x1b, /* 0x11011 442K ohm */
	ADC_JIG_UART_OFF	= 0x1c, /* 0x11100 523K ohm */
	ADC_JIG_UART_ON		= 0x1d, /* 0x11101 619K ohm */
	ADC_CARDOCK		= 0x1d, /* 0x11101 619K ohm */
#if defined(CONFIG_MUIC_DET_JACK)
	ADC_EARJACK		= 0x1e, /* 0x11110 1000 or 1002 ohm */

But there are a lot of conditional compile settings e.g.
#if !defined(CONFIG_MUIC_MAX77693_SUPPORT_CAR_DOCK)

So they may have compiled it without this activated for the Note 2. Possibly the SGS III forums have more info?
I got PM'ed by a user for a feature request on the Note 2, currently by default it is compiled with:

CONFIG_MUIC_MAX77693_SUPPORT_OTG_AUDIO_DOCK=y
CONFIG_MUIC_MAX77693_SUPPORT_SMART_DOCK=y

Car dock entry is missing in the default defconfig. The S3 has none of these options checked:

# CONFIG_MUIC_MAX77693_SUPPORT_OTG_AUDIO_DOCK is not set
# CONFIG_MUIC_MAX77693_SUPPORT_SMART_DOCK is not set
# CONFIG_MUIC_MAX77693_SUPPORT_CAR_DOCK is not set

Also, keep in mind we're talking international S3, US version has different PMICs.

So here's a kernel for both devices with all the three options enabled: S3 build upon this kernel, and the N2 on this one (Almost the same).

Again, both these have:

CONFIG_MUIC_MAX77693_SUPPORT_OTG_AUDIO_DOCK=y
CONFIG_MUIC_MAX77693_SUPPORT_SMART_DOCK=y
CONFIG_MUIC_MAX77693_SUPPORT_CAR_DOCK=y

I currently have no device/dock to test this functionality other than simple OTG, so I post it here for because of the specificity of the request. If it works I will keep it for both in the stable kernels.

Edit: I have moved this functionality onto the my main kernels and you should visit the threads linked above for downloads of new versions.
 

Attachments

  • Perseus.alpha24.3.CAR-i9300.tar
    6.9 MB · Views: 475
  • Perseus.alpha24.3.CAR-N7100.tar
    7.2 MB · Views: 73
Last edited:

lemmatti

Senior Member
Sep 26, 2012
62
37
Could somebody please trst this with s iii ? I'm hoping of getting my note today so I can test this :)
 

Top Liked Posts

  • There are no posts matching your filters.
  • 22
    We've already established that a resistor on the micro USB port can be used to force the Galaxy S into download mode, but the USB switching chip used on the phone has a lot of other capabilities that are triggered by different resistors between pin 4 and 5 of the plug.

    Update 6 March 2011: Confirmed modes so far:
    Desk Dock: 365K (also works with 1K)
    Car Dock: 619K
    In these modes audio output can be switched to pins D- and D+ of the USB port (D- is left) but this is not done by default, see this thread.

    Serial port/UART: RID_FM_BOOT_OFF_UART (523K)
    Read the rest of this thread for more details on using this port.
    Other resistor values that also enable the serial port:
    RID_AUD_DEV_TY_2 (80.07K): Doesn't switch the phone on, but produces bootlog output on the serial port when you switch it on manually. The bootlog output only starts partway through the second bootloader, rather than from the start of the primary bootloader.
    UART_CABLE (150K): Same as RID_AUD_DEV_TY_2


    Download mode:
    301K (this thread).

    Here is a list of all the resistor values, from fsa9480_i2c.h in the open source code for JPM. The resistor goes from pin 4 to pin 5 of the micro USB plug (full details on how to wire this up are in this thread). When you connect the plug with the resistor (in Froyo) you should see some messages from the fsa9480 driver in the kernel log, which you can view with the "dmesg" command.

    Code:
    RID_USB_OTG_MODE,	/* 0 0 0 0 0 	GND 		USB OTG Mode              */
    RID_AUD_SEND_END_BTN,	/* 0 0 0 0 1 	2K		Audio Send_End Button*/
    RID_AUD_REMOTE_S1_BTN,	/* 0 0 0 1 0 	2.604K		Audio Remote S1 Button */
    RID_AUD_REMOTE_S2_BTN,	/* 0 0 0 1 1 	3.208K		Audio Remote S2 Button                         */
    RID_AUD_REMOTE_S3_BTN,	/* 0 0 1 0 0 	4.014K		Audio Remote S3 Button */
    RID_AUD_REMOTE_S4_BTN,	/* 0 0 1 0 1 	4.82K		Audio Remote S4 Button */
    RID_AUD_REMOTE_S5_BTN,	/* 0 0 1 1 0 	6.03K		Audio Remote S5 Button */
    RID_AUD_REMOTE_S6_BTN,	/* 0 0 1 1 1 	8.03K		Audio Remote S6 Button */
    RID_AUD_REMOTE_S7_BTN,	/* 0 1 0 0 0 	10.03K		Audio Remote S7 Button */
    RID_AUD_REMOTE_S8_BTN,	/* 0 1 0 0 1 	12.03K		Audio Remote S8 Button */
    RID_AUD_REMOTE_S9_BTN,	/* 0 1 0 1 0 	14.46K		Audio Remote S9 Button */
    RID_AUD_REMOTE_S10_BTN,	/* 0 1 0 1 1 	17.26K		Audio Remote S10 Button */
    RID_AUD_REMOTE_S11_BTN,	/* 0 1 1 0 0 	20.5K		Audio Remote S11 Button */
    RID_AUD_REMOTE_S12_BTN,	/* 0 1 1 0 1 	24.07K		Audio Remote S12 Button */
    RID_RESERVED_1,		/* 0 1 1 1 0 	28.7K		Reserved Accessory #1 */
    RID_RESERVED_2,		/* 0 1 1 1 1 	34K 		Reserved Accessory #2 */
    RID_RESERVED_3,		/* 1 0 0 0 0 	40.2K		Reserved Accessory #3 */
    RID_RESERVED_4,		/* 1 0 0 0 1 	49.9K		Reserved Accessory #4 */
    RID_RESERVED_5,		/* 1 0 0 1 0 	64.9K		Reserved Accessory #5 */
    RID_AUD_DEV_TY_2,	/* 1 0 0 1 1 	80.07K		Audio Device Type 2 */
    RID_PHONE_PWD_DEV,	/* 1 0 1 0 0 	102K		Phone Powered Device */
    RID_TTY_CONVERTER,	/* 1 0 1 0 1 	121K		TTY Converter */
    RID_UART_CABLE,		/* 1 0 1 1 0 	150K		UART Cable */
    RID_CEA936A_TY_1,	/* 1 0 1 1 1 	200K		CEA936A Type-1 Charger(1) */
    RID_FM_BOOT_OFF_USB,	/* 1 1 0 0 0 	255K		Factory Mode Boot OFF-USB */
    RID_FM_BOOT_ON_USB,	/* 1 1 0 0 1 	301K		Factory Mode Boot ON-USB */
    RID_AUD_VDO_CABLE,	/* 1 1 0 1 0 	365K		Audio/Video Cable */
    RID_CEA936A_TY_2,	/* 1 1 0 1 1 	442K		CEA936A Type-2 Charger(1) */
    RID_FM_BOOT_OFF_UART,	/* 1 1 1 0 0 	523K		Factory Mode Boot OFF-UART */
    RID_FM_BOOT_ON_UART,	/* 1 1 1 0 1 	619K		Factory Mode Boot ON-UART */
    RID_AUD_DEV_TY_1_REMOTE,	/* 1 1 1 1 0 	1000.07K	Audio Device Type 1 with Remote(1) */
    RID_AUD_DEV_TY_1_SEND = RID_AUD_DEV_TY_1_REMOTE ,		/* 1 1 1 1 0 	1002K		Audio Device Type 1 / Only Send-End(2) */
    RID_USB_MODE,		/* 1 1 1 1 1 	Open		USB Mode, Dedicated Charger or Accessory Detach */
    3
    Thanks, I had a quick look and they no longer use the FSA9480 chip for the USB interface, instead it looks like they use the MAX77693 chip, same as the Galaxy SIII. There is a resistor table for cable detection in the code that has the same values for the car dock etc.:
    Code:
    	ADC_DOCK_VOL_DN		= 0x0a, /* 0x01010 14.46K ohm */
    	ADC_DOCK_VOL_UP		= 0x0b, /* 0x01011 17.26K ohm */
    	ADC_DOCK_PLAY_PAUSE_KEY = 0x0d,
    	ADC_SMARTDOCK		= 0x10, /* 0x10000 40.2K ohm */
    	ADC_AUDIODOCK		= 0x12, /* 0x10010 64.9K ohm */
    	ADC_CEA936ATYPE1_CHG	= 0x17,	/* 0x10111 200K ohm */
    	ADC_JIG_USB_OFF		= 0x18, /* 0x11000 255K ohm */
    	ADC_JIG_USB_ON		= 0x19, /* 0x11001 301K ohm */
    	ADC_DESKDOCK		= 0x1a, /* 0x11010 365K ohm */
    	ADC_CEA936ATYPE2_CHG	= 0x1b, /* 0x11011 442K ohm */
    	ADC_JIG_UART_OFF	= 0x1c, /* 0x11100 523K ohm */
    	ADC_JIG_UART_ON		= 0x1d, /* 0x11101 619K ohm */
    	ADC_CARDOCK		= 0x1d, /* 0x11101 619K ohm */
    #if defined(CONFIG_MUIC_DET_JACK)
    	ADC_EARJACK		= 0x1e, /* 0x11110 1000 or 1002 ohm */

    But there are a lot of conditional compile settings e.g.
    #if !defined(CONFIG_MUIC_MAX77693_SUPPORT_CAR_DOCK)

    So they may have compiled it without this activated for the Note 2. Possibly the SGS III forums have more info?
    I got PM'ed by a user for a feature request on the Note 2, currently by default it is compiled with:

    CONFIG_MUIC_MAX77693_SUPPORT_OTG_AUDIO_DOCK=y
    CONFIG_MUIC_MAX77693_SUPPORT_SMART_DOCK=y

    Car dock entry is missing in the default defconfig. The S3 has none of these options checked:

    # CONFIG_MUIC_MAX77693_SUPPORT_OTG_AUDIO_DOCK is not set
    # CONFIG_MUIC_MAX77693_SUPPORT_SMART_DOCK is not set
    # CONFIG_MUIC_MAX77693_SUPPORT_CAR_DOCK is not set

    Also, keep in mind we're talking international S3, US version has different PMICs.

    So here's a kernel for both devices with all the three options enabled: S3 build upon this kernel, and the N2 on this one (Almost the same).

    Again, both these have:

    CONFIG_MUIC_MAX77693_SUPPORT_OTG_AUDIO_DOCK=y
    CONFIG_MUIC_MAX77693_SUPPORT_SMART_DOCK=y
    CONFIG_MUIC_MAX77693_SUPPORT_CAR_DOCK=y

    I currently have no device/dock to test this functionality other than simple OTG, so I post it here for because of the specificity of the request. If it works I will keep it for both in the stable kernels.

    Edit: I have moved this functionality onto the my main kernels and you should visit the threads linked above for downloads of new versions.
    2
    Some notes about the UART:

    The UART device is /dev/ttySAC2 but you need to create a device node for it as described in this file from the kernel source:
    Documentation/arm/Samsung-S3C24XX/Overview.txt

    So use this command (root required):
    Code:
    mknod ttySAC2 c 204 66

    The UART is switched between the MODEM (radio) and PDA (CPU) by the device /sys/devices/virtual/sec/switch/uart_sel

    You can see what the current state is with this command:
    Code:
    cat /sys/class/sec/switch/uart_sel
        [UART Switch] Current UART owner = PDA

    You can change the state with:
    Code:
       echo PDA> /sys/class/sec/switch/uart_sel
    or
       echo MODEM> /sys/class/sec/switch/uart_sel

    You can tell when it's connected to MODEM because it will respond to AT commands, e.g.
    Code:
    ATI0
     Manufacturer: SAMSUNG
    
     Model: I9000
    
     Revision: I9000XXJPP
    
     IMEI: ***************

    The baud rate is set to 115200 at boot time, I don't know how to change it as yet.
    2
    Hi! After modding USB port to behave as UART, is it possible to use this port for custom data and not just for debug output? For instance, I would like to open ttySAC2 port with putty and enter some text which would then be transferred to my PC.
    Yes the ttySAC2 port works fine. In some configurations the serial port that's connected to the USB pins gets switched to the MODEM after boot and you need to switch it back, like this (from a terminal command line on the phone):

    echo PDA > /sys/class/sec/switch/uart_sel
    echo hi>/dev/ttySAC2 (you should see "hi" on a connected serial terminal).
    2
    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?
    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.