<?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>Send uint8_t array over bluetooth mesh (beginner)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/35734/send-uint8_t-array-over-bluetooth-mesh-beginner</link><description>hello 
 Im trying to send a small array with two integers over bluetooth mesh 
 
 
 
 but Im getting error code 7 invalid params.. 
 how should I send an array like this? and why is this way wrong? 
 
 thanks in advance</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 26 Jun 2018 16:06:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/35734/send-uint8_t-array-over-bluetooth-mesh-beginner" /><item><title>RE: Send uint8_t array over bluetooth mesh (beginner)</title><link>https://devzone.nordicsemi.com/thread/137746?ContentTypeID=1</link><pubDate>Tue, 26 Jun 2018 16:06:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c1e3f512-49db-4fa4-8fb1-3d83d59d99f3</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I must admit I cannot imagine what would be the difference between those two, apart from the length of the reply message, and a shorter one should not really differ.&lt;/p&gt;
&lt;p&gt;Do you have a minimal example that I can use to reproduce this? I.e. either a full project, or a main file that replaces that of an existing example, that includes the offending code (so that I can try a debug session here.) If I am able to reproduce it here then I can do some debugging.&lt;/p&gt;
&lt;p&gt;I also encourage you to do a debug session in your end, putting breakpoints and perhaps debug log messages in the call to access_model_publish() and deeper down the call chain, for locating what check fails (and then why).&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send uint8_t array over bluetooth mesh (beginner)</title><link>https://devzone.nordicsemi.com/thread/137671?ContentTypeID=1</link><pubDate>Tue, 26 Jun 2018 12:12:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:25a4861c-66ca-4d7a-ab3e-65e286ccaf24</guid><dc:creator>mike</dc:creator><description>&lt;p&gt;I dont know...sending an array with chars like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;uint32_t error_code;
    
    uint8_t array[8];
    sprintf(array, &amp;quot;%u&amp;quot;, nbr_of_packets);
    simple_on_off_server_t * p_server = p_args;
    access_message_tx_t reply;
    reply.opcode.opcode = RECEIVE_RESPONSE;
    reply.opcode.company_id = ACCESS_COMPANY_ID_NORDIC;
    reply.p_buffer =(const uint8_t *)&amp;amp;array;
 
    reply.force_segmented = false;
    reply.length = sizeof(array);
    error_code = access_model_publish(p_server-&amp;gt;model_handle, &amp;amp;reply);
    __LOG(LOG_SRC_APP, LOG_LEVEL_INFO,&amp;quot;ERROR CODE: 0x%0x Message sent: %s \n&amp;quot;,error_code, reply.p_buffer);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;works fine, no need to set other params here..&lt;/p&gt;
&lt;p&gt;the nbr_of_packets is an uint16_t by the way&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send uint8_t array over bluetooth mesh (beginner)</title><link>https://devzone.nordicsemi.com/thread/137516?ContentTypeID=1</link><pubDate>Mon, 25 Jun 2018 16:02:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a4cbde05-4fcc-46d9-b86e-64d45a74a236</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;It may be because not all the fields of the &lt;code&gt;access_message_tx_t reply&lt;/code&gt; is set. You miss &lt;code&gt;access_token&lt;/code&gt; (which is not important, you could set it to &lt;code&gt;0&lt;/code&gt;) and &lt;code&gt;transmic_size&lt;/code&gt; (for which &lt;code&gt;NRF_MESH_TRANSMIC_SIZE_DEFAULT&lt;/code&gt; should do.)&lt;/p&gt;
&lt;p&gt;See the &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.meshsdk.v2.0.1%2Fgroup__ACCESS.html&amp;amp;anchor=ga1f010f6f4e2fef3250e7566d40accb3e"&gt;access_model_publish()&lt;/a&gt; documentation for other reasons why the return value may be &lt;code&gt;NRF_INVALID_PARAM&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>