How to transfer bytes over the bridge?

Hi everybody,

i read all documentation and searched through a lot of forum posts, but i cannot find an answer to my question.

i want to send raw data (bytes/chars) over the bridge in both directions. on the linux side i'm using a python script to get the data.
currently i tried tried to use the Bridge.get/put methods from the bridge library but the problem is that the method only accepts strings. so when i try to send raw bytes like this 0x00FF00FF i only receive an empty string on the linux side in my python script because of the string termination.

this is part of my current implementation on the arm side where 'b' is the data i want to send:

int sendData(unsigned char *b, int sizeInBytes) {
    Bridge.put("data", (const char*) b);
}

And this is the linux python script part:

from bridge.bridgeclient import BridgeClient as bridgeclient
yunbridge = bridgeclient()
data = yunbridge.get('data')
print "Data (Size: ", len(data), ")"

Currently i only got it working if i'm using the file API by writing a file with the data from the arm part on the linux part and afterwards reading it out with the python script.
but this took over 1 second so it's way to slow.

hope you can help me, thanks

You can use the Serial communication.

You can use Serial1.write( ) to write bytes from the Arduino to the Linino.
To write from Linino to Arduino you can normally print your byte as character to stdout and it will be sent to the Atmega.

Look at this sketch and you will see how you can send byte/char from one side to another http://arduino.cc/en/Tutorial/YunSerialTerminal