Wouldn't the easiest way to use netcat over the tcp connection (which is already there)? Than you don't have to go the way over the sdcard?