<?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>Writing to peripheral ( 0 packets sent)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/7860/writing-to-peripheral-0-packets-sent</link><description>Hi, 
 i&amp;#39;m using s130 central/peripheral. I want to send data from my central nrf51822 to my peripheral nrf51822. 
 I declare write function like this: 
 static void writeChar (uint16_t peripheral_id,uint8_t *zelVrednost)
{
 uint32_t error_code =</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 26 Jun 2015 11:20:18 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/7860/writing-to-peripheral-0-packets-sent" /><item><title>RE: Writing to peripheral ( 0 packets sent)</title><link>https://devzone.nordicsemi.com/thread/28020?ContentTypeID=1</link><pubDate>Fri, 26 Jun 2015 11:20:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:469cbb12-3d21-4fc6-99f3-13fb0e2d17a5</guid><dc:creator>nejcokle</dc:creator><description>&lt;p&gt;Figured it out. I declared the size wrong. I used:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;write_params.len = sizeof(zelVrednost);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;instead of:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;write_params.len = sizeof(*zelVrednost);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;everything works perfect now.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>