Access XBee's data from Linux side of Yun

Hello,
How can we use the bridge library to access the data received by XBee (attached to ATMega side of Yun) on Linux side of Yun?

And can we also pass some data from Linux side of Yun to XBee attached to ATMega side? If yes then how?

Thanks in advance.

pchatrath:
Hello,
How can we use the bridge library to access the data received by XBee (attached to ATMega side of Yun) on Linux side of Yun?

And can we also pass some data from Linux side of Yun to XBee attached to ATMega side? If yes then how?

Thanks in advance.

"Use the bridge, Luke"... :grin:

Seriously, it doesn't matter really what your target/source of data is, the bridge (library) would be the default way of transferring data between the two "sides" of a Yun...

Ralf

With the latest image and IDE there are two basic ways of passing data. One is using Bridge.get/put, the other is using Mailbox. There are examples for both on the IDE (file->examples->Bridge). Check them out

Thanks for the help. :slight_smile:

Thanks PCWorxLA and Federico Fissore for the help. I tried to understand Bridge.get()/bridge.put() & Mailbox. I have few doubts:

  1. There are no direct examples of Bridge.get()/bridge.put() & Mailbox. So is it like going through the examples and finding what suites me?

  2. I tried to understand Bridge.get() and Bridge.put() from Forum posts and examples. What I understand so far is - I will be writing a sketch on Arduino side and BridgeClient.py() on linino side. I read we can purn pins on/off. But can I pass a variable's value from Linino to Arduino and viceversa using this same method?
    If yes then how can I integrate this code with the main code that I will be running both arduino side (to pass data wirelessly using XBee) and linino side (where I have my main work done)

  3. I also read this post: Using BridgeClient in Python Scripts. - #10 by system - Arduino Yún - Arduino Forum using which we can boost up the speed. What I don’t get is how we can implement this method. What will be the sketch related to it and how can I pass a variable using this method

  4. Can you suggest a link where I can understand more on Mailbox.

Thanks in advance!

The nightly builds of the IDE contain a MailboxReadMessage example http://arduino.cc/en/Main/Software#toc4
WRT to sending commands, take a look at TemperatureWebPanel example