<?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>MCUMGR firmware update via CAN bus (or any other bytestream source/sink) by software API instead of UART driver?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/110056/mcumgr-firmware-update-via-can-bus-or-any-other-bytestream-source-sink-by-software-api-instead-of-uart-driver</link><description>Hi, in one of our projects, we need to update the application firmware on our nRF5340 via CAN bus (using an MCP2515 interface which I will commision within the coming weeks, Zephyr driver seems to be available). 
 It is possible to update the firmware</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 09 Apr 2024 19:26:22 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/110056/mcumgr-firmware-update-via-can-bus-or-any-other-bytestream-source-sink-by-software-api-instead-of-uart-driver" /><item><title>RE: MCUMGR firmware update via CAN bus (or any other bytestream source/sink) by software API instead of UART driver?</title><link>https://devzone.nordicsemi.com/thread/477897?ContentTypeID=1</link><pubDate>Tue, 09 Apr 2024 19:26:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e42171a6-25f6-4b3e-adbf-8bf7635c6dec</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi,&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If you use&amp;nbsp;the&amp;nbsp;&lt;span dir="ltr"&gt;mcumgr-lib,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;you must implement the transport for both the SMP client and the SMP server. So I would recommend taking a look here:&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/tree/main/subsys/mgmt/mcumgr/transport"&gt;https://github.com/nrfconnect/sdk-zephyr/tree/main/subsys/mgmt/mcumgr/transport&lt;/a&gt;. and&amp;nbsp;&lt;a href="https://docs.zephyrproject.org/latest/services/device_mgmt/smp_transport.html"&gt;https://docs.zephyrproject.org/latest/services/device_mgmt/smp_transport.html&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;span&gt;Additionally, you can also look at this unofficial sample:&amp;nbsp;&lt;/span&gt;&lt;a href="https://github.com/hellesvik-nordic/samples_for_nrf_connect_sdk/tree/v2.2.0/bootloader_samples/client_smp/smp_client_uart"&gt;https://github.com/hellesvik-nordic/samples_for_nrf_connect_sdk/tree/v2.2.0/bootloader_samples/client_smp/smp_client_uart&lt;/a&gt;&lt;span&gt;. It uses UART instead of Bluetooth as transport.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The other option is to use the&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.6.0/nrf/libraries/dfu/dfu_target.html"&gt;DFU target library&lt;/a&gt;. With this, you can implement the CAN however you like on the client and use the DFU target library on the server side to handle the image received over CAN.&lt;/p&gt;
&lt;p&gt;-Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUMGR firmware update via CAN bus (or any other bytestream source/sink) by software API instead of UART driver?</title><link>https://devzone.nordicsemi.com/thread/477871?ContentTypeID=1</link><pubDate>Tue, 09 Apr 2024 15:56:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5592aded-12e6-4fb2-82d9-49b97e71ece3</guid><dc:creator>puz_md</dc:creator><description>&lt;p&gt;Hi Amanda,&lt;/p&gt;
&lt;p&gt;thank you very much for the reply. dfu-target definitely looks interesting.&lt;/p&gt;
&lt;p&gt;Unfortunately, the documentation is a bit lacking - there is some documentation about the code, but no flow diagrams and no description how dfu-target complements mcumgr... does dfu-target completely replace mcumgr, so that I have to remove mcumgr from my configuration and use df-target to write into the secondary slot from within my application, using my own comunication protocol?&lt;/p&gt;
&lt;p&gt;Or is dfu-target being used by mcumgr? Your first link looks like there are multiple already implemented communication channels for dfu-target available that work with the mcumgr&amp;#39;s smp protocol, whereas the second link suggests that dfu-target is a completely separate module that works without the smp protocol...&lt;/p&gt;
&lt;p&gt;Further, is there any straightforward documentation on the mcumgr protocol available (packet definitions etc.)? This information would also be useful in creating our own little flashing application, as there seems to be no reliably working flashing application / command line tool for mcumgr available at this time. (Somewhere, it was written that a new version for the mcumgr command line tool is in development, and the old version should not be used for production as it is not reliable...)&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Michael&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUMGR firmware update via CAN bus (or any other bytestream source/sink) by software API instead of UART driver?</title><link>https://devzone.nordicsemi.com/thread/477856?ContentTypeID=1</link><pubDate>Tue, 09 Apr 2024 14:32:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b7fa2db7-394b-44c4-aee4-7d628a3c2f14</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Here are the two starting points that I would say are the best. You can choose either one:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a title="https://github.com/nrfconnect/sdk-zephyr/tree/main/subsys/mgmt/mcumgr/transport" href="https://github.com/nrfconnect/sdk-zephyr/tree/main/subsys/mgmt/mcumgr/transport" rel="noopener noreferrer" target="_blank"&gt;https://github.com/nrfconnect/sdk-zephyr/tree/main/subsys/mgmt/mcumgr/transport&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a title="https://developer.nordicsemi.com/nrf_connect_sdk/doc/latest/nrf/libraries/dfu/dfu_target.html#dfu-target" href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/libraries/dfu/dfu_target.html#dfu-target" rel="noopener noreferrer" target="_blank"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/libraries/dfu/dfu_target.html#dfu-target&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Regards,&lt;br /&gt;Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>