Search code examples
iphonedebuggingipod-touchbattery

Debugging battery warning


I have an app that connects to an external accessory via Bluetooth. Testers have reported that the connection gets dropped when "Low Battery" alert is displayed. This was reported on iPod touch 2nd gen., so it may be peculiar to that device.

I am wondering if there is a way to run my app in debugger (connected to my computer) without charging the device. In other words, is there a way to disable USB charging of a device whose battery is not fully charged?


Solution

  • I have not tried it, but it is possible / likely you can do this by cutting the power cable within the usb cable.

    I would buy a cheap usb extension cable (male <-> female), and carefully cut it open (remove the outer plastic in the middle of the cable without damaging the wires inside).

    If you are lucky, there'll be a red cable, and that red cable will be the +5V line - if not, you'll have to use a multimeter to test which cable is pin 1 / +5V / VCC (pinout here: http://pinouts.ws/usb-pinout.html ). Once you identify it, cut that cable (and only that cable!).

    Then plug your iphone/ipod into your PC using your new cable, and the iphone will hopefully still work with the debugger but will no longer charge.


    As an aside, I could imagine the possibility that bluetooth is automatically disabled (or switched to a lower power mode) when the battery gets low - in which case losing the connection may be inevitable. You could try asking apple support if they are aware of anything like that.