<?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>Compare if received BLE data is equal to a specific value</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/74180/compare-if-received-ble-data-is-equal-to-a-specific-value</link><description>Hi, I successfully implemented a custom BLE service using this tutorial from Nordic. Also, thanks to a Nordic engineer, I have the QSPI example merged with the ble_app_template example with my custom BLE service. Now, I want to read the data received</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 29 Apr 2021 11:18:57 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/74180/compare-if-received-ble-data-is-equal-to-a-specific-value" /><item><title>RE: Compare if received BLE data is equal to a specific value</title><link>https://devzone.nordicsemi.com/thread/307441?ContentTypeID=1</link><pubDate>Thu, 29 Apr 2021 11:18:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2d0ff5d1-d94b-4327-8094-0b7d428b83f5</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hehe np, happy that it worked for you ;)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Compare if received BLE data is equal to a specific value</title><link>https://devzone.nordicsemi.com/thread/306384?ContentTypeID=1</link><pubDate>Thu, 22 Apr 2021 14:14:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:df1c0b4d-2de9-4223-a8e8-617aac7c524b</guid><dc:creator>ErickCastle</dc:creator><description>&lt;p&gt;Hi Jared,&lt;br /&gt;&lt;br /&gt;I was so dazed that I didn&amp;#39;t even consider that solution. It works perfectly, thank you, here is a screenshot of a test (if the value of TOKEN is equal to &amp;quot;64&amp;quot; then, I print something):&lt;br /&gt;&lt;br /&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1619100788227v1.png" alt=" " /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Compare if received BLE data is equal to a specific value</title><link>https://devzone.nordicsemi.com/thread/306019?ContentTypeID=1</link><pubDate>Wed, 21 Apr 2021 08:54:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7ad31bd2-b8df-40e0-afc6-367cf9b0dab8</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]I want to know how can I access that data in the main.c file so I can compare if the data received via BLE is equal to a specific value. If so, I will use QSPI to store some data in the external Flash&amp;nbsp;&lt;span&gt;memory present in the NRF52840 DK.&lt;br /&gt;&lt;/span&gt;[/quote]
&lt;p&gt;&amp;nbsp;Essentially, the question as I understand it is: How can I get access in main.c to a variable that is set in a function in another source?&amp;nbsp;You could use a global variable that you set in the callback handler in on_write().&amp;nbsp;&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>