<?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>How to send byte array using modem shell send</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/122474/how-to-send-byte-array-using-modem-shell-send</link><description>Hi, How do we send a byte array using mosh? From the documentation I can see: sock send -i 0 -l 100000 This specifies the socket and the length. But how is the actual data sent? Can we append it as ? sock send -i 0 -l 100000 &amp;quot;\x0a\xo1.....&amp;quot;</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 24 Jun 2025 11:54:50 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/122474/how-to-send-byte-array-using-modem-shell-send" /><item><title>RE: How to send byte array using modem shell send</title><link>https://devzone.nordicsemi.com/thread/540320?ContentTypeID=1</link><pubDate>Tue, 24 Jun 2025 11:54:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f4bd7d6e-5b67-4d11-884c-f21dfbb49de6</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="anupamvarghese"]I&amp;nbsp;understand sending string. Wanted to check how to send bytes.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Found the answer:&lt;br /&gt;&lt;br /&gt;sock send -i 0 -d &amp;quot;01 02 00 01...&amp;quot; --hex[/quote]
&lt;p&gt;Thank you for the update. Various options can be found in&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/main/samples/cellular/modem_shell/src/sock/sock_shell.c#L88"&gt;sock_shell.c&lt;/a&gt;. It is also possible to run &amp;quot;sock send -h&amp;quot; to look for specific options.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send byte array using modem shell send</title><link>https://devzone.nordicsemi.com/thread/540309?ContentTypeID=1</link><pubDate>Tue, 24 Jun 2025 11:36:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e55d3dc2-e885-4698-946f-d9ab9fb81192</guid><dc:creator>anupamvarghese</dc:creator><description>&lt;p&gt;I&amp;nbsp;understand sending string. Wanted to check how to send bytes.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Found the answer:&lt;br /&gt;&lt;br /&gt;sock send -i 0 -d &amp;quot;01 02 00 01...&amp;quot; --hex&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send byte array using modem shell send</title><link>https://devzone.nordicsemi.com/thread/540306?ContentTypeID=1</link><pubDate>Tue, 24 Jun 2025 11:31:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dbb79899-789c-4095-8042-cfe7e9c6cd3b</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;You could try using the same &amp;quot;sock send&amp;quot; command. For example, you can try with&amp;nbsp;&lt;br /&gt;&lt;span&gt;sock send -i 0 -d ”hello world”&lt;br /&gt;for sending string through the socket.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>