Arduino Yun and serial port over IP via ser2net ?

Hi, I have previously used Atheros A9331 with openwrt linux + Arduino boards on few projects, and I connect them over serial port and they work great together.

When I saw Yun being released I ordered it because I this product combines two devices I user previously in one, so I was really excited!

Now I'm having communication issues between two systems on Arduino Yun! I know there is bridge library, but because bridge libray is slower (python on linux is slower than bash that I used) and uses quite lot of space in Arduino memory I wanted just to use serial communication between Linino Linux and Arduino and to have serial connection between them.

When I test communication on Linino with sending some data to Arduino via "echo testing > /dev/ttyATH0" this works, but when I send data from serial console on Arduino I don't get data. After some figuring out I got data to be received back on Linino side.

Missing part was this in void (setup):

  Serial1.write((uint8_t *)"\xff\0\0\x05XXXXX\x0d\xaf", 11);

Then I setup ser2net so I can write and read serial data from network, and here is where I run into problems on Yun.

I can use netcat to send data, but when I open port from remote PC to read data I only get data for few seconds and then netcat drops connection.

Do you have any ideas why is this happening?

Wouldn't netcat drop an error message to indicate why the connection was dropped? Or does netcat stay open and something else dies? Or maybe its getting an end of buffer signal or something it needs to ignore. Like end of file?

I have used ser2net, but on the client side I use com0com and com2tcp. Of course this is for windows so I am not sure what is available Linux side.