Question about DevKitLiPO connecting to Arduino IDE V2.2

Started by BenIndustries, January 09, 2024, 10:03:32 PM

Previous topic - Next topic

BenIndustries


We're still evaluating the Olimex ESP32 DEV KIT LiPo boards for suitability in our prototype. We've successfully connected and written to these boards and are testing them.

However, to get our device to be discoverable and connect to other devices (such as an iPhone) using Bluetooth - we've always needed to select a board description or "profile" in the IDE that doesn't make sense to us - the NODE32S - instead of what we'd expect, the OlimexESP32DevKitLiPO profile. If we use the Olimex profile, the sketch will write to the board, but the device is NEVER discoverable as a Bluetooth device - making testing impossible - since our device works ONLY over Bluetooth.

Using the Node32 profile in the IDE is the only way we've been able to get our custom sketches to work and allow our device to be discoverable as a Bluetooth device.

The reason we even tried the Node32 board profile is because our initial versions of our device used these boards (KEEYEES ESP32 boards but without LiPO power features) successfully. However to ensure there weren't legacy issues impacting our situation - we installed a totally fresh instance of the Arduino IDE this morning on a new computer and it has the same problem with the Olimex board profile - but switching to the Node32 board made things work!

Any insight here would be appreciated.

We're on Arduino IDE 2.2, have installed the Olimex USB drivers, the Olimex board profiles, and have tested on 5 different boards from our stash of 10 RevD Olimex boards.

Thanks in advance for any insight into this oddity.

RK


LubOlimex

Strange, the bluetooth hardware is part of the ESP32 module. What you select as board variant in Arduino usually should NOT matter. Maybe it is something related to one of the settings like flash frequency or flash mode or partition scheme?

Does this persists with the Arduino bluetooth examples (like BLE -> Scan) so we can test with same code? Or maybe send us the bluetooth code that you use.
Technical support and documentation manager at Olimex

LubOlimex

#2
We tested with the Arduino ESP32 example BLE -> server, ESP32-DevKit-LiPo and the Olimex configuration and devices get easily discovered and we can connect to them (with mobile phone over bluetooth). We also tested the BLE -> write example. So make sure to test with that examples too.
Technical support and documentation manager at Olimex

BenIndustries

That's helpful clarity about the relationship between the board profile and the BLE hardware. We'll test that suggested code and let you know what we discover. If that all works as expected - I agree - it could be in our code - although we're using pretty widely available BLE libraries. But it's certainly a good path to investigate. Thanks for the speedy reply - most appreciated!

BenIndustries

We're trying a broad range of things here (and will share our results once we're done) - but one thing we've seen mentioned - is that the Arduino IDE version might matter? I'd be interested to hear if others have found a particular version of the IDE to be more reliable for the Olimex boards? We've recently been using the 2.2.1 version - but in the past we've used 1.8.13 successfully with the KeeYees boards.

RK




LubOlimex

We use Arduino IDE 1.8.19 - versions 2.x.x seems to have some GUI problems all around.

We use the latest ESP32 for Arduino package, updated from the board manager. At the moment, it is version 3.0.0-alpha3:

https://github.com/espressif/arduino-esp32/tree/3.0.0-alpha3
Technical support and documentation manager at Olimex

BenIndustries


Thanks for the IDE tip - we're reverting to the previous version here, as well.

So, some interesting findings so far - the problem appears to BT device-centric. That is to say - while we CAN load a sketch to the Dev board and have it instantly appear discoverable on a Windows10 laptop, using several example sketches and  the example libraries you've recommended - NONE of those set ups ever appear available as a BT device on the iOS or iPadOS. This is a problem for us as our primary target market is indeed the Apple user market (phones and iPads). Can you confirm what platforms you've tested on and if you see similar behavior and if so - suggest any fixes?

We'd be interested to know if the broader Olimex-using community has seen (and perhaps fixed!) similar behavior.

Thanks in advance!

RK

LubOlimex

We don't have much experience with Apple products but I tested today with a Iphone 11 and it did work fine, but I used the application mentioned the "BLE" -> "write" example. Did you try with this app:

https://apps.apple.com/us/app/ble-scanner-4-0/id1221763603

It is the recommended app for BLE -> write example (https://github.com/espressif/arduino-esp32/blob/master/libraries/BLE/examples/Write/Write.ino).

Maybe Apple products don't natively support Bluetooth 4.2 and require external app? Or maybe they don't support Bluetooth Classic or doesn't like the security protocols of the ESP32? Worth asking Apple directly or maybe the Apple community. They'd know more (I imagine they have more experience with BLE 4.2 products than we have with Apple products).

Another option is to try with newer chip like ESP32-C3 or ESP32-S3 that have Bluetooth 5:

https://www.olimex.com/Products/IoT/ESP32-S3/ESP32-S3-DevKit-Lipo/open-source-hardware

Again
https://www.olimex.com/Products/IoT/ESP32-C3/ESP32-C3-DevKit-Lipo/open-source-hardware
Technical support and documentation manager at Olimex

BenIndustries

We think we might have discovered the issue and suggest that this insight might be something others could  benefit from. This likely stems from the porting of our solution from the Amazon KeeYees dev boards to the Olimex board and is likely NOT centered on connecting to the IDE, but rather ensuring the Olimex board is visible as a BT device once fired up. We installed all the correct Olimex profiles and rolled back the IDE to the stable 1.8.13 version. (although we just tested on the V2.2 IDE and it worked there too) We were then able to connect and write sketches to the board at 115200 baud, reliably.

Here's the fix we found, again, to solve the issue of the Olimex board not showing up as a discoverable BT device on Apple OS devices, like iPads and iPhones...

We use A LOT of GPIO pins in our device, and had code in our Sketch that declared pins 9, 10 and 11 as Output pins. This worked fine on our KeeYees boards, in fact we actually powered several LED buttons using those pins! However - the Olimex boards (perhaps more true to the Espressif spec) do NOT make those pins available, as noted in lots places, and therefore - our code was clearly causing a problem. Once commented out - our Olimex board, running our code, is now reliably showing up, connecting over BT and behaving as expected. Hope this helps someone in the future. Thanks LubOlimex, for your help in tracking this issue down.

RK