Question

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?

Was it helpful?

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.

OTHER TIPS

Nope. The debugger only works when the dock cable is connected via USB to the development system, and that automatically causes the device to charge. You will have to find another way to monitor what your app is doing.

No, but you should have your user turn on logging on their test device and then send you the logs. (Or if you are that tester, turn on logging in the Settings app, under "Developer".)

Perhaps you can log the low battery message and the Bluetooth status as well.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top