<?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>Return error code that 0x4015.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/30428/return-error-code-that-0x4015</link><description>I used SDK nRF5_SDK_14.1.0_1dda907. 
 I added cycling speed and cadence service of BLE and bicycle speed and cadence of ANT+ in ble_ant_app_hrm example of multiprotocol. 
 If i opened ant hrm disp channel, i did not send bsc packet. Then success. 
 But</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 23 Feb 2018 01:12:55 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/30428/return-error-code-that-0x4015" /><item><title>RE: Return error code that 0x4015.</title><link>https://devzone.nordicsemi.com/thread/121744?ContentTypeID=1</link><pubDate>Fri, 23 Feb 2018 01:12:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c25796e0-0f4a-4d5b-8696-9498fad90d78</guid><dc:creator>Woody Hung</dc:creator><description>&lt;p&gt;Thank a lot.&lt;/p&gt;
&lt;p&gt;The question is&amp;nbsp;solved.&lt;/p&gt;
&lt;p&gt;Because i called that &lt;span&gt;ant_hrm_disp_open(&amp;amp;m_ant_hrm) once&amp;nbsp;&lt;/span&gt;and ant_hrm_disp_open(&amp;amp;m_ant_hrm)&amp;nbsp; in ant_evt_handler, it caused that&amp;nbsp;&lt;span&gt;open a channel that is already open and searching.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Return error code that 0x4015.</title><link>https://devzone.nordicsemi.com/thread/121726?ContentTypeID=1</link><pubDate>Thu, 22 Feb 2018 17:11:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fef7b23b-7e65-4e49-b9b7-9d68324341a9</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;It seems you are trying to open a channel that is already open and searching.&lt;/p&gt;
&lt;p&gt;Sorry to ask, but have you double checked that the log info show that there are different channels here? For instance for HRM:&lt;/p&gt;
&lt;p&gt;&amp;lt;info&amp;gt; ant_hrm: ANT HRM channel 0 init&lt;br /&gt;&amp;lt;info&amp;gt; ant_hrm: ANT HRM channel 0 open&lt;/p&gt;
&lt;p&gt;But for next channel:&lt;/p&gt;
&lt;p&gt;&amp;lt;info&amp;gt; ant_bsc: ANT BSC channel 1 init&lt;br /&gt;&amp;lt;info&amp;gt; ant_bsc: ANT BSC channel 1 open&lt;/p&gt;
&lt;p&gt;And so on.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Return error code that 0x4015.</title><link>https://devzone.nordicsemi.com/thread/121592?ContentTypeID=1</link><pubDate>Thu, 22 Feb 2018 00:57:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8c6fb03f-9680-4326-a16d-f45676e1a6d3</guid><dc:creator>Woody Hung</dc:creator><description>&lt;p&gt;What is the Channel Status if you call sd_ant_channel_status_get()?&lt;/p&gt;
&lt;p&gt;Ans. STATUS_SEARCHING_CHANNEL((uint8_t)0x02) ///&amp;lt; Indicates channel is active and in searching state.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;What have you set ucTotalNumberOfChannels when calling sd_ant_enable()?&lt;/p&gt;
&lt;p&gt;Ans. NRF_SDH_ANT_TOTAL_CHANNELS_ALLOCATED = 7&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;#define ANT_HRMRX_ANT_CHANNEL&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/**&amp;lt; Default ANT Channel. */&lt;br /&gt;#define ANT_HRMRX_DEVICE_NUMBER&amp;nbsp; &amp;nbsp; 0&amp;nbsp; &amp;nbsp; &amp;nbsp; /**&amp;lt; Device Number. */&lt;br /&gt;#define ANT_HRMRX_TRANS_TYPE&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; /**&amp;lt; Transmission Type. */&lt;br /&gt;#define ANTPLUS_NETWORK_NUMBER&amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp;/**&amp;lt; Network number. */&lt;/p&gt;
&lt;p&gt;#define ANT_BPWRRX_ANT_CHANNEL&amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp;/**&amp;lt; Default ANT Channel. */&lt;br /&gt;#define ANT_BPWRRX_DEVICE_NUMBER 0&amp;nbsp; &amp;nbsp; &amp;nbsp;/**&amp;lt; Device Number. */&lt;br /&gt;#define ANT_BPWRRX_TRANS_TYPE&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; /**&amp;lt; Transmission Type. */&lt;/p&gt;
&lt;p&gt;#define ANT_BSCRX_ANT_CHANNEL&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2&amp;nbsp; &amp;nbsp; /**&amp;lt; Default ANT Channel. */&lt;br /&gt;#define ANT_BSCRX_DEVICE_NUMBER&amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; /**&amp;lt; Device Number. */&lt;br /&gt;#define ANT_BSCRX_TRANS_TYPE&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&amp;nbsp; &amp;nbsp; /**&amp;lt; Transmission Type. */&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Return error code that 0x4015.</title><link>https://devzone.nordicsemi.com/thread/121492?ContentTypeID=1</link><pubDate>Wed, 21 Feb 2018 09:53:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:29a42c65-dd0d-463e-a78d-e59332669ec2</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;What is the Channel Status if you call&amp;nbsp;sd_ant_channel_status_get()?&lt;/p&gt;
&lt;p&gt;What have you set&amp;nbsp;ucTotalNumberOfChannels when calling&amp;nbsp;sd_ant_enable()?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Return error code that 0x4015.</title><link>https://devzone.nordicsemi.com/thread/121454?ContentTypeID=1</link><pubDate>Wed, 21 Feb 2018 01:15:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3be32210-b92a-40dc-933d-a7cec34c9c68</guid><dc:creator>Woody Hung</dc:creator><description>&lt;p&gt;ant_hrm_disp_open(&amp;amp;m_ant_hrm)&amp;nbsp;&lt;span&gt;that is returning 0x4015.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Return error code that 0x4015.</title><link>https://devzone.nordicsemi.com/thread/120799?ContentTypeID=1</link><pubDate>Wed, 14 Feb 2018 10:14:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:de2d1f52-0e13-40ba-901a-e8ebc5165714</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hi, I think we are going a bit in circles here now.&lt;/p&gt;
&lt;p&gt;To be able to help you, I need to know exactly which&lt;span&gt;&amp;nbsp;softdevice api call that return error code 0x4015 (NRF_ANT_ERROR_CHANNEL_IN_WRONG_STATE). So you will need to find which of the&amp;nbsp;sd_ant_channel_assign(),&amp;nbsp;sd_ant_broadcast_message_tx(),&amp;nbsp;sd_ant_channel_open(),&amp;nbsp;sd_ant_network_address_set(),&amp;nbsp;sd_ant_channel_id_set(),&amp;nbsp;sd_ant_channel_radio_freq_set(), or&amp;nbsp;sd_ant_channel_period_set() that is returning 0x4015.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Once we know which api call that return&amp;nbsp;NRF_ANT_ERROR_CHANNEL_IN_WRONG_STATE, then next step is to find what are the paramters&amp;nbsp;used in the specific softdevice call, and compare with the parameters for the other channel that is configured.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Return error code that 0x4015.</title><link>https://devzone.nordicsemi.com/thread/120776?ContentTypeID=1</link><pubDate>Wed, 14 Feb 2018 05:03:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:085323f0-173a-4908-8fab-7a96a7284654</guid><dc:creator>Woody Hung</dc:creator><description>&lt;p&gt;I setup (hrm and bsc) have it&amp;#39;s own unique: &lt;br /&gt;@param[in] ucChannel is an unsigned char (1 octet) denoting the channel to assign/open.&lt;/p&gt;
&lt;p&gt;I used SDK13.1 successful.&lt;/p&gt;
&lt;p&gt;But, I used the SDK14.1 then the above error situation happened.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Return error code that 0x4015.</title><link>https://devzone.nordicsemi.com/thread/120707?ContentTypeID=1</link><pubDate>Tue, 13 Feb 2018 13:13:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7f5ab790-df1b-4387-9787-78fbc0504959</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Have you tried to look into my question:&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In specific I suggest to check that each channel you setup (hrm and bsc) have it&amp;#39;s own unique:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;@param[in] ucChannel is an unsigned char (1 octet) denoting the channel to assign/open.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If several channel use the same&amp;nbsp;ucChannel, then you very likely will get 0x4015.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Return error code that 0x4015.</title><link>https://devzone.nordicsemi.com/thread/120645?ContentTypeID=1</link><pubDate>Tue, 13 Feb 2018 00:29:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f5780019-ba26-4859-9b47-c6e612b5e784</guid><dc:creator>Woody Hung</dc:creator><description>&lt;p&gt;Sorry, i modified my question.&lt;/p&gt;
&lt;p&gt;If i opened ant hrm disp channel, i did not send bsc packet.&lt;br /&gt;Then success.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;And, if i opened ant&amp;nbsp; bsc disp channel, i send bsc packet.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Then success.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;But, if i opened ant&amp;nbsp; bsc disp channel, i did not send bsc packet.&lt;/p&gt;
&lt;p&gt;A period of time later.&lt;/p&gt;
&lt;p&gt;Then return error code that 0x4015.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Return error code that 0x4015.</title><link>https://devzone.nordicsemi.com/thread/120526?ContentTypeID=1</link><pubDate>Mon, 12 Feb 2018 09:19:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c8be63d-d476-4216-9a05-9184c008182c</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I suggest you try to set some breakpoints or debug output in your code to find exactly which softdevice api call that return error code 0x4015 (NRF_ANT_ERROR_CHANNEL_IN_WRONG_STATE).&lt;/p&gt;
&lt;p&gt;It may be that you are trying to assign or open a channel that is already configured. In specific I suggest to check that each channel you setup have it&amp;#39;s own unique:&amp;nbsp;&lt;br /&gt;@param[in] ucChannel is an unsigned char (1 octet) denoting the channel to assign/open.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>