<?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>Zephyr crashing when I connect to a device</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/116852/zephyr-crashing-when-i-connect-to-a-device</link><description>has been helping me connect to a device and I am finally able to do that, but as soon as I do, Zephyr crashes. 
 This is with a lightly modified central_uart project [00:00:00.024,810] &amp;lt;0x1b&amp;gt;[0m&amp;lt;inf&amp;gt; central_uart: Scan module initialized&amp;lt;0x1b&amp;gt;[0m␍␊ 
</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 06 Dec 2024 08:16:49 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/116852/zephyr-crashing-when-i-connect-to-a-device" /><item><title>RE: Zephyr crashing when I connect to a device</title><link>https://devzone.nordicsemi.com/thread/513767?ContentTypeID=1</link><pubDate>Fri, 06 Dec 2024 08:16:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a53af551-5312-412b-9af3-542b68db835f</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;The &lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.8.0/page/nrf/libraries/bluetooth_services/services/nus_client.html"&gt;Nordic UART Service (NUS) Client&lt;/a&gt;&amp;nbsp;which the&amp;nbsp;&lt;span&gt;custom_client is based on is specifically&amp;nbsp;made to interface with the Nordic UART Service.&amp;nbsp;Any project that needs to work with this service can include this&amp;nbsp;this implementation by enabling the CONFIG_BT_NUS_CLIENT setting, not just the central_uart sample.&amp;nbsp;If you want, you can&amp;nbsp;remove the need for the nested callbacks in&amp;nbsp;custom_client by integrating&amp;nbsp;the code into your application.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr crashing when I connect to a device</title><link>https://devzone.nordicsemi.com/thread/513697?ContentTypeID=1</link><pubDate>Thu, 05 Dec 2024 17:19:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4a46e9df-287d-4926-9753-0d508c0c0b88</guid><dc:creator>DiBosco</dc:creator><description>[quote userid="4240" url="~/f/nordic-q-a/116852/zephyr-crashing-when-i-connect-to-a-device/513691"]The goal is to decouple the code and allow callbacks to be registered in the application. It was not designed to contain any application specific logic. I don&amp;#39;t see any problems with changing this though. The custom_client.c file I made is more or less&amp;nbsp;a copy of the nrf/subsys/bluetooth/services/nus_client.c file with some renaming and small&amp;nbsp;changes I made along the way to try to match your GATT server.[/quote]
&lt;p&gt;The thing that&amp;nbsp; doesn&amp;#39;t make sense to me with that is that custom_client is full of custom code anyway, the UUIDs are unique to that header as is&lt;/p&gt;
&lt;div style="background-color:#ffffff;color:#000000;font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#0000ff;"&gt;struct&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#267f99;"&gt;bt_custom_client_handles&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;br /&gt;&lt;br /&gt;which depends on what characteristics are in a service. &lt;br /&gt;In other words,it&amp;#39;s not a generic file that you can use with any&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;service. If it was, I could more see the advantage in it. &lt;br /&gt;&lt;br /&gt;The likelihood is that I will go through and simplify as &lt;br /&gt;much of it as I can.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;I still don&amp;#39;t understand a lot of this, and maybe tidying&lt;/div&gt;
&lt;div&gt;up the code as much as possible will help me with that. &lt;br /&gt;&lt;br /&gt;Thanks again for all the help, I&amp;#39;d never have got this&lt;/div&gt;
&lt;div&gt;working otherwise.&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr crashing when I connect to a device</title><link>https://devzone.nordicsemi.com/thread/513691?ContentTypeID=1</link><pubDate>Thu, 05 Dec 2024 16:32:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:afd844ab-b4a6-42c6-bb2a-0419746e033b</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;I&amp;#39;m glad to hear that you are receiving responses now from your peripheral.&lt;/p&gt;
[quote user="DiBosco"]And I see nothing there. If I stop the program there err is &lt;br /&gt;optimised out (and yes I have it building for debugging).[/quote]
&lt;p&gt;&amp;#39;-Og&amp;#39; still enables some optimizations.&amp;nbsp;You can add CONFIG_NO_OPTIMIZATIONS=y to your prj.conf if you want to use &amp;#39;-O0&amp;#39;. Just make sure that you don&amp;#39;t override this in your project build configuration in VS code.&lt;/p&gt;
[quote user="DiBosco"]&lt;span style="color:rgba(121, 94, 38, 1);"&gt;&lt;span style="color:rgba(121, 94, 38, 1);"&gt;ble_data_received_rx&lt;br /&gt;&lt;br /&gt;This is where I get stuff back in from the remote unit over BLE&lt;br /&gt;&lt;br /&gt;What is this for?&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;div style="background-color:rgba(255, 255, 255, 1);color:rgba(0, 0, 0, 1);font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:rgba(121, 94, 38, 1);"&gt;&lt;span style="color:rgba(121, 94, 38, 1);"&gt;&lt;span style="color:rgba(121, 94, 38, 1);"&gt;ble_data_received_tx&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;[/quote]
&lt;p&gt;First one is invoked when receiving notifications from the RX characteristic and the other one is when you receive it from the TX characteristic. I don&amp;#39;t know if your peripheral will actually send anything on the TX characteristic, but the screenshot from phone showed that both characteristics had the &amp;quot;notify&amp;quot; property. If not,&amp;nbsp;I would have just updated the existing function to use the RX handle.&lt;/p&gt;
[quote user="DiBosco"]&lt;span style="color:rgba(121, 94, 38, 1);"&gt;&lt;span style="color:rgba(121, 94, 38, 1);"&gt;Why does this have to be done with the obfuscation &lt;br /&gt;of a callback? Why not call&lt;/span&gt;&lt;/span&gt;
&lt;div style="background-color:rgba(255, 255, 255, 1);color:rgba(0, 0, 0, 1);font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:rgba(121, 94, 38, 1);"&gt;&lt;br /&gt;ble_data_received_rx&lt;br /&gt;&lt;br /&gt;directly? Or even better, simply do all the work in&lt;br /&gt;&lt;br /&gt;ble_data_received_tx&lt;br /&gt;&lt;br /&gt;Without having to call yet another function? Just &lt;br /&gt;seems like an extra layer of unnecessary complexity and code. &lt;br /&gt;&lt;br /&gt;The callbacks and their associated structs are a nightmare &lt;br /&gt;for reducing readability. &lt;/span&gt;&lt;/div&gt;&lt;/div&gt;[/quote]
&lt;p&gt;The goal is to decouple the code and allow callbacks to be registered in the application. It was not designed to contain any application specific logic. I don&amp;#39;t see any problems with changing this though. The custom_client.c file I made is more or less&amp;nbsp;a copy of the nrf/subsys/bluetooth/services/nus_client.c file with some renaming and small&amp;nbsp;changes I made along the way to try to match your GATT server.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr crashing when I connect to a device</title><link>https://devzone.nordicsemi.com/thread/513682?ContentTypeID=1</link><pubDate>Thu, 05 Dec 2024 15:38:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f841ae87-aa16-4a05-a2d6-8eed8836ce03</guid><dc:creator>DiBosco</dc:creator><description>[quote userid="4240" url="~/f/nordic-q-a/116852/zephyr-crashing-when-i-connect-to-a-device/513670"]Unless an ATT error is reported in the callback, the write command will have been sent. Did you check this error code?[/quote]
&lt;p&gt;If there was an error it would be spat out by this in &lt;span style="color:#795e26;"&gt;ble_data_sent&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;div style="background-color:#ffffff;color:#000000;font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#af00db;"&gt;if&lt;/span&gt;&lt;span style="color:#000000;"&gt; (&lt;/span&gt;&lt;span style="color:#001080;"&gt;err&lt;/span&gt;&lt;span style="color:#000000;"&gt; != &lt;/span&gt;&lt;span style="color:#098658;"&gt;0&lt;/span&gt;&lt;span style="color:#000000;"&gt;) &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#000000;"&gt; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;LOG_WRN&lt;/span&gt;&lt;span style="color:#000000;"&gt;(&lt;/span&gt;&lt;span style="color:#a31515;"&gt;&amp;quot;ATT error code: 0x&lt;/span&gt;&lt;span style="color:#001080;"&gt;%02X&lt;/span&gt;&lt;span style="color:#a31515;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:#000000;"&gt;, &lt;/span&gt;&lt;span style="color:#001080;"&gt;err&lt;/span&gt;&lt;span style="color:#000000;"&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#000000;"&gt;&lt;span style="color:#000000;"&gt; }&lt;br /&gt;&lt;br /&gt;And I see nothing there. If I stop the program there err is &lt;br /&gt;optimised out (and yes I have it building for debugging).&lt;/span&gt;&lt;/span&gt;[quote userid="4240" url="~/f/nordic-q-a/116852/zephyr-crashing-when-i-connect-to-a-device/513670"]Did you change the handle value from RX to TX as mentioned in my previous reply?[/quote]&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#000000;"&gt;Hmmm, no I did not, I missed that. &amp;lt;Scrolls back&amp;gt; &lt;br /&gt;&lt;br /&gt;Damnit, yes, that was not changed. &lt;br /&gt;&lt;br /&gt;OK, having changed that it now works in that I can put the&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#000000;"&gt;&lt;span style="color:#000000;"&gt;remote unit into ATE mode. Thank whatever deity you might &lt;br /&gt;worship for that. &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;AND&lt;/strong&gt;, I get data back. &lt;br /&gt;&lt;br /&gt;That might have really broken the back of it finally. &lt;br /&gt;&lt;br /&gt;I have a couple of things I&amp;#39;m not sure about:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;div style="background-color:#ffffff;color:#000000;font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#795e26;"&gt;&lt;span style="color:#795e26;"&gt;ble_data_received_rx&lt;br /&gt;&lt;br /&gt;This is where I get stuff back in from the remote unit over BLE&lt;br /&gt;&lt;br /&gt;What is this for?&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;div style="background-color:#ffffff;color:#000000;font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#795e26;"&gt;&lt;span style="color:#795e26;"&gt;&lt;span style="color:#795e26;"&gt;ble_data_received_tx&lt;br /&gt;&lt;br /&gt;------------------------------------------&lt;br /&gt;&lt;br /&gt;Also, one thing here in &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color:#795e26;"&gt;on_received_tx&lt;/span&gt;&lt;span style="color:#795e26;"&gt;&lt;span style="color:#795e26;"&gt;:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;div style="background-color:#ffffff;color:#000000;font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#af00db;"&gt;return&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#001080;"&gt;custom&lt;/span&gt;&lt;span style="color:#000000;"&gt;-&amp;gt;&lt;/span&gt;&lt;span style="color:#001080;"&gt;cb&lt;/span&gt;&lt;span style="color:#000000;"&gt;.&lt;/span&gt;&lt;span style="color:#001080;"&gt;received_tx&lt;/span&gt;&lt;span style="color:#000000;"&gt;(&lt;/span&gt;&lt;span style="color:#001080;"&gt;custom&lt;/span&gt;&lt;span style="color:#000000;"&gt;, &lt;/span&gt;&lt;span style="color:#001080;"&gt;data&lt;/span&gt;&lt;span style="color:#000000;"&gt;, &lt;/span&gt;&lt;span style="color:#001080;"&gt;length&lt;/span&gt;&lt;span style="color:#000000;"&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;span style="color:#795e26;"&gt;&lt;span style="color:#795e26;"&gt;&lt;br /&gt;Why does this have to be done with the obfuscation &lt;br /&gt;of a callback? Why not call&lt;/span&gt;&lt;/span&gt;
&lt;div style="background-color:#ffffff;color:#000000;font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#795e26;"&gt;&lt;br /&gt;ble_data_received_rx&lt;br /&gt;&lt;br /&gt;directly? Or even better, simply do all the work in&lt;br /&gt;&lt;br /&gt;ble_data_received_tx&lt;br /&gt;&lt;br /&gt;Without having to call yet another function? Just &lt;br /&gt;seems like an extra layer of unnecessary complexity and code. &lt;br /&gt;&lt;br /&gt;The callbacks and their associated structs are a nightmare &lt;br /&gt;for reducing readability. &lt;br /&gt;&lt;br /&gt;Thanks!&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;span style="color:#795e26;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;span style="color:#000000;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr crashing when I connect to a device</title><link>https://devzone.nordicsemi.com/thread/513670?ContentTypeID=1</link><pubDate>Thu, 05 Dec 2024 14:49:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f50f7ee4-cc11-47b4-930d-5926b2a184db</guid><dc:creator>Vidar Berg</dc:creator><description>[quote user="DiBosco"]&lt;p&gt;&lt;span style="color:rgba(121, 94, 38, 1);"&gt;ble_data_sent&lt;/span&gt;&lt;span style="white-space:pre;"&gt; &lt;strong&gt;is&lt;/strong&gt; getting called , which I think is called when the &lt;/span&gt;&lt;/p&gt;
&lt;div style="background-color:rgba(255, 255, 255, 1);color:rgba(0, 0, 0, 1);font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;central_uart app gets confirmation that the remote unit has read&lt;/div&gt;
&lt;div&gt;the charctersitic that has been written to locally? &lt;/div&gt;&lt;/div&gt;[/quote]
&lt;p&gt;Unless an ATT error is reported in the callback, the write command will have been sent. Did you check this error code?&lt;/p&gt;
[quote user="DiBosco"]Is your central_uart app on the DK definitely writing to:&lt;br /&gt;&lt;br /&gt;
&lt;div style="background-color:rgba(255, 255, 255, 1);color:rgba(0, 0, 0, 1);font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:rgba(175, 0, 219, 1);"&gt;#define&lt;/span&gt;&lt;span style="color:rgba(0, 0, 255, 1);"&gt; &lt;/span&gt;&lt;span style="color:rgba(0, 0, 255, 1);"&gt;BT_UUID_CUSTOM_SRV_TX_VAL&lt;/span&gt;&lt;span style="color:rgba(0, 0, 255, 1);"&gt; &lt;/span&gt;&lt;span style="color:rgba(238, 0, 0, 1);"&gt;\&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;[/quote]
&lt;p&gt;Did you change the handle value from RX to TX as mentioned in my previous reply?&lt;/p&gt;
[quote user="DiBosco"]&lt;div&gt;&lt;span style="color:rgba(0, 0, 255, 1);"&gt;LOG_ERR&lt;/span&gt; etc messages to a specific UART and have one UART for &lt;br /&gt;control comms to the PC that is being sent on via BLE and another&lt;/div&gt;
&lt;div&gt;purely for debug data, ie the data currently sent to &lt;br /&gt;&lt;span style="color:rgba(0, 0, 255, 1);"&gt;&lt;span style="color:rgba(0, 0, 255, 1);"&gt;LOG_ERR, &lt;/span&gt;&lt;/span&gt;&lt;span style="color:rgba(0, 0, 255, 1);"&gt;LOG_WRN&lt;/span&gt; and &lt;span style="color:rgba(0, 0, 255, 1);"&gt;LOG_INF?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If so, surely we could route it to ttyACM0? I can see ttyAM0 is &lt;br /&gt;currently spitting out data because it shows &lt;strong&gt;exactly &lt;/strong&gt;the same&lt;/div&gt;[/quote]
&lt;p&gt;You can select which device(s) the UART logger backend should use by modifying the zephyr,console property in the chosen node. The DK board sets this property to zephyr,console = &amp;amp;uart0 by default. Alternatively, if you want to have console (printf, printk) and log (LOG_*) output on separate devices, you can use the zephyr,log-uart property as&amp;nbsp;shown in the Devicetree overlay I shared.&amp;nbsp; What is not possible is&amp;nbsp;to have the Logger module to print debug messages to one device and only error messages to another. It seems like I misunderstood the question.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr crashing when I connect to a device</title><link>https://devzone.nordicsemi.com/thread/513645?ContentTypeID=1</link><pubDate>Thu, 05 Dec 2024 13:49:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5e194865-69ed-4a70-b9fe-bfe544bd2b48</guid><dc:creator>DiBosco</dc:creator><description>[quote userid="4240" url="~/f/nordic-q-a/116852/zephyr-crashing-when-i-connect-to-a-device/513589"]Sorry for not being more clear. What I meant to say is that the second COM port (/dev/ttyACM1) exposed by the interface MCU&amp;nbsp;isn&amp;#39;t available on this board as there are no nRF pins routed to this UART - USB bridge on the board. You can of course hook up an external FTDI device to&amp;nbsp;the pin headers, or simply use the nRF USB.[/quote]
&lt;p&gt;I still don&amp;#39;t understand this. &lt;br /&gt;&lt;br /&gt;Can we route the&lt;/p&gt;
&lt;div style="background-color:#ffffff;color:#000000;font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#0000ff;"&gt;LOG_ERR&lt;/span&gt; etc messages to a specific UART and have one UART for &lt;br /&gt;control comms to the PC that is being sent on via BLE and another&lt;/div&gt;
&lt;div&gt;purely for debug data, ie the data currently sent to &lt;br /&gt;&lt;span style="color:#0000ff;"&gt;&lt;span style="color:#0000ff;"&gt;LOG_ERR, &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;LOG_WRN&lt;/span&gt; and &lt;span style="color:#0000ff;"&gt;LOG_INF?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If so, surely we could route it to ttyACM0? I can see ttyAM0 is &lt;br /&gt;currently spitting out data because it shows &lt;strong&gt;exactly &lt;/strong&gt;the same&lt;/div&gt;
&lt;div&gt;info that I am getting out of the UART I have connected to an&lt;/div&gt;
&lt;div&gt;FTDI lead with:&lt;br /&gt;&lt;br /&gt;
&lt;div style="background-color:#ffffff;color:#000000;font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#0000ff;"&gt;CONFIG_LOG_BACKEND_UART&lt;/span&gt;&lt;span style="color:#000000;"&gt;=y&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr crashing when I connect to a device</title><link>https://devzone.nordicsemi.com/thread/513642?ContentTypeID=1</link><pubDate>Thu, 05 Dec 2024 13:44:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a163efd7-08da-4f5d-9e2f-73fbce3eb3d4</guid><dc:creator>DiBosco</dc:creator><description>[quote userid="4240" url="~/f/nordic-q-a/116852/zephyr-crashing-when-i-connect-to-a-device/513589"]Glad to hear you found the reason&amp;nbsp;for the usage fault. Regarding the&amp;nbsp;-ENOTCONN,&amp;nbsp;could you check if it is returned here:&amp;nbsp;[/quote]
&lt;p&gt;This morning&amp;nbsp; it&amp;#39;s not giving me the same error and it&amp;#39;s allegedly sending messages out to the remote unit. I haven&amp;#39;t changed anything, so goodness knows what was going on last night. I do often find with this ecosystem is very flaky. I often have to clean and recompile because it sometimes just doesn&amp;#39;t work after a normal compile and I often have to program twice because it fails the first time, so maybe it was the end of a long fruitless day and had I cleaned and rebuilt it would have been OK. &lt;br /&gt;&lt;br /&gt;Today, I have found out, from a colleague, that sending &amp;quot;status&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;&amp;quot; into the main RX characteristic puts the unit&amp;nbsp; I&amp;#39;m trying to communicate with into ATE mode.&lt;br /&gt;&lt;br /&gt;Previously, I&amp;#39;ve been trying to get this&amp;nbsp; this really complicated binary comms system it normally uses going. With this binary method the master is constantly sending out frames and expecting responses back and I had to use a specific program. So I was going:&lt;br /&gt;&lt;br /&gt;Program using PC_UART &amp;lt;-&amp;gt; nrf52840 bLE &amp;lt;-&amp;gt; Remote Unit BLE&lt;/p&gt;
&lt;p&gt;Now I can go:&lt;br /&gt;&lt;br /&gt;Cutecom on PC &amp;lt;-&amp;gt;nrf52840 bLE &amp;lt;-&amp;gt; Remote Unit BLE&lt;/p&gt;
&lt;p&gt;And I don&amp;#39;t have to worry about frames, it can all be ASCII based and simple. I can switch on the verbose errors and warnings in central_uart and read them on Cutecom along with any other data coming back over BLE from the custom unit.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;I have proven I can get into ATE on the custom unit mode over BLE by using BLE Scanner app on my phone and once I send&amp;nbsp; status&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt; the unit goes into ATE mode, with the LCD on the front panel confirming it. &lt;br /&gt;&lt;br /&gt;However, if I send that via the central_uart app on the 52840DK the remote does not go into ATE mode. So, I hook up the DK running your central_uart app to Cutecom and I send &lt;br /&gt;&lt;br /&gt;status&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;&lt;br /&gt;&lt;br /&gt;The central_uart app is clearly getting that exact text in, I can see that by either mirroring the message back to Cutecom or stopping the app with the debugging and looking at what it received. &lt;br /&gt;&lt;br /&gt;Once the status request is received by UART into centrral_uart app, this is&amp;nbsp; called:&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#001080;"&gt;err&lt;/span&gt;&lt;span style="color:#000000;"&gt; = &lt;/span&gt;&lt;span style="color:#795e26;"&gt;bt_custom_client_send&lt;/span&gt;&lt;span style="color:#000000;"&gt;(&amp;amp;&lt;/span&gt;&lt;span style="color:#001080;"&gt;custom_client&lt;/span&gt;&lt;span style="color:#000000;"&gt;, &lt;/span&gt;&lt;span style="color:#001080;"&gt;data_ptr&lt;/span&gt;&lt;span style="color:#000000;"&gt;, &lt;/span&gt;&lt;span style="color:#001080;"&gt;len&lt;/span&gt;&lt;span style="color:#000000;"&gt;);&lt;/span&gt;&lt;/p&gt;
&lt;div style="background-color:#ffffff;color:#000000;font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#000000;"&gt;&lt;br /&gt;I can see with the debugger that&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span style="color:#001080;"&gt;data_ptr&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;/span&gt; points to:&lt;br /&gt;&lt;br /&gt;&amp;quot;status&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;len is 8&lt;/p&gt;
&lt;p&gt;err = 0 is the response back from the &lt;span style="color:#795e26;"&gt;bt_custom_client_send&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;/span&gt; function which suggests is being sent to the remote unit. &lt;br /&gt;&lt;span style="color:#795e26;"&gt;&lt;br /&gt;ble_data_sent&lt;/span&gt;&lt;span style="white-space:pre;"&gt; &lt;strong&gt;is&lt;/strong&gt; getting called , which I think is called when the &lt;/span&gt;&lt;/p&gt;
&lt;div style="background-color:#ffffff;color:#000000;font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;central_uart app gets confirmation that the remote unit has read&lt;/div&gt;
&lt;div&gt;the charctersitic that has been written to locally? &lt;br /&gt;&lt;br /&gt;Is your central_uart app on the DK definitely writing to:&lt;br /&gt;&lt;br /&gt;
&lt;div style="background-color:#ffffff;color:#000000;font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#af00db;"&gt;#define&lt;/span&gt;&lt;span style="color:#0000ff;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;BT_UUID_CUSTOM_SRV_TX_VAL&lt;/span&gt;&lt;span style="color:#0000ff;"&gt; &lt;/span&gt;&lt;span style="color:#ee0000;"&gt;\&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#0000ff;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;BT_UUID_128_ENCODE&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;(&lt;/span&gt;&lt;span style="color:#098658;"&gt;0x651135b0&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;, &lt;/span&gt;&lt;span style="color:#098658;"&gt;0xdfe9&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;, &lt;/span&gt;&lt;span style="color:#098658;"&gt;0x45a2&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;, &lt;/span&gt;&lt;span style="color:#098658;"&gt;0x95c1&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;, &lt;/span&gt;&lt;span style="color:#098658;"&gt;0x46552a8a77e2&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&lt;span style="color:#0000ff;"&gt;)&lt;br /&gt;&lt;br /&gt;What do all these functions:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;div style="background-color:#ffffff;color:#000000;font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#267f99;"&gt;uint8_t&lt;/span&gt;&lt;span style="color:#000000;"&gt; (*&lt;/span&gt;&lt;span style="color:#001080;"&gt;received_tx&lt;/span&gt;&lt;span style="color:#000000;"&gt;)(&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;struct&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#267f99;"&gt;bt_custom_client&lt;/span&gt;&lt;span style="color:#000000;"&gt; *custom, &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;const&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#267f99;"&gt;uint8_t&lt;/span&gt;&lt;span style="color:#000000;"&gt; *data, &lt;/span&gt;&lt;span style="color:#267f99;"&gt;uint16_t&lt;/span&gt;&lt;span style="color:#000000;"&gt; len);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#267f99;"&gt;uint8_t&lt;/span&gt;&lt;span style="color:#000000;"&gt; (*&lt;/span&gt;&lt;span style="color:#001080;"&gt;received_rx&lt;/span&gt;&lt;span style="color:#000000;"&gt;)(&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;struct&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#267f99;"&gt;bt_custom_client&lt;/span&gt;&lt;span style="color:#000000;"&gt; *custom, &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;const&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#267f99;"&gt;uint8_t&lt;/span&gt;&lt;span style="color:#000000;"&gt; *data, &lt;/span&gt;&lt;span style="color:#267f99;"&gt;uint16_t&lt;/span&gt;&lt;span style="color:#000000;"&gt; len); &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;void&lt;/span&gt;&lt;span style="color:#000000;"&gt; (*&lt;/span&gt;&lt;span style="color:#001080;"&gt;sent&lt;/span&gt;&lt;span style="color:#000000;"&gt;)(&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;struct&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#267f99;"&gt;bt_custom_client&lt;/span&gt;&lt;span style="color:#000000;"&gt; *custom, &lt;/span&gt;&lt;span style="color:#267f99;"&gt;uint8_t&lt;/span&gt;&lt;span style="color:#000000;"&gt; err, &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;const&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#267f99;"&gt;uint8_t&lt;/span&gt;&lt;span style="color:#000000;"&gt; *data, &lt;/span&gt;&lt;span style="color:#267f99;"&gt;uint16_t&lt;/span&gt;&lt;span style="color:#000000;"&gt; len);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;void&lt;/span&gt;&lt;span style="color:#000000;"&gt; (*&lt;/span&gt;&lt;span style="color:#001080;"&gt;unsubscribed&lt;/span&gt;&lt;span style="color:#000000;"&gt;)(&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;struct&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#267f99;"&gt;bt_custom_client&lt;/span&gt;&lt;span style="color:#000000;"&gt; *custom);&lt;br /&gt;&lt;br /&gt;So and when should they be called? It looks to me, &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#000000;"&gt;(although I might be wrong because all the callbacks &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#000000;"&gt;within structures [sometimes] within further structures &lt;em&gt;really&lt;/em&gt;&lt;/span&gt;&lt;/div&gt;
are hard to read) that they are set up with &lt;br /&gt;&lt;br /&gt;
&lt;div style="background-color:#ffffff;color:#000000;font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;struct&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#267f99;"&gt;bt_custom_client_init_param&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#001080;"&gt;init&lt;/span&gt;&lt;span style="color:#000000;"&gt; = {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#000000;"&gt; .&lt;/span&gt;&lt;span style="color:#001080;"&gt;cb&lt;/span&gt;&lt;span style="color:#000000;"&gt; = {&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;&lt;span style="color:#000000;"&gt; .&lt;/span&gt;&lt;span style="color:#001080;"&gt;received_tx&lt;/span&gt;&lt;span style="color:#000000;"&gt; = &lt;/span&gt;&lt;span style="color:#795e26;"&gt;ble_data_received_tx&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#000000;"&gt; .&lt;/span&gt;&lt;span style="color:#001080;"&gt;received_rx&lt;/span&gt;&lt;span style="color:#000000;"&gt; = &lt;/span&gt;&lt;span style="color:#795e26;"&gt;ble_data_received_rx&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#000000;"&gt; .&lt;/span&gt;&lt;span style="color:#001080;"&gt;sent&lt;/span&gt;&lt;span style="color:#000000;"&gt; = &lt;/span&gt;&lt;span style="color:#795e26;"&gt;ble_data_sent&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#000000;"&gt; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#000000;"&gt; };&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;&lt;br /&gt;and &lt;br /&gt;&lt;br /&gt;
&lt;div style="background-color:#ffffff;color:#000000;font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#001080;"&gt;err&lt;/span&gt;&lt;span style="color:#000000;"&gt; = &lt;/span&gt;&lt;span style="color:#795e26;"&gt;bt_custom_client_init&lt;/span&gt;&lt;span style="color:#000000;"&gt;(&amp;amp;&lt;/span&gt;&lt;span style="color:#001080;"&gt;custom_client&lt;/span&gt;&lt;span style="color:#000000;"&gt;, &amp;amp;&lt;/span&gt;&lt;span style="color:#001080;"&gt;init&lt;/span&gt;&lt;span style="color:#000000;"&gt;);&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#000000;"&gt;&lt;span style="color:#000000;"&gt;But there are four callbacks in the struct&lt;/span&gt;&lt;/span&gt;
&lt;div style="background-color:#ffffff;color:#000000;font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#0000ff;"&gt;struct&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#267f99;"&gt;bt_custom_client_cb&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#267f99;"&gt;in custom_client.h and we on;y pass three here. &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#267f99;"&gt;So maybe they aren&amp;#39;t really connected. &lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;So, I guess the big question is: &lt;br /&gt;&lt;br /&gt;If the central_uart app is 100% definitely getting the right &lt;/div&gt;
&lt;div style="background-color:#ffffff;color:#000000;font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;string to send to the remote unit and the central_uart app &lt;strong&gt;&lt;em&gt;claims&lt;br /&gt;&lt;/em&gt;&lt;/strong&gt;that is has sent the string to the remote unit, and I even,&lt;strong&gt; &lt;/strong&gt;&lt;/div&gt;
&lt;div style="background-color:#ffffff;color:#000000;font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;seemingly get confirmation back that the remote unit has received&lt;br /&gt;something, how can we ascertain it&amp;#39;s actually put the right &lt;br /&gt;data into the Tx characteristic? I would hook up the other DK and &lt;br /&gt;see what is received but of course that no longer connects because&lt;br /&gt;of all the new stuff we have in central now.&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr crashing when I connect to a device</title><link>https://devzone.nordicsemi.com/thread/513589?ContentTypeID=1</link><pubDate>Thu, 05 Dec 2024 10:01:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6fc8f33f-c1bc-4a0a-a480-158e2c81c0d4</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Glad to hear you found the reason&amp;nbsp;for the usage fault. Regarding the&amp;nbsp;-ENOTCONN,&amp;nbsp;could you check if it is returned here:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1733383255711v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;? The &amp;#39;conn&amp;#39; object should be assigned at the end of the&amp;nbsp;bt_custom_handles_assign() function.&lt;/p&gt;
&lt;p&gt;Also, not directly related to this issue, but while reviewing this function again I noticed that I assigned the RX handle instead of the TX handle here:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1733383411546v2.png" alt=" " /&gt;&lt;/p&gt;
[quote user="DiBosco"]I don&amp;#39;t understand what you&amp;#39;re saying here.[/quote]
&lt;p&gt;Sorry for not being more clear. What I meant to say is that the second COM port (/dev/ttyACM1) exposed by the interface MCU&amp;nbsp;isn&amp;#39;t available on this board as there are no nRF pins routed to this UART - USB bridge on the board. You can of course hook up an external FTDI device to&amp;nbsp;the pin headers, or simply use the nRF USB.&lt;/p&gt;
&lt;p&gt;From the nRF52840 DK user guide:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1733385460748v3.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;(Ref.&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ug_nrf52840_dk/page/UG/dk/vir_com_port.html"&gt;https://docs.nordicsemi.com/bundle/ug_nrf52840_dk/page/UG/dk/vir_com_port.html&lt;/a&gt;&amp;nbsp;)&lt;/p&gt;
&lt;p&gt;To enable logging over the nRF USB port, you can try adding the following 2 overlays to the boards folder in your project source directory and do a pristine build.&lt;/p&gt;
&lt;p&gt;&amp;lt;PROJ_DIR&amp;gt;/boards/&lt;br /&gt;├── nrf52840dk_nrf52840.conf&lt;br /&gt;└── nrf52840dk_nrf52840.overlay&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/4555.nrf52840dk_5F00_nrf52840.overlay"&gt;devzone.nordicsemi.com/.../4555.nrf52840dk_5F00_nrf52840.overlay&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/0636.nrf52840dk_5F00_nrf52840.conf"&gt;devzone.nordicsemi.com/.../0636.nrf52840dk_5F00_nrf52840.conf&lt;/a&gt;&lt;/p&gt;
[quote user="DiBosco"]&lt;p&gt;Assuming you have more than one UART, can you route the&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;LOG_WRN &amp;amp; &lt;span&gt;LOG_ERR&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;span&gt;traffic to that other UART? If so, how. How and where do you &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;specify *which* UART &lt;/span&gt;&lt;/div&gt;&lt;/div&gt;[/quote]
&lt;p&gt;The UART backend does not support individual filtering per device. I.e., you&amp;nbsp;can&amp;#39;t define one log level for one UART/USB instance and a different level for another.&lt;/p&gt;
&lt;p&gt;&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: Zephyr crashing when I connect to a device</title><link>https://devzone.nordicsemi.com/thread/513508?ContentTypeID=1</link><pubDate>Wed, 04 Dec 2024 19:57:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d26c2082-93e4-4199-8fe4-a64793ce9beb</guid><dc:creator>DiBosco</dc:creator><description>&lt;p&gt;I&amp;#39;ve solved the crashing issue, that trick worked.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Am currently getting &lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;div style="background-color:#ffffff;color:#000000;font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#af00db;"&gt;#define&lt;/span&gt;&lt;span style="color:#0000ff;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;ENOTCONN&lt;/span&gt;&lt;span style="color:#0000ff;"&gt; &lt;/span&gt;&lt;span style="color:#098658;"&gt;128&lt;/span&gt;&lt;span style="color:#008000;"&gt;&lt;span style="color:#008000;"&gt; /* Socket is not connected */&lt;br /&gt;Error when I try to write to this:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;div style="background-color:#ffffff;color:#000000;font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#001080;"&gt;err&lt;/span&gt;&lt;span style="color:#000000;"&gt; = &lt;/span&gt;&lt;span style="color:#795e26;"&gt;bt_custom_client_send&lt;/span&gt;&lt;span style="color:#000000;"&gt;(&amp;amp;&lt;/span&gt;&lt;span style="color:#001080;"&gt;custom_client&lt;/span&gt;&lt;span style="color:#000000;"&gt;, &lt;/span&gt;&lt;span style="color:#001080;"&gt;data_ptr&lt;/span&gt;&lt;span style="color:#000000;"&gt;, &lt;/span&gt;&lt;span style="color:#001080;"&gt;len&lt;/span&gt;&lt;span style="color:#000000;"&gt;);&lt;br /&gt;Even though, the system&amp;#39;s telling me it&amp;#39;s connected to the custom unit.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;
[quote userid="4240" url="~/f/nordic-q-a/116852/zephyr-crashing-when-i-connect-to-a-device/513502"]Unfortunately, the second COM port on the nRF52840 DK is not connected to the nRF chip on this board. Otherwise, you could have created a board overlay to direct logs to the second UARTE instance.[/quote]
&lt;p&gt;&lt;br /&gt;I don&amp;#39;t understand what you&amp;#39;re saying here.&lt;/p&gt;
&lt;p&gt;First question is:&lt;/p&gt;
&lt;p&gt;Assuming you have more than one UART, can you route the&lt;/p&gt;
&lt;div style="background-color:#ffffff;color:#000000;font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#795e26;"&gt;LOG_WRN &amp;amp; &lt;span style="color:#0000ff;"&gt;LOG_ERR&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#795e26;"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#795e26;"&gt;traffic to that other UART? If so, how. How and where do you &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#795e26;"&gt;specify *which* UART &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#795e26;"&gt;is being used for the debug information? &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#795e26;"&gt;&lt;span style="color:#795e26;"&gt;&lt;br /&gt;Also, I assume you can change between spitting out &lt;/span&gt;&lt;/span&gt;
&lt;div style="background-color:#ffffff;color:#000000;font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#0000ff;"&gt;LOG_ERR and &lt;span style="color:#795e26;"&gt;LOG_WRN&lt;/span&gt; and both? If so, how?&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;span style="color:#795e26;"&gt;&lt;br /&gt;&lt;br /&gt;Second question&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Assuming the above is possible:&lt;/p&gt;
&lt;p&gt;a. This second UART: what do you mean it&amp;#39;s not connected to the nrf chip? Surely the second UART is a peripheral IN the nrf? Also, I thought this was a funky chip where you could connect any pin to any peripheral? So as long as the pins are accessible on the SIL headers I can connected up an FTDI&amp;nbsp; 3V3 cable to the second UART just as I am to the first to get UART traffic in and out.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;b. There are clearly some virtual com ports on this DK, when the board is powered up via the USB&amp;nbsp; connection to the board, I get:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:monospace;"&gt;&lt;span style="background-color:#ffffff;color:#000000;"&gt;crw-rw-rw- 1 root dialout 166, 0 Dec &amp;nbsp;4 19:50 &lt;/span&gt;&lt;span style="background-color:#000000;color:#ffff54;font-weight:bold;"&gt;/dev/ttyACM0&lt;/span&gt;&lt;span style="background-color:#ffffff;color:#000000;"&gt; &lt;/span&gt;&lt;br /&gt;crw-rw-rw- 1 root dialout 166, 1 Dec &amp;nbsp;4 19:50 &lt;span style="background-color:#000000;color:#ffff54;font-weight:bold;"&gt;/dev/ttyACM1&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color:#ffffff;color:#000000;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Now, I know that the debug information comes out of this because at one point I somehow managed to open some sort of terminal in VSC and when &lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;div style="background-color:#ffffff;color:#000000;font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#0000ff;"&gt;CONFIG_LOG_BACKEND_UART&lt;/span&gt;&lt;span style="color:#000000;"&gt;=y&lt;br /&gt;&lt;br /&gt;Was in prj.conf&lt;br /&gt;&lt;br /&gt;I got the same serial info into VSC as I currently get into Cutecom. &lt;br /&gt;&lt;br /&gt;So is it not possible to use that VCP in Cutecom &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#000000;"&gt;as the BACKEND UART? This would be the easiest and best way to &lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#000000;"&gt;do it. &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#000000;"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#000000;"&gt;Just in case it matters, in the interest of readability I have split &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#000000;"&gt;all the serial stuff into a new file, so when I not get a packet &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#000000;"&gt;&lt;span style="color:#000000;"&gt;in over the UART in serial.c, I call this function in main.c&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;div style="background-color:#ffffff;color:#000000;font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#0000ff;"&gt;void&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#795e26;"&gt;send_ble_data_to_xlrt&lt;/span&gt;&lt;span style="color:#000000;"&gt;(&lt;/span&gt;&lt;span style="color:#267f99;"&gt;uint8_t&lt;/span&gt;&lt;span style="color:#000000;"&gt; *&lt;/span&gt;&lt;span style="color:#001080;"&gt;data_ptr&lt;/span&gt;&lt;span style="color:#000000;"&gt;, &lt;/span&gt;&lt;span style="color:#267f99;"&gt;uint16_t&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#001080;"&gt;len&lt;/span&gt;&lt;span style="color:#000000;"&gt;)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#000000;"&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;int&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#001080;"&gt;err&lt;/span&gt;&lt;span style="color:#000000;"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#001080;"&gt;err&lt;/span&gt;&lt;span style="color:#000000;"&gt; = &lt;/span&gt;&lt;span style="color:#795e26;"&gt;bt_custom_client_send&lt;/span&gt;&lt;span style="color:#000000;"&gt;(&amp;amp;&lt;/span&gt;&lt;span style="color:#001080;"&gt;custom_client&lt;/span&gt;&lt;span style="color:#000000;"&gt;, &lt;/span&gt;&lt;span style="color:#001080;"&gt;data_ptr&lt;/span&gt;&lt;span style="color:#000000;"&gt;, &lt;/span&gt;&lt;span style="color:#001080;"&gt;len&lt;/span&gt;&lt;span style="color:#000000;"&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#af00db;"&gt;if&lt;/span&gt;&lt;span style="color:#000000;"&gt; (&lt;/span&gt;&lt;span style="color:#001080;"&gt;err&lt;/span&gt;&lt;span style="color:#000000;"&gt; != &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;NO_ERROR&lt;/span&gt;&lt;span style="color:#000000;"&gt;) &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#000000;"&gt; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;LOG_WRN&lt;/span&gt;&lt;span style="color:#000000;"&gt;(&lt;/span&gt;&lt;span style="color:#a31515;"&gt;&amp;quot;CUSTOM send timeout&amp;quot;&lt;/span&gt;&lt;span style="color:#000000;"&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#000000;"&gt; }&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;&lt;span style="color:#000000;"&gt;}&lt;br /&gt;This is where I get the error -128 not connected&lt;br /&gt;&lt;br /&gt;Eventually I&amp;#39;ll put all the BLE stuff in another file &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#000000;"&gt;so main is as it should be, a very basic file. Baby steps though. &lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr crashing when I connect to a device</title><link>https://devzone.nordicsemi.com/thread/513502?ContentTypeID=1</link><pubDate>Wed, 04 Dec 2024 18:18:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:726cc7d7-b1d8-43b2-a85a-60e14ebaac91</guid><dc:creator>Vidar Berg</dc:creator><description>[quote user="DiBosco"]I can only assume that when modifying the code to allow for this new subscription I&amp;#39;ve messed something up.[/quote]
&lt;p&gt;I’m not sure what could have triggered the unaligned memory access. The first thing I would do is look up the faulting instruction address to see which line of code it maps to. You can do this either by using arm-zephyr-eabi-addr2line or by placing a breakpoint at the address.&lt;/p&gt;
&lt;p&gt;With addr2line:&lt;/p&gt;
&lt;p&gt;1. Open a terminal in Vs code with the toolchain env set:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1733335184637v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;2. Enter the following command from the &amp;quot;nRF connect&amp;quot; terminal&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1733335380858v3.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;In my case:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1733335434313v4.png" alt=" " /&gt;&lt;/p&gt;
[quote user="DiBosco"]Would be great to have one of those take the traffic and send it to Cutecom to see what&amp;#39;s going on at the same time I&amp;#39;m trying to use the BLE &amp;quot;UART&amp;quot;[/quote]
&lt;p&gt;Unfortunately, the second COM port on the nRF52840 DK is not connected to the nRF chip on this board. Otherwise, you could have created a board overlay to direct logs to the second UARTE instance.&lt;/p&gt;
[quote user="DiBosco"]I do, of course, realise this and I also know that coding style varies massively from person to person. I do appreciate that some people even &lt;em&gt;like&lt;/em&gt; K&amp;amp;R style indentation.[/quote]
&lt;p&gt;I don’t have strong opinions on this to be honest, but I think it makes sense for us to follow the same style as Zephyr for consistency, even though there are always things that could be improved.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr crashing when I connect to a device</title><link>https://devzone.nordicsemi.com/thread/513433?ContentTypeID=1</link><pubDate>Wed, 04 Dec 2024 13:07:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:19860163-8b1b-49e1-b2f8-97ff07c1c5de</guid><dc:creator>DiBosco</dc:creator><description>&lt;p&gt;Actually, one more thing that might help me.&lt;br /&gt;&lt;br /&gt;Those debug messages that are turned on by having:&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;div style="background-color:#ffffff;color:#000000;font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#0000ff;"&gt;CONFIG_LOG_BACKEND_UART&lt;/span&gt;&lt;span style="color:#000000;"&gt;=y&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;In the conf file are very useful, but no good when I&amp;#39;m actually &lt;br /&gt;trying to ship traffic through the BLE &amp;quot;UART&amp;quot;. Could I route&lt;/div&gt;
&lt;div&gt;it through to a different UART, preferably one of the&lt;/div&gt;
&lt;div&gt;virtual com ports that are on the debug USB interface?&lt;/div&gt;
&lt;div&gt;I do see that I have &lt;br /&gt;&lt;br /&gt;/dev/ttyACMx where x is couple of a numbers per dev kit.&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;br /&gt;Would be great to have one of those take the traffic and send it to Cutecom to see what&amp;#39;s going on at the same time I&amp;#39;m trying to use the BLE &amp;quot;UART&amp;quot;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr crashing when I connect to a device</title><link>https://devzone.nordicsemi.com/thread/513429?ContentTypeID=1</link><pubDate>Wed, 04 Dec 2024 12:55:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c786f72e-ffae-4a55-83a4-a622f32a7407</guid><dc:creator>DiBosco</dc:creator><description>&lt;p&gt;OK, that&amp;#39;s crashing again now:&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[00:00:00.013,366] &amp;lt;0x1b&amp;gt;[0m&amp;lt;inf&amp;gt; bt_hci_core: No ID address. App must call settings_load()&amp;lt;0x1b&amp;gt;[0m␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[00:00:00.013,397] &amp;lt;0x1b&amp;gt;[0m&amp;lt;inf&amp;gt; central_uart: Bluetooth initialized&amp;lt;0x1b&amp;gt;[0m␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[00:00:00.014,373] &amp;lt;0x1b&amp;gt;[0m&amp;lt;inf&amp;gt; bt_hci_core: Identity: D9:AD:8D:A9:1A:A2 (random)&amp;lt;0x1b&amp;gt;[0m␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[00:00:00.014,404] &amp;lt;0x1b&amp;gt;[0m&amp;lt;inf&amp;gt; bt_hci_core: HCI: version 6.0 (0x0e) revision 0x104e, manufacturer 0x0059&amp;lt;0x1b&amp;gt;[0m␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[00:00:00.014,434] &amp;lt;0x1b&amp;gt;[0m&amp;lt;inf&amp;gt; bt_hci_core: LMP: version 6.0 (0x0e) subver 0x104e&amp;lt;0x1b&amp;gt;[0m␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[00:00:00.015,747] &amp;lt;0x1b&amp;gt;[1;31m&amp;lt;err&amp;gt; os: ***** USAGE FAULT *****&amp;lt;0x1b&amp;gt;[0m␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[00:00:00.015,747] &amp;lt;0x1b&amp;gt;[1;31m&amp;lt;err&amp;gt; os: Unaligned memory access&amp;lt;0x1b&amp;gt;[0m␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[00:00:00.015,777] &amp;lt;0x1b&amp;gt;[1;31m&amp;lt;err&amp;gt; os: r0/a1: 0x20003800 r1/a2: 0x00000000 r2/a3: 0x00000001&amp;lt;0x1b&amp;gt;[0m␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[00:00:00.015,777] &amp;lt;0x1b&amp;gt;[1;31m&amp;lt;err&amp;gt; os: r3/a4: 0x00038207 r12/ip: 0x00038207 r14/lr: 0x00014bc5&amp;lt;0x1b&amp;gt;[0m␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[00:00:00.015,808] &amp;lt;0x1b&amp;gt;[1;31m&amp;lt;err&amp;gt; os: xpsr: 0x61000000&amp;lt;0x1b&amp;gt;[0m␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[00:00:00.015,808] &amp;lt;0x1b&amp;gt;[1;31m&amp;lt;err&amp;gt; os: Faulting instruction address (r15/pc): 0x00014bd6&amp;lt;0x1b&amp;gt;[0m␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[00:00:00.015,838] &amp;lt;0x1b&amp;gt;[1;31m&amp;lt;err&amp;gt; os: &amp;gt;&amp;gt;&amp;gt; ZEPHYR FATAL ERROR 31: Unknown error on CPU 0&amp;lt;0x1b&amp;gt;[0m␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[00:00:00.015,899] &amp;lt;0x1b&amp;gt;[1;31m&amp;lt;err&amp;gt; os: Current thread: 0x200032c0 (main)&amp;lt;0x1b&amp;gt;[0m␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[00:00:01.547,698] &amp;lt;0x1b&amp;gt;[1;31m&amp;lt;err&amp;gt; os: Halting system&amp;lt;0x1b&amp;gt;[0m␍␊&lt;br /&gt;&lt;br /&gt;I can only assume that when modifying the code to allow for this new subscription I&amp;#39;ve messed something up. &lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
[quote userid="4240" url="~/f/nordic-q-a/116852/zephyr-crashing-when-i-connect-to-a-device/513385"]The use of 0 to indicate success is an established convention in C, and is not limited to Zephyr or the linux kernel. But I see your point. defining a symbol such as NO_ERROR could help improve the code readability. In the old SDK we&amp;nbsp;had the NRF_SUCCESS symbol that was defined as &amp;#39;0&amp;#39;.[/quote]
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I do, of course, realise this and I also know that coding style varies massively from person to person. I do appreciate that some people even &lt;em&gt;like&lt;/em&gt; K&amp;amp;R style indentation. &lt;/p&gt;
&lt;p&gt;I&amp;#39;ve never liked this&lt;/p&gt;
&lt;p&gt;if (whatevs)&lt;br /&gt;&lt;br /&gt;type of thing, right from when I started learning C in the 90s it always made me baulk. IMHO code should be as easy as possible to read. &lt;/p&gt;
&lt;p&gt;Having done a medical job where they were incredibly strict about stuff like this, as well as things like never using magic numbers it really teaches you how valuable it is to not take short cuts, not to ever have ifs without ==, not to call functions with a call to a function, not use use things like the ternary operator and so on. &lt;br /&gt;&lt;br /&gt;I believe some of how C was originally invented was to mitigate for the fact that space to store source code was at a premium, but those days are long gone. Disk space is plentiful and cheap and there&amp;#39;s no reason not to be verbose in the interest of clarity.&amp;nbsp;&amp;nbsp; Especially when you&amp;#39;re providing code for others to read. It especially helps when debugging and single stepping through code. &lt;br /&gt;&lt;br /&gt;I&amp;#39;ll see if I can go through this code by update setting breakpoints and trying to work out where it crashes, in the meantime if there&amp;#39;s anything you can thing of to track this down that would be great. I can&amp;#39;t pretend to really follow exactly what&amp;#39;s going on with these changes, let alone how the system works as whole, I get partway down one of these deep callback/macro/structure in a structure rabbit holes and soon forget where I was up to or what I was trying to do. &lt;/p&gt;
[quote userid="4240" url="~/f/nordic-q-a/116852/zephyr-crashing-when-i-connect-to-a-device/513385"]Since&amp;nbsp;your peripheral doesn&amp;#39;t implement BLE security, you can remove this line and call gatt_discover() unconditionally in your connected callback.[/quote]
&lt;p&gt;OK, cool, thanks! &lt;br /&gt;&lt;br /&gt;Thanks again for all the help, it is greatly appreciated. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr crashing when I connect to a device</title><link>https://devzone.nordicsemi.com/thread/513385?ContentTypeID=1</link><pubDate>Wed, 04 Dec 2024 10:18:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:980c4cdf-961a-4081-b09e-396a206af4bd</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;I made some edits to the GATT client implementation I posted earlier to also enable notifications for the second characteristic. Please try it with this.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/custom_5F00_client.c"&gt;devzone.nordicsemi.com/.../custom_5F00_client.c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/custom_5F00_client.h"&gt;devzone.nordicsemi.com/.../custom_5F00_client.h&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/3146.diff.diff"&gt;devzone.nordicsemi.com/.../3146.diff.diff&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This change is also required in main.c:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="diff"&gt;@@ -294,7 +304,8 @@ static void discovery_complete(struct bt_gatt_dm *dm,
 	bt_gatt_dm_data_print(dm);
 
 	bt_custom_handles_assign(dm, custom);
-	bt_custom_subscribe_receive(custom);
+	bt_custom_subscribe_tx_receive(custom);
+	bt_custom_subscribe_rx_receive(custom);
 
 	bt_gatt_dm_data_release(dm);
 }&lt;/pre&gt;&lt;/p&gt;
[quote user="DiBosco"]if ((!err) &amp;amp;&amp;amp; (err != -EALREADY))[/quote]
&lt;p&gt;I assume the developer intended to write if ((err) &amp;amp;&amp;amp; (err != -EALREADY)) so the error message would be printed for any error except -EALREADY. However, I don&amp;#39;t see any obvious reasons for ignoring the&amp;nbsp;&lt;span&gt;EALREADY error in this sample. There is no side effect to this&amp;nbsp;as only the error message is printed, which I assume is why it has not been caught by our tests.&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;"&gt;Will report this internally.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;This is how I would have expected it to be written:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;	err = bt_scan_stop();
	if (err) {
		LOG_ERR(&amp;quot;Stop LE scan failed (err %d)&amp;quot;, err);
	}&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The use of 0 to indicate success is an established convention in C, and is not limited to Zephyr or the linux kernel. But I see your point. defining a symbol such as NO_ERROR could help improve the code readability. In the old SDK we&amp;nbsp;had the NRF_SUCCESS symbol that was defined as &amp;#39;0&amp;#39;.&lt;/p&gt;
[quote user="DiBosco"]&lt;div style="background-color:rgba(255, 255, 255, 1);color:rgba(0, 0, 0, 1);font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;&lt;div&gt;&lt;span style="color:rgba(0, 0, 0, 1);"&gt; &lt;/span&gt;&lt;span style="color:rgba(0, 16, 128, 1);"&gt;err&lt;/span&gt;&lt;span style="color:rgba(0, 0, 0, 1);"&gt; = &lt;/span&gt;&lt;span style="color:rgba(121, 94, 38, 1);"&gt;bt_conn_set_security&lt;/span&gt;&lt;span style="color:rgba(0, 0, 0, 1);"&gt;(&lt;/span&gt;&lt;span style="color:rgba(0, 16, 128, 1);"&gt;conn&lt;/span&gt;&lt;span style="color:rgba(0, 0, 0, 1);"&gt;, &lt;/span&gt;&lt;span style="color:rgba(0, 112, 193, 1);"&gt;BT_SECURITY_L1&lt;/span&gt;&lt;span style="color:rgba(0, 0, 0, 1);"&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;As we&amp;#39;re not using security on our unit and it was giving &lt;br /&gt;me an error when it was set to L2. Does that sound right?[/quote]
&lt;p&gt;Since&amp;nbsp;your peripheral doesn&amp;#39;t implement BLE security, you can remove this line and call gatt_discover() unconditionally in your connected callback.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr crashing when I connect to a device</title><link>https://devzone.nordicsemi.com/thread/513279?ContentTypeID=1</link><pubDate>Tue, 03 Dec 2024 16:42:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:10bcc303-6c67-495f-96fd-0bfb73aba702</guid><dc:creator>DiBosco</dc:creator><description>&lt;p&gt;OK, a little more info and more questions:&lt;br /&gt;&lt;br /&gt;Firstly - and I&amp;#39;m not sure this actually matters in terms of it functioning. This second line must be wrong:&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;div style="background-color:#ffffff;color:#000000;font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#001080;"&gt;err&lt;/span&gt;&lt;span style="color:#000000;"&gt; = &lt;/span&gt;&lt;span style="color:#795e26;"&gt;bt_scan_stop&lt;/span&gt;&lt;span style="color:#000000;"&gt;();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#af00db;"&gt;if&lt;/span&gt;&lt;span style="color:#000000;"&gt; ((&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;NO_ERROR&lt;/span&gt;&lt;span style="color:#000000;"&gt; == &lt;/span&gt;&lt;span style="color:#001080;"&gt;err&lt;/span&gt;&lt;span style="color:#000000;"&gt;) &amp;amp;&amp;amp; (&lt;/span&gt;&lt;span style="color:#001080;"&gt;err&lt;/span&gt;&lt;span style="color:#000000;"&gt; != -&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;EALREADY&lt;/span&gt;&lt;span style="color:#000000;"&gt;)) &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#000000;"&gt; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;LOG_ERR&lt;/span&gt;&lt;span style="color:#000000;"&gt;(&lt;/span&gt;&lt;span style="color:#a31515;"&gt;&amp;quot;Stop LE scan failed (err &lt;/span&gt;&lt;span style="color:#001080;"&gt;%d&lt;/span&gt;&lt;span style="color:#a31515;"&gt;)&amp;quot;&lt;/span&gt;&lt;span style="color:#000000;"&gt;, &lt;/span&gt;&lt;span style="color:#001080;"&gt;err&lt;/span&gt;&lt;span style="color:#000000;"&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#000000;"&gt;&lt;span style="color:#000000;"&gt; }&lt;br /&gt;&lt;br /&gt;This line was originally the mind bending:&lt;br /&gt;&lt;br /&gt;if ((!err) &amp;amp;&amp;amp; (err != -EALREADY))&lt;br /&gt;&lt;br /&gt;Even when written out to make it much more understandable where &lt;br /&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;NO_ERROR&lt;/span&gt; is defined as 0 rather than a magic number that is &lt;br /&gt;littered throughout all this code.&lt;br /&gt;&lt;br /&gt;This seems like a mad line of code. If &lt;span style="color:#001080;"&gt;err&lt;/span&gt; &lt;strong&gt;is&lt;/strong&gt; equal to 0 &lt;br /&gt;it can&amp;#39;t be anything else. &lt;br /&gt;&lt;br /&gt;However, as it&amp;#39;s just printing out a line of debug code I &lt;br /&gt;suspect it doesn&amp;#39;t actually matter. &lt;br /&gt;&lt;br /&gt;What doesn&amp;#39;t seem to be getting called though is this:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;div style="background-color:#ffffff;color:#000000;font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#795e26;"&gt;&lt;span style="color:#795e26;"&gt;discovery_complete&lt;br /&gt;&lt;br /&gt;This is used in this:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;div style="background-color:#ffffff;color:#000000;font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#0000ff;"&gt;struct&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#267f99;"&gt;bt_gatt_dm_cb&lt;/span&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#001080;"&gt;discovery_cb&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;span style="color:#000000;"&gt;&lt;span style="color:#000000;"&gt; &lt;br /&gt;&lt;br /&gt;Which in turn is filled out, I think, in&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;div style="background-color:#ffffff;color:#000000;font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#795e26;"&gt;gatt_discover&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;span style="color:#000000;"&gt;&lt;span style="color:#000000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;div style="background-color:#ffffff;color:#000000;font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#000000;"&gt;&lt;span style="color:#000000;"&gt;But&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;div style="background-color:#ffffff;color:#000000;font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#795e26;"&gt;gatt_discover&lt;/span&gt; never gets called from here: &lt;br /&gt;&lt;br /&gt;
&lt;div style="background-color:#ffffff;color:#000000;font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#001080;"&gt;err&lt;/span&gt;&lt;span style="color:#000000;"&gt; = &lt;/span&gt;&lt;span style="color:#795e26;"&gt;bt_conn_set_security&lt;/span&gt;&lt;span style="color:#000000;"&gt;(&lt;/span&gt;&lt;span style="color:#001080;"&gt;conn&lt;/span&gt;&lt;span style="color:#000000;"&gt;, &lt;/span&gt;&lt;span style="color:#0070c1;"&gt;BT_SECURITY_L1&lt;/span&gt;&lt;span style="color:#000000;"&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#af00db;"&gt;if&lt;/span&gt;&lt;span style="color:#000000;"&gt; (&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;NO_ERROR&lt;/span&gt;&lt;span style="color:#000000;"&gt; != &lt;/span&gt;&lt;span style="color:#001080;"&gt;err&lt;/span&gt;&lt;span style="color:#000000;"&gt;) // was if (err), changed for clarity&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#000000;"&gt; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;LOG_WRN&lt;/span&gt;&lt;span style="color:#000000;"&gt;(&lt;/span&gt;&lt;span style="color:#a31515;"&gt;&amp;quot;Failed to set security: &lt;/span&gt;&lt;span style="color:#001080;"&gt;%d&lt;/span&gt;&lt;span style="color:#a31515;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:#000000;"&gt;, &lt;/span&gt;&lt;span style="color:#001080;"&gt;err&lt;/span&gt;&lt;span style="color:#000000;"&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#795e26;"&gt;gatt_discover&lt;/span&gt;&lt;span style="color:#000000;"&gt;(&lt;/span&gt;&lt;span style="color:#001080;"&gt;conn&lt;/span&gt;&lt;span style="color:#000000;"&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#000000;"&gt; }&lt;br /&gt;&lt;br /&gt;Surely &lt;span style="color:#795e26;"&gt;gatt_discover&lt;/span&gt; should be called if err *is* equal &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#000000;"&gt;to 0 which is, again, defined as &lt;span style="color:#0000ff;"&gt;NO_ERROR&lt;/span&gt; for clarity.&lt;br /&gt;&lt;br /&gt;Oh, also I changed &lt;span style="color:#795e26;"&gt;bt_conn_set_security&lt;/span&gt; to:&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div style="background-color:#ffffff;color:#000000;font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;span style="color:#001080;"&gt;err&lt;/span&gt;&lt;span style="color:#000000;"&gt; = &lt;/span&gt;&lt;span style="color:#795e26;"&gt;bt_conn_set_security&lt;/span&gt;&lt;span style="color:#000000;"&gt;(&lt;/span&gt;&lt;span style="color:#001080;"&gt;conn&lt;/span&gt;&lt;span style="color:#000000;"&gt;, &lt;/span&gt;&lt;span style="color:#0070c1;"&gt;BT_SECURITY_L1&lt;/span&gt;&lt;span style="color:#000000;"&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;As we&amp;#39;re not using security on our unit and it was giving &lt;br /&gt;me an error when it was set to L2. Does that sound right?&lt;br /&gt;&lt;br /&gt;
&lt;div style="background-color:#ffffff;color:#000000;font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#795e26;"&gt;gatt_discover&lt;/span&gt; is also called in:&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div style="background-color:#ffffff;color:#000000;font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#795e26;"&gt;security_changed, but security_changed never gets called &lt;br /&gt;(I don&amp;#39;t know what this is for).&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;span style="color:#000000;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;span style="color:#000000;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr crashing when I connect to a device</title><link>https://devzone.nordicsemi.com/thread/513243?ContentTypeID=1</link><pubDate>Tue, 03 Dec 2024 14:22:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:29379eeb-8b04-4050-b6f5-45e8dc0e9a47</guid><dc:creator>DiBosco</dc:creator><description>&lt;p&gt;If it is necessary to enable notifications, how do you do that please?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr crashing when I connect to a device</title><link>https://devzone.nordicsemi.com/thread/513227?ContentTypeID=1</link><pubDate>Tue, 03 Dec 2024 13:44:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:076b05a9-a9f3-4325-8e11-ee3a2a132e1e</guid><dc:creator>DiBosco</dc:creator><description>&lt;p&gt;Thanks&amp;nbsp; for the boot banner tip. &lt;br /&gt;&lt;br /&gt;On the subject of writing from the Android app, I have made&amp;nbsp; some progress, This system is quite complex and the remote unit only writes when requested by a convoluted message, so I found what the standard debug request header is and wrote those 32 bytes using the BLE Scanner app by writing to characteristic UUID&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;div style="background-color:#ffffff;color:#000000;font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#098658;"&gt;0x651135b0&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;, &lt;/span&gt;&lt;span style="color:#098658;"&gt;0xdfe9&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;, &lt;/span&gt;&lt;span style="color:#098658;"&gt;0x45a2&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;, &lt;/span&gt;&lt;span style="color:#098658;"&gt;0x95c1&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;, &lt;/span&gt;&lt;span style="color:#098658;"&gt;0x46552a8a77e2&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Now, unless and until I actually hit notify for the &lt;br /&gt;&lt;br /&gt;
&lt;div style="background-color:#ffffff;color:#000000;font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#098658;"&gt;0xe7d6274e&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;, &lt;/span&gt;&lt;span style="color:#098658;"&gt;0xb765&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;, &lt;/span&gt;&lt;span style="color:#098658;"&gt;0x11e9&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;, &lt;/span&gt;&lt;span style="color:#098658;"&gt;0xa2a3&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;, &lt;/span&gt;&lt;span style="color:#098658;"&gt;&lt;span style="color:#098658;"&gt;0x2a2ae2dbcce4&lt;br /&gt;&lt;br /&gt;characteristic, I got nothing back. When I did hit notify then the &lt;br /&gt;remote node wrote some valid data into the phone. &lt;br /&gt;&lt;br /&gt;Is the issue that on this Zephyr app we&amp;#39;re not subscribing &lt;br /&gt;(is that the right word) to the read characteristic? &lt;br /&gt;&lt;br /&gt;I&amp;#39;m assuming that should go on in the&lt;/span&gt;&lt;/span&gt;
&lt;div style="background-color:#ffffff;color:#000000;font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#795e26;"&gt;&lt;br /&gt;bt_custom_handles_assign&lt;br /&gt;&lt;br /&gt;function? &lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr crashing when I connect to a device</title><link>https://devzone.nordicsemi.com/thread/513080?ContentTypeID=1</link><pubDate>Mon, 02 Dec 2024 22:41:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:18baa7d7-5b14-4831-a395-d0ab019d8d23</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;I&amp;#39;m wondering if there&amp;nbsp;any specific requirements for interfacing with your peripheral device or if it behaves just like the original NUS sample. For instance,&amp;nbsp;if it requires notifications to be enabled on more than one characteristic to allow notifications to be sent or some kind of handshake, etc. Either way, I think it might be faster to use the nRF Connect app to determine what works and what doesn&amp;#39;t. For example, you can check if you&amp;#39;re able to receive data if you only enable notifications for the e7d6274e-b765-11e9-a2a3-2a2ae2dbcce4 characteristic:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1733178980235v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user="DiBosco"]One ot her slight annoyance that needs sorting is this that is spat out of the UART at boot:[/quote]
&lt;p&gt;You can disable the boot banners by adding the following 2 lines to your project configuration file:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_NCS_BOOT_BANNER=n
CONFIG_BOOT_BANNER=n&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&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: Zephyr crashing when I connect to a device</title><link>https://devzone.nordicsemi.com/thread/513066?ContentTypeID=1</link><pubDate>Mon, 02 Dec 2024 19:40:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ad991ae-7ec0-4730-a282-d3defa4b1c2e</guid><dc:creator>DiBosco</dc:creator><description>&lt;p&gt;I&amp;#39;ve tried the 52840DK using your peripheral UART and that works. So I have done&lt;br /&gt;&lt;br /&gt;UART&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BLE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | UART&lt;/p&gt;
&lt;p&gt;PC UART&amp;lt;-&amp;gt;CENTRAL_UART on 52840&amp;lt;-&amp;gt;&amp;lt;PERIPHERAL_UART on 528040&amp;lt;-&amp;gt;PC UART&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;When I try to connect to the custom unit, which uses the very same UUIDs as your custom program, rather than peripheral_uart, it does not work. &lt;br /&gt;&lt;br /&gt;The custom unit has successfully done exactly the same thing I&amp;#39;m trying to achieve here, but with a Raspberry Pi:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;UART&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BLE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | UART&lt;/p&gt;
&lt;p&gt;PC UART &amp;lt;-&amp;gt; Raspberry Pi with BLE &amp;lt;-&amp;gt; Custom Unit&amp;lt;-&amp;gt;STM32&lt;br /&gt;&lt;br /&gt;I want to replace that with&lt;/p&gt;
&lt;p&gt;UART&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BLE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | UART&lt;/p&gt;
&lt;p&gt;PC UART &amp;lt;-&amp;gt; CENTRAL_UART on 52840&amp;lt;-&amp;gt; Custom Unit&amp;lt;-&amp;gt;STM32&lt;/p&gt;
&lt;p&gt;BTW, I know how crazy this is, but it&amp;#39;s what we&amp;#39;ve been asked to do. &lt;br /&gt;&lt;br /&gt;The custom unit&amp;#39;s service for which you had the screen shot has the following setup in its firmware where Rx is data going into it and Tx is data going out.&lt;/p&gt;
&lt;p&gt;// the service&lt;br /&gt;#define BASE_UUID128&amp;nbsp;&amp;nbsp; &amp;quot;2a1f963c-143a-4f7d-9107-6315196a02a6&amp;quot;&lt;br /&gt;#define BASE_UUID16&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x963c&lt;br /&gt;// BLE Data into the custom unit (so the central_uart I&amp;#39;m trying to get working will write into this)&lt;br /&gt;#define RX_LENGTH&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 240&lt;br /&gt;#define RX_UUID128&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;quot;651135b0-dfe9-45a2-95c1-46552a8a77e2&amp;quot;&lt;br /&gt;#define RX_UUID16&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x35b0&lt;br /&gt;// Not sued for UART comms&lt;br /&gt;#define RX_ACK_LENGTH&amp;nbsp; 2&lt;br /&gt;#define RX_ACK_UUID128 &amp;quot;946ba79e-3162-46d5-9ba7-8a9d08c11ff0&amp;quot;&lt;br /&gt;#define RX_ACK_UUID16&amp;nbsp; 0xa79e&lt;br /&gt;// Data out from the custom unit into the central_uart over Bluetooth&lt;br /&gt;#define TX_LENGTH&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 240&lt;br /&gt;#define TX_UUID128&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;quot;e7d6274e-b765-11e9-a2a3-2a2ae2dbcce4&amp;quot;&lt;br /&gt;#define TX_UUID16&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x274e&lt;br /&gt;// Unused for this UART function&lt;br /&gt;#define TX_ACK_LENGTH&amp;nbsp; 2&lt;br /&gt;#define TX_ACK_UUID128 &amp;quot;e7d629ba-b765-11e9-a2a3-2a2ae2dbcce4&amp;quot;&lt;br /&gt;#define TX_ACK_UUID16&amp;nbsp; 0x29ba&lt;/p&gt;
&lt;p&gt;The custom unit is running an older Nordic device and I have successfully talked to it the custom unit by writing a Qt program on Linux to talk directly to it. So, the point being we know the custom unit works with these UUIDs&lt;br /&gt;&lt;br /&gt;I have tried swapping RX and TX round in custom_client.h just in case there was a BLE equivalent of a 2/3 swap needed, but that does not help. &lt;br /&gt;&lt;br /&gt;i.e.&lt;/p&gt;
&lt;div style="background-color:#ffffff;color:#000000;font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#008000;"&gt;/** &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;@brief&lt;/span&gt;&lt;span style="color:#008000;"&gt; UUID of the TX Characteristic. **/&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#af00db;"&gt;#define&lt;/span&gt;&lt;span style="color:#0000ff;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;BT_UUID_CUSTOM_SRV_RX_VAL&lt;/span&gt;&lt;span style="color:#0000ff;"&gt; &lt;/span&gt;&lt;span style="color:#ee0000;"&gt;\&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#0000ff;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;BT_UUID_128_ENCODE&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;(&lt;/span&gt;&lt;span style="color:#098658;"&gt;0x651135b0&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;, &lt;/span&gt;&lt;span style="color:#098658;"&gt;0xdfe9&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;, &lt;/span&gt;&lt;span style="color:#098658;"&gt;0x45a2&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;, &lt;/span&gt;&lt;span style="color:#098658;"&gt;0x95c1&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;, &lt;/span&gt;&lt;span style="color:#098658;"&gt;0x46552a8a77e2&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;)&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;&lt;span style="color:#008000;"&gt;/** &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;@brief&lt;/span&gt;&lt;span style="color:#008000;"&gt; UUID of the RX Characteristic. **/&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#af00db;"&gt;#define&lt;/span&gt;&lt;span style="color:#0000ff;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;BT_UUID_CUSTOM_SRV_TX_VAL&lt;/span&gt;&lt;span style="color:#0000ff;"&gt; &lt;/span&gt;&lt;span style="color:#ee0000;"&gt;\&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#0000ff;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;BT_UUID_128_ENCODE&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;(&lt;/span&gt;&lt;span style="color:#098658;"&gt;0xe7d6274e&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;, &lt;/span&gt;&lt;span style="color:#098658;"&gt;0xb765&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;, &lt;/span&gt;&lt;span style="color:#098658;"&gt;0x11e9&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;, &lt;/span&gt;&lt;span style="color:#098658;"&gt;0xa2a3&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;, &lt;/span&gt;&lt;span style="color:#098658;"&gt;0x2a2ae2dbcce4&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;)&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;br /&gt;&lt;br /&gt;One ot her slight annoyance that needs sorting is this that is spat out of the UART at boot:&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;*** Booting nRF Connect SDK v2.8.0-a2386bfc8401 ***␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;*** Using Zephyr OS v3.7.99-0bc3393fb112 ***␍␊&lt;br /&gt;&lt;br /&gt;If I search for &amp;quot;&lt;strong&gt;Booting nRF Connect&amp;quot; in VSC it does not give me any hits.&lt;/strong&gt; Do you &lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;know where that is in the source so I can get rid of it please?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr crashing when I connect to a device</title><link>https://devzone.nordicsemi.com/thread/513055?ContentTypeID=1</link><pubDate>Mon, 02 Dec 2024 17:55:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:56b83a11-2a15-4dc9-ad47-d61b15801cb5</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;I thought you were using the Nordic UART service with custom UUIDs. However, after&amp;nbsp;looking at the the nRF Connect screendump you shared again, I notice several differences. For instance, your service includes three or more characteristics,&amp;nbsp;while the UART service only has two. The client code I provided will only subscribe to notifications from the first characteristic with UUID:651135b0-dfe9-45a2-95c1-46552a8a77e2.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t know which characteristics the peripheral is supposed to send notifications on in your case.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr crashing when I connect to a device</title><link>https://devzone.nordicsemi.com/thread/513052?ContentTypeID=1</link><pubDate>Mon, 02 Dec 2024 17:10:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a4cbe8e-f4b7-4252-853d-d17774336715</guid><dc:creator>DiBosco</dc:creator><description>&lt;p&gt;So are you saying the central_uart project needs to be modified (in this case&amp;nbsp; the one you supplied) so that the Rx characteristic in central subscribes to the Tx characteristic in the remote node?&lt;/p&gt;
&lt;p&gt;When I use your peripheral_uart to talk to your central with my UUIDs in, I don&amp;#39;t need to do anything else other than send data into the UART on the peripheral and it appears on the central_uart project&amp;#39;s UART output.&lt;/p&gt;
&lt;p&gt;If I look with nrf connect on my Android&amp;nbsp; phone, the Tx&amp;nbsp; on the remote node - whether it be the Nordic DK running peripheral_uart, or our custom device, (which is the RX on the central_uart project) it is notify only, so why would it work on peripheral_uart and not our custom device. What am I&amp;nbsp; not understanding here?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr crashing when I connect to a device</title><link>https://devzone.nordicsemi.com/thread/513050?ContentTypeID=1</link><pubDate>Mon, 02 Dec 2024 16:46:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8c734736-2b98-4786-8abe-e84063189afe</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;The NUS service only supports notifications on the TX characteristic (&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/libraries/bluetooth/services/nus.html#nus-service-readme"&gt;Nordic UART service&lt;/a&gt;). However, from the screenshot you posted earlier of the nRF Connect app, it seems that both of your characteristics support notifications. This means&amp;nbsp;the GATT client must be modified to subscribe to both characteristics (i.e. custom_client.c if you&amp;#39;re using my project).&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1733157741783v1.png" alt=" " /&gt;&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: Zephyr crashing when I connect to a device</title><link>https://devzone.nordicsemi.com/thread/513010?ContentTypeID=1</link><pubDate>Mon, 02 Dec 2024 14:48:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bb24a529-7137-404e-9567-9821e2fc0853</guid><dc:creator>DiBosco</dc:creator><description>&lt;p&gt;OK, in gatt.c the pointer looks like it is NULL.&lt;/p&gt;
&lt;p&gt;That function really should have:&lt;br /&gt;&lt;br /&gt;if ((NULL != &lt;span style="color:#001080;"&gt;conn&lt;/span&gt;&lt;span style="white-space:pre;"&gt;) &amp;amp;&amp;amp; (NULL != &lt;/span&gt;&lt;span style="color:#001080;"&gt;params))&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#001080;"&gt;at the start of that function to stop that issue. &lt;br /&gt;&lt;br /&gt;I think we should forget about this particular project though, because...&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Your program does not do this, but although I can get comms in over the UART, write it to &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#001080;"&gt;the characteristic &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#001080;"&gt;in the remote node and I get notification it&amp;#39;s been read by&amp;nbsp; the remote node &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#001080;"&gt;becauswe the &lt;/span&gt;&lt;span style="color:#795e26;"&gt;ble_data_sent function is called. &lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#795e26;"&gt;&lt;br /&gt;However,&amp;nbsp; I never get the &lt;/span&gt;&lt;span style="color:#795e26;"&gt;ble_data_received callback function being called, so &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#795e26;"&gt;either the data isn&amp;#39;t being quite sent to the write characteristic properly in your app &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#795e26;"&gt;or something&amp;#39;s wrong&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#795e26;"&gt;with the setup fior the read characteristic in your app. We know the remote node works correctly &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#795e26;"&gt;because it&amp;#39;s been working with a Raspberry Pi just fine.&lt;br /&gt;&lt;br /&gt;I&amp;#39;m assuming that, somehow, when you set up the syatem to be able to write to &lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div style="background-color:#ffffff;color:#000000;font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#0000ff;"&gt;BT_UUID_CUSTOM_TX&lt;br /&gt;&lt;br /&gt;That you are setting up some area of memoryt that is &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#0000ff;"&gt;automatically the same size as the characteristic in our custom&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#0000ff;"&gt;remote node? &lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span style="color:#795e26;"&gt;I did put this:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div style="background-color:#ffffff;color:#000000;font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#0000ff;"&gt;CONFIG_BT_L2CAP_TX_MTU&lt;/span&gt;&lt;span style="color:#000000;"&gt;=247&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#0000ff;"&gt;CONFIG_BT_BUF_ACL_RX_SIZE&lt;/span&gt;&lt;span style="color:#000000;"&gt;=251&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#0000ff;"&gt;CONFIG_BT_BUF_ACL_TX_SIZE&lt;/span&gt;&lt;span style="color:#000000;"&gt;=251&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;in prj.conf&lt;/div&gt;
&lt;div style="background-color:#ffffff;color:#000000;font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;&lt;/div&gt;
&lt;div style="background-color:#ffffff;color:#000000;font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;and changed:&lt;br /&gt;&lt;br /&gt;
&lt;div style="background-color:#ffffff;color:#000000;font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#af00db;"&gt;#define&lt;/span&gt;&lt;span style="color:#0000ff;"&gt; &lt;/span&gt;&lt;span style="color:#0000ff;"&gt;UART_BUF_SIZE&lt;/span&gt;&lt;span style="color:#0000ff;"&gt; &lt;/span&gt;&lt;span style="color:#098658;"&gt;240&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;from it being just 20 bytes long to allow&lt;/div&gt;
&lt;div&gt;for our larger characteristics.&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span style="color:#795e26;"&gt;&lt;span style="color:#001080;"&gt;----------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In your program I am guessing via &lt;/span&gt;&lt;span style="color:#795e26;"&gt;custom_client_init you somehow tell the system &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#795e26;"&gt;that if it finds the the service you are telling it to call &lt;/span&gt;&lt;span style="color:#795e26;"&gt;ble_data_received. I&amp;#39;m again &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#795e26;"&gt;guessing that &lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div style="background-color:#ffffff;color:#000000;font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#795e26;"&gt;bt_custom_handles_assign does the magic of knitting them together&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#795e26;"&gt;&lt;span style="color:#795e26;"&gt;in one of those&lt;/span&gt;&lt;/span&gt;
&lt;div style="background-color:#ffffff;color:#000000;font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#795e26;"&gt;memset&lt;/span&gt; lines somewhere? Or maybe:&lt;br /&gt;&lt;br /&gt;
&lt;div style="background-color:#ffffff;color:#000000;font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#001080;"&gt;custom_c&lt;/span&gt;&lt;span style="color:#000000;"&gt;-&amp;gt;&lt;/span&gt;&lt;span style="color:#001080;"&gt;handles&lt;/span&gt;&lt;span style="color:#000000;"&gt;.&lt;/span&gt;&lt;span style="color:#001080;"&gt;rx&lt;/span&gt;&lt;span style="color:#000000;"&gt; = &lt;/span&gt;&lt;span style="color:#001080;"&gt;gatt_desc&lt;/span&gt;&lt;span style="color:#000000;"&gt;-&amp;gt;&lt;/span&gt;&lt;span style="color:#001080;"&gt;handle&lt;/span&gt;&lt;span style="color:#000000;"&gt;;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;But I could be wrong, I can&amp;#39;t follow that&lt;/div&gt;
&lt;div&gt;code I&amp;#39;m afraid. What should be looking for here in&lt;/div&gt;
&lt;div&gt;an attempt to ascertain whether that is all set up correctly?&lt;/div&gt;
&lt;/div&gt;
&lt;span style="color:#795e26;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span style="color:#001080;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr crashing when I connect to a device</title><link>https://devzone.nordicsemi.com/thread/512984?ContentTypeID=1</link><pubDate>Mon, 02 Dec 2024 13:24:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bdae06fe-7c47-4616-8bb1-faedef12eee7</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;It seems you are encountering the same assertion as before:&lt;/p&gt;
[quote user="DiBosco"]&lt;p style="margin:0;text-indent:0;"&gt;&lt;span style="color:rgba(0, 0, 0, 1);font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;ASSERTION FAIL [conn] @ WEST_TOPDIR/zephyr/subsys/bluetooth/host/gatt.c:5433␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0;text-indent:0;"&gt;&lt;span style="color:rgba(0, 0, 0, 1);font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;⇥ invalid parameters␍␊&lt;/span&gt;&lt;/p&gt;[/quote]
&lt;p&gt;Can you place a breakpoint at this line to confirm that the conn pointer is not set? Also, were you able to reproduce this with the central project I uploaded?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr crashing when I connect to a device</title><link>https://devzone.nordicsemi.com/thread/512933?ContentTypeID=1</link><pubDate>Mon, 02 Dec 2024 10:58:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:81d198ed-565c-4140-833f-6dc802083407</guid><dc:creator>DiBosco</dc:creator><description>&lt;p&gt;OK, and FWIW, yes I had a breakpoint and without it, I get this:&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;Starting Bluetooth Central UART example␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[00:00:03.093,292] &amp;lt;0x1b&amp;gt;[0m&amp;lt;inf&amp;gt; fs_nvs: 2 Sectors of 4096 bytes&amp;lt;0x1b&amp;gt;[0m␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[00:00:03.093,292] &amp;lt;0x1b&amp;gt;[0m&amp;lt;inf&amp;gt; fs_nvs: alloc wra: 0, fb8&amp;lt;0x1b&amp;gt;[0m␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[00:00:03.093,322] &amp;lt;0x1b&amp;gt;[0m&amp;lt;inf&amp;gt; fs_nvs: data wra: 0, 88&amp;lt;0x1b&amp;gt;[0m␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[00:00:03.093,475] &amp;lt;0x1b&amp;gt;[0m&amp;lt;inf&amp;gt; bt_sdc_hci_driver: SoftDevice Controller build revision: ␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt; fe 2c f9 6a 7f 36 22 2e a0 79 c0 40 be 2c 03 20 |.,.j.6&amp;quot;. .y.@.,. ␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt; 40 c2 f3 32 |@..2 &amp;lt;0x1b&amp;gt;[0m␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[00:00:03.097,717] &amp;lt;0x1b&amp;gt;[0m&amp;lt;inf&amp;gt; bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)&amp;lt;0x1b&amp;gt;[0m␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[00:00:03.097,747] &amp;lt;0x1b&amp;gt;[0m&amp;lt;inf&amp;gt; bt_hci_core: HW Variant: nRF52x (0x0002)&amp;lt;0x1b&amp;gt;[0m␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[00:00:03.097,778] &amp;lt;0x1b&amp;gt;[0m&amp;lt;inf&amp;gt; bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 254.63788 Build 573996906&amp;lt;0x1b&amp;gt;[0m␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[00:00:03.098,480] &amp;lt;0x1b&amp;gt;[0m&amp;lt;inf&amp;gt; bt_hci_core: No ID address. App must call settings_load()&amp;lt;0x1b&amp;gt;[0m␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[00:00:03.098,510] &amp;lt;0x1b&amp;gt;[0m&amp;lt;inf&amp;gt; central_uart: Bluetooth initialized&amp;lt;0x1b&amp;gt;[0m␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[00:00:03.099,487] &amp;lt;0x1b&amp;gt;[0m&amp;lt;inf&amp;gt; bt_hci_core: Identity: D9:AD:8D:A9:1A:A2 (random)&amp;lt;0x1b&amp;gt;[0m␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[00:00:03.099,517] &amp;lt;0x1b&amp;gt;[0m&amp;lt;inf&amp;gt; bt_hci_core: HCI: version 6.0 (0x0e) revision 0x104e, manufacturer 0x0059&amp;lt;0x1b&amp;gt;[0m␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[00:00:03.099,578] &amp;lt;0x1b&amp;gt;[0m&amp;lt;inf&amp;gt; bt_hci_core: LMP: version 6.0 (0x0e) subver 0x104e&amp;lt;0x1b&amp;gt;[0m␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[00:00:03.100,952] &amp;lt;0x1b&amp;gt;[0m&amp;lt;inf&amp;gt; central_uart: Scan module initialized&amp;lt;0x1b&amp;gt;[0m␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[00:00:03.100,952] &amp;lt;0x1b&amp;gt;[0m&amp;lt;inf&amp;gt; central_uart: NUS Client module initialized&amp;lt;0x1b&amp;gt;[0m␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[00:00:03.105,987] &amp;lt;0x1b&amp;gt;[0m&amp;lt;inf&amp;gt; central_uart: Scanning successfully started&amp;lt;0x1b&amp;gt;[0m␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[00:00:03.414,184] &amp;lt;0x1b&amp;gt;[0m&amp;lt;inf&amp;gt; central_uart: Filters matched. Address: E8:A0:DB:24:21:62 (random) connectable: 1&amp;lt;0x1b&amp;gt;[0m␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[00:00:03.604,248] &amp;lt;0x1b&amp;gt;[0m&amp;lt;inf&amp;gt; central_uart: Connected: E8:A0:DB:24:21:62 (random)&amp;lt;0x1b&amp;gt;[0m␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[00:00:03.604,370] &amp;lt;0x1b&amp;gt;[1;33m&amp;lt;wrn&amp;gt; central_uart: Failed to set security: -12&amp;lt;0x1b&amp;gt;[0m␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[00:00:03.604,431] &amp;lt;0x1b&amp;gt;[1;31m&amp;lt;err&amp;gt; central_uart: Stop LE scan failed (err 0)&amp;lt;0x1b&amp;gt;[0m␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[00:00:03.855,590] &amp;lt;0x1b&amp;gt;[1;33m&amp;lt;wrn&amp;gt; bt_conn: conn 0x20002640 failed to establish. RF noise?&amp;lt;0x1b&amp;gt;[0m␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[00:00:03.855,926] &amp;lt;0x1b&amp;gt;[1;33m&amp;lt;wrn&amp;gt; central_uart: MTU exchange failed (err 14)&amp;lt;0x1b&amp;gt;[0m␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[00:00:03.855,957] &amp;lt;0x1b&amp;gt;[0m&amp;lt;inf&amp;gt; central_uart: Service not found&amp;lt;0x1b&amp;gt;[0m␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[00:00:03.856,140] &amp;lt;0x1b&amp;gt;[0m&amp;lt;inf&amp;gt; central_uart: Disconnected: E8:A0:DB:24:21:62 (random), reason 0x3e &amp;lt;0x1b&amp;gt;[0m␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[00:00:03.987,030] &amp;lt;0x1b&amp;gt;[0m&amp;lt;inf&amp;gt; central_uart: Filters matched. Address: E8:A0:DB:24:21:62 (random) connectable: 1&amp;lt;0x1b&amp;gt;[0m␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[00:00:04.183,074] &amp;lt;0x1b&amp;gt;[0m&amp;lt;inf&amp;gt; central_uart: Connected: E8:A0:DB:24:21:62 (random)&amp;lt;0x1b&amp;gt;[0m␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[00:00:04.183,166] &amp;lt;0x1b&amp;gt;[1;33m&amp;lt;wrn&amp;gt; central_uart: Failed to set security: -12&amp;lt;0x1b&amp;gt;[0m␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[00:00:04.183,258] &amp;lt;0x1b&amp;gt;[1;31m&amp;lt;err&amp;gt; central_uart: Stop LE scan failed (err 0)&amp;lt;0x1b&amp;gt;[0m␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[00:00:04.334,655] &amp;lt;0x1b&amp;gt;[0m&amp;lt;inf&amp;gt; central_uart: MTU exchange done&amp;lt;0x1b&amp;gt;[0m␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;ASSERTION FAIL [conn] @ WEST_TOPDIR/zephyr/subsys/bluetooth/host/gatt.c:5433␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;⇥ invalid parameters␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[00:00:05.684,509] &amp;lt;0x1b&amp;gt;[0m&amp;lt;inf&amp;gt; central_uart: Service discovery completed&amp;lt;0x1b&amp;gt;[0m␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[00:00:05.694,183] &amp;lt;0x1b&amp;gt;[1;31m&amp;lt;err&amp;gt; os: r0/a1: 0x00000004 r1/a2: 0x00001539 r2/a3: 0x20000b60&amp;lt;0x1b&amp;gt;[0m␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[00:00:05.694,213] &amp;lt;0x1b&amp;gt;[1;31m&amp;lt;err&amp;gt; os: r3/a4: 0x00000004 r12/ip: 0x00000000 r14/lr: 0x000217df&amp;lt;0x1b&amp;gt;[0m␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[00:00:05.694,213] &amp;lt;0x1b&amp;gt;[1;31m&amp;lt;err&amp;gt; os: xpsr: 0x21000000&amp;lt;0x1b&amp;gt;[0m␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[00:00:05.694,213] &amp;lt;0x1b&amp;gt;[1;31m&amp;lt;err&amp;gt; os: Faulting instruction address (r15/pc): 0x00031072&amp;lt;0x1b&amp;gt;[0m␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[00:00:05.694,274] &amp;lt;0x1b&amp;gt;[1;31m&amp;lt;err&amp;gt; os: &amp;gt;&amp;gt;&amp;gt; ZEPHYR FATAL ERROR 4: Kernel panic on CPU 0&amp;lt;0x1b&amp;gt;[0m␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[00:00:05.694,305] &amp;lt;0x1b&amp;gt;[1;31m&amp;lt;err&amp;gt; os: Current thread: 0x20002568 (BT RX WQ)&amp;lt;0x1b&amp;gt;[0m␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[00:00:05.747,711] &amp;lt;0x1b&amp;gt;[1;31m&amp;lt;err&amp;gt; os: Halting system&amp;lt;0x1b&amp;gt;[0m␍␊&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr crashing when I connect to a device</title><link>https://devzone.nordicsemi.com/thread/512929?ContentTypeID=1</link><pubDate>Mon, 02 Dec 2024 10:37:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1c0f1a50-f6c3-4f73-8399-a0547a7e8f7c</guid><dc:creator>DiBosco</dc:creator><description>&lt;p&gt;OK, it is apparent I have a big gap (no pun intended) in my client side knowledge. As soon&amp;nbsp; as you say it though it is obvious that the client can&amp;#39;t be expected to know what&amp;#39;s going on in all the peripherals. I suspect the best bet here might be to work with your project and see if I can work out how it functions.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>