How does the Arduino Bridge library works internally?

I have seen lot of links and all of them mention "how to use" the Bridge library, but doesn't explain "how it works".

So far my understanding is that, both AVR ATmega32u4 and Atheros AR9331, communicate with each other through serial connection. The AVR part of Bridge library communicates with Python code running inside linino through serial. Apart from it, I couldn't get anything else from the Bridge library example pages.

I know that I can read the source (which I am anyway doing), but it will be really nice if someone can kindly briefly explain (or point me to some link that explains) how the AVR and Python code communicate to each other internally. Also does the Python code listens to any port for web requests?

Thanks.

I found this blog helpful for understanding the bridge: Jan-Piet Mens :: Understanding Arduino Yún's bridge .

priority:
I found this blog helpful for understanding the bridge: Jan-Piet Mens :: Understanding Arduino Yún's bridge .

Thanks for the link. It touches on some of the high level stuff about Bridge library and is a good start.

But it would be nice if there is some more in-depth documentation about how the interface happens between AVR and Python code.

Hi Sudar
there is not yet an in-depth bridge code overview, but here are some basics.
The 32u4 accesses the linux terminal with its Serial1. That linux terminal is nothing but the prompt.
The 32u4 starts the bridge and puts the terminal in "binary" mode. We then invented a protocol assigning each individual function call from Bridge library a fixed identifier
So when you say Bridge.get("string") a handful of bytes are sent to the linux side telling we are going to get something from the bridge storage, than the actual key "string" is sent. Same goes for the response: a handful of bytes telling we are sending key "string" associated value followed by the actual value
Everything is CRCed, so that if some bytes got lost, the whole request/response is re-sent

Thanks for the pointers. I will use them as basics and will try to get more details by reading the code.

When I was going through the bridge library code, I also found that there is some process which is running in port 5700. Can you kindly shed some light on what this process does?

Thank you.

PS: I know that the library is still in its initial stages, but it would be really nice if the internals is documented, so that it will be easy for 3rd party developers and library creators.

The in memory storage is listening on port 5700

Thanks.

I guess, I will be able to figure out rest by looking into the code.