<?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>Integrating nRF Sniffer Python module into a script</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/76411/integrating-nrf-sniffer-python-module-into-a-script</link><description>Hello I want to make a python script that allows sniffing of 802.15.4 packets (nRF52840), The module exposes an API that allows starting and stopping the capture. I installed the script by typing the following command python -m easy_install then I integrated</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 23 Jun 2021 12:41:08 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/76411/integrating-nrf-sniffer-python-module-into-a-script" /><item><title>RE: Integrating nRF Sniffer Python module into a script</title><link>https://devzone.nordicsemi.com/thread/316737?ContentTypeID=1</link><pubDate>Wed, 23 Jun 2021 12:41:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:51d75734-a9ac-4826-a52e-c9649054cad5</guid><dc:creator>Ayoub GH</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;First of all, I would like to thank you for your answer and for your help,&lt;br /&gt;I did the same thing as you finally I managed to capture and generate the pcap file, but the problem is I wanted to make a script that allows me to capture the data live and display them in the console.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Ayoub&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Integrating nRF Sniffer Python module into a script</title><link>https://devzone.nordicsemi.com/thread/316733?ContentTypeID=1</link><pubDate>Wed, 23 Jun 2021 12:30:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:76da3c0f-1841-470b-ac06-fa6857e1cb2e</guid><dc:creator>Marjeris Romero</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Would you like to share your python script so I can test it on my side? It may be easier for me to debug having the code available.&lt;/p&gt;
&lt;p&gt;Are you using pynrfjprog to start the connection to the DK? If so the connection must be started before capturing pcaps. You should then create and channel set:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;from nrf802154_sniffer import nrf802154Sniffer

self._sniffer_api = Nrf802154Sniffer()
self._sniffer_api.channel = self.channel
...
//and to start capture:
self._sniffer_api.extcap_capture(self.pcap_result_file, self.com_port, self.channel, metadata)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Marjeris&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>