<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[BLE arduino libraries crashing on M5 stack]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">I'm writing some code that uses BLE to discover a couple of sensors. I've been able to initialise the BLE library, scan for a device and succesfully match the service UUID with the one I'm interested in. However once I want to do something with services characteristics  my M5 crashes with the following error when I call</p>
<pre><code>  std::map&lt;std::string, BLERemoteService*&gt;* servicesMap  = pClient-&gt;getServices();         
  for (auto &amp;myServiceEntry : *servicesMap)   
  {
    BLERemoteService* svc = myServiceEntry.second;
    Serial.printf("Service found on Device: %s \n",  svc-&gt;getUUID().toString().c_str());

    if (svc-&gt;getUUID().toString() == myUUID)
    {   
      Serial.println("Searching for characteruistics");        

      std::map&lt;std::string, BLERemoteCharacteristic*&gt;* characteristics = svc-&gt;getCharacteristics();
      
      Serial.println("Finished search");
          
    }        
  }
</code></pre>
<p dir="auto">results in</p>
<p dir="auto">Finished search<br />
E (9180) FreeRTOS: FreeRTOS Task "loopTask" should not return, Aborting now!</p>
<p dir="auto">Backtrace: 0x40091e8c:0x3ffcaac0 0x400920bd:0x3ffcaae0 0x4008ddef:0x3ffcab00</p>
<p dir="auto">Rebooting...</p>
<p dir="auto">Has anyone used the BLE libraries with the M5? My understanding is the BLE libraries are now part of the ESP32 libraries for arduino and I am currently using ESP21 1.0.2</p>
<p dir="auto">Thanks</p>
]]></description><link>https://community.m5stack.com/topic/1286/ble-arduino-libraries-crashing-on-m5-stack</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 08:44:31 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/1286.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 04 Sep 2019 01:02:24 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to BLE arduino libraries crashing on M5 stack on Mon, 09 Sep 2019 01:43:46 GMT]]></title><description><![CDATA[<p dir="auto">I have no control over the ble server device. It appears the ble libraries are just flaky</p>
]]></description><link>https://community.m5stack.com/post/5532</link><guid isPermaLink="true">https://community.m5stack.com/post/5532</guid><dc:creator><![CDATA[rob.biernat]]></dc:creator><pubDate>Mon, 09 Sep 2019 01:43:46 GMT</pubDate></item><item><title><![CDATA[Reply to BLE arduino libraries crashing on M5 stack on Sun, 08 Sep 2019 17:43:49 GMT]]></title><description><![CDATA[<p dir="auto">Hmm had something similar some time ago.  Check for null values e.g. empty fields on the ble device.</p>
]]></description><link>https://community.m5stack.com/post/5530</link><guid isPermaLink="true">https://community.m5stack.com/post/5530</guid><dc:creator><![CDATA[Gero Nimo]]></dc:creator><pubDate>Sun, 08 Sep 2019 17:43:49 GMT</pubDate></item></channel></rss>