CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Xigbee network problem

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
razavi



Joined: 19 Jul 2010
Posts: 10

View user's profile Send private message

Xigbee network problem
PostPosted: Wed Sep 15, 2010 1:52 am     Reply with quote

Hi there, sorry for my newbie question.
I have 3 wireless ember zigbee development kit package.
From the book examples I can have unicast data transmission between pic16 small devices and 18f board as coordinator but when I try to join a network from pic18 board as sleepy device to another pic18 board as coordinator nothing happens.
//////////////////////////////////////////////////
Coordinator code :
Code:


#include <18F4620.h>
#fuses HS, NOWDT, NOLVP, PUT, NOBROWNOUT
#use delay(clock =10000000)
#use rs232(xmit=PIN_C7,rcv = PIN_C7,baud = 9600,)

#define COORDINATOR 1


#include "em260.h"
#include "ember_utilities.c"

#include<digit.h>
void main(void)
{
   EmberEUI64 emLocalEui64;
   EmberStatus Status;
   EmberApsFrame apsframe;
   int8 messagetag = 0x01;
   int8 messagedata[1];
   int messageLength;
   int16 indexOrDestination;

   printf("\n\r RESET ....");
   
   lcd_clear();
   if(EmberInitialization())
   {
   
      EmberConfig();
      EmberInitializeBinding();
      ezspGetEUI64(&emLocalEui64[0]);
      EmberAddEndPoint();
      EmberFormNetwork();
      Status=ezspPermitJoining(0xFF);     
      while(TRUE)
      {
         sinkApplicationTick();
         EM260Tick();
         lcd_putd(unicast_data);
      }
   }
}


Sleepy device code
Code:

#include <18F4620.h>
#fuses HS,NOWDT,NOLVP,PUT,NOBROWNOUT,NOPROTECT
#DEVICE ADC=8
#use delay(clock=10M)
#define SLEEPY_SENSOR 1
#include "em260.h"
#include "ember_utilities.c"
#include "digit.h"
void main()
{
   //int8 i;
   EmberStatus status;
   EmberEUI64 emLocalEui64;
   EmberApsFrame apsframe;
   int8 messagetag = 0x01;
   int8 messagedata[10];
   int messageLength;
   int16 indexOrDestination;
   
   
   if(EmberInitialization())
   {
      EmberConfig();
      EmberInitializeBinding();
      ezspGetEUI64(&emLocalEui64[0]);
      EmberAddEndPoint();
     
      EmberJoinNetwork(EMBER_SLEEPY_END_DEVICE);
      indexOrDestination = 0x0000;
      apsframe.profileID=0xC00F;
      apsframe.clusterID=0x0001;
      apsframe.sourceEndpoint=0x01;
      apsframe.destinationEndpoint=0x01;
      apsframe.options=0x0000;
      apsframe.groupID=0x0000;
      apsframe.sequence=0x00;
      messageLength=10;
      messagedata[0]=0;
      messagedata[1]=1;
      messagedata[2]=1;
      messagedata[3]=2;
      messagedata[4]=5;
      messagedata[5]=5;
      messagedata[6]=5;
      messagedata[7]=5;
      messagedata[8]=5;
      messagedata[9]=255;
      int i;
     
      while(TRUE)
      {
         EM260Tick();
         sensorApplicationTick();
         ezspSendUnicast(EMBER_OUTGOING_DIRECT,indexorDestination,&apsframe,messagetag,messageLength,&messagedata[0]);
         lcd_putd(i++);
      }
   }
}

Can anyone help about it ?

Regards
razavi



Joined: 19 Jul 2010
Posts: 10

View user's profile Send private message

PostPosted: Sun Sep 19, 2010 7:10 pm     Reply with quote

any one can help about it please ?
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group