X-bee digimesh communication


hi,
i set 3 node network in digimesh.
i set 1 router , other 2 end device.
i connected 3 radios computer through usb explorer , x-ctu console found able communicate bidirectionally.
but when connected these 3 x-bee radios arduino using x-bee sheild,the communication not happening.
i loaded following program in arduino xbee radio configured router sends 'h' , 'l' alternatively.

code: [select]
void setup()
{
  serial.begin(9600);
}

void loop()
{
  serial.print('h');
  delay(1000);
  serial.print('l');
  delay(1000);
}


this program @ other 2 receiver ends of arduino.

code: [select]
byte byteread;
void setup() {               
// turn serial protocol on

  serial.begin(9600);
}

void loop() {
   /*  check if data has been sent computer: */
  if (serial.available()) {
    /* read recent byte */
    byteread = serial.read();
    serial.print("msg received");
    serial.write(byteread);
  }
}


when connected other 2 receivers using usb explorer , checked console in x-ctu. found receiving 'h' , 'l' properly.so guess there problem when interface arduino. can me in this?

hi,
i think found issue, named router transmits 'h' , 'l' '1' , other 2 receivers '2' , '3' .
its because since  there command in 2 receivers '2' , '3'

code: [select]
serial.print(''msg received");

the second receiver instead of getting data transmitter,it receives 3rd receiver output msg received serially , outputs msg received serially serial monitor.

when had 1 receiver , 1 transmitter, communication happening smoothly. guess issue interference between 2 receivers.

so changed code in sender send identification mark '1' , wrote program in receiver displays data got identification mark '1'.
here program @ sender

code: [select]
void setup()
{
  serial.begin(9600);
}

void loop()
{
  serial.print('1');
  serial.print('h');
  delay(1000);
  serial.print('1');
  serial.print('l');
  delay(1000);
}


the code @ receiver

code: [select]
byte byteread;
void setup() {               
// turn serial protocol on

  serial.begin(9600);
}

void loop() {
   /*  check if data has been sent computer: */
  if (serial.available()==2) {
    /* read recent byte */
    if(serial.read()==1)
    {
    byteread = serial.read();
    serial.write(byteread);
  }
  }
}


but didnt output receiver serial monitor. can me  code selectively display data particular node '1'
also want node '1 ' receive data other 2 nodes , display them in serial monitor also.any on front appreciated.


Arduino Forum > Using Arduino > Networking, Protocols, and Devices (Moderator: fabioc84) > X-bee digimesh communication


arduino

Comments

Popular posts from this blog

Connecting Raspberry Pi 2 to P10(1R)-V706 LED Dot Matrix - Raspberry Pi Forums

TypeError: <unknown> is not a numpy array - Raspberry Pi Forums

datso and removing imagetitle - Joomla! Forum - community, help and support