<?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 write a functions(program) for transmitting and receiving data over uart using nrf 51822?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/26029/how-to-write-a-functions-program-for-transmitting-and-receiving-data-over-uart-using-nrf-51822</link><description>Hi, there
i am using nrf51822 to communicate with quectel ec25 .i want to send AT commands over uart and receive some response from quectel.for eg. i am sending a &amp;quot;AT&amp;quot; command i should get &amp;quot;ok&amp;quot; response in return.i am referring nrf5 sdk10.0.0 uart example</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 24 Oct 2017 13:52:44 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/26029/how-to-write-a-functions-program-for-transmitting-and-receiving-data-over-uart-using-nrf-51822" /><item><title>RE: how to write a functions(program) for transmitting and receiving data over uart using nrf 51822?</title><link>https://devzone.nordicsemi.com/thread/102597?ContentTypeID=1</link><pubDate>Tue, 24 Oct 2017 13:52:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f582fd81-c1d8-4d45-a21f-5655349e07b7</guid><dc:creator>ASHISH</dc:creator><description>&lt;p&gt;hey matt could you send me your code for referal purpose as you are also using gsm communication with nrf51822.it would be great help!!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to write a functions(program) for transmitting and receiving data over uart using nrf 51822?</title><link>https://devzone.nordicsemi.com/thread/102598?ContentTypeID=1</link><pubDate>Tue, 24 Oct 2017 11:01:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3be09c2b-facb-49d9-a20f-e49e54f779a7</guid><dc:creator>Matt</dc:creator><description>&lt;p&gt;But can you manually send AT commands to the ec25 right now? I mean using something like a putty program to manually send AT commands and get the response from the ec25. If that works, then connect the nrf51822 to the ec25, set up the uart and use the app_uart_put() api call.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to write a functions(program) for transmitting and receiving data over uart using nrf 51822?</title><link>https://devzone.nordicsemi.com/thread/102594?ContentTypeID=1</link><pubDate>Mon, 23 Oct 2017 11:57:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bb06dc23-8c5c-4bc2-bed0-14c0a8f874eb</guid><dc:creator>ASHISH</dc:creator><description>&lt;p&gt;hey matt Thanks,i have gone through the ble_uart example and it worked well.but i have problem while sending AT commands to quectel ec25 .you had mentioned about finite state machine.i dont have any clue about writing fsm algorithm for sending AT commands to EC25 Board.could you send me the fsm code for sendinfg at command .i want just sample fsm code for sending data over uart.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to write a functions(program) for transmitting and receiving data over uart using nrf 51822?</title><link>https://devzone.nordicsemi.com/thread/102595?ContentTypeID=1</link><pubDate>Wed, 18 Oct 2017 14:59:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c13b8ad6-9366-45d1-be06-89b99ebe34f2</guid><dc:creator>Matt</dc:creator><description>&lt;p&gt;Finite State Machine (fsm). You really need to look at the example code like ~\nRF5_SDK_11.0.0_89a8197\examples\ble_peripheral\ble_app_uart\main.c to see how to send and receive data with the UART. I don&amp;#39;t have a &amp;quot;simple&amp;quot; example to show you right away :(&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to write a functions(program) for transmitting and receiving data over uart using nrf 51822?</title><link>https://devzone.nordicsemi.com/thread/102596?ContentTypeID=1</link><pubDate>Wed, 18 Oct 2017 12:05:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1ba8acda-60b2-464c-b5a8-8108bcf7bdcc</guid><dc:creator>ASHISH</dc:creator><description>&lt;p&gt;Hey,Thanks matt  can you please elaborate what is fsm and how to write a fsm to send AT commands using nrf 51822?if you share the fsm algorithm code for uart it will be great help.can you please tell me the working of a sending and receiving functions in uart example?how can i write a function to send AT commands?how to check receiving data?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to write a functions(program) for transmitting and receiving data over uart using nrf 51822?</title><link>https://devzone.nordicsemi.com/thread/102593?ContentTypeID=1</link><pubDate>Tue, 17 Oct 2017 14:55:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b61381c0-7341-4353-9fd3-58f032c8641d</guid><dc:creator>Matt</dc:creator><description>&lt;p&gt;Look into the ble uart bridge example (~\nRF5_SDK_11.0.0_89a8197\examples\ble_peripheral\ble_app_uart\main.c) and look for the function uart_event_handle() for the uart receive example. As for sending it depends on how you structure your application to invoke the app_uart_put(). In my application I have the nRF52832 talking to the Telit GE866 module to send and receive data from a cloud server through the GSM network; I also have a QuecTel EVK but have not got the chance to try it yet!&lt;/p&gt;
&lt;p&gt;I strongly suggest you code some kind of fsm to handle the AT command sequence to the QuecTel module as that involves registration, setting up the connection and requesting a socket, all of which can fail and thus the same AT commands must be resent again, in which case a fsm definitely helps to make the code/logic clear.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>