Hi libelium-dev
Thank you for the reply...
All it's ok and i get the Meshlium Mac-adress and now i want to connect waspmote to the meshlium and see the data provided by the waspmote.
All the PANID, channel, ... are ok and this the code uploaded in waspmote:
Code:
/*
* ----- wasp_start_program_full_802_v1------
*/
packetXBee* paq_sent;
int8_t state=0;
long previous=0;
char aux[200];
char* macHigh=" ";
char* macLow=" ";
int aux_1 = 0;
int aux_2 = 0;
uint8_t PANID[2]={0x33,0x32};
#define key_access "LIBELIUM"
uint8_t direccion[8]={0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF};
void setup(){
// Store key access in EEPROM
for(int i=0;i<8;i++){
Utils.writeEEPROM(i+107,key_access[i]);
}
RTC.ON();
ACC.ON();
XBee.setMode(XBEE_ON);
XBee.begin(9600);
delay(1000);
XBee.print("+++");
delay(2000);
XBee.println("ATBD5,AP2,WR,CN");
delay(150);
XBee.setMode(XBEE_OFF);
XBee.close();
Utils.setLED(LED0, LED_ON);
Utils.setLED(LED1, LED_ON);
delay(5000);
Utils.setLED(LED0, LED_OFF);
Utils.setLED(LED1, LED_OFF);
for (int i=0;i<24;i++){
Utils.blinkLEDs(125);
}
// Inits the XBee 802.15.4 library
xbee802.init(XBEE_802_15_4,FREQ2_4G,NORMAL);
// Powers XBee
xbee802.ON();
// Get the XBee MAC address
delay(500);
int counter = 0;
while(xbee802.getOwnMac()==1&&counter<4){
xbee802.getOwnMac();
counter++;
}
Utils.hex2str(xbee802.sourceMacHigh,macHigh,4);
Utils.hex2str(xbee802.sourceMacLow,macLow,4);
}
void loop()
{
// Chosing a channel : channel 0x0C
xbee802.setChannel(0x0C);
if( !xbee802.error_AT ) XBee.println("Channel set OK");
else XBee.println("Error while changing channel");
// Chosing a PANID : PANID=0x3332
xbee802.setPAN(PANID);
if( !xbee802.error_AT ) XBee.println("PANID set OK");
else XBee.println("Error while changing PANID");
sprintf(aux,"-mac:%s%s -x:%d,y:%d,z:%d -temp:%d -bat: %d%c%c%c",macHigh,macLow,ACC.getX(),ACC.getY(),ACC.getZ(),RTC.getTemperature(),PWR.getBatteryLevel(),'%','\r','\n');
paq_sent=(packetXBee*) calloc(1,sizeof(packetXBee));
paq_sent->mode=BROADCAST;
paq_sent->MY_known=0;
paq_sent->packetID=0x52;
paq_sent->opt=0;
xbee802.hops=0;
xbee802.setOriginParams(paq_sent,MAC_TYPE);
xbee802.setDestinationParams(paq_sent, "0013A20040777FB7", aux, MAC_TYPE, DATA_ABSOLUTE);
xbee802.sendXBee(paq_sent);
free(paq_sent);
paq_sent = NULL;
delay(1000);
}
There are any problem in the code???
The configuration of Meshlium are ok.
But until now , i can't see the data provided from my waspmote when i use button "Show me Now"
i see the old date stored in meshlium ...
Please tell me how can i do???
Regard
ghorbel