<?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>bsdlib AT socket API</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/44057/bsdlib-at-socket-api</link><description>Hi, 
 I really would like to be able interface with the modem at the lowest possible level. I got the bsdlib working. 
 I use the following procedure to send AT commands and receive responses: 
 init: 
 
 send: 
 
 receive: 
 
 when I use a buffer of</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 05 Mar 2019 11:57:12 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/44057/bsdlib-at-socket-api" /><item><title>RE: bsdlib AT socket API</title><link>https://devzone.nordicsemi.com/thread/174232?ContentTypeID=1</link><pubDate>Tue, 05 Mar 2019 11:57:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0fe8a4d3-7afe-40c2-9f86-5eade17faf58</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;I agree that this is not very efficient in terms of RAM usage. I&amp;#39;ll report this back to the developers.&lt;/p&gt;
&lt;p&gt;Unfortunately, as it&amp;#39;s implemented as a datagram, you&amp;#39;re unable to read a message in x byte chunks. The rest will then be discarded.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: bsdlib AT socket API</title><link>https://devzone.nordicsemi.com/thread/173899?ContentTypeID=1</link><pubDate>Mon, 04 Mar 2019 09:36:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:559973a1-42f9-4031-80f3-97ba18e72b9f</guid><dc:creator>Martijn</dc:creator><description>&lt;p&gt;Any more info on when the end of a message is received?&lt;/p&gt;
&lt;p&gt;Is there any possibility read a portion of the data without removing the rest of it?&lt;/p&gt;
&lt;p&gt;The examples that I found all use 4k buffers, wich seems a bit weird to me, because this is also allocated by the library. So there are 3 4k buffers allocated, 1tx in lib, 1rx in the lib and I alos need to allocate 4k in the application. seems a bit much to me.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: bsdlib AT socket API</title><link>https://devzone.nordicsemi.com/thread/173463?ContentTypeID=1</link><pubDate>Thu, 28 Feb 2019 12:04:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7a8ddb23-2e12-4ce7-ac9b-b446fac5e28e</guid><dc:creator>Martijn</dc:creator><description>&lt;p&gt;thank you, is that also the command response?&amp;nbsp;I thought that was the max size of the command I could send.&lt;/p&gt;
&lt;p&gt;And when the response is smaller than 4k. how do I know the end of the message is received?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: bsdlib AT socket API</title><link>https://devzone.nordicsemi.com/thread/173459?ContentTypeID=1</link><pubDate>Thu, 28 Feb 2019 11:48:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:85cb7ed4-e1d2-4a4c-81ac-593090030383</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The maximum is 4k:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/NordicPlayground/nrfxlib/blob/master/bsdlib/include/bsd_limits.h#L47"&gt;https://github.com/NordicPlayground/nrfxlib/blob/master/bsdlib/include/bsd_limits.h#L47&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: bsdlib AT socket API</title><link>https://devzone.nordicsemi.com/thread/173114?ContentTypeID=1</link><pubDate>Tue, 26 Feb 2019 18:31:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:88771297-d932-420c-ac03-413cf453c2ce</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;I&amp;#39;ll check up on this internally and get back to you.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: bsdlib AT socket API</title><link>https://devzone.nordicsemi.com/thread/172983?ContentTypeID=1</link><pubDate>Tue, 26 Feb 2019 10:40:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6278985e-3234-4518-9b53-e0cd5ca01de0</guid><dc:creator>Martijn</dc:creator><description>&lt;p&gt;Ok, so how do I know when the end of a single message is received?&lt;/p&gt;
&lt;p&gt;How large does my buffer need to be at max?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: bsdlib AT socket API</title><link>https://devzone.nordicsemi.com/thread/172970?ContentTypeID=1</link><pubDate>Tue, 26 Feb 2019 09:40:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:407259c1-15a0-4eb5-92a3-3e8657271886</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi Martijn,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]Is this expected behaviour? Do I need to allocate a massive buffer to be sure I always get all of my data?[/quote]
&lt;p&gt;An AT socket is implemented as a datagram, so you can do a NRF_MSG_PEEK into it (to keep it &amp;quot;unread&amp;quot;), but once you do a NRF_MSG_DONTWAIT, it will flush/truncate unless you read out the whole message.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>