<?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>nRF52832 firmware design approach</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/65092/nrf52832-firmware-design-approach</link><description>hello I am using nrf52832. I am advertising some data and scanning (on the same microcontroller) for other nrf52 devices(which will have the same firmware). When the other nrf52 comes closer than certain rssi threshold, I have to transmit this other device</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 24 Aug 2020 13:53:59 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/65092/nrf52832-firmware-design-approach" /><item><title>RE: nRF52832 firmware design approach</title><link>https://devzone.nordicsemi.com/thread/266011?ContentTypeID=1</link><pubDate>Mon, 24 Aug 2020 13:53:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:678363a9-a0f2-4dd0-853f-1368be983424</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Ok, so you want to measure RSSI between many devices, and send some data to a gateway when needed, right?&lt;/p&gt;
&lt;p&gt;And if I understand correctly, you are already done with the advertising and scanning part that is done on the nodes, to detect the RSSI, right?&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;And now you need to send this data to the gateway?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Option 1: You should be able to use radio notifications together with advertising and scanning. What sort of issue are you running into?&lt;/p&gt;
&lt;p&gt;You probably don&amp;#39;t need to use radio notifications, even though it is possible. You can just use a timer set to 1.5 advertising interval.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;However: Even if you know that the advertisement has been sent, you have no guarantee that the gateway has picked it up. The packet may be lost due to noise, or if the gateway is already in the middle of another advertising packet from one of the other nodes. So you should let the device advertise these messages for many advertising intervals if you want to &lt;strong&gt;increase the probability&lt;/strong&gt; for the gateway to pick it up (still not guaranteed).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Option 2: A connection will ensure that the message that you are sending is successfully received by the gateway. The downside is that this takes time, because they have to connect, the gateway needs to enable notifications, and then receive the notification from the service/characteristic, instead of just receiving an advertisement packet.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I would say that option 2 is your best option, but it depends on the number of nodes you are going to use. If you have 20 nodes, it shouldn&amp;#39;t be a problem to connect to any nodes that request it, if they request it once in a while. But if you have 1000 nodes, you may struggle to keep up with the nodes that want to connect.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So if you have too many nodes (the number depends on the advertising interval that you need), I would imagine that the best option would be to change advertisements, but leave them advertising like this for a lot longer than one advertisement. Why do you need to change it back?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>