C language serial file transfer (transmission between ARM boards)