# Question on 802.15.4 implementation

**URL:** <https://www.ruby-forum.com/t/question-on-802-15-4-implementation/230057>\
**Category:** GNU Radio\
**Created:** [May 28, 2014, 7:23pm UTC](https://www.ruby-forum.com/t/question-on-802-15-4-implementation/230057 "2014-05-28T19:23:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jason\_sam](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/7993a0/32.png) [@jason\_sam](https://www.ruby-forum.com/u/jason_sam)\
**Post date:** [May 28, 2014, 7:23pm UTC](https://www.ruby-forum.com/t/question-on-802-15-4-implementation/230057/1 "2014-05-28T19:23:32Z")

</div>

Hi ,  
I am trying to send a simple message between two USRPs using the new  
message passing interface in GNU Radio 3.7 over 802.15.4 implementation.  
I created a “message generator” which publishes a message to the “app  
in” port of 802.15.4. Similarly on the receiver side a “message  
consumer” gets the message from the “app out” port of 802.15.4, I see  
that the message on the receiver is getting dropped at the 15.4 MAC  
layer with the following debug message:

mac.cc:mac\_in: pmt\_is\_pair  
mac.cc::mac\_in: data\_len = 30  
CRC at Reception: 0  
MAC: Dropping packet self routed

I poked around mac.cc code a bit. It looks like the message received has  
the same mac id as the mac id of the receiver. It seems that the MAC  
layer does not use the _real_ MAC id, rather it generates mac id using  
“rand() % 100”. My understanding is that the receiver is also getting  
the same mac-id as the sender and hence dropping packet.  
Any idea how to fix the problem?

Note that I am not using RIME stack for communication (as done by  
Bastian), but rather trying to send/receive message from/to MAC layer  
itself.

thanks and regards

-Anirud

Anirudha “Anirud” Sahoo  
Advanced Network Technology Div.  
National Institute of Standards and Technology (NIST)  
100 Bureau Drive,  
Gaithersburg, MD - 20878  
Room - B230, bldg.- 222  
Phone- 301-975-4439

---

<div class="post-metadata">

**Author:** ![SahooS\_Anirudha](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/a87d85/32.png) [@SahooS\_Anirudha](https://www.ruby-forum.com/u/SahooS_Anirudha)\
**Post date:** [May 29, 2014, 11:59am UTC](https://www.ruby-forum.com/t/question-on-802-15-4-implementation/230057/2 "2014-05-29T11:59:27Z")

</div>

Hi Anirud,

On 28 May 2014, at 18:47, Sahoo, Anirudha [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> mac.cc:mac\_in: pmt\_is\_pair  
> mac.cc::mac\_in: data\_len = 30  
> CRC at Reception: 0  
> MAC: Dropping packet self routed
> 
> I poked around mac.cc code a bit. It looks like the message received has the  
> same mac id as the mac id of the receiver. It seems that the MAC layer does not  
> use the _real_ MAC id, rather it generates mac id using rand() % 100. My  
> understanding is that the receiver is also getting the same mac-id as the sender  
> and hence dropping packet.  
> Any idea how to fix the problem?

Which code are you using? I can neither find the debug output nor the  
rand() % 100 code. Also what do you mean with MAC id? Sequence number or  
MAC address?

Best,  
Bastian

---

<div class="post-metadata">

**Author:** ![SahooS\_Anirudha](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/a87d85/32.png) [@SahooS\_Anirudha](https://www.ruby-forum.com/u/SahooS_Anirudha)\
**Post date:** [May 30, 2014, 5:19pm UTC](https://www.ruby-forum.com/t/question-on-802-15-4-implementation/230057/3 "2014-05-30T17:19:53Z")

</div>

oops, I just found out that the code I have been working with, has been  
modified in-house. So, the debug message is coming from changes made to  
your code. Sorry about that.

thanks and regards

-Anirud

Anirudha “Anirud” Sahoo  
National Institute of Standards and Technology  
Advanced Network Technologies Division  
100 Bureau Drive, Stop 8920  
Gaithersburg, MD 20899-8920
