hey all,I've had big problems.. I'm sending messages to a Java Application via
TOSBase, and I don't have problems with it, but when I send messages from the
Java Application to the Mote, the messages correctly arrive at TOSBase because
I do the typecast and I'm able to extract all fields.. but when the message is
sent to the Mote(micaz) .. the mote doesn't receive it.The received packet on
TOSBase once the typecast is done contains:msgType = 0x3 correct.destID =
0xb correct.upperth = 0x7b correct...and the TOS_Msg packet contains:type =
0xa - correct is the AM_QUERYMSGgroup = 0x7d is the TOS_AM_GROUP I don't now
what is missing.my code is bellow.queryMsh.henum{ AM_QUERYMSG = 10,}typedef
struct queryMsg{ uint16_t msgType; uint16_t destID; uint16_t upperth;
uint16_t
lowerth;}queryMsg;--------------------Receiver.nc--------------------------------configuration
Receiver {}implementation { components Main,
ReceiverM; components GenericComm as Comm; components
IntToLeds; Main.StdControl -> ReceiverM.StdControl;
Main.StdControl ->IntToLeds.StdControl; Main.StdControl ->
Comm; ReceiverM.RadioControl ->Comm.Control;
ReceiverM.RadioReceive ->Comm.ReceiveMsg[AM_QUERYMSG]; //ReceiverM.RadioSend
->Comm; IntToLeds.IntOutput
<-ReceiverM.IntOutput;}___________________________includes
AM;includes queryMsg;module ReceiverM { provides {
interface StdControl; }uses{ interface StdControl as
RadioControl; interface IntOutput; //interface Receive as
Bcast; interface ReceiveMsg as RadioReceive;
//interface BareSendMsg as RadioSend;
}}implementation { command result_t StdControl.init()
{ call RadioControl.init(); return SUCCESS;
} command result_t StdControl.start() { call
RadioControl.start(); return SUCCESS; } command
result_t StdControl.stop() { call RadioControl.stop();
return SUCCESS; } event TOS_MsgPtr RadioReceive.receive(TOS_MsgPtr
Msg) { TOS_MsgPtr pBuf = Msg; queryMsg *p
=(queryMsg*)Msg->data; call IntOutput.output(0x7);
return pBuf; } event result_t
IntOutput.outputComplete(result_t success){ return SUCCESS;
}}
_________________________________________________________________
Find a local pizza place, movie theater, and moreā¦.then map the best route!
http://maps.live.com/default.aspx?v=2&ss=yp.bars~yp.pizza~yp.movie%20theater&cp=42.358996~-71.056691&style=r&lvl=13&tilt=-90&dir=0&alt=-1000&scene=950607&encType=1&FORM=MGAC01_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help