the only way of fixing this is to open up the iPhone and change thepart that connects to the cable, I'm sure you can find the partsomewhere and the internet. Like on iFixit
After u change the part of hardware everything was works smoothHow to Charge an iPhone
The easiest way to charge an iPhone is toplug it into the USB port of a computer or use the wall chargersupplied with it. But what if you want to charge it in the car with acar charger? I'm sure some of you have tried it. You can't because theiPhone doesn't charge like other normal USB devices. Just by supplying5 volts to the USB cable of the iPhone will not charge it. That's whymost car chargers will not work with the iPhone.
An iPhone taking charge.
Today I decided to discover the secret behind how the iPhoneinitiate its charging sequence. I tried plugging it into a few ordinaryUSB chargers which supplies 5 volts to pins 1 and 4 (refer diagrambelow). As expected, the iPhone refused to charge. Then I turned myattention to the iPhone's wall charger.
Image courtesy: wikipedia.com
Before I get into the interesting bits, a little basics here. AUSB charger supplies a regulated 5 volts to pins 1 and 4, with 1 being+5v and 4 being 0v. When a USB device is plugged in, it draws powerthrough pins 1 and 4. The device also draws power from there to chargeitself. So it would seem that just by supplying 5 volts to pins 1 and 4would be sufficient to charge a device. But that is not the case forthe iPhone (and I'm sure there are other devices that are built thatway too). Alright, enough of the basics, back to our experiment.
By measuring the output of all of the pins on the iPhone wallcharger, I realised that it gave a an additional reference voltage onpins 2 and 3 (Note: on normal USB car chargers, pins 2 and 3 are notconnected). On pin 2, with reference to ground, it was 2.5 volts. Onpin 3, with reference to ground, it was 1.8v. So I came up with thehypothesis that those reference voltages tell the iPhone to startcharging.
To test this hypothesis, I removed the reference voltages andsure enough, the iPhone refused to charge. Even removing either onewill result in the iPhone not charging. Interestingly, once the iPhoneis charging (with the reference voltages applied), I can remove thereference voltages and the iPhone will still keep on charging. But, ifI apply the charging voltage initially without the reference voltages,and then only after that I apply the reference voltages, the iPhonestill will not charge. So I came to the conclusion that the iPhone willonly charge if the reference voltages are present when the chargingvoltage is applied.Updated schematic!
I way way prefer to draw on paper than use a schematic software to draw nice schematics.
Using the voltage divider setup above, you'll be able to get the1.8v and the 2.5v reference voltages. The iPhone was only drawing about10 microAmps or 0.01mA from the reference voltages so large resistorvalues are acceptable. By supplying these reference voltages to pins 2and 3 of the USB connector, you should be able to fool your iPhone intothinking it is plugged into the wall charger and it should startcharging immediately, in theory. I mean, how hard is it to tricksomething that has no brain?
Anyways, a disclaimer here. I have not built a charger usingthis method yet so I cannot guarantee that it will work. And althoughit is almost impossible to destroy your iPhone by using the circuitabove, I hereby declare that I take no responsibility for whatever thathappens to your iPhone. This is just a proof-of-concept that I came upwith and will hopefully be trying it out very soon.