<?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>BLE Uart,how to sent out faster after connected()</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/115277/ble-uart-how-to-sent-out-faster-after-connected</link><description>hello 
 NCS2.0.2/2.3.0, vscode 
 
 Bluetooth: Peripheral UART 
 
 
 i add a fun as follow: 
 void PutToBleSend() 
 { 
 struct uart_data_t *buf = k_malloc(sizeof(struct uart_data_t)); 
 if (buf) { 
 sprintf(buf-&amp;gt;data, &amp;quot;KEY-003&amp;quot;); 
 buf-&amp;gt;len = strlen(buf</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 08 Oct 2024 22:00:12 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/115277/ble-uart-how-to-sent-out-faster-after-connected" /><item><title>RE: BLE Uart,how to sent out faster after connected()</title><link>https://devzone.nordicsemi.com/thread/505432?ContentTypeID=1</link><pubDate>Tue, 08 Oct 2024 22:00:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:18f4705a-1247-4c4f-8446-6ffd46d47f7d</guid><dc:creator>Sigurd</dc:creator><description>[quote user="yuyou"]1.is there a function&amp;nbsp;for know has paired?&amp;nbsp;[/quote]
&lt;p&gt;If you want to know if a pairing &lt;span&gt;procedure&amp;nbsp;was&amp;nbsp;&lt;/span&gt;completed, you can r&lt;span&gt;egister authentication information callbacks&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Snippet:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void pairing_complete(struct bt_conn *conn, bool bonded)
{
LOG_INF(&amp;quot;Pairing completed: %s, bonded: %d&amp;quot;, log_addr(conn), bonded);
}

static void pairing_failed(struct bt_conn *conn, enum bt_security_err reason)
{
LOG_INF(&amp;quot;Pairing failed conn: %s, reason %d %s&amp;quot;, log_addr(conn), reason,
bt_security_err_to_str(reason));
}





static struct bt_conn_auth_info_cb conn_auth_info_callbacks = {
.pairing_complete = pairing_complete,
.pairing_failed = pairing_failed
};





err = bt_conn_auth_info_cb_register(&amp;amp;conn_auth_info_callbacks);
if (err) {
printk(&amp;quot;Failed to register authorization info callbacks.\n&amp;quot;);&lt;/pre&gt;&lt;/p&gt;
[quote user="yuyou"]&lt;p&gt;&lt;span&gt;2.nrf52820 system off take 36uA, how to&amp;nbsp;reduce power consumption? see SCH as follow:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;[/quote]
&lt;p&gt;This seems like a new unrelated question. Please open a new case for the power consumption question.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Uart,how to sent out faster after connected()</title><link>https://devzone.nordicsemi.com/thread/505262?ContentTypeID=1</link><pubDate>Tue, 08 Oct 2024 02:23:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:86ebd9b9-60b8-46cd-8176-dd805539f5f5</guid><dc:creator>yoyou</dc:creator><description>&lt;p&gt;thanks for reply,&lt;/p&gt;
&lt;p&gt;tow questions:&lt;/p&gt;
&lt;p&gt;&lt;span&gt;1.is there a function&amp;nbsp;for know has paired?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;2.nrf52820 system off take 36uA, how to&amp;nbsp;reduce power consumption? see SCH as follow:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span style="color:#0000ff;"&gt;static int disable_ds_1(const struct device *dev)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#0000ff;"&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#0000ff;"&gt;&amp;nbsp; &amp;nbsp; ARG_UNUSED(dev);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#0000ff;"&gt;&amp;nbsp; &amp;nbsp; pm_policy_state_lock_get(PM_STATE_SOFT_OFF);// NCS2.0.0+&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#0000ff;"&gt;&amp;nbsp; &amp;nbsp; return 0;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#0000ff;"&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#0000ff;"&gt;SYS_INIT(disable_ds_1, PRE_KERNEL_2, 0);&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;&lt;span style="color:#0000ff;"&gt;void go_system_off(char n)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#0000ff;"&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#0000ff;"&gt;&amp;nbsp; &amp;nbsp; printk(&amp;quot;%s system off (%d)\n&amp;quot;, CONFIG_BOARD,n);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#0000ff;"&gt;&amp;nbsp; &amp;nbsp; // Configure to generate PORT event (wakeup) on button 1 press.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#0000ff;"&gt;&amp;nbsp; &amp;nbsp; nrf_gpio_cfg_input(NRF_DT_GPIOS_TO_PSEL(DT_NODELABEL(button0), gpios),NRF_GPIO_PIN_NOPULL);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#0000ff;"&gt;&amp;nbsp; &amp;nbsp; nrf_gpio_cfg_sense_set(NRF_DT_GPIOS_TO_PSEL(DT_NODELABEL(button0), gpios),NRF_GPIO_PIN_SENSE_LOW);&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;&lt;span style="color:#0000ff;"&gt;&amp;nbsp; &amp;nbsp; const struct pm_state_info si = {PM_STATE_SOFT_OFF, 0, 0};&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#0000ff;"&gt;&amp;nbsp; &amp;nbsp; pm_state_force(0, &amp;amp;si);//1.9.99+&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#0000ff;"&gt;&amp;nbsp; &amp;nbsp; k_msleep(100);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#0000ff;"&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE Uart,how to sent out faster after connected()</title><link>https://devzone.nordicsemi.com/thread/505181?ContentTypeID=1</link><pubDate>Mon, 07 Oct 2024 12:33:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c1f4588b-4529-44ee-a7e0-b14b52187f8c</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;Take a look at how the&amp;nbsp;throughput sample is configured. That sample is configured for&amp;nbsp;optimizing BLE throughput.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/v2.3.0/samples/bluetooth/throughput/prj.conf"&gt;https://github.com/nrfconnect/sdk-nrf/blob/v2.3.0/samples/bluetooth/throughput/prj.conf&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>