Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

USB-C has obfuscated things but I was hoping the following would work:

Buy a Y-cable from Ali Express that has USB-C male to plug into the phone, and both USB-C female and USB-A female sockets. Plug keyboard into the USB-A and the charger into USB-C.

But it doesn't work, and I suspect it's a software limitation at least on my phone (Moto G Play 2023). If the charger is plugged in first, the phone will charge but not use the keyboard. If the keyboard is plugged in first, the phone will use it, but not charge. I think the wires are there to make it all work, but the phone's OS just doesn't support this scenario. Pity.

Needless to say documentation is nonexistent so I don't actually know what's in the cable. For all I know, the two female sockets are just connected in parallel.




USB-C never defined a Y cable and so they never figured out how that would work. If such a cable works anywhere it is either luck, or there is some chip inside that checks for power messages from either end but otherwise looks like a straight through cable. Even then it will be tricky because if the two devices want different voltages from the charger only one can get their way.

I can't blame the USB-C people for not working on this case. It is a lot harder than it seems to make work, and of limited use. Just get a USB-C hub if you need this ability.


Isn't this exactly what USB-C docks are for?

I've seen plenty of those devices, where you have a female USB-C socket to connect a charger to, a range of other female USB-C, USB-A and other ports for peripherals and a short cable with a male USB-C plug to connect to a laptop. If everything works, the dock will act as a power source for both the peripherals and the laptop, but will act like a hub on the data lines, with the laptop being the host.

I wonder if it would work just the same if you connected a phone instead of a laptop to the "host" cable.


That is what a dock is for. OP wants a simple and cheap cable instead which isn't really possible in the generic sense (though it might work in some limited way)

I've connected my phone to the host cable of a dock before and everything worked. (I didn't try the HDMI output, but sound on the dock just worked)


This is known as a USB Accessory Charging Adapter of which a dock is one form but the old Battery Charging standard also anticipated it being in the form of a cabled adapter:

Battery Charging 1.2:

> An Accessory Charger Adaptor (ACA) is an adaptor which allows a single USB port to be attached to both a charger and another device at the same time.

Figure 3-1 shows the various configurations covered. The third one indicates the intent of having an adapter with data pass through to an accessory while powering from a third port fed by an external USB supply.

These exist today as USB-C splitters.


The docks we have around here at work all use Displaylink chips. So it would work if the phone had the (software) Displaylink driver, no Displayport video capability required on the USB-C port. But I'm guessing that's unlikely.


Hmmm, it occurred to me, I'm sitting in front of a laptop connected to a (power delivery) USB-C dock. So unplugged the laptop and plugged the cable into my phone instead (very basic, Moto G Play 2023). What happened? Almost nothing! The phone reported an audio output device, but did not charge, and the keyboard and mouse plugged into the dock did not get recognized either. Not encouraging.


Well, the Kensington dock at work did not work (for delivering power to the phone and letting keyboard and mouse be used) - in fact it did none of those things. But ordered this cheapie from Ali:

https://vi.aliexpress.com/item/1005007015739540.html

which does claim to work with various smartphones. We'll see.


Would be interested to know that as well. Good luck!


Dunno if anyone stil sees this but.. the gadget came from Ali.

Phone doesn't charge through it. However, my work laptop does. If this thing is plugged in between its USB-C dock and the laptop, it is powered, but the dock is not otherwise seen. So the USB-C socket is a full power delivery passthrough but that's all it is.

The USB-A port does work; a mouse plugged into it is seen by the laptop. Didn't test the HDMI output.

For the phone: Useless. Obviously this phone does not do USB-PD. It just expects the power adapter to deliver 5V. So a limitation with this phone; I'll never be able to simultaneously power it and also get an OTG USB connection.


Heh, if you want a really atrocious USB power violation... Costco sold some extremely bright flashlights (think car headlight bright, and also usable as a self-defense weapon in the spirit of the old D-cell Maglites) before Christmas, that have an USB charge socket. Needless to say they include a charge cable but no charger.

But this thing wants 1.5A at 5V. And doesn't do any power "negotiation" at all, as far as I can see. It happens to work because modern smartphone chargers can do 5V at 2A by default. But plug it into any older charger and the charger immediately shuts down due to overcurrent.

I have one of those USB passthrough voltage/current meter gadgets. Yes, it draws 1.5A. I guess what it should be doing is slow-charge unless it can negotiate for more power. It's a very decent flashlight otherwise.

Oh, it also has two USB-C sockets. A red one for charging, and a black one for using the flashlight's substantial battery as a power bank. I don't know what would happen if you plugged the charger into the wrong socket and don't have the courage to try.


> Oh, it also has two USB-C sockets. A red one for charging, and a black one for using the flashlight's substantial battery as a power bank. I don't know what would happen if you plugged the charger into the wrong socket and don't have the courage to try.

USB-C does a bit of negation before putting our any significant amount of power. There's a "dumb mode" that just uses a pair of half-cent resistors and is fine for up to 3A at 5V, and then the "smart" PD (Power Delivery) mode that does a digital negotiation and can do much higher wattage.

All that is to say that if you plugged the black USB-C into a charging brick it'd probably just fail the negotiation and nothing bad would happen. Both sides would have to be violating the spec for it to be a real hazard.

Annoyingly, some really cheap devices skip out on even the dumb mode resistors to save a penny, and so even though they have USB-C ports, you have to charge them with USB-A to USB-C cables (because USB-A ports always provide power, no negotiation required.)

Those devices are where the cheap Y-cables come in handy, because they usually include the required resistors + give you a USB-A port.


The flashlight comes with an USB A->C charging cable, as do the (low end) smartphones we have (along with USB-A power adapter for the phones). Thus probably no PD negotiation. Right?


A lot of flashlights and cheap gadgets have USB-C port but can only charge from USB-A port. The reason is that they cheaped out on including the resistors that signal legacy USB mode. The USB-C to USB-A cable has the resistors.

The smartphones should have proper USB-C port, I haven't heard of one with charging problems, and included USB-A cable cause cheap.


Aah, yes, the USB-A side always provides power, no negotiation needed for that aspect. There is still supposed to be some level of negotiation before drawing that much current (often just checking resistance, similar to the USB-C "dumb" mode), but obviously the device skipped that also.


No need for weird racism.

American companies like Skullcandy do this too.


Fair enough, edited.


> extremely bright flashlights (think car headlight bright, and also usable as a self-defense weapon in the spirit of the old D-cell Maglites)

Using a device which is mostly lithium ion batteries as a weapon? Even scarier than you expect, if you puncture a battery


First of all these flashlights are very sturdy, and second, if you need a self-defense weapon, I don't think a slight danger of the weapon bursting into flame, post-use, is a high priority concern. The battery pack is a relatively loose fit, slide-out item inside a metal tube. All the charge electronics including connectors are part of it. The flashlight actually comes with an alternative battery pack that takes (a lot of) AA cells.


My wild guess would be that, yes, that cable is just a naive splitter. The only real use case I could think of that would work would be taking a USB-C port and making it accept either USB-C or USB-A devices without having to dig around/swap adapters/etc. I say that because as far as I'm aware (though I'm having trouble digging up an authoritative source right now), there's no way for USB devices to share data lines. Even cheap "passive" hubs and things all have ICs to present themselves as a USB device and sit between the host and the downstream devices. With the older USB specs you could still get some power even without the data lines, but with USB-C you need the data lines to negotiate power delivery. I don't think there are any software-level changes would make that setup work.

If you are looking for a solution though (albiet a bit bit bulkier one) it's likely any of a number of "USB C hub" or "USB C dock" products would work there. Most have a USB-C port marked "PD-IN". Plug the hub into your phone, plug your power into the PD-IN, and use the USB-A/other ports to connect your other devices. Run you like $20 from the usual suspects.


Thanks for that. The longer-term goal is to make a "dock" for my elderly mom's phone that lets her use it as a tiny (her eyes are still good) pseudo-desktop setup with keyboard and mouse. She often ends up with her phone as her only communications device when things go wrong (again) on her laptop and this would give a good email experience (she's a skilled touch-typist). Any pointers to a cheap USB-C dock on Ali that does the job?

Sadly, one limitation, at least on the Android device, is that you can't use it in landscape mode with a mouse. Well, you can, but the launcher only operates in portrait mode, as do a lot of apps. I don't want to change the launcher - elderly folks get very fixated on how their device is supposed to work. Anyway as soon as the phone switches to sideways-portrait mode, the mouse also does which is very disorienting.


Nothing I've tested specifically with Android--my use has been mostly Steam Deck or iPad Pro.

I've had good luck with the Anker stuff. Not sure if any of it's on Aliexpress, but they are on Amazon. I have a couple of the Anker 555 which is about $50. The Anker 332 looks fairly similar for more like $20. Both have the "PD-IN".

I'm, again, not sure how it would interact with Android, but basically all of these have a HDMI port as well. It might be worth a try to see how Android handles the portrait/landscape stuff with an external display--connecting it to a cheap monitor might resolve some of that for you. I have some fuzzy recollection of doing this back in the day with a MHL adapter and the phone displaying portrait the right way up just with black space on the left and right on the screen.

Anker 332 with a charger connected, mouse and keyboard plugged in, and HDMI running to an external monitor might get you essentially a "desktop" experience with a single cable. If her laptop has a USB-C port as well, when that's working she may be able to just plug that in to make use of all the peripherals on that instead. Something like the 555 also has a SD card reader which could work as some shared storage for moving files between the devices just by plugging them in and saving them there.


While not in a Y cable format, there are small USB-C hubs that can do this.

If I plug a NVMe drive into my iPhone, my phone will run out of battery so quickly so I have to use a hub and plug in my charger at the same time.


There is no such thing as a spec compliant USB Y cable. Unless it's got some kind of internal USB hub. There is nothing the spec designers can do to account for non complaint ali express junk.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: