<?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[How does GUI-O&#x27;s auto-connect work in BLE?]]></title><description><![CDATA[<p dir="auto">I have had success using GUI-O in Bluetooth SPP mode with ESP32 and auto-connect.<br />
I have recently tried to use GUI-O BLE mode using an ESP32-S3 with the GUI-BasicBLE example. It works somewhat:</p>
<ol>
<li>It takes about 20-30 seconds for the GUI-O app to acknowledge that it has made a connection- even though the serial monitor on the ESP32-S3 shows a connection very quickly.</li>
<li>You then have to pick 0xFFE0 for service and then 0xFFE1 for characteristic.</li>
<li>Then the dashboard works.</li>
<li>if you then switch on Autoconnect, and re-start GUI-O,  it brings up the Quick Connect menu but shows 2 separate BasicBLE devices ( I only have 1 ESP32 running)</li>
<li>Picking either one does not show a "connect" message on the ESP32 serial monitor and shows a bluetooth low energy error message on GUI-O app<br />
The same thing happens if I use a standard ESP32 module (non S3) with the same GUI-O_BasicBLE example code.<br />
It appears that one cannot use the autoconnect function with BLE and also that you cannot reconnect to an ESP32 while running the GUI-O_BasicBLE example.<br />
Thank you</li>
</ol>
]]></description><link>https://forum.gui-o.com/topic/72/how-does-gui-o-s-auto-connect-work-in-ble</link><generator>RSS for Node</generator><lastBuildDate>Sun, 07 Jun 2026 17:10:33 GMT</lastBuildDate><atom:link href="https://forum.gui-o.com/topic/72.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 14 Jun 2022 13:51:41 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How does GUI-O&#x27;s auto-connect work in BLE? on Mon, 27 Jun 2022 16:24:26 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.gui-o.com/uid/4">@kl3m3n</a>  That was quick!   Yes, your code which restarts the advertising in the onDisconnect routine is much better. I believe I tried putting it there first but I don't think it would compile ("not in scope" error). Then I checked out that Kolban demo and just did it his way.<br />
You must be a pretty good programmer to be handling all aspects of this by yourself. Even programmers that do both MCU programming and either smartphone or PC applications, are often not good writers- i.e. their documentation is poor. Your's is excellent.<br />
FYI. I have used an IOS app called TechBasic which is something like GUI-O in that it lets you communicate with MCUs via Bluetooth. It is, however, a Basic interpreter running on the IOS device. So, its a bit more versatile but you do the actual programming/development on the IOS device itself. That's not ideal. The TechBasic app itself starts up like a PC IDE for Basic programming, and you can compose/edit or  select &amp; run your Basic programs from there.. So, it's not really a stand-alone app that a non-programmer can use easily. The auto-connect feature of GUI-O is quite superior in this respect.<br />
Also, as far as I know, IOS only works in the BLE mode- not the legacy Bluetooth SPP mode. I happen to like that the Android OS lets you use legacy Bluettoth/SPP.<br />
So, I agree- you are right to be hesitant about an IOS app. There would be a lot of adaptation you would likely have to do.<br />
Again- thanks for your attention and efforts on my forum posts.<img src="https://forum.gui-o.com/assets/plugins/nodebb-plugin-emoji/emoji/android/1f60a.png?v=29eca934c85" class="not-responsive emoji emoji-android emoji--blush" style="height:23px;width:auto;vertical-align:middle" title=":blush:" alt="😊" /></p>
]]></description><link>https://forum.gui-o.com/post/270</link><guid isPermaLink="true">https://forum.gui-o.com/post/270</guid><dc:creator><![CDATA[bmillier]]></dc:creator><pubDate>Mon, 27 Jun 2022 16:24:26 GMT</pubDate></item><item><title><![CDATA[Reply to How does GUI-O&#x27;s auto-connect work in BLE? on Sun, 26 Jun 2022 21:40:01 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.gui-o.com/uid/33">@bmillier</a> Thank you for the fix!</p>
<p dir="auto">I have made slight modifications to keep the loop part clean and instead added your re-advertising routine to the disconnect callback. The entire example code is below at the end of this post.</p>
<p dir="auto">I will also update the BasicBLE example. Thank you.</p>
<p dir="auto">Yes, iOS somewhat limits the flexibility in app development. Of course, Android also enforces some changes with every new API release / update, but I don't need to buy a new PC for this <img src="https://forum.gui-o.com/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=29eca934c85" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:23px;width:auto;vertical-align:middle" title=":)" alt="🙂" /><br />
This is just my first impression - I have never really done any iOS development...</p>
<p dir="auto">P.S.: The app price on Android is around 10$. I understand there is a big market for iOS, especially in the US. The logical step would be to support this, but I currently develop the app alone and also take care of the examples, the website, the designer tool etc... Frankly, porting to iOS scares me a bit... It is going to take some time and a fair amount of energy <img src="https://forum.gui-o.com/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=29eca934c85" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:23px;width:auto;vertical-align:middle" title=":)" alt="🙂" /></p>
<p dir="auto">BR,<br />
kl3m3n</p>
<pre><code>/*
 * GUI-O Basic BLE example (using ESP32-WROOM-32)
 *
 * Copyright (C) 2021, GUI-O Team
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */

#include &lt;BLEDevice.h&gt;
#include &lt;BLEServer.h&gt;
#include &lt;BLEUtils.h&gt;
#include &lt;BLE2902.h&gt;

namespace led {
  static const uint8_t LED_BUILTIN = 2;
  static const uint8_t LED_CHANNEL = 0;
  static const double LED_FREQ = 5000.0;
  static const uint8_t LED_BITS = 8;
} // namespace led

namespace uuid {
  static const char *SERVICE_UUID = "6E400001-B5A3-F393-E0A9-E50E24DCCA9E";
  static const char *RX_CHARACTERISTIC_UUID = "6E400002-B5A3-F393-E0A9-E50E24DCCA9E";
  static const char *TX_CHARACTERISTIC_UUID = "6E400003-B5A3-F393-E0A9-E50E24DCCA9E";
} // namespace uuid

// forward declare parser for incoming messages
void parseGuioMsg(const String &amp;msg);

// setup done flag
bool setupDone = false;

// custom handling of server callbacks
class CustomBLEServerCallbacks: public BLEServerCallbacks {
    void onConnect(BLEServer* pServer) {
      Serial.println("Connected!");
    };
    void onDisconnect(BLEServer* pServer) {
      Serial.println("Disconnected!");

      // fix provided by BM
      // restart advertising after disconnect, otherwise GUI-O cannot re-connect
      if(setupDone) {
        // restart advertising on disconnect
        delay(500);
        pServer-&gt;startAdvertising(); 
      }
    }
};

// custom handling of characteristic callbacks
class CustomBLECharacteristicCallbacks: public BLECharacteristicCallbacks {
  void onWrite(BLECharacteristic *pCharacteristic) {
    std::string msg = pCharacteristic-&gt;getValue();
    
    // parse message string
    parseGuioMsg(String(msg.c_str()));
  }      
};

// global ptr
BLECharacteristic *pTxCharacteristic;

void setup() {
  // debug output
  Serial.begin(115200);

  // setup builtin led
  ledcSetup(led::LED_CHANNEL, led::LED_FREQ, led::LED_BITS); // channel, freq, resolution_bits
  ledcAttachPin(led::LED_BUILTIN, led::LED_CHANNEL);

  // create device
  BLEDevice::init("BasicBLE_NUS");
  // create server and register callback
  BLEServer *pServer = BLEDevice::createServer();
  pServer-&gt;setCallbacks(new CustomBLEServerCallbacks());
  // create service
  BLEService *pService = pServer-&gt;createService(uuid::SERVICE_UUID);

  // crate Tx characteristic and add descriptor
  pTxCharacteristic = pService-&gt;createCharacteristic(uuid::TX_CHARACTERISTIC_UUID, BLECharacteristic::PROPERTY_NOTIFY);
  pTxCharacteristic-&gt;addDescriptor(new BLE2902());
  
  // crate Rx characteristic and register callback
  BLECharacteristic *pRxCharacteristic = pService-&gt;createCharacteristic(uuid::RX_CHARACTERISTIC_UUID, BLECharacteristic::PROPERTY_WRITE | BLECharacteristic::PROPERTY_WRITE_NR);
  pRxCharacteristic-&gt;setCallbacks(new CustomBLECharacteristicCallbacks());

  // start the service and start advertising
  pService-&gt;start();
  pServer-&gt;getAdvertising()-&gt;start();

  // setup done flag
  setupDone = true;
}

void loop() {
  
}

/***************************/
/* IMPLEMENT YOUR GUI HERE */
/***************************/
void sendMsg(const String &amp;msg) {
  pTxCharacteristic-&gt;setValue(std::string(msg.c_str()));
  pTxCharacteristic-&gt;notify();
  delay(50);
}

void parseGuioMsg(const String &amp;msg) {
  if(msg.startsWith("@init")) {
    Serial.println("GUI-O app is requesting INITIALIZATION!");

    // clear screen and set background
    sendMsg("@cls\r\n");
    sendMsg("@guis BGC:#FFFFFF\r\n");
    delay(100);

    // initialize simple example GUI
    sendMsg("|LB UID:title X:50 Y:15 TXT:\"Simple light switch\" FFA:\"font8\" FSZ:3.5\r\n");
    sendMsg("|LB UID:tap_me X:50 Y:70 TXT:\"TAP ME!\" FFA:\"font8\" FSZ:3 FFA:\"font5\"\r\n");
    sendMsg("|CB UID:brightness X:50 Y:50 W:90 BTH:5 HAH:8 HAW:8 VIS:0 STA:135 ENA:45 FGC:#000000 SFGC:#FFFF00 BGC:#CBCBCB\r\n");
    sendMsg("|IM UID:light_off X:50 Y:50 IP:\"https://i.imgur.com/3VbsS0Z.png\" VIS:1\r\n");
    sendMsg("|IM UID:light_on X:50 Y:50 IP:\"https://i.imgur.com/gNdck9A.png\" VIS:0\r\n");    
  }
  else if(msg.startsWith("@light_off")) {
    Serial.println("GUI-O app is requesting LIGHT ON!");

    // "drive GUI-O app"
    sendMsg("@light_off VIS:0\r\n");
    sendMsg("@light_on VIS:1\r\n");
    sendMsg("@brightness VIS:1 VAL:100\r\n");

    // led enable
    ledcWrite(led::LED_CHANNEL, 255);
  }
  else if(msg.startsWith("@light_on")) {
    Serial.println("GUI-O app is requesting LIGHT OFF!");

    // "drive GUI-O app"
    sendMsg("@light_off VIS:1\r\n");
    sendMsg("@light_on VIS:0\r\n");
    sendMsg("@brightness VIS:0 VAL:0\r\n");

    // led disable
    ledcWrite(led::LED_CHANNEL, 0);
  }
  else if(msg.startsWith("@brightness")) {
    const int idx = msg.indexOf(' ');
    
    if(idx &gt; 0) {
      const int val = msg.substring(idx + 1).toInt();
      
      if(val &gt;= 0 &amp;&amp; val &lt;= 100) {
        Serial.print("GUI-O app is requesting LIGHT BRIGHTNESS: ");
        Serial.println(val);

        // led drive
        ledcWrite(led::LED_CHANNEL, static_cast&lt;uint8_t&gt;(val * 2.55));
      }            
    }    
  }  
}
</code></pre>
]]></description><link>https://forum.gui-o.com/post/269</link><guid isPermaLink="true">https://forum.gui-o.com/post/269</guid><dc:creator><![CDATA[kl3m3n]]></dc:creator><pubDate>Sun, 26 Jun 2022 21:40:01 GMT</pubDate></item><item><title><![CDATA[Reply to How does GUI-O&#x27;s auto-connect work in BLE? on Sun, 26 Jun 2022 13:28:44 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.gui-o.com/uid/4">@kl3m3n</a>  Hi:<br />
I sent the patched BasicBLE_NUS.ino file to the email address you mentioned. The added lines are marked with the comment "//BM added". I don't feel that you need to acknowledge me in the demo because I just studied a BLE uart example originally written by Neil Kolban and ported to Arduino by  Evandro Copercini, and changed your demo accordingly.<br />
I understand your issues with IOS.<img src="https://forum.gui-o.com/assets/plugins/nodebb-plugin-emoji/emoji/android/1f627.png?v=29eca934c85" class="not-responsive emoji emoji-android emoji--anguished" style="height:23px;width:auto;vertical-align:middle" title=":anguished:" alt="😧" />  I had wanted to write IOS programs to act as a GUI for my MCU projects about 8 years ago. I used PCs at work and at home, but had purchased a Mac Mini because I was also doing support functions for some of our staff that used Macs exclusively. However, shortly after I got interested in trying to write IOS apps in Objective C, the Mac OS had to be updated to use it, and my Mac Mini wouldn't support the update. So, I was disappointed. Later on when Swift , Clang came along, I didn't want to spend another $1500 to buy a new Mac. Also, to be honest, I found Objective C hard to understand- I use C for everything now, but used Visual Basic on PCs and BascomAVR for the AVR MCUs I was using at that time.<br />
As far as I know, there's nothing like your GUI-O on IOS- at least not that I've found. Since Matjaz gave me a free license,  I can't see  what you charge for GUI-O. But, if you decided to do an IOS version, I think you should charge more- there is not a huge market for this sort of app, but those who need it would be willing to pay more than the usual $5-$10 that apps often sell for. For IOS, there's no way the average MCU programmer is going to be able to develop their own IOS app for something like this.<br />
BR</p>
]]></description><link>https://forum.gui-o.com/post/268</link><guid isPermaLink="true">https://forum.gui-o.com/post/268</guid><dc:creator><![CDATA[bmillier]]></dc:creator><pubDate>Sun, 26 Jun 2022 13:28:44 GMT</pubDate></item><item><title><![CDATA[Reply to How does GUI-O&#x27;s auto-connect work in BLE? on Sat, 25 Jun 2022 21:07:09 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.gui-o.com/uid/33">@bmillier</a> Hi</p>
<p dir="auto">That is great news! <img src="https://forum.gui-o.com/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=29eca934c85" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:23px;width:auto;vertical-align:middle" title=":)" alt="🙂" /> I would be much obliged to see the modified code - I can then update the BLE examples. I would like add you as a contributor  (<strong>bmiller</strong>) at the start of the example code, if it is OK with you? You can post the code patch here (just the changes) or send it to info.guio.app[at]<a href="http://gmail.com" rel="nofollow ugc">gmail.com</a>.</p>
<p dir="auto">Regarding iOS - I know that in USA there are more iOS users and porting GUI-O to iOS would indeed reach a broader audience. The porting process would probably not be too difficult as most of the GUI-O source is in C++ (and I think that clang compiler allows mixing C++ with objective C code). But it is very difficult to set up an effective development environment without using a mac - and boy, are this devices expensive... <img src="https://forum.gui-o.com/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=29eca934c85" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:23px;width:auto;vertical-align:middle" title=":)" alt="🙂" /></p>
<p dir="auto">It would be awesome if the income from the GUI-O app could cover such expenses in the future. So, my reply would be - iOS is planned, but the time-frame is undetermined.</p>
<p dir="auto">BR,<br />
kl3m3n</p>
]]></description><link>https://forum.gui-o.com/post/267</link><guid isPermaLink="true">https://forum.gui-o.com/post/267</guid><dc:creator><![CDATA[kl3m3n]]></dc:creator><pubDate>Sat, 25 Jun 2022 21:07:09 GMT</pubDate></item><item><title><![CDATA[Reply to How does GUI-O&#x27;s auto-connect work in BLE? on Sat, 25 Jun 2022 15:56:54 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.gui-o.com/uid/4">@kl3m3n</a>   Good news! I solved the problems.<br />
I decided to eliminate some unknowns so I tried my ESP32 running BasicBLE_NUS- connecting to my iPad running Adafruit's Bluefruit BLE Connect (utility/diagnostic app). It connected properly, I could send @init and get the GUI screen setup code back. But, when I disconnected, I could not re-connect- same as GUI-O. So, the problem was in the BasicBLE_NUS program. After some troubleshooting, I determined the problem was that the BasicBLE_NUS was failing to re-instate advertising after the disconnect. I added code to this program to start the advertising up again after a disconnect. Now both GUI-O and the Adafruit BLE Connect program run properly even after multiple disconnect/connect cycles.<br />
Regarding the 30-40 sec delay I was experiencing. The blame for that lies with the OS on my Samsung Note 10.1 (Lineage 16). Whether I was running GUI-O or Adafruit's Bluefruit BLE Connect, it took 30-50 secs to connect with this tablet. However, running BasicBLE_NUS and connecting to my iPad, running Bluefruit BLE Connect, the connect time was instantaneous. I'm going to take this opportunity to encourage you to port GUI-O to IOS<img src="https://forum.gui-o.com/assets/plugins/nodebb-plugin-emoji/emoji/android/1f60a.png?v=29eca934c85" class="not-responsive emoji emoji-android emoji--blush" style="height:23px;width:auto;vertical-align:middle" title=":blush:" alt="😊" /><br />
I don't know how to attach my modified BasicBLE_NUS.ino to this message. If you want to see the code I changed, maybe give me your email address, and I can attach it to that.<br />
BR</p>
]]></description><link>https://forum.gui-o.com/post/266</link><guid isPermaLink="true">https://forum.gui-o.com/post/266</guid><dc:creator><![CDATA[bmillier]]></dc:creator><pubDate>Sat, 25 Jun 2022 15:56:54 GMT</pubDate></item><item><title><![CDATA[Reply to How does GUI-O&#x27;s auto-connect work in BLE? on Fri, 24 Jun 2022 22:28:29 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.gui-o.com/uid/4">@kl3m3n</a>  Thanks-<br />
I went into the Android Settings/Bluetooth and used "Forget this device" on the BasicBLE_NUS device, Now, it still takes 30-40 seconds (after the ESP32 says BLE has connected) to switch to the characteristic screen, but now I see the Nordic UART service. When I select this, the GUI-O demo now works. However, like you, if I close the GUI-O app, I cannot run GUI-O again until I re-boot the ESP32 (even though my ESP32 Serial monitor shows that the ESP32 BLE has disconnected).<br />
After I re-boot the ESP-32, if I open GUI-O again (with autoconnect selected) it will successfully auto-run the demo app- but it still takes 30-40 seconds to connect.<br />
But, the need to re-boot the ESP32 between connections is not good!<br />
Re Wi-Fi. When I said that ESP32-S3 only has BLE, I really meant that it doesn't have legacy Bluetooth. I already have my own code for the ESP8266 or ESP32 which allows me to control/monitor an ESP32/8266 target using either Android or IOS phones/tablet with a web browser-based interface (that the ESP32/8266 serves up). Its written for a specific project- not versatile like GUI-O is, but adequate. I got interested in GUI-O for cases where Wi-fi was not available/practical- but Bluetooth was a good option.</p>
<p dir="auto">BR</p>
]]></description><link>https://forum.gui-o.com/post/265</link><guid isPermaLink="true">https://forum.gui-o.com/post/265</guid><dc:creator><![CDATA[bmillier]]></dc:creator><pubDate>Fri, 24 Jun 2022 22:28:29 GMT</pubDate></item><item><title><![CDATA[Reply to How does GUI-O&#x27;s auto-connect work in BLE? on Fri, 24 Jun 2022 19:05:05 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.gui-o.com/uid/33">@bmillier</a> Hi</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.gui-o.com/uid/33">@bmillier</a> said in <a href="/post/263">How does GUI-O's auto-connect work in BLE?</a>:</p>
<blockquote>
<p dir="auto">I know the ESP32 caches WiFi SSIDs, etc. but wonder if it stores BLE characteristics in non-volatile Flash too?</p>
</blockquote>
<p dir="auto">Can you try unpairing the ESP32 from the Android system Bluetooth menu (under settings -&gt; Bluetooth)? It seems that you Android device has cached the "old" pairing data. Maybe this will help.</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.gui-o.com/uid/33">@bmillier</a> said in <a href="/post/263">How does GUI-O's auto-connect work in BLE?</a>:</p>
<blockquote>
<p dir="auto">Sorry for all this trouble- I'm doing fine with legacy Bluetooth, so the BLE is not a deal-breaker for me- except that I can't use my ESP32-S3 which only has BLE.</p>
</blockquote>
<p dir="auto">I think that the ESP32-S3 also has WiFi? You could try the "IoT" examples? Everything is basically the same, but over WiFi (or mobile data from the Android side). "IoT" is based on MQTT protocol.</p>
<p dir="auto">BR,<br />
kl3m3n</p>
]]></description><link>https://forum.gui-o.com/post/264</link><guid isPermaLink="true">https://forum.gui-o.com/post/264</guid><dc:creator><![CDATA[kl3m3n]]></dc:creator><pubDate>Fri, 24 Jun 2022 19:05:05 GMT</pubDate></item><item><title><![CDATA[Reply to How does GUI-O&#x27;s auto-connect work in BLE? on Fri, 24 Jun 2022 15:43:19 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.gui-o.com/uid/4">@kl3m3n</a>  Hi:<br />
I am trying out the BasicBLE_NUS example. It acts virtually the same way as the BasicBLE example. The serial monitor on my ESP32 reports that a connection is made- almost immediately.<br />
But, it still takes 30+ seconds and then comes up with the 3 available services: 0x1801,0x1800 and 0xFFE0. If I choose 0x1800, I then have 3 choices for characteristic: 0x2A00, 0x2A01, 0x2AA6. The 0x2A00 choice gives an error- and you have to re-boot ESP32 to try again. So does 0x2A01 and 0x2AA6<br />
Trying service 0x1801 yields characteristic of 0x2A05 which then shows a connection but the GUI-O app just says "Connected device not responding".<br />
Trying service 0xFFE0 yields characteristic 0xFFE1. When chosen, this shows a connection but again, the GUI-O app shows the error message "Connected device not responding".</p>
<p dir="auto">Looking at your BLE_NUS code, I cannot figure out where all of the above services/characteristics are coming from. It seems the FFE0/FFE1 values are "left over" from the BasicBLE.ino program I had tried before. I know the ESP32 caches WiFi SSIDs, etc. but wonder if it stores BLE characteristics in non-volatile Flash too?<br />
I am wondering if this problem arises from my Android tablet, and not GUI-O code? It is an older Samsung Galaxy Tab 10.1 which I had to root and then install Lineage 16 Android OS. My wife has a much newer LG Android smartphone, but currently I only have GUI-O licensed for the Note 10.1<br />
Sorry for all this trouble- I'm doing fine with legacy Bluetooth, so the BLE is not a deal-breaker for me- except that I can't use my ESP32-S3 which only has BLE.<br />
BR</p>
]]></description><link>https://forum.gui-o.com/post/263</link><guid isPermaLink="true">https://forum.gui-o.com/post/263</guid><dc:creator><![CDATA[bmillier]]></dc:creator><pubDate>Fri, 24 Jun 2022 15:43:19 GMT</pubDate></item><item><title><![CDATA[Reply to How does GUI-O&#x27;s auto-connect work in BLE? on Thu, 23 Jun 2022 12:34:44 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.gui-o.com/uid/4">@kl3m3n</a> Hi:<br />
Yes- I think that in terms of a GUI-O - supplied BLE demo, it would make sense to use either the Nordic or UART service as a default because a newcomer would like the demo to work immediately and not have to figure out the service/characteristic. In the BLE demo C code, it would be easy to add a comment at the top explaining that a person can pick another service besides UART and maybe include commented out example code for another service.<br />
I have some experience with BLE and the various services using the Cypress MCUs. I have to admit I am "old-fashioned": I prefer to use the simple SPP protocol and write my own parsing routines for various functions. I really don't like those really long UUIDs- they're too long to recognize/remember. <img src="https://forum.gui-o.com/assets/plugins/nodebb-plugin-emoji/emoji/android/1f627.png?v=29eca934c85" class="not-responsive emoji emoji-android emoji--anguished" style="height:23px;width:auto;vertical-align:middle" title=":anguished:" alt="😧" /><br />
BR<br />
Brian</p>
]]></description><link>https://forum.gui-o.com/post/262</link><guid isPermaLink="true">https://forum.gui-o.com/post/262</guid><dc:creator><![CDATA[bmillier]]></dc:creator><pubDate>Thu, 23 Jun 2022 12:34:44 GMT</pubDate></item><item><title><![CDATA[Reply to How does GUI-O&#x27;s auto-connect work in BLE? on Thu, 23 Jun 2022 06:47:40 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.gui-o.com/uid/33">@bmillier</a> Hi!</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.gui-o.com/uid/33">@bmillier</a> said in <a href="/post/260">How does GUI-O's auto-connect work in BLE?</a>:</p>
<blockquote>
<p dir="auto">On a happier note, I submitted my article to SE with a GUI-O project and they are processing it now. Also, another, more complex project that I am doing using GUI-O + legacy Bluetooth is working well, at this stage anyway. That project is for Circuit Cellar, but will be a ways off.</p>
</blockquote>
<p dir="auto">Wow, this is very nice to hear! <img src="https://forum.gui-o.com/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=29eca934c85" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:23px;width:auto;vertical-align:middle" title=":)" alt="🙂" /></p>
<p dir="auto">Regarding the BLE troubles - I will dive deeper and try to figure out what's wrong...</p>
<p dir="auto">Since the service service and characteristic UUIDs are not standardized, I have made this user-selectable. But, if you don't want to go through this selection procedure, use NUS (Nordic UART service) UUIDs. Check out the code here <a href="https://drive.google.com/uc?export=download&amp;id=1OVhITiGA2CAfbz2kE0QTNLCD5d2YBUAu" rel="nofollow ugc">BasicBLE_NUS.ino</a>.</p>
<p dir="auto">This basically sets a standardized service and characteristic UUID that GUI-O recognizes and connects to automatically. So, everything is the same as in the other example, just the values are different:</p>
<pre><code>...SERVICE_UUID = "6E400001-B5A3-F393-E0A9-E50E24DCCA9E";
...RX_CHARACTERISTIC_UUID = "6E400002-B5A3-F393-E0A9-E50E24DCCA9E";
...TX_CHARACTERISTIC_UUID = "6E400003-B5A3-F393-E0A9-E50E24DCCA9E";
</code></pre>
<p dir="auto">I could of course add support for "GUI-O UART service" in the same way.</p>
<p dir="auto">BR,<br />
kl3m3n</p>
]]></description><link>https://forum.gui-o.com/post/261</link><guid isPermaLink="true">https://forum.gui-o.com/post/261</guid><dc:creator><![CDATA[kl3m3n]]></dc:creator><pubDate>Thu, 23 Jun 2022 06:47:40 GMT</pubDate></item><item><title><![CDATA[Reply to How does GUI-O&#x27;s auto-connect work in BLE? on Wed, 22 Jun 2022 22:26:35 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.gui-o.com/uid/4">@kl3m3n</a> Hello. The BLE example did work for me but only after waiting 30 seconds or more for a connection, and then I had to pick both the service and the characteristic. This is not intuitive since several UUIDS show up in the scan for both choices. The FFE0 and FFE1 (the ones that work) are specified in the demo code, but not mentioned in the video, if I remember correctly.<br />
For the BLE demo, I am using the same ESP32 board(s) that work very well with GUI-O legacy bluetooth (and connect almost immediately).<br />
Like you, I cannot re-connect if I quit the QUI-O app, and re-open the GUI-O app. But, if I re-boot the eSP32, then I can re-connect- but with the same long connection time, and the need to re-enter the service and characteristic UUID. So, basically the same as you, but mine takes much too long.<br />
When I try the procedure you mention at the end of your note, if I re-boot ESP32 while I am waiting (30 sec++) for a connection, I just get an error in GUI-O.  But, if I don't reboot, and just wait, eventually it connects. My boards also contain a  WROOM-32.<br />
I don't know if this matters, but I also see a few other BLE devices during the scan. I expect they are the 2 Amazon Firesticks I have, or maybe the Raspi's that I also have running and which have BLE connectivity (which I don't use).<br />
On a happier note, I submitted my article to SE with a GUI-O project and they are processing it now. Also, another, more complex project that I am doing using GUI-O + legacy Bluetooth is working well, at this stage anyway. That project is for Circuit Cellar, but will be a ways off.<br />
BR<br />
Brian</p>
]]></description><link>https://forum.gui-o.com/post/260</link><guid isPermaLink="true">https://forum.gui-o.com/post/260</guid><dc:creator><![CDATA[bmillier]]></dc:creator><pubDate>Wed, 22 Jun 2022 22:26:35 GMT</pubDate></item><item><title><![CDATA[Reply to How does GUI-O&#x27;s auto-connect work in BLE? on Mon, 20 Jun 2022 19:25:55 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.gui-o.com/uid/33">@bmillier</a> Hello,</p>
<p dir="auto">the BLE example seem to work okayish for me (using ESP32-WROOM-32)... I can connect immediately and the communication works.</p>
<p dir="auto">But, if I quit the GUI-O app during the connection and re-open it, the connection cannot be established - I get an error if I wait... But (again <img src="https://forum.gui-o.com/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=29eca934c85" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:23px;width:auto;vertical-align:middle" title=":)" alt="🙂" /> ), if I reset the ESP32-WROOM-32 board during this connection procedure, everything works OK.</p>
<p dir="auto">Do you experience similar symptoms? I will make a video of this and post it here for reference (hopefully tomorrow). What happens if you reset the ESP32 board when the connection process is taking too long? Can you please try this?</p>
<p dir="auto">BR,<br />
kl3m3n</p>
]]></description><link>https://forum.gui-o.com/post/258</link><guid isPermaLink="true">https://forum.gui-o.com/post/258</guid><dc:creator><![CDATA[kl3m3n]]></dc:creator><pubDate>Mon, 20 Jun 2022 19:25:55 GMT</pubDate></item><item><title><![CDATA[Reply to How does GUI-O&#x27;s auto-connect work in BLE? on Tue, 14 Jun 2022 22:30:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.gui-o.com/uid/4">@kl3m3n</a><br />
thanks for looking into this. While I am doing fine with legacy bluetooth with an ESP32, I also have ESP-S3 boards which I will use in the future, and the S3 only works with BLE</p>
]]></description><link>https://forum.gui-o.com/post/253</link><guid isPermaLink="true">https://forum.gui-o.com/post/253</guid><dc:creator><![CDATA[bmillier]]></dc:creator><pubDate>Tue, 14 Jun 2022 22:30:24 GMT</pubDate></item><item><title><![CDATA[Reply to How does GUI-O&#x27;s auto-connect work in BLE? on Tue, 14 Jun 2022 14:40:37 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.gui-o.com/uid/33">@bmillier</a> this is strange... The BLE example should work. I will test it ASAP.</p>
<p dir="auto">Thank you for the feedback.</p>
<p dir="auto">BR,<br />
kl3m3n</p>
]]></description><link>https://forum.gui-o.com/post/247</link><guid isPermaLink="true">https://forum.gui-o.com/post/247</guid><dc:creator><![CDATA[kl3m3n]]></dc:creator><pubDate>Tue, 14 Jun 2022 14:40:37 GMT</pubDate></item></channel></rss>