<?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>Unit testing using CMOCK and UNITY of the BLE module gives Error: Bluetooth device missing</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/106800/unit-testing-using-cmock-and-unity-of-the-ble-module-gives-error-bluetooth-device-missing</link><description>Hi, 
 I am integrating unit tests on our on an NRF Connect SDK project using Unity and CMock. I followed the example on documentation here . 
 The project uses the BLE modules and I am developing unit tests for the application files related to Bluetooth</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 20 Dec 2023 16:39:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/106800/unit-testing-using-cmock-and-unity-of-the-ble-module-gives-error-bluetooth-device-missing" /><item><title>RE: Unit testing using CMOCK and UNITY of the BLE module gives Error: Bluetooth device missing</title><link>https://devzone.nordicsemi.com/thread/461330?ContentTypeID=1</link><pubDate>Wed, 20 Dec 2023 16:39:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:93cb31b6-4075-4b17-9296-dbb012d8357d</guid><dc:creator>ChroukK</dc:creator><description>&lt;p&gt;Thanks for your quick response!&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks for pointing me to the documentation, it is helpful.&lt;/p&gt;
&lt;p&gt;The git PR for the issue resolves it using twister. I am using west instead with unity. I will explore it further to see if there is a similar work around with the west build script. At the moment, my temporary solution is running using two commands:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;span&gt;west build -b native_posix&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;span&gt;build/zephyr/zephyr.exe --bt-dev=hci0&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unit testing using CMOCK and UNITY of the BLE module gives Error: Bluetooth device missing</title><link>https://devzone.nordicsemi.com/thread/461267?ContentTypeID=1</link><pubDate>Wed, 20 Dec 2023 11:56:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:763a1dd5-ff2b-4faf-9e43-dcbd856007b1</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I found &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/boards/posix/native_posix/doc/index.html"&gt;native_posix docs&lt;/a&gt; and &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/connectivity/bluetooth/bluetooth-tools.html#bluetooth-tools"&gt;Bluetooth tools docs&lt;/a&gt; talking about these, but both mention that you add it to the zephyr.exe command.&lt;/p&gt;
&lt;p&gt;However, I found this git issue which seems similar: &lt;a href="https://github.com/zephyrproject-rtos/zephyr/issues/41073"&gt;https://github.com/zephyrproject-rtos/zephyr/issues/41073&lt;/a&gt;, which links to &lt;a href="https://github.com/zephyrproject-rtos/zephyr/pull/52697"&gt;https://github.com/zephyrproject-rtos/zephyr/pull/52697&lt;/a&gt;. The PR sounds like it might be what you need. Have a look and see if you can make it work.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>