Forum Menu




 


Log in Problems?
New User? Sign Up!
AVR Freaks Forum Index

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
oparz_
PostPosted: Feb 09, 2012 - 09:05 AM
Newbie


Joined: Feb 03, 2012
Posts: 7
Location: munich

hello,
I'm working with Bitcloud on SensorTerminalBoard (Dresden Elektronik)and ATmega128rfa.

Could anybody help me to display the sensor values in WSNMonitor.
I can watch dummy sensor values in my terminal programm, but i can not see a sensor graph pane in wsnmonitor?

in the following lines I've copied the received serial data (Terminalprogram HTerm):
10 02 01 00 11 00 00 00 00 00 00 00 00 00 00 01 01 01 00 80 00 00 C8 2C 0F FF FF 00 00 01 0C AA 00 00 00 BB 00 00 00 CC 00 00 00 20 05 4F 70 61 72 7A 10 03 2A

477061727a hex = oparz ( i've changed the device caption in the configuration file)

here is my code with the dummy sensor variables in the file WSNCoord.c:

case SENDING_DEVICE_STATE:
switch (event)
{
case APP_PROCESS:
visualizeSerialTx();
appMessage.data.messageType = 0x01;
appMessage.data.meshbean.battery = 0xAA;
appMessage.data.meshbean.temperature = 0xBB;
appMessage.data.meshbean.light = 0xCC;
appSendMessageToUsart(&appMessage.data, sizeof(AppMessage_t));
appDeviceState = STARTING_TIMER_STATE;
appPostSubTaskTask();
break;

default:
break;
}
break;

i have tried several values for .messageType or .boardType without success
may be i've missed an answer to this problem in the forum but i've spent a lot of time searching around

my project is rcb and my bitcloud version is 1.13

any help is very appreciated
 
 View user's profile Send private message  
Reply with quote Back to top
oparz_
PostPosted: Feb 09, 2012 - 09:25 AM
Newbie


Joined: Feb 03, 2012
Posts: 7
Location: munich

solved!!

I've added leading zeros to my dummy data:
appMessage.data.meshbean.battery = 0x000000AA;
appMessage.data.meshbean.temperature = 0x000000BB;
appMessage.data.meshbean.light = 0x000000CC;

or better solution:

appMessage.data.meshbean.battery = CPU_TO_LE32(0xAA);
 
 View user's profile Send private message  
Reply with quote Back to top
alexru
PostPosted: Feb 09, 2012 - 04:20 PM
Raving lunatic


Joined: Apr 15, 2009
Posts: 6141
Location: San Jose, CA

Both codes are identical. And CPU_TO_LE32() is an empty macro on AVR.

_________________
The opinions and views expressed by me on this forum are my own and do not represent my employer or anyone else that I'm affiliated with.
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
oparz_
PostPosted: Feb 12, 2012 - 08:21 PM
Newbie


Joined: Feb 03, 2012
Posts: 7
Location: munich

I was surprised, because i am sure 0xaa is the same as 0x000000aa....maybe I've changed another variable

thank you
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT + 1 Hour
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2006 The PNphpBB Group
Credits