Carplay - Phone that supports charging and OTG simultaneously?

Search This thread

LexDuck

New member
Jan 28, 2023
3
0
Hi all,

I'm looking for the phone that allows charging and using OTG simultaneously. I have the Carplay adapter that can be connected to the android phone and I want to use it in my motorcycle as media dashboard. The problem I'm facing right now is that every phone I'm using doesn't support the charging. When I connect the power supply the communication with accessory stops and when it's disconnected the accessory is working again.

I was testing on Motorola G31, Samsung S10 and Pixel 2 XL. The adapter itself works fine as I was testing it on my Macbook and I can charge and use usb accessory at the same time.

If you know some phone that will work I would be greatfull for the recommendation. I prefer the usbc connection.

The second question I have which is way less important. Is there an custom rom that is very lightweight and allow just to run the application for the adapter to boot as fast as possible?


=====================================================
For anyone looking for simple answer I can confirm that Poco X3 is working fine, if you know other phones please add a post
 
Last edited:

alecxs

Forum Moderator
Staff member
Feb 17, 2016
3,768
5
1,765
gitlab.com


if you read through the links you will stumple about explanation why USB-C don't have any OTG mode at all..
 
Last edited:

alecxs

Forum Moderator
Staff member
Feb 17, 2016
3,768
5
1,765
gitlab.com
micro USB OTG port has ID pin which is shorted to GND to determinate the host.

where is ID pin on USB-C?

1110px-USB_Type-C_Receptacle_Pinout.svg.png
 

Renate

Recognized Contributor / Inactive Recognized Dev
if you read through the links you will stumple about explanation why USB-C don't have any OTG mode at all..
Say what??? You're killing me.

Yes, of course there is OTG over USB 3 Type C.
You buy a (passive) adapter and it works, just like with micro USB 2.

Now you're going to ask me how.
I actually have a device that I build that switches dynamically straight USB vs OTG.
It's a 5.1k resistor from a CC to ground puts it in OTG.

Here's a video of two Androids hooked together with one being a "digitizer" and the other using it through a OTG adapter.

See: https://www.amazon.com/24pin-USB-C-Resistor-Black-Housing/dp/B07T97LC9L
 

Attachments

  • swipe.mp4
    303.7 KB · Views: 0
Last edited:
  • Like
Reactions: ze7zez

Renate

Recognized Contributor / Inactive Recognized Dev
Here's an adapter I made for Type C. You can use it normally (with a straight micro USB cable) or as OTG with a micro USB OTG adapter.
And if you connect it to a 5 wire device that switches the micro USB ID, then it can do both alternately.
The black heat shrink hides a 5.1k resistor.

Oh, as far as PD goes:
Code:
# USB power role changes
on property:sys.usb.typec.power_role=source
    write /sys/class/dual_role_usb/otg_default/power_role ${sys.usb.typec.power_role}
on property:sys.usb.typec.power_role=sink
    write /sys/class/dual_role_usb/otg_default/power_role ${sys.usb.typec.power_role}
 

Attachments

  • typecotg.jpg
    typecotg.jpg
    100.8 KB · Views: 9
  • Like
Reactions: ze7zez

alecxs

Forum Moderator
Staff member
Feb 17, 2016
3,768
5
1,765
gitlab.com
you should maybe read about USB-C and its protocols especially USB-PD.

oh I have one too, and it works. with custom kernel you can even charge on host mode.

IMG_20230128_235738.jpg


USB-C devices don't use USB On-The-GO (OTG) like the older devices discussed here, instead they use something called Dual-Role-Mode/Dual-Role-Devices (DRD).
Whereas USB-OTG host/client was determined by hardware; DRD uses context to determine the host/client devices, which needs to be implemented in firmware/software/logic.
https://microchipsupport.force.com/s/article/How-to-do-USB-On-the-go-OTG-on-USB-Type-C
 
Last edited:
you should maybe read about USB-C and its protocols especially USB-PD.

oh I have one too, and it works. with custom kernel you can even charge on host mode.

View attachment 5822233


https://microchipsupport.force.com/s/article/How-to-do-USB-On-the-go-OTG-on-USB-Type-C
Uh, what?
I'm fully aware of how USB-C signalling works, thanks.
The link you pointed me to confirms exactly what I said:
All existing OTG methodologies (ID pin, Host Negotiation Protocol, and Session Request Protocol) are prohibited from being used on USB Type-C ports!
 

Renate

Recognized Contributor / Inactive Recognized Dev
Yawn.
Of course there is no "OTG" in Type C.
But if somebody wants to use a regular USB A plug of a keyboard/mouse on their Type C device they just buy an "OTG adapter".
USB Type-C plugs associated with the “A” end of a legacy adapter cable are required to have Rd (5.1 kΩ ± 20%) termination incorporated into the plug assembly – see Section 4.5.3.2.1.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    where is ID pin on USB-C?
    It's just that people buy it and it works, because they don't think about the number of pins.
    1
    if you read through the links you will stumple about explanation why USB-C don't have any OTG mode at all..
    Say what??? You're killing me.

    Yes, of course there is OTG over USB 3 Type C.
    You buy a (passive) adapter and it works, just like with micro USB 2.

    Now you're going to ask me how.
    I actually have a device that I build that switches dynamically straight USB vs OTG.
    It's a 5.1k resistor from a CC to ground puts it in OTG.

    Here's a video of two Androids hooked together with one being a "digitizer" and the other using it through a OTG adapter.

    See: https://www.amazon.com/24pin-USB-C-Resistor-Black-Housing/dp/B07T97LC9L
    1
    Here's an adapter I made for Type C. You can use it normally (with a straight micro USB cable) or as OTG with a micro USB OTG adapter.
    And if you connect it to a 5 wire device that switches the micro USB ID, then it can do both alternately.
    The black heat shrink hides a 5.1k resistor.

    Oh, as far as PD goes:
    Code:
    # USB power role changes
    on property:sys.usb.typec.power_role=source
        write /sys/class/dual_role_usb/otg_default/power_role ${sys.usb.typec.power_role}
    on property:sys.usb.typec.power_role=sink
        write /sys/class/dual_role_usb/otg_default/power_role ${sys.usb.typec.power_role}
    1
    Maybe you don't know this, but if you quote someone, it actually does tag them, exactly like a reply.

    If you don't want to drag someone into a conversation you can just copy/paste the text and then manually apply the quote formatting.

    Have a good evening.