hi all 

I'm having trouble with sending packets in tos 2.x. The problem is that no 
packets are sent with AMSend.send , thist returns 4 (EOFF). 

This is a part of the code in my Channel component: 

// Wired in other part of my application 
ChannelM.AMSend -> AMSenderC; 
ChannelM.Receive -> AMReceiverC; 
ChannelM.Packet -> AMSenderC; 
ChannelM.AMPacket -> AMSenderC; 
ChannelM.SplitControl -> ActiveMessageC; 

... 
event void Boot.booted() { 
call SplitControl.start(); 
} 
... 
command result_t Channel.send(uint16_t node, uint8_t *msgP) { 

uint8_t* out = 0x0; // Packet data mem address 
error_t senderr; // Command send error 

// Build packet 
call AMPacket.setDestination(&packet, node); // Put packet destination 
call Packet.setPayloadLength(&packet, MSG_LEN); // Set payload lenght 
out = (uint8_t*) call Packet.getPayload(&packet, NULL); // Get payload address 
memcpy(out,msgP,MSG_LEN); // Put message into packet 

senderr = call AMSend.send(node, &packet, MSG_LEN); // Send it 
if (senderr == 0) { 
return 0; 
} else { 
return senderr; // In this case senderr = 4 (EOFF) . Why? :( 
} 
... 

May be i need another wired...? 

Help me please. 


Edel Angel Rodríguez Sánchez 
Facultad de Informática 
Universidad de Granma. Cuba 


________________________________________
Universidad de Granma. Bayamo, M.N. Cuba

Participe en el III Congreso Cubano de Desarrollo Local
9 al 11 de marzo de 2011
http://www.udg.co.cu/congreso

Tiempo: http://www.udg.co.cu/mrtg/weather/weather.html
Imagenes desde el satelite: 
http://www.udg.co.cu/mrtg/weather/map/today-Bayamo-CUXX0001.jpg

_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to