Question about Xbee wireless communication between two propeller microcontrollers

tomato1980tomato1980 Posts: 3
edited March 19 in Propeller 1 Vote Up0Vote Down
I have a question about Xbee wireless communication between two propeller microcontrollers.

I have two propeller board of education and two Xbee modules (XBee-PRO S2C 802.15.4 w/Wire Antenna)
I could achieved one direction communication, from one propeller to other propeller.
→One propeller just sends message and other propeller just receives the message.

But I wonder if I can achieve duplex communication between two propellers.

This means, can both propellers send and receive message by Xbee module at the same time for duplex communication?

Comments

  • 7 Comments sorted by Date Added Votes
  • Mike GreenMike Green Posts: 22,379
    edited March 19 Vote Up0Vote Down
    Have you looked in the OBEX (here for example)? What do you want to send back and forth? You can't quite have independent full-duplex communications (from your program's perspective because there are commands and responses going back and forth between each Propeller and its corresponding xBee module). These are full-duplex, but the radio channels are effectively half-duplex.
  • Admin: Thread moved to Propeller 1 category
  • Mike Green wrote: »
    Have you looked in the OBEX (here for example)? What do you want to send back and forth? You can't quite have independent full-duplex communications (from your program's perspective because there are commands and responses going back and forth between each Propeller and its corresponding xBee module). These are full-duplex, but the radio channels are effectively half-duplex.

    >>Mr.Mike. Thank you for your comment. What I want to do is・・・
    When there are propeller A and propeller B (each propeller has a Xbee module), A and B propellers send and receive messages each other at the same time.


    I attach the outline figure of what I want to do.


    1082 x 1050 - 111K
  • Setup your XBees for transparent mode, addressed to communicate with each other. Then treat the connection like a wired connection.
    Jon McPhalen
    -- please don't call me "Jonny"
  • Infernal Machine
  • JonnyMac wrote: »
    Setup your XBees for transparent mode, addressed to communicate with each other. Then treat the connection like a wired connection.
    Publison wrote: »

    Thank you guys, I understood page 25 in tutorial is similar to what I want to.
    But I am still confusing because I am trying to make wireless connection by propeller C in simple IDE(Not spin code).

    In my computer, simple IDE cannot read spin code・・・

    Thus, my confusing points are
    (1) How should I set my Xbee as a transparent mode in simple IDE?
    (2)
    For now, my c codes for one direction communication are
    ********transmitter side***********
    fdserial *xbee;

    int main()
    {
    xbee = fdserial_open(9, 8, 0, 9600);

    while(1)
    {
    dprint(xbee,"A");
    }

    }
    *****************************

    *********Receiver side**********
    fdserial *xbee;

    int main()
    {
    xbee = fdserial_open(9, 8, 0, 9600);
    char c;
    while(1)
    {
    c = fdserial_rxChar(xbee);
    print("data is %c",c);
    }
    }

    ********************************
    For this code, I should add another connection like a ybee for another wireless connection?
  • For this code, I should add another connection like a ybee for another wireless connection?
    No. The fdserial library has transmit and receive capabilities (fd is for full duplex). Review the library docs for details (I program in Spin so I can't help you).
    Jon McPhalen
    -- please don't call me "Jonny"
Sign In or Register to comment.