<?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>UART and logging in automated BabbleSim tests, suggestions?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/123367/uart-and-logging-in-automated-babblesim-tests-suggestions</link><description>Hello! 
 I am trying to set up automated tests for an application on the nRF54L15 BabbleSim target. The application needs two-way communication with a test script; this would be UART with another chip on real hardware. At the same time, logs from the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 08 Aug 2025 10:18:44 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/123367/uart-and-logging-in-automated-babblesim-tests-suggestions" /><item><title>RE: UART and logging in automated BabbleSim tests, suggestions?</title><link>https://devzone.nordicsemi.com/thread/545037?ContentTypeID=1</link><pubDate>Fri, 08 Aug 2025 10:18:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:960234fd-147e-47bd-83b1-65c638a301f0</guid><dc:creator>Tom Weber</dc:creator><description>&lt;p&gt;Thank you. I have verified that Unix domain sockets work, with no changes to configuration or build files. This will be good enough for my use case.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART and logging in automated BabbleSim tests, suggestions?</title><link>https://devzone.nordicsemi.com/thread/544832?ContentTypeID=1</link><pubDate>Wed, 06 Aug 2025 16:52:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4b674569-6968-4283-89e4-1bb3452ba4c6</guid><dc:creator>Alberto Escolar</dc:creator><description>&lt;p&gt;&amp;gt;&amp;nbsp;&lt;span&gt;I thought the application is linked with a minimal standard C library and not the host one.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In general there is a choice of libC&lt;br /&gt;&lt;a href="https://docs.zephyrproject.org/latest/boards/native/native_sim/doc/index.html#c-library-choice"&gt;https://docs.zephyrproject.org/latest/boards/native/native_sim/doc/index.html#c-library-choice&lt;/a&gt;&lt;br /&gt;If you build with&amp;nbsp;CONFIG_EXTERNAL_LIBC you are building directly with the host libC&amp;nbsp;&lt;br /&gt;If you build with an embedded libC, you need to be a bit more careful to be able to call out into the Linux side. That is why most native_sim drivers are split in 2 parts, one built with the embedded side and another one build&amp;nbsp;in&amp;nbsp;the host side:&lt;br /&gt;&lt;a href="https://docs.zephyrproject.org/latest/boards/native/doc/arch_soc.html#native-simulator-runner-context-and-the-embedded-context"&gt;https://docs.zephyrproject.org/latest/boards/native/doc/arch_soc.html#native-simulator-runner-context-and-the-embedded-context&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART and logging in automated BabbleSim tests, suggestions?</title><link>https://devzone.nordicsemi.com/thread/544821?ContentTypeID=1</link><pubDate>Wed, 06 Aug 2025 15:12:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:80fc1283-5441-496b-b663-24e6c2a25a6e</guid><dc:creator>Tom Weber</dc:creator><description>&lt;p&gt;Hello Alberto, thank you for your answer!&lt;/p&gt;
&lt;p&gt;&amp;gt;&amp;nbsp;&lt;span&gt;In the meanwhile, if you want to connect to a python(?) script, maybe you want to&amp;nbsp;avoid using&amp;nbsp;intermediary components, and directly open a Linux pipe for which you open the other side in your python script?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I did not know that this is possible, I thought the application is linked with a minimal standard C library and not the host one. Will try to open a Unix socket and get back to you.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART and logging in automated BabbleSim tests, suggestions?</title><link>https://devzone.nordicsemi.com/thread/544433?ContentTypeID=1</link><pubDate>Mon, 04 Aug 2025 10:03:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ffd51c1f-1a7e-48b9-b55f-19561c93ce5c</guid><dc:creator>Alberto Escolar</dc:creator><description>&lt;p&gt;Hi Tom, as this is a plain Zephyr question, it&amp;nbsp;may be easier to discuss it in Zephyr&amp;#39;s discord (&lt;a id="" href="https://chat.zephyrproject.org/"&gt;https://chat.zephyrproject.org/&lt;/a&gt;&amp;nbsp;#babblesim channel), or as a GH discussion (&lt;a id="" href="https://github.com/zephyrproject-rtos/zephyr/discussions/new/choose"&gt;https://github.com/zephyrproject-rtos/zephyr/discussions/new/choose&lt;/a&gt;).&lt;br /&gt;You are welcome to ping me (aescolar) there.&lt;br /&gt;In the meanwhile, if you want to connect to a python(?) script, maybe you want to&amp;nbsp;avoid using&amp;nbsp;intermediary components, and directly open a Linux pipe for which you open the other side in your python script?&amp;nbsp;&lt;br /&gt;(see for ex. how the EDTT driver works&amp;nbsp;&lt;a id="" href="https://github.com/zephyrproject-rtos/zephyr/blob/main/tests/bsim/bluetooth/ll/edtt/common/edtt_driver_bsim.c"&gt;https://github.com/zephyrproject-rtos/zephyr/blob/main/tests/bsim/bluetooth/ll/edtt/common/edtt_driver_bsim.c&lt;/a&gt;&amp;nbsp;, where the EDTT is&amp;nbsp;&amp;nbsp;a python tool &lt;a id="" href="https://github.com/EDTTool/EDTT"&gt;https://github.com/EDTTool/EDTT&lt;/a&gt;&amp;nbsp;. Note, I&amp;#39;m not telling you to use EDTT for this, this is just an example of a &amp;quot;funny driver&amp;quot; that connects to a python script).&lt;br /&gt;&lt;br /&gt;&amp;gt;&amp;nbsp;&lt;span&gt;Using a PTY for UART is problematic because the PTY number gets assigned by the host OS and can not be explicitly specified, so it is unpredictable from an automation perspective.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Note you can ask the PTY driver to run any arbitrary command you want when the pty is created.&lt;br /&gt;&lt;br /&gt;&amp;gt;&amp;nbsp;&lt;span&gt;because the logs are also printed to stdout and I haven&amp;#39;t found a way to log to a file instead.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Correct. The Logger&amp;nbsp;defaults to either use a backend that prints to stdout, or to one of the UARTs.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>