<?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>btattach command hanging when using HCI UART sample nrf52840</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/116230/btattach-command-hanging-when-using-hci-uart-sample-nrf52840</link><description>When flashing the chip with a build from the samples/bluetooth/hci_uart via west build -b nrf52840dk/nrf52840 samples/bluetooth/hci_uart --pristine and west flash off the current main of sdk-zephyr, a btattach command from a linux host connected to the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 14 Nov 2024 17:22:19 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/116230/btattach-command-hanging-when-using-hci-uart-sample-nrf52840" /><item><title>RE: btattach command hanging when using HCI UART sample nrf52840</title><link>https://devzone.nordicsemi.com/thread/510550?ContentTypeID=1</link><pubDate>Thu, 14 Nov 2024 17:22:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4b8c123e-d791-4660-a0a9-04abee7484b0</guid><dc:creator>samanthacho</dc:creator><description>&lt;p&gt;Great, thank you so much!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: btattach command hanging when using HCI UART sample nrf52840</title><link>https://devzone.nordicsemi.com/thread/510416?ContentTypeID=1</link><pubDate>Thu, 14 Nov 2024 08:47:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:340a5ffc-e11e-4411-9101-d5b66cfadda6</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;I&amp;#39;m glad to hear that it worked. This likely means that there is a problem with the UART flow control signals. This problem should be addressed if you want to use the H:4 protocol. Otherwise, the new 3-wire HCI sample may be an alternative.&lt;/p&gt;
&lt;p&gt;Regarding privacy, this can be disabled in the controller by adding&amp;nbsp;CONFIG_BT_CTLR_PRIVACY=n to your project configuration file.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: btattach command hanging when using HCI UART sample nrf52840</title><link>https://devzone.nordicsemi.com/thread/510384?ContentTypeID=1</link><pubDate>Wed, 13 Nov 2024 23:58:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fee98bba-7c83-439d-a828-eb51375328ca</guid><dc:creator>samanthacho</dc:creator><description>&lt;p&gt;Thank you!! I did the second option, and am seeing the chip respond as expected!&lt;/p&gt;
&lt;p&gt;A follow up question -- is there a way to disable the&amp;nbsp;LE Privacy operation? I am seeing the bluetoothd daemon error when attempting to get the address due to not being able to open the crypto module `Failed to open crypto` -- It seems like this could be mitigated by enabling&amp;nbsp;CONFIG_CRYPTO_USER, but this is not an option for us due to incompatibilities with other kernel modules.&lt;/p&gt;
&lt;p&gt;When looking at the bluetoothd/bluez5 code, it seems like we can skip it all together if we disable LE privacy in the BT controller:&lt;br /&gt;```&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt; /*&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; * If the controller does not support LE Privacy operation,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; * there is no support for loading identity resolving keys&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; * into the kernel.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; */&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;```&lt;/p&gt;
&lt;p&gt;^ That is from&amp;nbsp;bluez/src/adapter.c, 5.54 version.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I have patched other sections to avoid using the crypto library callouts in this fashion, and to instead use openssl, but I am wondering if there is a way to disable the LE privacy mode as I don&amp;#39;t need to support it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: btattach command hanging when using HCI UART sample nrf52840</title><link>https://devzone.nordicsemi.com/thread/510302?ContentTypeID=1</link><pubDate>Wed, 13 Nov 2024 13:21:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ad4302cd-9c20-4bfc-a7c2-e1afef4546d0</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="samanthacho"]he `btattach` command from the host, the DK responds with `0e 04 01 03 0c 00`, which I believe to be the successful completion of a reset of the BT controller.[/quote]
&lt;p&gt;You are right. I made a HCI capture with btmon showing the command exchange when I run btattach and I see the same response to the reset command.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;HCI capture (can be viewed in Wireshark):&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/btmon_5F00_trace_5F00_attach.pcapng"&gt;devzone.nordicsemi.com/.../btmon_5F00_trace_5F00_attach.pcapng&lt;/a&gt;&lt;/p&gt;
[quote user="samanthacho"]&lt;p&gt;&lt;span&gt;- subsequent requests are propagated to the BT controller, but the interrupt to attempt to send them is never triggered, thus the tx_isr is never called and no data is attempted to be transmitted over uart.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Should the whole message be sent in tx_isr via the `uart_fifo_fill` function? If not, when are the rest of the bytes supposed to be transmitted? Also, when data is added via `&lt;/span&gt;h4_send`, why is the interrupt to send the data via tx_isr not being triggered?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Also is this statement in hci_uart/src/main.c correct?&lt;/p&gt;[/quote]
&lt;p&gt;I see the same &amp;quot;spurious interrupt&amp;quot; message when enabling debug logging over RTT:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;00:01:04.220,855] &amp;lt;dbg&amp;gt; hci_uart: h4_send: buf 0x2000c544 type 1 len 7
[00:01:04.222,137] &amp;lt;dbg&amp;gt; hci_uart: h4_read: read 1 req 1
[00:01:04.222,137] &amp;lt;dbg&amp;gt; hci_uart: h4_read: read 1 req 3
[00:01:04.222,167] &amp;lt;dbg&amp;gt; hci_uart: h4_read: read 2 req 2
[00:01:04.222,198] &amp;lt;dbg&amp;gt; hci_uart: h4_read: read 0 req 2
[00:01:04.222,229] &amp;lt;dbg&amp;gt; hci_uart: bt_uart_isr: spurious interrupt rx:0 tx:0
[00:01:04.223,419] &amp;lt;dbg&amp;gt; hci_uart: h4_read: read 1 req 2
[00:01:04.223,449] &amp;lt;dbg&amp;gt; hci_uart: h4_read: read 1 req 1
[00:01:04.223,449] &amp;lt;dbg&amp;gt; hci_uart: rx_isr: putting RX packet in queue.
[00:01:04.223,480] &amp;lt;dbg&amp;gt; hci_uart: h4_read: read 0 req 1
[00:01:04.223,510] &amp;lt;dbg&amp;gt; hci_uart: bt_uart_isr: spurious interrupt rx:0 tx:0
[00:01:04.223,632] &amp;lt;dbg&amp;gt; hci_uart: h4_send: buf 0x2000c544 type 1 len 7
[00:01:04.232,543] &amp;lt;dbg&amp;gt; hci_uart: h4_read: read 1 req 1
[00:01:04.232,574] &amp;lt;dbg&amp;gt; hci_uart: h4_read: read 2 req 3
[00:01:04.232,604] &amp;lt;dbg&amp;gt; hci_uart: h4_read: read 0 req 1
[00:01:04.232,635] &amp;lt;dbg&amp;gt; hci_uart: bt_uart_isr: spurious interrupt rx:0 tx:0
[00:01:04.235,870] &amp;lt;dbg&amp;gt; hci_uart: h4_read: read 1 req 1
[00:01:04.235,900] &amp;lt;dbg&amp;gt; hci_uart: h4_read: read 0 req 0
[00:01:04.235,931] &amp;lt;dbg&amp;gt; hci_uart: rx_isr: putting RX packet in queue.
[00:01:04.236,053] &amp;lt;dbg&amp;gt; hci_uart: h4_send: buf 0x2000c544 type 1 len 15&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I assume&amp;nbsp;maybe the code is triggering the TX interrupt when it is not supposed to, but have not been able to confirm that yet. However, it does not seem to affect the HCI communication. I can still scan for devices in btmgr (with &amp;#39;find -l&amp;#39;)&lt;/p&gt;
&lt;p&gt;But it is strange that the tx fifo is not being emptied in your case. It makes me suspect that&amp;nbsp;could be an issue with the flow control. Could you try updating your sdk to the&amp;nbsp;v2.8.0-rc2 tag and try the&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/samples/bluetooth/hci_uart_3wire/README.html"&gt;HCI 3-wire (H:5)&lt;/a&gt;&amp;nbsp;sample without flow control?&lt;/p&gt;
&lt;p&gt;Note that this sample requires you to use the&amp;nbsp;&lt;span&gt;hciattach command to attach the device.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;sudo hciattach -n /dev/ttyACM0 3wire 1000000&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;v2.7.0/nrf$ git fetch
v2.7.0/nrf$ git checkout v2.8.0-rc2
v2.7.0/nrf$ west update&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Edit: &lt;/strong&gt;Another way to check if this issue is caused by flow control is to lower the baud rate in the board overlay from 1M to 115200 and disable hardware flow control in your existing project. Although it may not be stable without flow control, you should be able to receive command responses if flow control is the problem.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: btattach command hanging when using HCI UART sample nrf52840</title><link>https://devzone.nordicsemi.com/thread/510204?ContentTypeID=1</link><pubDate>Wed, 13 Nov 2024 00:21:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:90fcb036-1c3e-47b3-842b-c8ff168b1fab</guid><dc:creator>samanthacho</dc:creator><description>&lt;p&gt;Upon further debugging efforts, what I am seeing is that it seems like the BT controller is not responding the way we are expected.&lt;br /&gt;- On the first issue of the `btattach` command from the host, the DK responds with `0e 04 01 03 0c 00`, which I believe to be the successful completion of a reset of the BT controller.&lt;/p&gt;
&lt;p&gt;- the `tx_isr` function is triggered via interrupt, and the transmit buffer currently contains 7 bytes,&amp;nbsp;&lt;span&gt;`04 0e 04 01 03 0c 00`, which is the reset response.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;- the buffer is left with 6 bytes (the value of the rest of the reset command) and these are never transmitted&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;- subsequent requests are propagated to the BT controller, but the interrupt to attempt to send them is never triggered, thus the tx_isr is never called and no data is attempted to be transmitted over uart.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Should the whole message be sent in tx_isr via the `uart_fifo_fill` function? If not, when are the rest of the bytes supposed to be transmitted? Also, when data is added via `&lt;/span&gt;h4_send`, why is the interrupt to send the data via tx_isr not being triggered?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Also is this statement in hci_uart/src/main.c correct?&lt;br /&gt;```&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;if&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span&gt;!&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;uart_irq_rx_ready&lt;/span&gt;&lt;span&gt;(hci_uart_dev) &lt;/span&gt;&lt;span&gt;||&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;uart_irq_tx_ready&lt;/span&gt;&lt;span&gt;(hci_uart_dev))) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;LOG_DBG&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&amp;quot;spurious interrupt&amp;quot;&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; }&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;```&lt;/p&gt;
&lt;p&gt;I am wondering if it should be `&lt;span&gt;if&lt;/span&gt;&lt;span&gt;&amp;nbsp;(&lt;/span&gt;&lt;span&gt;!(&lt;/span&gt;&lt;span&gt;uart_irq_rx_ready&lt;/span&gt;&lt;span&gt;(hci_uart_dev)&amp;nbsp;&lt;/span&gt;&lt;span&gt;||&amp;nbsp;&lt;/span&gt;&lt;span&gt;uart_irq_tx_ready&lt;/span&gt;&lt;span&gt;(hci_uart_dev))`?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: btattach command hanging when using HCI UART sample nrf52840</title><link>https://devzone.nordicsemi.com/thread/510197?ContentTypeID=1</link><pubDate>Tue, 12 Nov 2024 21:12:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0e1717d2-54bb-4ea9-9e71-50ab087afe89</guid><dc:creator>samanthacho</dc:creator><description>&lt;p&gt;Yes,&amp;nbsp;I&amp;nbsp;verified the pins are connected for the HW flow control.&lt;/p&gt;
&lt;p&gt;```&lt;/p&gt;
&lt;p&gt;[00:02:03.923,492] &amp;lt;wrn&amp;gt; hci_uart: rx is ready&lt;br /&gt;[00:02:03.923,522] &amp;lt;wrn&amp;gt; hci_uart: read 1 req 1&lt;br /&gt;[00:02:03.923,522] &amp;lt;wrn&amp;gt; hci_uart: read 3 req 3&lt;br /&gt;[00:02:03.923,553] &amp;lt;wrn&amp;gt; hci_uart: read 0 req 0&lt;br /&gt;[00:02:03.923,583] &amp;lt;wrn&amp;gt; hci_uart: putting RX packet in queue.&lt;br /&gt;[00:02:03.923,614] &amp;lt;wrn&amp;gt; hci_uart: spurious interrupt&lt;br /&gt;[00:02:03.923,889] &amp;lt;wrn&amp;gt; hci_uart: buf 0x2000e620 type 1 len 7&lt;/p&gt;
&lt;p&gt;```&lt;/p&gt;
&lt;p&gt;I am seeing when using the RTT debugger that when the `hciconfig hci0 up` command is initiated from the host, although the DK receives packages over the UART, it never attempts to transmit via `tx_isr`. I also do not see the device moving the tx to enabled.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: btattach command hanging when using HCI UART sample nrf52840</title><link>https://devzone.nordicsemi.com/thread/510190?ContentTypeID=1</link><pubDate>Tue, 12 Nov 2024 19:21:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b5597dc2-77f0-4de6-bb51-5894781bb3b1</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Yes, the baudrate should be 1M if you build for the nrf52840dk/nrf52840 because of the Devicetree overlay in &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/main/samples/bluetooth/hci_uart/boards/nrf52840dk_nrf52840.overlay"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/main/samples/bluetooth/hci_uart/boards/nrf52840dk_nrf52840.overlay&lt;/a&gt;. The overlay also sets the &amp;#39;&lt;a href="https://docs.zephyrproject.org/latest/build/dts/api/bindings/serial/nordic%2Cnrf-uart.html"&gt;hw-flow-control&lt;/a&gt;&amp;#39; property which enables the CTS and RTS handshake signals. Are those connected to your Linux host?&lt;/p&gt;
&lt;p&gt;EDIT: I tested this sample on an nRF52840 DK using the default build configuration in SDK 2.7.0 with an Ubuntu 22.04 host, but was not able to reproduce the issue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: btattach command hanging when using HCI UART sample nrf52840</title><link>https://devzone.nordicsemi.com/thread/510187?ContentTypeID=1</link><pubDate>Tue, 12 Nov 2024 18:53:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:17bdb6b9-f8fd-4b07-aa5a-f9dd6dcf704e</guid><dc:creator>samanthacho</dc:creator><description>&lt;p&gt;To confirm is the baudrate correct&amp;nbsp;at `&lt;span&gt;1000000` for the btattach command?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: btattach command hanging when using HCI UART sample nrf52840</title><link>https://devzone.nordicsemi.com/thread/510182?ContentTypeID=1</link><pubDate>Tue, 12 Nov 2024 18:09:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b2b69d6d-b2d2-45e8-a330-1bd3a40ff627</guid><dc:creator>samanthacho</dc:creator><description>&lt;p&gt;Yes I am not using the 32kHz crystal, I have made the suggested change. Thank you!&lt;/p&gt;
&lt;p&gt;I rebuilt with with the suggested SDK -- what I am seeing is that the chip seems to be receiving messages over&amp;nbsp;UART&amp;nbsp;from the host device (I can see the interrupt RX&amp;nbsp;commands being called), and I can see the TX interrupt being called, but the host device does not seem to be receiving any of the transmitted data over UART, thus all the commands to bring up the UART interface are timing out.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: btattach command hanging when using HCI UART sample nrf52840</title><link>https://devzone.nordicsemi.com/thread/510022?ContentTypeID=1</link><pubDate>Tue, 12 Nov 2024 07:33:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:035196f5-d238-49e4-a486-6d7204198d7b</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;It&amp;nbsp;looks like you’re not using the 52840 DK board with the optional 32 kHz crystal mounted. In that case, you need to change the low frequency clock source from the crystal oscillator to the internal RC oscillator (&lt;a href="https://docs.nordicsemi.com/bundle/ps_nrf52840/page/clock.html#ariaid-title4"&gt;LFCLK controller&lt;/a&gt;. To do this, add &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/a70d6bd9660a3450f264d1d7017828196a964b3f/drivers/clock_control/Kconfig.nrf#L33"&gt;CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC&lt;/a&gt;=y to your project configuration file.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I would also recommend you consider using the nRF Connect SDK (west init -m &lt;a href="https://github.com/nrfconnect/sdk-nrf"&gt;https://github.com/nrfconnect/sdk-nrf&lt;/a&gt;&amp;nbsp; --mr v2.7.0) which includes a qualified Bluetooth controller (&lt;a href="https://docs.nordicsemi.com/bundle/comp_matrix_nrf52840/page/COMP/nrf52840/nrf52840_ble_qdid_qual_matrix.html#nrf52840_ble_qdid_qual_matrix__sd-fn"&gt;Bluetooth QDIDs&lt;/a&gt;, ).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: btattach command hanging when using HCI UART sample nrf52840</title><link>https://devzone.nordicsemi.com/thread/510002?ContentTypeID=1</link><pubDate>Tue, 12 Nov 2024 01:22:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:43af1d58-c79a-4fd0-80ca-dc4f1123f8eb</guid><dc:creator>samanthacho</dc:creator><description>&lt;p&gt;By commenting out `z_nrf_clock_control_lf_on` in `zephyr/drivers/timer/nrf_rtc_timer.c`, the device moves into the application stage, and I see the uart init function being called.&amp;nbsp;However, the device is still down and cannot be communicated with.&lt;/p&gt;
&lt;p&gt;```&lt;/p&gt;
&lt;p&gt;&amp;nbsp;btattach -B /dev/ttyMSM2 -S 1000000 -P h4 &amp;amp;&lt;/p&gt;
&lt;p&gt;```&lt;/p&gt;
&lt;p&gt;```&lt;/p&gt;
&lt;p&gt;root@7f0311c2-29f3-400f-89ff-27f9b285608a:~# hciconfig&lt;br /&gt;hci0: Type: Primary Bus: UART&lt;br /&gt; BD Address: 00:00:00:00:00:00 ACL MTU: 0:0 SCO MTU: 0:0&lt;br /&gt; DOWN&lt;br /&gt; RX bytes:0 acl:0 sco:0 events:0 errors:0&lt;br /&gt; TX bytes:4 acl:0 sco:0 commands:1 errors:0&lt;/p&gt;
&lt;p&gt;```&lt;/p&gt;
&lt;p&gt;When I initiate from the host device (running bluez) the `btattach` command, or an `hciconfig hci0 up`, I see `bt_uart_isr` being called on the device, but the host device eventually reports the command times out&amp;nbsp;&lt;br /&gt;```&lt;/p&gt;
&lt;p&gt;root:~# hciconfig hci0 up&lt;br /&gt;Can&amp;#39;t init device hci0: Connection timed out (110)&lt;/p&gt;
&lt;p&gt;```&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: btattach command hanging when using HCI UART sample nrf52840</title><link>https://devzone.nordicsemi.com/thread/509991?ContentTypeID=1</link><pubDate>Mon, 11 Nov 2024 21:54:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:63ce4258-1cb0-499b-ab5d-6b05d385efe8</guid><dc:creator>samanthacho</dc:creator><description>&lt;p&gt;when looking at the backtrace from gdb, it looks like the hci_uart_init is not being called, and the device is not moving past the PRE_KERNEL_2 stage:&lt;/p&gt;
&lt;p&gt;```&lt;/p&gt;
&lt;p&gt;arch_cpu_atomic_idle (key=key@entry=32) at /Users/samantha.cho/clones/zephyrproject/zephyr/arch/arm/core/cortex_m/cpu_idle.c:136&lt;br /&gt;136 arch_irq_unlock(key);&lt;br /&gt;(gdb) bt&lt;br /&gt;#0 arch_cpu_atomic_idle (key=key@entry=32) at /Users/samantha.cho/clones/zephyrproject/zephyr/arch/arm/core/cortex_m/cpu_idle.c:136&lt;br /&gt;#1 0x0001648a in k_cpu_atomic_idle (key=32) at /Users/samantha.cho/clones/zephyrproject/zephyr/include/zephyr/kernel.h:6017&lt;br /&gt;#2 lfclk_spinwait (mode=CLOCK_CONTROL_NRF_LF_START_STABLE) at /Users/samantha.cho/clones/zephyrproject/zephyr/drivers/clock_control/clock_control_nrf.c:515&lt;br /&gt;#3 z_nrf_clock_control_lf_on (start_mode=start_mode@entry=CLOCK_CONTROL_NRF_LF_START_STABLE) at /Users/samantha.cho/clones/zephyrproject/zephyr/drivers/clock_control/clock_control_nrf.c:571&lt;br /&gt;#4 0x000173ac in sys_clock_driver_init () at /Users/samantha.cho/clones/zephyrproject/zephyr/drivers/timer/nrf_rtc_timer.c:766&lt;br /&gt;#5 0x00018242 in z_sys_init_run_level (level=level@entry=INIT_LEVEL_PRE_KERNEL_2) at /Users/samantha.cho/clones/zephyrproject/zephyr/kernel/init.c:371&lt;br /&gt;#6 0x0001840a in z_cstart () at /Users/samantha.cho/clones/zephyrproject/zephyr/kernel/init.c:779&lt;br /&gt;#7 0x00003ab4 in z_prep_c () at /Users/samantha.cho/clones/zephyrproject/zephyr/arch/arm/core/cortex_m/prep_c.c:209&lt;br /&gt;#8 0x000038fe in z_arm_reset () at /Users/samantha.cho/clones/zephyrproject/zephyr/arch/arm/core/cortex_m/reset.S:169&lt;br /&gt;Backtrace stopped: previous frame identical to this frame (corrupt stack?)&lt;/p&gt;
&lt;p&gt;```&lt;/p&gt;
&lt;p&gt;I also added a breakpoint to the hci_uart_init, and don&amp;#39;t see it being called. Is there something needed to make the chip move into the application stage?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: btattach command hanging when using HCI UART sample nrf52840</title><link>https://devzone.nordicsemi.com/thread/509990?ContentTypeID=1</link><pubDate>Mon, 11 Nov 2024 21:37:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4c1f07cf-f8aa-4cf8-acdf-bb4b536bc74c</guid><dc:creator>samanthacho</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;After initiating the `power on` command via btmgmt, it fails with an invalid index error:&lt;br /&gt;```&lt;/p&gt;
&lt;p&gt;[hci0]# power on&lt;br /&gt;Set Powered for hci1 failed with status 0x11 (Invalid Index)&lt;/p&gt;
&lt;p&gt;```&lt;/p&gt;
&lt;p&gt;btmon logs don&amp;#39;t seem too informative, just reporting the same error:&lt;/p&gt;
&lt;p&gt;```&lt;/p&gt;
&lt;p&gt;@ MGMT Open: btmon (privileged) version 1.14 {0x0002} 0.368619&lt;br /&gt;@ MGMT Command: Set Powered (0x0005) plen 1 {0x0001} [&lt;span&gt;hci0&lt;/span&gt;] 3.136329&lt;br /&gt; Powered: Enabled (0x01)&lt;br /&gt;@ MGMT Event: Command Status (0x0002) plen 3 {0x0001} [&lt;span&gt;hci0&lt;/span&gt;] 3.136349&lt;br /&gt; Set Powered (0x0005)&lt;br /&gt; Status: Invalid Index (0x11)&lt;br /&gt;@ MGMT Close: btmgmt&lt;/p&gt;
&lt;p&gt;```&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: btattach command hanging when using HCI UART sample nrf52840</title><link>https://devzone.nordicsemi.com/thread/509977?ContentTypeID=1</link><pubDate>Mon, 11 Nov 2024 19:06:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cc57e2fb-c4cf-469d-9eef-07f3256cf219</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The CONFIG_BT_CTLR symbol must be enabled in the build, as this configuration includes the Bluetooth controller. The instructions for disabling CONFIG_BT_CTLR apply if you plan to connect another board with the Zephyr host to your board, instead of using the BlueZ host on your Linux system. &lt;/p&gt;
&lt;p&gt;After attaching the HCI interface, open another terminal and run $ sudo btmgmt --index 1, then issue the &amp;#39;power on&amp;#39; command to initialize the interface. If this doesn&amp;#39;t work, please run &amp;#39;btmon&amp;#39; and repeat the steps to see if any errors are reported.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: btattach command hanging when using HCI UART sample nrf52840</title><link>https://devzone.nordicsemi.com/thread/509969?ContentTypeID=1</link><pubDate>Mon, 11 Nov 2024 18:27:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:669274a1-7952-4d02-9cea-c84e689e6103</guid><dc:creator>samanthacho</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I believe the device is not running -- I don&amp;#39;t see the hci init being called when adding a breakpoint via gdb, and on my host device, I see the device being reported as down. Is disabling the config&amp;nbsp;&lt;span&gt;CONFIG_BT_CTLR&lt;/span&gt; on the Zephyr device necessary, as suggested by the HCI UART instructions, and if so, how do I resolve the build failures seen when disabling it for the sample?&lt;/p&gt;
&lt;p&gt;```&lt;/p&gt;
&lt;p&gt;root@7f0311c2-29f3-400f-89ff-27f9b285608a:~# hciconfig&lt;br /&gt;hci0: Type: Primary Bus: UART&lt;br /&gt; BD Address: 00:00:00:00:00:00 ACL MTU: 0:0 SCO MTU: 0:0&lt;br /&gt; DOWN&lt;br /&gt; RX bytes:0 acl:0 sco:0 events:0 errors:0&lt;br /&gt; TX bytes:4 acl:0 sco:0 commands:1 errors:0&lt;/p&gt;
&lt;p&gt;```&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: btattach command hanging when using HCI UART sample nrf52840</title><link>https://devzone.nordicsemi.com/thread/509929?ContentTypeID=1</link><pubDate>Mon, 11 Nov 2024 14:42:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0fb818db-c659-4238-be70-8f32cf03e59d</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;&lt;span&gt;btattach will not return&amp;nbsp;when the device is successfully attached. Instead it will continue running to manage the connection with the HCI interface. &lt;/span&gt;&lt;span&gt;You can open another terminal window or tab to use the interface. Alternatively, you can create a systemd service,etc to let&amp;nbsp;btattach&amp;nbsp;run in the background.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Vidar&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>