<?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>Problem with simultaneous transmission and reception</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/14143/problem-with-simultaneous-transmission-and-reception</link><description>Hi all again guys! I am experiencing a problem with my application: i have a beacon that is sending ADC converted values to a nrf51 DK (via notification), which is connected to the pc to receive these values via USB and visualize them; from the pc, i</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 21 Jun 2016 09:49:56 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/14143/problem-with-simultaneous-transmission-and-reception" /><item><title>RE: Problem with simultaneous transmission and reception</title><link>https://devzone.nordicsemi.com/thread/54059?ContentTypeID=1</link><pubDate>Tue, 21 Jun 2016 09:49:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:25580bd6-309b-4cc3-b74b-bc94382eb2ce</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;I don&amp;#39;t know what causes the disconnection. Is the error code still the same? Without FIFO you don&amp;#39;t use a FIFO buffer, with FIFO you use a FIFO bufer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with simultaneous transmission and reception</title><link>https://devzone.nordicsemi.com/thread/54058?ContentTypeID=1</link><pubDate>Tue, 21 Jun 2016 09:11:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cb0a7828-88c0-474d-8218-5b706339991f</guid><dc:creator>Revo</dc:creator><description>&lt;p&gt;It seems to work using the FIFO library, i got a disconnection and reset one time on like 50 tries (and maybe because i was using write too fast?); can you explain me the difference with or without FIFO?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with simultaneous transmission and reception</title><link>https://devzone.nordicsemi.com/thread/54057?ContentTypeID=1</link><pubDate>Tue, 21 Jun 2016 08:01:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:12a3fa89-34ad-4413-96b5-98bdb218e6e1</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Strange I don&amp;#39;t get a reset anymore. Yes, you can try to use app_uart_fifo instead of app_uart.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with simultaneous transmission and reception</title><link>https://devzone.nordicsemi.com/thread/54056?ContentTypeID=1</link><pubDate>Mon, 20 Jun 2016 13:19:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:46efdc96-e4da-4ea9-aaa1-05eadcc49f8e</guid><dc:creator>Revo</dc:creator><description>&lt;p&gt;I tried commenting app_sched_event_put() and the following APP_ERROR_CHECK, but It doesn&amp;#39;t change anything and the reset still happens!&lt;/p&gt;
&lt;p&gt;p.s i saw another post with someone that had a problem about using uart and then solved it with something about FIFO, is this a possible error?&lt;a href="https://devzone.nordicsemi.com/question/20383/sending-via-uart/"&gt;devzone.nordicsemi.com/.../&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with simultaneous transmission and reception</title><link>https://devzone.nordicsemi.com/thread/54055?ContentTypeID=1</link><pubDate>Mon, 20 Jun 2016 13:15:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3066443a-c87d-464e-bd2e-763b60039c2a</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;For app_error_handler() to be called, it has to be actually called somewhere, with the error code. I did some testing, and it seems it can from app_sched_event_put() in sys_evt_dispatch(). Could you try commenting that out and see if helps?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with simultaneous transmission and reception</title><link>https://devzone.nordicsemi.com/thread/54054?ContentTypeID=1</link><pubDate>Mon, 20 Jun 2016 10:50:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2c054fe0-cee3-4647-99da-e4475fecccba</guid><dc:creator>Revo</dc:creator><description>&lt;p&gt;I know this, i found it strange too but consider this: app_error_handler is called ONLY just before the reset (so it must be the cause), and exactly when i send something to the beacon and it puts it out with uart. So, the error code inside app_error_handler, that is the NO MEM stuff, can only come from the uart function. After this, unfortunately i don&amp;#39;t have the tools to get out from the beacon the value of the line number, because my only possibility is to turn on the LED to verify if the error code is what i supposed (like i do with no mem)... can you do this for me or tell me a way to get this value?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with simultaneous transmission and reception</title><link>https://devzone.nordicsemi.com/thread/54053?ContentTypeID=1</link><pubDate>Mon, 20 Jun 2016 10:43:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2bb9757f-f4f8-4940-b916-9f6479eb086b</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;I was looking at an older project of yours. I see it now. app_uart_put() shouldn&amp;#39;t cause the reset, at least not directly. Because you are not calling APP_ERROR_CHECK() with its returned error code. Can you see what error code, line number and file name that causes app_error_handler to be called?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with simultaneous transmission and reception</title><link>https://devzone.nordicsemi.com/thread/54052?ContentTypeID=1</link><pubDate>Mon, 20 Jun 2016 10:31:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ce18f4bb-ce25-48c9-b3a9-e0e92e6b83b9</guid><dc:creator>Revo</dc:creator><description>&lt;p&gt;It&amp;#39;s one of the last function in the bottom of the code ( inside the folder nrf51822 beacon v1.1.1, source code...main.c), nested in the function &amp;quot;invio uart&amp;quot;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with simultaneous transmission and reception</title><link>https://devzone.nordicsemi.com/thread/54051?ContentTypeID=1</link><pubDate>Mon, 20 Jun 2016 10:22:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e5b1bbc1-e7ac-4086-9ae3-b5bf185303cc</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;That&amp;#39;s good. I&amp;#39;m sorry, but I can&amp;#39;t find any app_uart_put in your beacon source code?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with simultaneous transmission and reception</title><link>https://devzone.nordicsemi.com/thread/54050?ContentTypeID=1</link><pubDate>Mon, 20 Jun 2016 09:12:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7331681e-5c76-419e-bbac-80455c00ced2</guid><dc:creator>Revo</dc:creator><description>&lt;p&gt;I am having the possibility to work on the beacon today. Since the problem seems to be the beacon (as you said, the app_error_handler is called and a system reset in it is executed), i tried to figure out what makes this happen, and what i saw is that if i remove the app_uart_put instruction, it happens very very less times (maybe 1 every 30/40 sendings), if i put it back, every 2 or 3 times i send something to the beacon, they disconnect, due to the function nvic_systemreset in the app error handler. Even with this, this happening seems to be pretty random.&lt;/p&gt;
&lt;p&gt;In the error handler, the error code seems to come from app uart put, and the error is &amp;quot;NRF_ERROR_NO_MEM&amp;quot;. Can you please give me your expert opinion on how to fix this? Please note that every time that the beacon receive a packet to send out with app uart put, it&amp;#39;s a packet of 13 bytes; this error seems to happen sometimes at the first sending after turning on the beacon, so the buffer shouldn&amp;#39;t be already full (TX_BUFFER is set on 256).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with simultaneous transmission and reception</title><link>https://devzone.nordicsemi.com/thread/54049?ContentTypeID=1</link><pubDate>Mon, 13 Jun 2016 13:15:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:add33e46-d309-4519-8b75-e8940ba6f26e</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;If you try what I mentioned above, and you are still stuck, I will help you. Let me know when you ahve time working on BLE again.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with simultaneous transmission and reception</title><link>https://devzone.nordicsemi.com/thread/54048?ContentTypeID=1</link><pubDate>Mon, 13 Jun 2016 13:05:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bba1d90f-b5c8-4fa6-a5dc-544692f82dc6</guid><dc:creator>Revo</dc:creator><description>&lt;p&gt;I&amp;#39;m sorry Mr Myhre but i am currently at a point of the project where, not for my fault, i must work on different features of the system and i can&amp;#39;t make any testing on the bluetooth devices (even though i already tried something in the error handler with no results, but i am not so confident in my debug abilities); unfortunately i will have to solve it later when i will have the occasion to work again on the BT part, so can i kindly ask you or somebody of the Nordic moderation team to make this debug for me on the code so i will have something ready in the following weeks to fix the problem? It would be really helpful for me!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with simultaneous transmission and reception</title><link>https://devzone.nordicsemi.com/thread/54047?ContentTypeID=1</link><pubDate>Mon, 13 Jun 2016 07:57:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d3f1f0e9-1ee2-4090-a0e6-77dff3ff1246</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;I have been out travelling, sorry. You are probably getting BLE_HCI_CONNECTION_TIMEOUT on the central because the peripheral is not responding. It is probably not responding because you it has reset in app_error_handler() or because you have got a hard fault. Try setting a breakpoing in app_error_handler() and see if you hit it, and try stopping when you get this disconnect, where in the code are you?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with simultaneous transmission and reception</title><link>https://devzone.nordicsemi.com/thread/54046?ContentTypeID=1</link><pubDate>Mon, 06 Jun 2016 09:21:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fb94a860-25a9-487b-a799-e585382c206a</guid><dc:creator>Revo</dc:creator><description>&lt;p&gt;Excuse me for bothering Mr Myhre, did you manage to try my code? I did some other tests and the code works in the cases when i don&amp;#39;t have disconnection between the two devices (i see on the beacon the number sent via serial with app uart put on an oscylloscope), but i still cannot understand why there are those random disconnections. When a disconnection happens, the values that i sent with the write are put via serial on the immediately successive connection and write operation, so when a disconnection happens i actually &amp;quot;lose&amp;quot; that packet. I only need help about this, fix the disconnection problem! Thanks really...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with simultaneous transmission and reception</title><link>https://devzone.nordicsemi.com/thread/54045?ContentTypeID=1</link><pubDate>Tue, 31 May 2016 12:14:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:37c9c860-36e9-44f9-a2b0-c02eae98d202</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;I will check your code when I have time, but please check the stuff I mentioned above.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with simultaneous transmission and reception</title><link>https://devzone.nordicsemi.com/thread/54044?ContentTypeID=1</link><pubDate>Tue, 31 May 2016 12:08:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:559f8a1f-95f6-4443-9e65-3b84069b1ae3</guid><dc:creator>Revo</dc:creator><description>&lt;p&gt;Today i did some testing, and i noticed that the disconnection happens a lot less times, though still occurs, i can&amp;#39;t really explain this... in addition, as you can see on the peripheral i want to put out in serial the numbers sent with the write operation, but checking with the oscilloscope i don&amp;#39;t get the numbers with app uart put; maybe this usage of app uart put can someway cause also the problem? If you could check when you have time the code part pc--&amp;gt;DK--&amp;gt;beacon--&amp;gt;app uart put i would be really grateful...&lt;/p&gt;
&lt;p&gt;P.S i checked the case of disconnection on the central side, and the reason is &amp;quot;08&amp;quot;, which seems to be from the table of the softdevice a connection timeout, i don&amp;#39;t understand how it is possible...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with simultaneous transmission and reception</title><link>https://devzone.nordicsemi.com/thread/54043?ContentTypeID=1</link><pubDate>Tue, 31 May 2016 10:40:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f9d4ac02-6d1a-4265-a301-f343453ba21d</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;I would also suspect that error is in the central. But I would still confirm this. What you can do is to check if you get the BLE_GAP_EVT_DISCONNECTED event on either side, and check what the reason is p_ble_evt-&amp;gt;evt.gap_evt.params.disconnected.reason. I would also put a breakpoint in app_error_handler(), to see if you get any errors somewhere.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with simultaneous transmission and reception</title><link>https://devzone.nordicsemi.com/thread/54042?ContentTypeID=1</link><pubDate>Mon, 30 May 2016 16:23:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4690f1e4-292f-4790-bfdc-4ca028b814e3</guid><dc:creator>Revo</dc:creator><description>&lt;p&gt;Ok sorry, my first goal was to understand if it was capable or not, now i know that there should be a problem in the code. Yes, when i DON&amp;#39;T send numbers, the transmission from the beacon (peripheral) to the DK (central) works perfectly, the problem arises randomly (though pretty often) with the opposite way. I uploaded the zip (you probably already saw it because you helped me with older problems about it) with both the  files loaded on the beacon and the ones for the DK, i put both of them because i don&amp;#39;t know which of the two devices makes this disconnection problem, even though of course is the DK that makes the write operation while receiving notifications by the beacon. Always really thanks for your help.&lt;/p&gt;
&lt;p&gt;I resume briefly the two codes:&lt;/p&gt;
&lt;p&gt;BEACON SIDE: converts with the ADC every 2 ms, then save the result filling five packet of 20 bytes, then sends them via notification to the DK&lt;/p&gt;
&lt;p&gt;DK SIDE: receives the notification after doing db discovery of the service of the beacon, then sends them via uart to the pc; when from the pc i write an array of 13 integer and send them via UART to the DK, it gets an event and writes these values on the beacon, on a appropriate characteristic (for doing this, there is a control of the 10th value of the array that must be nonzero).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with simultaneous transmission and reception</title><link>https://devzone.nordicsemi.com/thread/54041?ContentTypeID=1</link><pubDate>Mon, 30 May 2016 15:58:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7e3efed3-d5eb-4852-b8c4-79df2def9b18</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;It is capable. I have no idea what you are doing, so it is difficult to say what the problem could be. You give the impression that it works when you don&amp;#39;t send numbers from the PC? Maybe you can edit your question and add the relevant parts?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>