I have discover the great possibility to verify if a packet it is 
received/delivered by the node sending using the interface PacketLink 
interface : i have read the 126 TEP.
I use the component CC2420ActiveMessageC and this components provide the 
interface PacketLink .I have a little problem when on the 126 TEP is said :

Developers can simply define the preprocessor variable PACKET_LINK to compile 
the functionality of the PacketLink layer in with the CC2420 stack. 

This means that I must set in the makefile 

PFLAGS += -PACKET_LINK

and so wiring the interface PacketLink to the component CC2420ActiveMessageC 
the commands that I have used 
command void setRetries(message_t *msg, uint16_t maxRetries) 
command void setRetryDelay(message_t *msg, uint16_t retryDelay) 

are ok .For the moment I use those two command in a send function :

error_t sendData(uint8_t *buf,uint8_t adr)
        {
                
                if(!busy)
                {
                        
                        ppkt=(CCRadioData*)call 
AMSend.getPayload(&pkt,sizeof(CCRadioData));
                
                        popolaRadioData(buf);
                        
                        call PacketAcknowledgements.requestAck(&pkt);
                        
                        call PacketLink.setRetries(&pkt,5);
                        
                        call PacketLink.setRetryDelay(&pkt,20);
                        
                        errore=call AMSend.send(adr,&pkt,sizeof(CCRadioData));
                        
                        busy = TRUE;    
                        
                        if(errore != SUCCESS)
                        {
                                printf("errore mandaFoto %d\n",errore);
                                printfflush();  
                                busy = FALSE;
                        }
                
                                                
                }else
                {
                        errore = BUSY;
                }
                                
                return errore;   
        }

and I have no problem at compile time but I believe that  the PacketLink 
commands are not working correctly because with PacketAcknowledgements I see 
if a packet it isn't delievered 
Any suggestion is really appreciate :thank in advance.

Giorgio


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

Reply via email to