Fixed serial writing. For bidirectional communication is no working. Be aware that gateway echoing the serial command leads to weird behaviour.
Merge pull request #2 from kolaf/master

Fixed serial writing. For bidirectional communication is now working.