You are not logged in.
Hi;
I have some problems about detecting the ACK packet. What I am trying to do is; during a music stream; in an infinite while loop ( while(1)), record the length of the incoming packets. If this is a ack packet I print the length of that if it is not an ack packet I reset the recording array. My questions are:
a) What is the length of ACK packet in CSMAMAC ?
b) In order to understand if it was a ack packet or data packet I have set an ackflag in receivegoodpacket function, so when "case" is ackpacket it resets the flag. My question is; if I am sampling the incoming data in every 5 us to see whether the flag is set or not, is it possible for 'receivegoodpacket' function to reset my flag during two samples (which is 5us) ?
Thank you very much for your assistance
Hasan
Offline
Regarding my previous question to give a better insight what I am trying to, this is where I have created and set my flag.
int ackflag=1;// Flag created
int receiveGoodPacket(Macframe* packet) {
warpmac_incrementLEDHigh();
if(warpmac_addressedToMe(packet)){
Macframe ackPacket;
switch(packet->pktType){
case ACKPACKET:
ackflag=packet->pktType; /// This is where I reset my flag
In my main while loop; I am continuously checking the instantaneous RSSI value from the radio board. Whenever it is above a threshold value, I think that it is a good clue for the data to be an ack packet. So, I start counting the length of data with every 5us. Unfortunately, whenever I print this observed length on the screen it gives me very small values (like 40us) for a ack packet length.
Thank you
Bests,
Offline
I'm not clear on exactly what you're trying to measure.
An ACK packet is always the same length (24 bytes- it's just a MAC-lever header with no payload). If you're using QPSK for the base-rate modulation (which is the default), this translates to 72us of over-the-air time for the full ACK packet (adding together the preamble, training symbols and base-rate symbols).
Offline