<?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>BLE set custom Packet Header.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/84360/ble-set-custom-packet-header</link><description>Hello, industry. Two questions for you: 
 
 1. To test fault-tolerance of our BLE scanning device we need to generate and advertise from another BLE device custom faulty (!) BLE packets. 
 As we understand, BLE data format = Preamble (1 byte) + Access</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 03 Feb 2022 16:16:54 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/84360/ble-set-custom-packet-header" /><item><title>RE: BLE set custom Packet Header.</title><link>https://devzone.nordicsemi.com/thread/351194?ContentTypeID=1</link><pubDate>Thu, 03 Feb 2022 16:16:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3cd88f1a-5b40-4371-9795-9d1ac7ddac60</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;The radio transmitter example in the nRF5 SDK could be a good starting point.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/nrf_dev_radio_tx_example.html"&gt;https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/nrf_dev_radio_tx_example.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE set custom Packet Header.</title><link>https://devzone.nordicsemi.com/thread/351189?ContentTypeID=1</link><pubDate>Thu, 03 Feb 2022 15:53:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ed657567-3814-4c8c-8745-b137e4c907e3</guid><dc:creator>NKern</dc:creator><description>&lt;p&gt;Great, but how?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE set custom Packet Header.</title><link>https://devzone.nordicsemi.com/thread/351178?ContentTypeID=1</link><pubDate>Thu, 03 Feb 2022 15:20:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1b8987f8-88ba-46b4-9155-98983ec29762</guid><dc:creator>Sigurd</dc:creator><description>[quote user="NKern"]Can we&amp;nbsp;get direct low-level&amp;nbsp;&lt;span&gt;access&amp;nbsp;to RADIO on NRF51-DK or&amp;nbsp;NRF52-DK?&lt;/span&gt;[/quote]
&lt;p&gt;Yes.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE set custom Packet Header.</title><link>https://devzone.nordicsemi.com/thread/351172?ContentTypeID=1</link><pubDate>Thu, 03 Feb 2022 15:07:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2a96a542-c4cc-42de-9d47-004fa1603374</guid><dc:creator>NKern</dc:creator><description>&lt;p&gt;Thank you for quick response.&lt;/p&gt;
&lt;p&gt;Can we&amp;nbsp;get direct low-level&amp;nbsp;&lt;span&gt;access&amp;nbsp;to RADIO on NRF51-DK or&amp;nbsp;NRF52-DK?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE set custom Packet Header.</title><link>https://devzone.nordicsemi.com/thread/351091?ContentTypeID=1</link><pubDate>Thu, 03 Feb 2022 12:28:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:54191c0c-541c-4223-9b37-3627a08495b2</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]SoftDevice API allows&amp;nbsp;us to modify only Broadcast Data (AdvData = 31 byte), which does not break what we need.[/quote]
&lt;p&gt;And in addition, it does not allow you to generate invalid packets, i.e. packets that does not follow the Bluetooth spec.&lt;/p&gt;
[quote user=""]So we are looking for a way how to modify with custom data all of the mentioned data structures:[/quote]
&lt;p&gt;This is not supported with the SoftDevice. You will need to access and use the RADIO directly.&amp;nbsp;The only code I&amp;#39;m aware of that does something similar like this is the beacon advertising done in SD timeslots in the Thingy:52 FW:&amp;nbsp;&lt;a href="https://github.com/NordicSemiconductor/Nordic-Thingy52-FW/blob/master/source/util/advertiser_beacon_timeslot.c"&gt;https://github.com/NordicSemiconductor/Nordic-Thingy52-FW/blob/master/source/util/advertiser_beacon_timeslot.c&lt;/a&gt;&lt;/p&gt;
[quote user=""]2. What part in BLE&amp;nbsp;&lt;span&gt;data format&amp;nbsp;(if any) defines the total overall packet length to be&amp;nbsp;accepted by BLE scan device?&lt;/span&gt;[/quote]
&lt;p&gt;There is a length field in the advertising data header: &lt;a href="https://www.novelbits.io/bluetooth-low-energy-advertisements-part-1/"&gt;https://www.novelbits.io/bluetooth-low-energy-advertisements-part-1/&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>