UDP/ethernet communications using bridge

Hi, I am coming from using an arduino that can use the ethernet library

as I am aware from reading the Yun's documentations, the ethernet(and wifi) directly interfaces with the linino side as opposed to directly to the MCU.

now I'm looking to port old codes that used the ethernet library to the Yun, from experimenting it looks like using bridge.put() and bridge.get() might be the way to go but as the two processors run asynchronously I would have to control a "ready bit" on the bridge to facilitate transfers of strings and this would need considerable editing.

looking into it further, I came across this library but I have no idea how to use it. (or if it's even related to my intended purpose). There's no documentation on the github page. Can anyone point me to the right direction?

From a quick glance, that "library" looks like the Linux side Python code to talk to the Bridge Library that comes with the Arduino IDE. That code should already be installed on your Yun.

I don't think you will find a library that allows you to run Ethernet Shield code with a minimum of changes. The way the networking on the Yun works is very different and much more advanced and powerful than the Ethernet Shield style code. A line-by line translation is not practical.

A significant rewrite is likely to be needed, and that is a good opportunity to analyze what's really happening: odds are you can move quite a bit of the code to the Linux side for better performance and easier implementation, not to mention saving A LOT of the limited memory in the '32U4 sketch processor.

Don't think of the Yun as an Arduino with a Linux processor tacked onto it. Think of it as a powerful Linux networking router/processor, with an Arduino tacked onto it. Most of what you used to do in the sketch can probably be done better on the Linux side, especially any networking.

KUM4: now I'm looking to port old codes that used the ethernet library to the Yun, from experimenting it looks like using bridge.put() and bridge.get() might be the way to go but as the two processors run asynchronously I would have to control a "ready bit" on the bridge to facilitate transfers of strings and this would need considerable editing.

Bridge.get and Bridge.put are two method used to share data between the two systems. If you want to use the Ethernet connection it is better using the Http class https://www.arduino.cc/en/Reference/YunHttpClientConstructor or the YunClient class https://www.arduino.cc/en/Reference/YunClientConstructor

Then you can use the bridge.put and get methods to modify a shared variable used like "ready bit"