<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>How to intercept 802.15.4 frames while using Thread</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/59339/how-to-intercept-802-15-4-frames-while-using-thread</link><description>Hi! 
 I read that your Thread stack uses a different 802.15.4 implementation than the MAC driver. Is it possible to intercept special broadcast data packets e.g. from energy harvesting switches while using thread? 
 The special packets that I want to</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 26 Mar 2020 13:47:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/59339/how-to-intercept-802-15-4-frames-while-using-thread" /><item><title>RE: How to intercept 802.15.4 frames while using Thread</title><link>https://devzone.nordicsemi.com/thread/241862?ContentTypeID=1</link><pubDate>Thu, 26 Mar 2020 13:47:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:77c71e48-dd01-4217-8a46-1f565fc60341</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;We don&amp;#39;t have any examples doing this, unfortunately.&lt;/p&gt;
&lt;p&gt;I would suggest to study how the BLE examples use the ble event handler in the ble_examples to propagate an event to main.c. E.g. how the ble_app_uart example receives an event in&amp;nbsp;ble_nus_on_ble_evt() in ble_nus.c, and use the on_write() function to send the event&amp;nbsp;BLE_NUS_EVT_RX_DATA to main.c.&lt;/p&gt;
&lt;p&gt;Remember to make a copy of the message in your own buffer before sending the message through to the ZBOSS stack, because after this, it may be freed at any time (possibly before you have time to handle it in main.c).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to intercept 802.15.4 frames while using Thread</title><link>https://devzone.nordicsemi.com/thread/241846?ContentTypeID=1</link><pubDate>Thu, 26 Mar 2020 13:24:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:59f82e55-d0e7-46af-a014-f7a1812b7b2d</guid><dc:creator>Jochen0x90h</dc:creator><description>&lt;p&gt;Thanks for the info. What is the correct way to notify the application from the interrupt and prevent race conditions on the copied data? Is there an example for this? Is it OK for Thread to do the processing in the callback or is it also called in the interrupt handler?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to intercept 802.15.4 frames while using Thread</title><link>https://devzone.nordicsemi.com/thread/241800?ContentTypeID=1</link><pubDate>Thu, 26 Mar 2020 11:47:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a3a99984-570f-47b6-8b0f-aa4f4f031d88</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;This sniffer doesn&amp;#39;t use Zigbee or OpenThread. As far as I know there isn&amp;#39;t plans to release the source code for this.&lt;/p&gt;
&lt;p&gt;The function nrf_802154_received_timestamp_raw from SDK\nrf5\external\zboss\osif\zb_nrf52_transceiver.c is the function you are looking for in Zigbee. It is called by the radio driver whenever a frame is received, in which the function will pass the frame to the ZBOSS stack when it is called. Because this is called from an interrupt, and it is in charge of passing the packets to the zboss stack, you should not do any further processing of the packet here. You can forward it to your application, and do the processing there, so that the interrupt handler is immediately ready for a new packet. In addition, the ZBOSS stack will decide to free up this buffer when it is processed, so you should copy the data to your own buffer (and not just send the pointer to the original buffer).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to intercept 802.15.4 frames while using Thread</title><link>https://devzone.nordicsemi.com/thread/241727?ContentTypeID=1</link><pubDate>Thu, 26 Mar 2020 07:49:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a902e4a5-50ec-4b51-bef4-f07fa4a091c6</guid><dc:creator>Jochen0x90h</dc:creator><description>&lt;p&gt;Other question would be if you will release the source code of the 802.15.4 packet sniffer in the future. It seems to me that it just forwards the packets to the USB port, but would be handy for experimenting.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to intercept 802.15.4 frames while using Thread</title><link>https://devzone.nordicsemi.com/thread/241640?ContentTypeID=1</link><pubDate>Wed, 25 Mar 2020 15:40:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:079c0845-bdf8-4e6f-b877-8bfd3bb232f4</guid><dc:creator>Jochen0x90h</dc:creator><description>&lt;p&gt;Does the Zigbee stack use the same radio driver like the thread stack? Or is the radio driver part of the closed source Zigbee stack? It would still be interesting if it is possible to receive raw data packets using the Zigbee stack.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to intercept 802.15.4 frames while using Thread</title><link>https://devzone.nordicsemi.com/thread/241541?ContentTypeID=1</link><pubDate>Wed, 25 Mar 2020 09:51:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1df038c5-34cf-4fea-b41b-cab6ff1979fa</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;You can&amp;#39;t run thread an zigbee simultaneously. I don&amp;#39;t think there is a similar function in Zigbee. The Zigbee stack is a closed source stack (developed by an external company), so I don&amp;#39;t have access to check how the packets are forwarded to the zigbee stack. Knowing that you can&amp;#39;t use Thread and Zigbee simultaneously, is that still a valid question? Whether or not it is possible to receive raw data packet when using the Zigbee Stack?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to intercept 802.15.4 frames while using Thread</title><link>https://devzone.nordicsemi.com/thread/241484?ContentTypeID=1</link><pubDate>Tue, 24 Mar 2020 22:50:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:50aafd30-a98a-4c06-a33d-5a877ec5f175</guid><dc:creator>Jochen0x90h</dc:creator><description>&lt;p&gt;Yes it seems to work. The switch that I use even has a sequence counter and a checksum generated by some encryption algorithm so replay is not (easily) possible like in car keys. The next question if this still works when thread and zigbee are used simultaneously. otLinkSetPcapCallback() is an openthread function, how do packets get forwarded to the zigbee stack?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to intercept 802.15.4 frames while using Thread</title><link>https://devzone.nordicsemi.com/thread/241395?ContentTypeID=1</link><pubDate>Tue, 24 Mar 2020 13:51:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:07cc01b4-21c7-4655-bd91-ed2ac5a9e701</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello Jochen,&lt;/p&gt;
&lt;p&gt;Sorry for the late reply.&lt;/p&gt;
&lt;p&gt;Were you able to receive non-network packets using otLinkSetPcapCallback()?&lt;/p&gt;
&lt;p&gt;These energy harvesting switches typically do not have enough power to run the radio in RX mode, so they will not be part of the network. Just so you know, this means that if you do an action on these switches, this will be vulnerable to reply attacks. But it would be you who decide whether or not this is an issue. Even if you have some sort of key, the keys in Thread networks are regularly updated to prevent replay attacks. This is just an FYI.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to intercept 802.15.4 frames while using Thread</title><link>https://devzone.nordicsemi.com/thread/241394?ContentTypeID=1</link><pubDate>Tue, 24 Mar 2020 13:43:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:01f483ab-7174-4d10-8db3-c523b3da871c</guid><dc:creator>Jochen0x90h</dc:creator><description>&lt;p&gt;It seems to work using&amp;nbsp;&lt;span&gt;otLinkSetPcapCallback() in link.h&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>