Fixed serial writing. For bidirectional communication is no working. Be aware that gateway echoing the serial command leads to weird behaviour.