Post a new topicPost a reply Page 3 of 5   [ 43 posts ]
Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
 Post subject: Re: Help Required
PostPosted: Mon Jul 23, 2012 6:36 am 

Joined: Wed Jul 11, 2012 11:53 am
Posts: 23
Dear Sir,
Thank you very much for your kind reply.
Basically,we have two problem and if any one of them is solved our problem will be solved.
1. The first problem is the given given below is working fine with wireless communication but the problem is with the output at the serial monitor. The out put is given below which is not understandable.

packetXBee* paq_sent;
int8_t state=0;
long previous=0;
int g=0;
uint8_t PANID[2]={0x12,0x34};
float value_temperature = 0;
char temp[10];

void setup()
{
// Inits the XBee 802.15.4 library
xbee802.init(XBEE_802_15_4,FREQ2_4G,NORMAL);

// Powers XBee
xbee802.ON();
}

void loop()
{
// Set params to send
value_temperature = SensorAgr.readValue(SENS_AGR_TEMPERATURE);
// --- coversion equation---
value_temperature = ( value_temperature - 0.5 ) * 100;
Utils.float2String(value_temperature,temp,2);
sprintf("\n",temp);
paq_sent=(packetXBee*) calloc(1,sizeof(packetXBee));
paq_sent->mode=UNICAST;
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, "0013A200407620F5",temp, MAC_TYPE, DATA_ABSOLUTE);
xbee802.sendXBee(paq_sent);
if( !xbee802.error_TX )
{
XBee.println("ok");
}
free(paq_sent);
paq_sent=NULL;

delay(500);
}


Output:

~}3¢@v ÎGR#}3¢@v Î0.32L~€}3¢@v ÎCR#}3¢@v Î-6.45~€}3¢@v Î?R#}3¢@v Î-13.2
2ô~€}3¢@v Î:R#}3¢@v Î-17.09ð~€}3¢@v Î:R#}3¢@v Î-20.64õ~€}3¢@v Î:R#}3¢@v
Î-22.90ô~€}3¢@v Î:R#}3¢@v Î-24.83ð~€}3¢@v Î:R#}3¢@v Î-26.45ð~€}3¢@v Î<R
#}3¢@v Î-27.74ë~€}3¢@v Î=R#}3¢@v Î-28.70í~€}3¢@v Î:R#}3¢@v Î-29.35î~€}3¢
@v ÎBR#}3¢@v Î-30.32ñ~€}3¢@v ÎFR#}3¢@v Î-30.00ò~€}3¢@v ÎLR#}3¢@v Î-29.67
×~€}3¢@v ÎFR#}3¢@v Î-32.58ã~€}3¢@v ÎFR#}3¢@v Î-30.64è~€}3¢@v ÎFR#}3¢@v
Î-29.35â~€}3¢@v ÎCR#}3¢@v Î-28.06è~€}3¢@v Î@R#}3¢@v Î-30.00ø~€}3¢@v Î@R#
}3¢@v Î-30.96é~€}3¢@v ÎBR#}3¢@v Î-29.35æ~€}3¢@v ÎDR#}3¢@v Î-30.00ô~€}3¢@
v ÎBR#}3¢@v Î-32.90ë

2. Our second problem is simple wireless communication such as sending a "Hello world " and printing it at the serial monitor. we have tried different codes but non of them is able to give out put at the serial monitor, a sample code is given below which is successfully compiled and uploaded but no out put at serial monitor.

void setup()
{
SensorAgr.setBoardMode(SENS_ON);
SensorAgr.setSensorMode(SENS_ON, SENS_AGR_RADIATION);
RTC.begin();
delay(100);
SensorAgr.setAnemometerThreshold(90.0);
}
void loop()
{
RTC.begin();
delay(100);
XBee.setMode(XBEE_ON);
XBee.begin(38400);
delay(100);
XBee.println("Baba G");
delay(100);
}



void setup()
{
SensorAgr.setBoardMode(SENS_ON);
SensorAgr.setSensorMode(SENS_ON, SENS_AGR_RADIATION);
RTC.begin();
delay(100);
SensorAgr.setAnemometerThreshold(90.0);
}
void loop()
{
RTC.begin();
delay(100);
xbee802.ON();
delay(100);
xbee802.send("0013A200407620F5","Hello World");
delay(100);
}



Kindly, sir send us a tested and simplified code( able to communicate wirelessly and printing just "hello world" at the serial monitor) so that we can start our project. we will be thankful indeed.


Top
 Profile  
 
 Post subject: Re: Help Required
PostPosted: Mon Jul 23, 2012 9:59 am 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7501
rahimgiki,

Let's try to answer your doubts.

Regarding your first code, the output is right. But maybe you did not get why these non readable characters are there. Well, in the output you copied you can see temp values as readable numbers (in red), and other strange characters which corresponds to commands sent from Waspmote to XBee module, just to tell XBee module what it should do (blue values).
output wrote:
ÎBR#}3¢@v Î-29.35æ~€}3¢@v ÎDR#}3¢@v Î-30.00ô~€
this is due to you are only sending temp variable which contains temperature number. Also values are negative so you are not connecting right temp sensor.

try to send next line:
Quote:
xbee802.setDestinationParams(paq_sent, "0013A200407620F5","Hello world", MAC_TYPE, DATA_ABSOLUTE);
You will see "hello world in the output.

We kindly ask you to test example codes and use them as a start point.

After the conversation we have had, it seems you may be interested in a special support service or a customized engineering service.

As you will know, we are Wireless Sensor Networks hardware manufacturers. On addition to that, we provide with a complete software system to control our hardware and comprehensive documentation. We are committed to support the clients in the development process through the forum, but we cannot implement the final solution for each project.

Some clients just do not want to implement the software for their projects and prefer us to do it for them, or maybe they find it complicated. In these cases we offer special services like:
1. a number of one-to-one support hours with one engineer on our online e-learning platform. You can have direct line with one of our experts and if you like we can access your desktop in a remote way.
2. general training courses which are a great introduction to our systems.
3. specific training course, focusing on the features and modules you need to handle.
4. customized engineering: you can let us know the list of tasks your system needs to work out, and our R&D Dept. can develop all the project for you.


Please visit this area regarding training: http://www.libelium.com/products/training
and this one about custom engineering: http://www.libelium.com/products/services

Do not hesitate to ask any questions you may have.

Best regards


Top
 Profile  
 
 Post subject: Re: Help Required
PostPosted: Mon Jul 23, 2012 1:40 pm 

Joined: Wed Jul 11, 2012 11:53 am
Posts: 23
Dear Sir,
Thanks for your kind reply.
But our problem still stands. we do not want libelium to write complete code for us.
We are only concern with the out put that how we could remove these unknown characters from it appears at the serial monitor. The program and its output are as under

void setup()
{
SensorAgr.setBoardMode(SENS_ON);
SensorAgr.setSensorMode(SENS_ON, SENS_AGR_RADIATION);
RTC.begin();
delay(100);
SensorAgr.setAnemometerThreshold(90.0);
}
void loop()
{
RTC.begin();
delay(100);
xbee802.init(XBEE_802_15_4,FREQ2_4G,NORMAL);
xbee802.ON();
delay(100);
xbee802.send("0013A200407620F4","Hello World");
delay(100);
}


https://picasaweb.google.com/111680972601820928934/SerialMonitorOutput#5768327277645144546


Waiting for your fruitful reply.....
Thanks.


Top
 Profile  
 
 Post subject: Re: Help Required
PostPosted: Mon Jul 23, 2012 2:19 pm 

Joined: Wed Nov 10, 2010 9:45 am
Posts: 271
Location: Australia
Both nodes set to AP=2?

check with X-CTU, upgrade firmware, and test again.


Top
 Profile  
 
 Post subject: Re: Help Required
PostPosted: Tue Jul 24, 2012 8:56 am 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7501
rahimgiki,

Why don't you follow example structure? We think you still do not get how affects each code line to Waspmote modules and also the meaning of what you name as unknown characters.

We provide examples of each module working separately and we leave for our clients to merge these examples following their needs.

We provide a lot of documentation in our [urlhttp://www.libelium.com/development/waspmote]development section[/url]. Besides that, Digi provides a lot of useful guides to understand XBee modules behaviour.

Please, we kindly ask you to spend some time reading doc and then, we will be happy to answer any question you may have.

to test quickly Xbee communication please use a code like next one.
Quote:
void setup()
{
  // Inits the XBee 802 library
  xbee802.init(XBEE_802_15_4,FREQ2_4G,NORMAL);
   // Powers XBee
  xbee802.ON();
}
void loop()
{
data = (char*) calloc(25,sizeof(char));
    sprintf(data,"Hello Waspmote\n\r");

    XBee.print(data);

    free(data);
   data = NULL;
   delay(5000);
}


Top
 Profile  
 
 Post subject: Re: Help Required
PostPosted: Tue Jul 24, 2012 2:47 pm 

Joined: Wed Jul 11, 2012 11:53 am
Posts: 23
Thanks for your reply.
We have updated the firmware and one of our XBee module stop working completely, then we reply that module with other and it start working but our problem unknown character at the serial monitor still stands.

About the Program, we have compiled and upload the code given in the last post to wasp mote. But similarly no output at the serial monitor. However, after replacing Xbee.print(data); with xbee802.send("Mac-address",data);. The serial Monitor start printing but with similar unknown character before the Hello world.
Please sir, Kindly tell us what is the basic problem and how we could get rid of these unknown characters.
we will be happy that serial monitor print only the Hello world without these strange characters.
Thanks.

Best Regards
Rahim GIK Institute


Top
 Profile  
 
 Post subject: Re: Help Required
PostPosted: Wed Jul 25, 2012 9:49 am 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7501
rahimgiki,

We provide previous code only as a guide line. Not for directly usage.

Please read in the documentation a bout transparent mode of XBee modules setting AP=0 to avoid strange characters.

We must say that changing XBee firmware requires advanced knowledge of XBee modules and it is not covered by Libelium warranty.

Regards


Top
 Profile  
 
 Post subject: Re: Help Required
PostPosted: Fri Jul 27, 2012 12:54 pm 

Joined: Wed Jul 11, 2012 11:53 am
Posts: 23
Dear Sir,
Thanks for your regular replies.
we have API=0 in our code but still the strange characters are there. we have read almost every post regarding wireless communication between wasp mote and gate but unable to find a solution to these strange characters appearing at the serial monitor and specially at the hyper terminal from where we have to copy the out put for further analysis. we have studied most of the example along with technical guides for wasp mote but no solution.
Dear sir, we did not have any problem from programming side but the problem is with the strange characters. Please sir, kindly post a simple and tested program with wireless communication and its output without these strange character. It may have just print "Hello" on serial monitor but without these unwanted characters.
We will be thankful indeed..
Waiting for your kind reply


Top
 Profile  
 
 Post subject: Re: Help Required
PostPosted: Fri Jul 27, 2012 3:42 pm 

Joined: Wed Nov 10, 2010 9:45 am
Posts: 271
Location: Australia
If you are using AP=0; then you don't have to use xbee802 API function i.e paq_sent. Whilst in AP=0 (transparent mode), the data on the serial line is pushed to the Tx pin of the Xbee module. But you have to set the destination MAC using X-CTU (from the transmitter node). Therefore, if you are using AP=0, for example: Node 1 (transmitter) MAC address = 0013A20040691B8, and Node 2(Receiver) MAC address = 0013A200406918CC.

With X-CTU you have to place the transmitter radio and modify the destination address to match that of your receiver i.e 0013A200406918CC. then use xbee802.send("HELLO WORLD"); and the data should be received by the receiver without the API header. you have to make sure also that the baud-rate BD is set correctly (38400). Do you understand? Why don't you read the Digi manual on the XBee-series1 radios. they explain how to communicate in transparent mode.


Top
 Profile  
 
 Post subject: Re: Help Required
PostPosted: Mon Jul 30, 2012 1:53 pm 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7501
Many thanks to AmroQuandour for his explanation.

rahimgiki, please follow these advises and let us know.

Regards


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