<?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>Integrating UART with BLE Mesh</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/95917/integrating-uart-with-ble-mesh</link><description>Hi! 
 I am currently working on a project that involves taking a command sent over UART and broadcasting the data sent in that command to a number of BLE Mesh devices. I currently have this somewhat working using the dimming client example from the BLE</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 14 Feb 2023 19:23:32 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/95917/integrating-uart-with-ble-mesh" /><item><title>RE: Integrating UART with BLE Mesh</title><link>https://devzone.nordicsemi.com/thread/409946?ContentTypeID=1</link><pubDate>Tue, 14 Feb 2023 19:23:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6192fb84-35fb-4a77-9cac-cd12aad3d7e3</guid><dc:creator>Evan Colt</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I ended up switching our implementation over to ble_app_uart and managed to get the project working for our purposes. I am still unsure about what was causing the conflict between libuart_async and the mesh code we had running but I can figure that out in the future if needed. In order to get the ble_app_uart to work I had to remove all of the defines linking nrf_drv_uart and other files to the apply_old_config.h file. Thank you for your help.&lt;/p&gt;
&lt;p&gt;Best,&lt;/p&gt;
&lt;p&gt;Evan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Integrating UART with BLE Mesh</title><link>https://devzone.nordicsemi.com/thread/408019?ContentTypeID=1</link><pubDate>Fri, 03 Feb 2023 13:39:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3ad479f3-9c65-42ff-ae74-d8c88731a433</guid><dc:creator>AHaug</dc:creator><description>[quote user="DarkColt"]I did not write the original libUART implementation for the application and I cannot figure out the exact way that we made it work with the mesh. What I can say is that when I try to re-implement libUART on a fresh version of the mesh dimming example I am running into a number of runtime error that I am assuming the person who originally did this ran into and fixed by modifying the libUART library. I am running into an issue where I am getting an INVALID_STATE runtime error from line 398 in nrf_libuart_async.c&amp;nbsp;[/quote]
&lt;p&gt;There might be some clock dependencies in between what mesh uses and what libuart uses, but I would initially recommend you to have a look at the following two resources before we dive into that:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.meshsdk.v5.0.0%2Fmd_doc_user_guide_integrating_mesh_nrf5_sdk.html&amp;amp;cp=7_2_2_7"&gt;https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.meshsdk.v5.0.0%2Fmd_doc_user_guide_integrating_mesh_nrf5_sdk.html&amp;amp;cp=7_2_2_7&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/NordicSemiconductor/nRF5-SDK-for-Mesh/blob/master/examples/sdk_coexist/ble_app_uart_coexist/README.md"&gt;https://github.com/NordicSemiconductor/nRF5-SDK-for-Mesh/blob/master/examples/sdk_coexist/ble_app_uart_coexist/README.md&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I believe the latter sample should be exactly what you want (i.e a mesh light switch sample mixed with the&amp;nbsp;&lt;span&gt;link_ble_app_uart_example example from the nRF5 SDK).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Let me know if this is enough to get it to work!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Kind regards,&lt;br /&gt;Andreas&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: Integrating UART with BLE Mesh</title><link>https://devzone.nordicsemi.com/thread/407846?ContentTypeID=1</link><pubDate>Thu, 02 Feb 2023 18:24:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5ed5a2ac-00dd-4cf9-852e-38db026bf7eb</guid><dc:creator>Evan Colt</dc:creator><description>&lt;h3 id="mcetoc_1go9ovu890"&gt;Have you seen and/or gotten &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/libuarte_example.html"&gt;the libuart sample&lt;/a&gt;&amp;nbsp;in nRF5 SDK to work on its own without being integrated in a Mesh device?&lt;/h3&gt;
&lt;p&gt;I got the sample to work independently from mesh and it worked perfectly.&lt;/p&gt;
&lt;h3 id="mcetoc_1go9ovu891"&gt;Can you check if you already have one UART in your application before you add libuarte? This might be the case since you get 2x interrupts&lt;/h3&gt;
&lt;p&gt;I have not seen a second implementation of UART and I cannot find one when I look. The only UART is libUART&lt;/p&gt;
&lt;h3 id="mcetoc_1go9ovu892"&gt;&lt;br /&gt;Could you explain how you set up the UART?&lt;/h3&gt;
&lt;p&gt;I did not write the original libUART implementation for the application and I cannot figure out the exact way that we made it work with the mesh. What I can say is that when I try to re-implement libUART on a fresh version of the mesh dimming example I am running into a number of runtime error that I am assuming the person who originally did this ran into and fixed by modifying the libUART library. I am running into an issue where I am getting an INVALID_STATE runtime error from line 398 in nrf_libuart_async.c&amp;nbsp;&lt;/p&gt;
&lt;pre&gt;&lt;pre class="ui-code" data-mode="text"&gt;if (p_libuarte-&amp;gt;p_ctrl_blk-&amp;gt;enabled)
{
   return NRF_ERROR_INVALID_STATE;
}&lt;/pre&gt;&lt;/pre&gt;
&lt;p&gt;do you know what might be the cause of this? I am following the libuart sample exactly so I am inferring that this is a issue where the library is conflicting with the mesh. If I can troubleshoot these issues the reason why there is a duplicated interrupt may become apparent.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Integrating UART with BLE Mesh</title><link>https://devzone.nordicsemi.com/thread/406239?ContentTypeID=1</link><pubDate>Tue, 24 Jan 2023 12:43:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e572119e-3dd5-4b6d-ae7a-edb31229bfba</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]Question 1) Does anyone know why I might be encountering these two bugs?[/quote]
&lt;p&gt;Our initial thoughts is that this is related to the UART part of your application and not the Mesh part.&amp;nbsp;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Could you explain how you set up the UART?&lt;/li&gt;
&lt;li&gt;Have you seen and/or gotten &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/libuarte_example.html"&gt;the libuart sample&lt;/a&gt;&amp;nbsp;in nRF5 SDK to work on its own without being integrated in a Mesh device?&lt;/li&gt;
&lt;li&gt;Can you check if you already have one UART in your application before you add libuarte? This might be the case since you get 2x interrupts&lt;/li&gt;
&lt;/ol&gt;
[quote user=""]Question 2) Is there a better way to integrate BLE Mesh with UART than using the l&lt;span&gt;ibUART_async library&amp;nbsp;from NRF SDK 17.0.2. So far I have not seen any other ways to do this but I am open to other options.&lt;/span&gt;[/quote]
&lt;p&gt;If you don&amp;#39;t need to use libuarte it might be sufficient to use a &amp;quot;normal&amp;quot; UART, like the one used in the &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fps_nrf52840%2Fuarte.html&amp;amp;"&gt;ble_app_uart&lt;/a&gt; sample&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>