iPhone 3GS stuck in recovery

iiphone stuck in recovery mode
i left my iphone in charging .and after 15 -20 min it was in recovery mode .i tries every thing tinyumbrella recovey fix , redsn0w recovry fix , ireb recovry fix , tried to restore it to ios 6.1.3 through itune .i tried every thing . when ever i try to restore it . it says . waiting for device then error 40 , it also fixed host file then also says error 40 , tried ireb dfu mode but again same error ...help ! ....
is it a harware issue / or it is software issue
"tinyumbrella" is a tool to put out from recovery mode

Original thread: https://forums.imore.com/threads/iphone-3gs-stuck-in-recovery.276640/