Help with 3GS stuck in recovery mode

Good morning, I need some help. I have recently purchased an iPhone 3GS off Ebay. It is stuck in recovery mode, with the "Connect to iTunes screen".
If I connect it to iTunes and I start the restore process, it stays stuck in "waiting for iPhone". I've tried to do it from DFU mode but it is the same.
I've also tried to kick it off recovery mode with Tinyumbrella, but with no success: it went through some black screens with a lot of letters/numbers and then said "giving up".
I cannot jailbreak it because I don't know with iOS firmware it is installed... anyway I don't think that the jaibreak process would work either.
Any suggestion??
Thank you.