I'm trying to connect my mouse to my phone but I broke my otg cable. So I split a slimport wire that fits my phone and matches the mouse wire and wired it together but when I plug it into my phone the mouse doesn't turn on or work at all. I checked both of them before spliting them and they both work. Instead of buying a new otg cable I want to figure out how else I can make it work by rewiring it somehow. Can anyone help on how to fix it or different ideas? I also reconnected the usb port.
As per Wikipedia, an OTG cable has to have an extra connection (ID) with a resistor or connection to ground.
Its value depends on how you want the devices to be powered / interact:
Short to GND - Becomes OTG A device
124 kΩ - A charger and either no device or an A-device that is not asserting VBUS (not providing power) are attached. The OTG device is allowed to charge and initiate SRP but not connect.
68 kΩ - A charger and an A-device that is asserting VBUS (is providing power) are attached. The OTG device is allowed to charge and connect but not initiate SRP.
36.5 kΩ - A charger and a B-device are attached. The OTG device is allowed to charge and enter host mode.
So I'm afraid that using a random micro USB cable will not work. You need to find one that has an internal connection to the extra pin(ID) and short it to GND: