<?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>Where to get the firmware error code details ??</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/126042/where-to-get-the-firmware-error-code-details</link><description>Hi, I am working on Bluetooth of nrf52840 board. I am still learning the SDK and I want to know where can I found the details of error codes, which are considered as &amp;#39;int&amp;#39; in the firmware example programmes. 
 For example : I got an error saying Advertising</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 09 Dec 2025 13:37:56 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/126042/where-to-get-the-firmware-error-code-details" /><item><title>RE: Where to get the firmware error code details ??</title><link>https://devzone.nordicsemi.com/thread/556559?ContentTypeID=1</link><pubDate>Tue, 09 Dec 2025 13:37:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e57a5469-dea6-4d0c-a53f-c4c866ca496f</guid><dc:creator>Samruddhi Jadhav</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;From your description, it seems like you are trying to call the bt_le_adv_start() function (as shown in the following &lt;a href="https://docs.zephyrproject.org/latest/doxygen/html/group__bt__gap.html#gad2e3caef88d52d720e8e4d21df767b02"&gt;Zephyr API Documentation: Generic Access Profile&lt;/a&gt;&amp;nbsp;documentation). When you call bt_le_adv_start(), and after advertising has started, the function will return 0. If there is a fault, it will return a negative number as you are observing. The number indicates the type of error message. In the &lt;a href="https://docs.zephyrproject.org/latest/doxygen/html/group__system__errno.html"&gt;Zephyr API Documentation: Error numbers&lt;/a&gt;, we can see that 120 is tied with &amp;quot;EALREADY&amp;quot; (or &amp;quot;Operation already in process&amp;quot;) error in the SDK. Similarly, in this documentation, we can also see which error messages the other numbers represent. If you then search for bt_le_adv_start and look into the adv.c file in the SDK, you can navigate to EALREADY (see the attached code snippet from adv.c).&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;	if (atomic_test_bit(adv-&amp;gt;flags, BT_ADV_ENABLED)) {
		return -EALREADY;
	}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;If you are getting -120, it indicates that you are asking to start something which has already started or already is in the running state. If it returns 0, it shows that advertising has started as per the request.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Hope this helps.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>