Post a new topicPost a reply Page 2 of 3   [ 28 posts ]
Go to page Previous  1, 2, 3  Next
Author Message
 Post subject: Re: spend via xbee ZigBee faster
PostPosted: Mon Jul 30, 2012 1:20 pm 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7516
melisandroid,

Could you please be more specific?

Regards


Top
 Profile  
 
 Post subject: Re: spend via xbee ZigBee faster
PostPosted: Mon Jul 30, 2012 1:59 pm 

Joined: Thu Jul 05, 2012 2:13 pm
Posts: 24
hi !!!!

MY xbee support transparent mode .So as you said me i try it to transmit my packets but still packets are spend a lot of time for transmission .As well as some packets with this mode was not received ....
:ugeek:

regards


Top
 Profile  
 
 Post subject: Re: spend via xbee ZigBee faster
PostPosted: Mon Jul 30, 2012 2:39 pm 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7516
melisandroid,

Could you please post the modified code you are using?

Regards.


Top
 Profile  
 
 Post subject: Re: spend via xbee ZigBee faster
PostPosted: Mon Jul 30, 2012 2:59 pm 

Joined: Thu Jul 05, 2012 2:13 pm
Posts: 24
hi !!!
Instead of this paq_sent->mode=BROADCAST; i use this paq_sent->mode= TRANSPARENT;
as well as i change my xbee from router api to router end device;

Do i something wrong ?

regards


Top
 Profile  
 
 Post subject: Re: spend via xbee ZigBee faster
PostPosted: Mon Jul 30, 2012 4:14 pm 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7516
melisandroid,

This line is incorrect.

Could you post entire code? (or, at least, the sending part).

Regards


Top
 Profile  
 
 Post subject: Re: spend via xbee ZigBee faster
PostPosted: Tue Jul 31, 2012 11:58 am 

Joined: Thu Jul 05, 2012 2:13 pm
Posts: 24
ho


this the code in loop .this code compile successfully

void loop(){






if (flag==1){


paq_sent=(packetXBee*) calloc(1,sizeof(packetXBee)); //desmeusi mnimis
paq_sent->mode=TRANSPARENT;
paq_sent->MY_known=0;
paq_sent->packetID=0x52;
paq_sent->opt=0;
xbeeZB.hops=0;
xbeeZB.setOriginParams(paq_sent,MAC_TYPE);

flag=0;

}

va = analogRead(ANALOG1); // Read the input ANALOG1 and store its value in val
va1 = (((millis()-previous) )/1000);
delay(200);

va2 = analogRead(ANALOG1); // Read the input ANALOG1 and store its value in val
va3=(((millis()-previous) )/1000);
delay(200);

va4 = analogRead(ANALOG1); // Read the input ANALOG1 and store its value in val
va5=(((millis()-previous) )/1000);
delay(200);

va6 = analogRead(ANALOG1); // Read the input ANALOG1 and store its value in val
va7=(((millis()-previous) )/1000);

sprintf(aux,"1-input:%d , %d -input:%d , %d -input:%d , %d -input:%d , %d , %c %c %c",va,va1,va2,va3,va4,va5,va6,va7,'%','\r','\n');

xbeeZB.setDestinationParams(paq_sent, "0013A200403A8BBF", aux, MAC_TYPE,DATA_ABSOLUTE);

xbeeZB.sendXBee(paq_sent);





regards


Top
 Profile  
 
 Post subject: Re: spend via xbee ZigBee faster
PostPosted: Tue Jul 31, 2012 1:16 pm 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7516
Melisandroid,

This line paq_sent->mode=TRANSPARENT; is not correct. Mode can only be UNICAST or BROADCAST.

OK, now forget about transparent mode because only a few firmwares are compatible with this mode.(20xx (AT coordinator), 22xx (AT router), and 28xx (AT end device)).

Please, take a look at section 8.6.6 of Zigbee networking guide where an example of sending without API header is used.

Your sending part would be similar to next lines
Quote:
void setup()
{
  // Inits the XBee ZigBee library
  xbeeZB.init(ZIGBEE,FREQ2_4G,NORMAL);

  // Powers XBee
  xbeeZB.ON();
  
  //(...)

}

void loop {

  //(...)

  char* data;

  for(int c=0;c<50;c++) // Set the data
  {
    data[c]=’A’;
  }
  
  xbeeZB.send(“0013A2004030F66A”,data);

  //(...)

}


Regards


Top
 Profile  
 
 Post subject: Re: spend via xbee ZigBee faster
PostPosted: Wed Aug 01, 2012 10:59 am 

Joined: Thu Jul 05, 2012 2:13 pm
Posts: 24
hi again ....


i try this but i the wasp-mote does not send anything to the gateway . I change the mac address from the example that you send me to my mac address .


Top
 Profile  
 
 Post subject: Re: spend via xbee ZigBee faster
PostPosted: Wed Aug 01, 2012 5:57 pm 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7516
melisa,

We send you a dummy code to show the basic shape for a code. PLease use next code and set your coordinator MAC. It is a simple test where you can see that a packet is sent every 20 milliseconds.

Please be sure your XBee Zigbee modules are properly configured as we mentioned in previous post.
Quote:
long timeShot;
char data[20];

void setup(){

  USB.begin();
  USB.println("start");

  // Inits the XBee ZB library
  xbeeZB.init(ZIGBEE,FREQ2_4G,NORMAL,UART1);

  // Powers XBee
  xbeeZB.ON();

}

void loop(){
  USB.println("loop");

  timeShot = millis(); // get timestamp
  sprintf(data,"%lu\n\r",timeShot);

  USB.print("millis: ");
  USB.println(data);

  // Set here your MAC
  xbeeZB.send("0013A20040614BA0",data);ç
}


Top
 Profile  
 
 Post subject: Re: spend via xbee ZigBee faster
PostPosted: Tue Aug 07, 2012 11:59 pm 

Joined: Thu Jul 05, 2012 2:13 pm
Posts: 24
HI

i try this code and i get correct packet in usb port but i do not get anything in my gateway

regards


Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 2 of 3   [ 28 posts ]
Go to page Previous  1, 2, 3  Next


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Libelium theme based on 610nm Style by Daniel St. Jules of http://www.gamexe.net


© Libelium Comunicaciones Distribuidas S.L. | Terms of use