Post a new topicPost a reply Page 1 of 3   [ 21 posts ]
Go to page 1, 2, 3  Next
Author Message
 Post subject: Create Network
PostPosted: Tue Dec 13, 2011 1:50 pm 

Joined: Mon Dec 12, 2011 1:20 pm
Posts: 27
Hi
I'm new in using WaspMote and i want to install: Waspmote XBee 802.15.4 Creating a Network Example... but i have this message:

avrdude: stk500_getsync(): not in sync: resp=0x30
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

Please help me. How can i do exactly ...
I want to know what Baud i use: 9600, 38400,115000,... ???

It is the same message when i want to install Hello world presented here:
viewtopic.php?f=14&t=7700

Regard.


Top
 Profile  
 
 Post subject: Re: Create Network
PostPosted: Wed Dec 14, 2011 3:38 pm 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7455
Hi,

Do you remove the XBee module when you try to upload the code?

Best regards


Top
 Profile  
 
 Post subject: Re: Create Network
PostPosted: Thu Dec 15, 2011 2:15 pm 

Joined: Mon Dec 12, 2011 1:20 pm
Posts: 27
Hi
ThankYou for for the reply... and the problem is solved.

I have 2 question:
First, can upload a send-reveived application on the GateWay ??

Second, Can i, or how to create a file and save the value provided from waspMote with gps attached received by the GateWay ( value shown in the interface Serial Monitor).

Regards


Top
 Profile  
 
 Post subject: Re: Create Network
PostPosted: Thu Dec 15, 2011 2:44 pm 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7455
Dear ghorbel,

Yes, this is in the "Read Me First" post. Did not you executed that before writing the post?
viewtopic.php?f=14&t=7700

It is highly advised for new users to read the "Read Me First" post.

Regarding your new questions:
1 - no, you cannot upload code in the Gateway since it does not have a microcontroller like Waspmote. It is just an interface which takes the incoming data from the wireless frames, and puts it in the USB line. And the opposite action is also possible.

2 - I believe you want to log or store the incoming frames. This feature is not implemented in Waspmote but in other product by Libelium, Meshlium, which is supposed to be used in this kind of projects. It can even parse and store the data into a convenient MySQL data base.

Other options:

2.1 - you can just copy and paste the data in a txt file (obvious). Most people do this.

2.2 - there are programs, like CuteCom, which apart from showing the incoming data, they can save that in a log file. Everything is explained in the "Read Me First" post (step 19).

2.3 - if you use Linux you can use some quick commands in the console to save your incoming data automatically in a txt file.

2.4 - you can write some code, in C or Java for example, to do a "serial port sniffer".
There are related projects implemented by the community which can help you:
http://www.arduino.cc/cgi-bin/yabb2/YaB ... 1233335474


Best regards


Top
 Profile  
 
 Post subject: Re: Create Network
PostPosted: Thu Dec 22, 2011 3:49 pm 

Joined: Mon Dec 12, 2011 1:20 pm
Posts: 27
Hi
Thank you for the reply...

Now i want to communicate with 2 motes, so Mote1 send message to Mote 2 and Mote 2 send it to the gateWay (GW).

I used the Waspmote XBee 802.15.4 Sending & Receiving Example and it work perfectly when i send message from mote 1 to GW (the same for Mote 2)... but when i want to send message from mote1 to GW with mote2 intermediate it is not possible...

My question is for the intermediate node2, i use the Waspmote XBee 802.15.4 Sending_ReceivingB Example or Waspmote XBee 802.15.4 Sending_Receiving Example.?????

I hope that my question is clear...

Please tel me what can i do and what is the change of code that should be to use.

Regard


Top
 Profile  
 
 Post subject: Re: Create Network
PostPosted: Tue Dec 27, 2011 12:44 pm 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7455
Hi ghorbel,

In this example http://www.libelium.com/development/waspmote/example040 you have the code for both Wasmpotes, one of them send "Test message!" to the other Waspmote and this send answer when receives the message.

You will have to change the MAC address here:

Code:
xbee802.setDestinationParams(paq_sent, "0013A20040304F78", data, MAC_TYPE, DATA_ABSOLUTE);


Using the MAC address of your XBee (in Waspmote 2)

regards


Top
 Profile  
 
 Post subject: Re: Create Network
PostPosted: Wed Dec 28, 2011 2:37 pm 

Joined: Mon Dec 12, 2011 1:20 pm
Posts: 27
Hi Libelium-Dev
Thank you for the reply and all it's OK.

Now i want to know the Meshlium Mac-adress to connect Waspmote to it, so please tell me the command that i tape to know the meshlium Mac-adress.

xbee802.setDestinationParams(paq_sent, "Mechlium Mac-adress (????)", data, MAC_TYPE, DATA_ABSOLUTE);

i hope that my question is clear...

Regard
Ghorbel


Top
 Profile  
 
 Post subject: Re: Create Network
PostPosted: Thu Dec 29, 2011 10:16 am 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7455
Hi ghorbel,

Here you have a guide, where you can see how to get the MAC address of your XBee in Meshlium.

http://www.libelium.com/development/mes ... figuration

regards


Top
 Profile  
 
 Post subject: Re: Create Network
PostPosted: Thu Dec 29, 2011 1:31 pm 

Joined: Mon Dec 12, 2011 1:20 pm
Posts: 27
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


Top
 Profile  
 
 Post subject: Re: Create Network
PostPosted: Thu Dec 29, 2011 2:29 pm 

Joined: Mon Dec 12, 2011 1:20 pm
Posts: 27
Hi libelium-dev
I have a stuped question: i don't know how to insert image in forum ???
because i want to insert image and i can do it... please tell me how can i do.

Thanks

Regard
Ghorbel


Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 3   [ 21 posts ]
Go to page 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:


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