I'm trying to tackle a problem where I want to wall-mount a USB device on a brick wall that only has a single 2-wire (14AWG) cable available, and no room / capability to run a new cable or remove the current one (have tried both - it's an old house, who knows what is happening in the wall...)

I plan to plug a 240 V AC (Aus) to 5 V DC transformer (can be another transformer - the cable is NOT rated for 240 VAC however) in the roof space, and connect it to the cable. The other end of the cable comes out of a small hole in the wall (probably around 70mm high x 50mm wide x 30mm deep that I can put a small circuit board into.

The problem is that, as I am sure everyone here knows, you can't charge a modern USB device (based on my tests) using just 2 wires, a USB cable for charging these devices has 4 wires, it needs "something" on the two data (+/-) cables.

It is that "something" that I want to put in the wall, where there is limited space. I assume that this will be some sort of circuit that convinces devices that they are OK to charge, simulating (??) the communication that would normally happen on the 2 data wires inside a USB cable, effectively a very small DC-to-DC USB charger.

Is there anything off-the-shelf that can be bought to go from 2-wire to a (4-wire) female USB Type-A plug that allows the device to receive power? I'm also happy to put something together myself if anyone can point me at a circuit diagram :-)

Thanks in advance, hope all that made sense!