Post a new topicPost a reply Page 3 of 6   [ 51 posts ]
Go to page Previous  1, 2, 3, 4, 5, 6  Next
Author Message
 Post subject: Re: Kindly help on this ...i get wrong values
PostPosted: Wed Jul 18, 2012 10:42 am 

Joined: Mon Apr 16, 2012 8:34 am
Posts: 49
Hi Libelium,
Quote:
you may try the sendinga and receiving examples that you can find here. Remeber to turn on the mote once the network has been created and without any other ZB coordinator present.


Kindly elaborate the above quote in detailed steps so i can do it right.

thanks
manomac


Top
 Profile  
 
 Post subject: Re: Kindly help on this ...i get wrong values
PostPosted: Wed Jul 18, 2012 10:59 am 

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

you will find in the provided link two sample codes for ZigBee communication, upload them to your board and try to receive data in your gateway.

Be careful to turn on the mote once the network has been established by the coordinator of the gateway, and make sure that there is not any other coordinator connected to make sure the modules are connecting to the right network.

Regards.


Top
 Profile  
 
 Post subject: Re: Kindly help on this ...i get wrong values
PostPosted: Wed Jul 18, 2012 7:58 pm 

Joined: Mon Apr 16, 2012 8:34 am
Posts: 49
Hi Libelium,

this is what i did...
1. I tried & uploaded the sample code WaspXBeeZB_2_sending_receivingB to my waspmote board then i disconnected its USB from PC and
2. connected USB gateway then i powered on the mote.
3. opened the Libelium IDE & serial monitor but i didnt get any output

Im unable to find why waspmote & gateway doesnt communicate.

FYI
waspmote: "WZBP-SMA5 Waspmote ZB PRO SMA 5 DBI"
gateway: "WGZBP-SMA5Waspmote Gateway ZB PRO SMA 5 DBI"

Kindly validate my steps & help me get them communicating. :cry:

Many thanks
manomac


Top
 Profile  
 
 Post subject: Re: Kindly help on this ...i get wrong values
PostPosted: Thu Jul 19, 2012 9:40 am 

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

is it possible you modified any other parameters from your XBee modules apart from JV, such as the baudrate? We have a tutorial explaining how to configure the modules to establish a network and communicate with a gateway in Meshlium, I think it will help you to complete the information you can find in the ZigBee networking guide to configure properly your modules.

Regards.


Top
 Profile  
 
 Post subject: Re: Kindly help on this ...i get wrong values
PostPosted: Fri Jul 20, 2012 7:40 am 

Joined: Mon Apr 16, 2012 8:34 am
Posts: 49
Hi Libelium,

Please check this output.
http://i46.tinypic.com/2jcved4.png

After changing the JV, BD, AP using XCTU, i got the waspmote communicating.

Thanks Libelium :)
--------------------------------------------------------------------
Next I've GPRS-Pro by which i need to send temperature data by sms every 5 min after averaging the temperature values.

The example i referred is ------Waspmote GPRS_Pro Sending an SMS Example--------
.
.
if(GPRS_Pro.setTextModeSMS()) USB.println("Text Mode SMS OK");
.
.
if(GPRS_Pro.sendSMS("Test Message!","*********")) USB.println("SMS Sent OK");
.
.

In this function how to pass the temperature value for 5 min.
.
.
USB.print("Temperature: ");
USB.println(RTC.getTemperature(),DEC);
.
.

In simple terms: How to pass data in GPRS_PRO.sendSMS() function. or how to assign temperature to a variable and pass that data to GPRS_PRO.sendSMS() function.

Kindly help me on this...

Many thanks
manomac


Top
 Profile  
 
 Post subject: Re: Kindly help on this ...i get wrong values
PostPosted: Fri Jul 20, 2012 12:55 pm 

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

you can use sprintf to pass it to a string, something like this:

Code:
float temperature = RTC.getTemperature();
char temp[6];
char aux[20];
Utils.float2String(temperature, temp, 2);
sprinf(aux,"temperature: %s", temp);

Regards.


Top
 Profile  
 
 Post subject: Re: Kindly help on this ...i get wrong values
PostPosted: Fri Jul 20, 2012 1:06 pm 

Joined: Mon Apr 16, 2012 8:34 am
Posts: 49
Hi Libelium,

Code:
float temperature = RTC.getTemperature();
char temp[6];
char aux[20];
Utils.float2String(temperature, temp, 2);
sprinf(aux,"temperature: %s", temp);


Now which variable should be passed in GPRS_PRO.sendSMS() function to send the temperature as sms

Is it GPRS_PRO.sendSMS(aux, "**********");
or
GPRS_PRO.sendSMS(temp, "**********"); //* is replaced by mobile number

Kindly answer this part too..

Many thanks
Manomac


Top
 Profile  
 
 Post subject: Re: Kindly help on this ...i get wrong values
PostPosted: Fri Jul 20, 2012 1:31 pm 

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

it is aux which you should pass to the sendSMS function (in fact you can also use temp, which is also a string, aux is an example of how to build an array of characters including other type variables).

Regards.


Top
 Profile  
 
 Post subject: Re: Kindly help on this ...i get wrong values
PostPosted: Fri Jul 20, 2012 1:54 pm 

Joined: Mon Apr 16, 2012 8:34 am
Posts: 49
Kindly validate this piece of code:

float temperature = RTC.getTemperature();
char temp[6];
char aux[20];

Void setup()
{
if(GPRS_Pro.setTextModeSMS()) USB.println("Text Mode SMS OK");
if(GPRS_Pro.sendSMS("Test Message!","*********")) USB.println("SMS Sent OK");
}

Void loop()
{
USB.print("Temperature: ");
USB.println(RTC.getTemperature(),DEC);
Utils.float2String(temperature, temp, 2);
sprinf(aux,"temperature: %s", temp);
delay(500000);
if(GPRS_Pro.sendSMS(aux,"*********")) USB.println("SMS Sent OK");
}


Top
 Profile  
 
 Post subject: Re: Kindly help on this ...i get wrong values
PostPosted: Mon Jul 23, 2012 10:49 am 

Joined: Mon Apr 16, 2012 8:34 am
Posts: 49
In the following code im trying to pass temperature value in the GPRS_Pro.sendSMS() as string.
Kindly validate the following code because im uncertain whether it will execute as expected?

Thanks
manomac

Code:
float temperature = RTC.getTemperature();
char temp[6];
char aux[20];

void setup()
{
if(GPRS_Pro.setTextModeSMS()) USB.println("Text Mode SMS OK");
if(GPRS_Pro.sendSMS("Test Message!","*********")) USB.println("SMS Sent OK");
}

Void loop()
{
USB.print("Temperature: ");
USB.println(RTC.getTemperature(),DEC);
Utils.float2String(temperature, temp, 2); //float temp value is returned as string
sprinf(aux,"temperature: %s", temp); //aux stores the string
delay(500000);
if(GPRS_Pro.sendSMS(aux,"*********")) USB.println("SMS Sent OK");
}


Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 3 of 6   [ 51 posts ]
Go to page Previous  1, 2, 3, 4, 5, 6  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