<?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>Receive all BLE packets through USB/UART</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/85600/receive-all-ble-packets-through-usb-uart</link><description>Hello, 
 I am looking for some advices for a personnal project. 
 I would like to be able to receive all BLE packets ( so all protocols (GATT, SM, LL) and not only GATT) that come from my nrf52840 Dongle through an UART or USB connection. The output I</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 16 Mar 2022 12:11:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/85600/receive-all-ble-packets-through-usb-uart" /><item><title>RE: Receive all BLE packets through USB/UART</title><link>https://devzone.nordicsemi.com/thread/358410?ContentTypeID=1</link><pubDate>Wed, 16 Mar 2022 12:11:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ae7f77bb-0699-4393-87de-3bd47de29c87</guid><dc:creator>ENGLAB Dev</dc:creator><description>[quote userid="26071" url="~/f/nordic-q-a/85600/receive-all-ble-packets-through-usb-uart/358114#358114"]f you are connecting to a dongle over BLE, then that would be a BLE device, not just a simulation, right?[/quote]
&lt;p style="font-family:Calibri;font-size:11.0pt;margin:0in;"&gt;Indeed !&lt;/p&gt;
&lt;p style="font-family:Calibri;font-size:11.0pt;margin:0in;"&gt;However, what I meant is that the dongle would try to imitate the behavior of another BLE device (ie smartwatch, smart sensor &amp;hellip;)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/p&gt;
&lt;p style="font-family:Calibri;font-size:11.0pt;margin:0in;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/85600/receive-all-ble-packets-through-usb-uart/358114#358114"]I don&amp;#39;t see why you need to get access to the raw packets in order to do pairing. Are you saying that you want to intercept the connection between two other devices, and pretend that you are one of them?&amp;nbsp;[/quote]
&lt;p style="font-family:Calibri;font-size:11.0pt;margin:0in;"&gt;&lt;/p&gt;
&lt;p style="font-family:Calibri;font-size:11.0pt;margin:0in;"&gt;That&amp;#39;s what I was trying to do earlier and it explains why I was expecting to send raw packets. I am now looking for another approach where my dongle would imitate a BLE smart device. The main purpose is to see what are the informations that goes from a device to another after the encryption started.&lt;/p&gt;
&lt;p style="font-family:Calibri;font-size:11.0pt;margin:0in;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-family:Calibri;font-size:11.0pt;margin:0in;"&gt;Anyway, I have got the answer of my question and I will dug further into the SDK to find a sample that can achieve this !&lt;/p&gt;
&lt;p style="font-family:Calibri;font-size:11.0pt;margin:0in;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="font-family:Calibri;font-size:11.0pt;margin:0in;"&gt;Thanks for all Edvin !&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Receive all BLE packets through USB/UART</title><link>https://devzone.nordicsemi.com/thread/358114?ContentTypeID=1</link><pubDate>Tue, 15 Mar 2022 07:52:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c14c520c-e998-45c5-ab19-ae26c773e709</guid><dc:creator>Edvin</dc:creator><description>[quote user="ENGLAB Dev"]wanted to be able to connect my dongle (that would simulate a BLE Device) [/quote]
&lt;p&gt;If you are connecting to a dongle over BLE, then that would be a BLE device, not just a simulation, right?&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t see why you need to get access to the raw packets in order to do pairing. Are you saying that you want to intercept the connection between two other devices, and pretend that you are one of them?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It is perfectly possible to customize an advertising packet, and you can even scan for advertisement packets, and copy that into your own advertisements. However, if the two devices are bonded, then you will not have the correct encryption keys to pretend that you are one of the devices.&lt;/p&gt;
&lt;p&gt;So if what you want to do is to record the pairing/bonding and fetch the keys, then I am afraid that other than the sniffer FW (not open source), then we don&amp;#39;t have anything that would follow two other devices entering a connection.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Receive all BLE packets through USB/UART</title><link>https://devzone.nordicsemi.com/thread/357977?ContentTypeID=1</link><pubDate>Mon, 14 Mar 2022 14:10:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c79a24f5-3877-4e70-9a46-6b46b8dfd3a3</guid><dc:creator>ENGLAB Dev</dc:creator><description>&lt;p&gt;Hello Edvin,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Okay thanks for your answer, I won&amp;#39;t&amp;nbsp; continue further with the softdevice.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I have read about the XY problem and I apologize if I wasn&amp;#39;t explicit enough when I have exposed the problem. I hope you understood what I am trying to do with my last message&amp;nbsp; (ie : &amp;quot;&lt;i&gt; wanted to be able to connect my dongle (that would simulate a BLE Device) to my phone through an application with SC pairing&lt;/i&gt;. &amp;quot;). As my project is growing, I might also be interested in reading/writting GATT characteristics when the pairing would be established.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I started to take a look at the &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.3.0%2Fble_sdk_app_multirole_lesc.html"&gt;SC Multirole sample&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.3.0%2Fble_sdk_app_multirole_lesc.html"&gt;Heart rate application&lt;/a&gt; where I wanted to customize the advertisement packet to match with the one from the BLE device, in order to pair the dongle with my phone through the application.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Receive all BLE packets through USB/UART</title><link>https://devzone.nordicsemi.com/thread/357562?ContentTypeID=1</link><pubDate>Fri, 11 Mar 2022 09:00:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:01fa3fa1-3c75-49ab-b374-9031156af92d</guid><dc:creator>Edvin</dc:creator><description>[quote user="ENGLAB Dev"]Do you have any hints to achieve «&amp;nbsp;a bluetooth stack on my own » ?[/quote]
&lt;p&gt;Unfortunately, no. That is no simple task. To put it in perspective, we have a quite large group working on our Bluetooth Stack as their main job. I don&amp;#39;t think that is really realistic.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If it is mainly for debugging, then I think I would start somewhere else (&lt;a href="https://en.wikipedia.org/wiki/XY_problem"&gt;XY problem&lt;/a&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: Receive all BLE packets through USB/UART</title><link>https://devzone.nordicsemi.com/thread/357547?ContentTypeID=1</link><pubDate>Fri, 11 Mar 2022 08:11:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0d7c636e-387f-4f9b-a176-7f730c0ed11b</guid><dc:creator>ENGLAB Dev</dc:creator><description>&lt;p&gt;Hello Edvin,&lt;/p&gt;
&lt;p&gt;Ok I understand, thanks for the answer&amp;nbsp;!&lt;/p&gt;
&lt;p&gt;Do you have any hints to achieve &amp;laquo;&amp;nbsp;a bluetooth stack on my own &amp;raquo; ?&lt;/p&gt;
&lt;p&gt;I wanted to be able to connect my dongle (that would simulate a BLE Device) to my phone through an application with SC pairing. I thought it was more convenient to analyze (and custom, if needed) packets that are sent/received to perform debugging.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Receive all BLE packets through USB/UART</title><link>https://devzone.nordicsemi.com/thread/357417?ContentTypeID=1</link><pubDate>Thu, 10 Mar 2022 13:40:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4b1ce96f-ec78-40cf-8874-6dea0e2a1be1</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;I understand.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Unfortunately, the sniffer source code is not open source, so I don&amp;#39;t have anything that I can share.&lt;/p&gt;
&lt;p&gt;As for the softdevice, it is not possible to&amp;nbsp;see the raw data packets that the radio receives, so I guess that if you need these packets, you will need to implement a bluetooth stack on your own.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am sorry that I don&amp;#39;t have anything that I can share.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Is this for debugging? If so, please let me know, and maybe we can help you sort out any issues that you might experience.&amp;nbsp;&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: Receive all BLE packets through USB/UART</title><link>https://devzone.nordicsemi.com/thread/357351?ContentTypeID=1</link><pubDate>Thu, 10 Mar 2022 09:42:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:128a45e9-f12c-4d14-8afa-9d6ae2962bee</guid><dc:creator>ENGLAB Dev</dc:creator><description>&lt;p&gt;Hello Edvin,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks for your answer.&lt;/p&gt;
&lt;p&gt;I have tried the nRF Sniffer example. However, it doesn&amp;rsquo;t match my expectation.&lt;/p&gt;
&lt;p&gt;Firstly, I do not want to sniff any traffic between two BLE devices but I want to have access to the packets that my Dongle is receiving. (Thus I&amp;rsquo;m sure that I don&amp;rsquo;t lose any packet and I&amp;rsquo;m then able to manage the packets that I am receiving directly with the Dongle firmware)&lt;/p&gt;
&lt;p&gt;I wanted to take a look at the source code of the sniffer sample, in order to adapt it but I only found the .hex file.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Receive all BLE packets through USB/UART</title><link>https://devzone.nordicsemi.com/thread/357207?ContentTypeID=1</link><pubDate>Wed, 09 Mar 2022 14:23:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ff6b1751-7880-45ca-a870-21bcb63659a6</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Have you tried the &lt;a href="https://www.nordicsemi.com/Products/Development-tools/nRF-Sniffer-for-Bluetooth-LE"&gt;nRF Sniffer for Bluetooth LE&lt;/a&gt; before? Is that something you are looking for, and that you can use, perhaps?&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></channel></rss>