<?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>Implementing USB Media Transfer Protocol</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/60522/implementing-usb-media-transfer-protocol</link><description>Hi, 
 We are currently evaluating a project, that uses the nrf52840 with an SD card and is connected as a USB device. One of the uses is the MCU is writing data to the SD card, while the USB interface can be used to transfer data out of the device. 
</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sun, 28 Mar 2021 20:58:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/60522/implementing-usb-media-transfer-protocol" /><item><title>RE: Implementing USB Media Transfer Protocol</title><link>https://devzone.nordicsemi.com/thread/302264?ContentTypeID=1</link><pubDate>Sun, 28 Mar 2021 20:58:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:551a5d80-9eb8-4508-afd5-6a58f3848046</guid><dc:creator>peterz</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I&amp;#39;m also interested in MTP for several reasons. With MTP I could&lt;br /&gt;a) deliver status and get/set config of my device as text file&lt;br /&gt;b) present sensor result values as &amp;quot;temperature_2021-03-28.csv&amp;quot; and &amp;quot;temperature_2021-03-28.json&amp;quot; and produce/format the file content on the fly&lt;br /&gt;c) firmware update for dummies (just drop the file)&lt;/p&gt;
&lt;p&gt;Yes, most could also be done with MSC.&lt;br /&gt;But files &amp;quot;popping up&amp;quot; when a measurement is terminated is not possible when the host OS is the boss of the file system.&lt;br /&gt;And detach/reattach for every change will lead to &amp;quot;drive not present&amp;quot; when an application wants to check for new results regularly.&lt;/p&gt;
&lt;p&gt;I looked at the above mentioned code from Bosch. This is clearly a good solution in the Bosch context. But IMHO this implementation does not fit with the concepts of nRF52 SDK. I would much prefer an approach which adopts the existing concepts and integrates smoothly&amp;nbsp; with the Nordic library. So I started with the Nordic CDC implementation and adapted the code to reflect MTP instead of CDC.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m a newbie in MTP and not experienced in USB either, therefore I progress very slowly and the resulting code is of questionable quality.&lt;br /&gt;But if somebody wants to join the effort, I&amp;#39;ll put the evolving code in a git repository.&lt;br /&gt;(or just wait a couple of weeks until it starts to work...)&lt;/p&gt;
&lt;p&gt;have fun&lt;br /&gt;Peter&lt;/p&gt;
&lt;p&gt;EDIT 17.04.2021: now I can list files and read a dummy text file on Linux and Windows 10. Making it work on Linux did take some effort but it was a piece of cake compared to make the same work on Windows.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Implementing USB Media Transfer Protocol</title><link>https://devzone.nordicsemi.com/thread/262670?ContentTypeID=1</link><pubDate>Sun, 02 Aug 2020 07:00:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:935a0ee1-86be-4e68-bc4c-13bd7b138fa2</guid><dc:creator>Jabez Winston</dc:creator><description>&lt;p&gt;&lt;span&gt;Please have a look at the USB MTP implementation for nRF52840 by Bosch Sensortec&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/Zhyolo/COINES/tree/master/coines_api/mcu_app30/usb_mtp"&gt;https://github.com/Zhyolo/COINES/tree/master/coines_api/mcu_app30/usb_mtp&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Implementing USB Media Transfer Protocol</title><link>https://devzone.nordicsemi.com/thread/258936?ContentTypeID=1</link><pubDate>Wed, 08 Jul 2020 08:28:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7e490626-27e5-47aa-a334-11184cb10ddb</guid><dc:creator>Sreejit</dc:creator><description>&lt;p&gt;Hi Soren,&lt;/p&gt;
&lt;p&gt;We too are trying to write data to SD card while the USB interface is copying the data out. Can I know what was the result of your evaluation. Were you able to achieve the required functionality?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Implementing USB Media Transfer Protocol</title><link>https://devzone.nordicsemi.com/thread/246271?ContentTypeID=1</link><pubDate>Thu, 23 Apr 2020 12:54:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bb639502-cfe2-4270-89bd-47cebcf184e8</guid><dc:creator>Soren Bendtsen</dc:creator><description>&lt;p&gt;Thanks Kenneth!&lt;/p&gt;
&lt;p&gt;Its not the answer I was looking for, but appreciate you taking the time.&lt;/p&gt;
&lt;p&gt;I am looking at if something like this could be ported. It would need to be modified for the file system and usb driver, but it could be do-able.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/libmtp/libmtp/tree/master/src"&gt;https://github.com/libmtp/libmtp/tree/master/src&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Implementing USB Media Transfer Protocol</title><link>https://devzone.nordicsemi.com/thread/246265?ContentTypeID=1</link><pubDate>Thu, 23 Apr 2020 12:40:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c4e5f382-d462-413a-8d1a-302b3f4daf23</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Not aware of such example now, I don&amp;#39;t really have any suggestion for workaround either.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>