Any pointers on how to initiate serial communication with the iphone? Or any other idea to interact with external hardware?
It depends on what you want to do. For an SSH terminal connection I reccomend TouchTerm (search the appstore).
I have no experience with electrical connections, but you can find the pinout of the iPod/iPhone connector here: http://pinouts.ru/PortableDevices/ipod_pinout.shtml
You can then download the iPhone developer kit here: http://developer.apple.com/iphone/
The only supported way to connect external hardware to the iPhone is through the iPod accessory protocol, through the 30-pin connector. Details on that program are at http://developer.apple.com/ipod/accessories.html. It isn't a free program and the 30-pin connector only supports certain features, but it's the only option available today.
Apps compiled with the unofficial toolkit (and running on jailbroken iPhones) can supposedly access the serial port present in the dock connector.
See: http://devdot.wikispaces.com/Iphone+Serial+Port+Tutorial