BLE - RaspPi - XOJO?

I just ended an I2C effort of a RaspPi project and need to replace I2C with BLE. In hind sight I probably should have started with BLE due to the scope of this project. However the first part of the project had two boards within 1’ apart and having worked with this protocol many - many years ago it seemed like the right thing to do. I learned.

Through that effort I have a fully functioning 7" touchscreen interface developed with XOJO that is if I can say myself - nice. So I am looking to replace the I2C communications section and implement BLE communications between the RaspPi5 and several PICOs.

Anyway. Looking around I do not see a lot on BLE in XOJO. MBS has additional libraries for Windows and MAC but not for RaspPi which is an ARM 64 Debian version: 11 (bullseye) OS platform.

So I am asking what options exist. Will this become a shell operation?

Your thoughts and suggestions welcomed

This might help get you started on the shell approach

but yes, it’d be great if Xojo or MBS added support.

I connect esp8266 or esp32 devices to a xojo app using ethernet or wifi only.
that way it is handled by xojo directly.
I also made the modules small web servers, and access them using an htmlviewer or a tcpsocket.
BLE or USB is too much hassle to program. and is one to one device only.

BTW I2C on these ESP modules works fine !

1 Like

I agree.

BLE is a standard way to interface with multiple different types of devices. From printers to Mini Splits to AC Compressors and more. Since the technology is well formed IMHO it would not be difficult to make a drop in Control such as Serial, Server, TCP or URL. Again IMHO this would bring more value to XOJO.

Especially since the UI aspects in XOJO enable you to create a quality interface fairly quickly.

1 Like

For what it’s worth, Bluetooth is not on the roadmap for any platform.

https://documentation.xojo.com/resources/roadmap.html

Sadly, there isn’t a general “Add Bluetooth to the Framework” ticket. There are platform-specific tickets, which I think detracts from Xojo as a cross-platform solution.

#71352 - Bluetooth for Android
#71212 - Bluetooth needed for iOS
#37535 - Add bluetooth support for iOS (now 10.2 years old)

I2C worked good as long as PICO was Controller/Master. When connected as Peripheral/Slave and Pi5 as Controller/Master communications block reads STOP was not seen.

BLE enables the type of local mobile functionality to multiple end devices which will allow a single Controller to control several devices.

Yup! I have wanted BLE for a long time. I want (and need) to use from iOS and/or Android to one of my products, Seriously lacking if you ask me…

Tim

3 Likes

seems like a viable library which might be able to be wrapped in a plugin by @Christian_Schmitz though I’m guessing there’d be additional licensing fees (like LibXL or DynaPDF) and there’d need to be enough community interest to justify Christian’s team doing the work…

4 Likes

I agree about the importance of a framework implementation.

I just created an issue titled - Feature Request: Add Bluetooth to the Framework

I agree.

I just opened an issue titled - Feature Request: Add Bluetooth to the Framework. I am not certain I created that correctly. I looked for feature request but did not see one. Maybe @Tim_Parnell will let me know if I need to create a different way.

Until then check the feature request out and add to it.

Looks good. Similar to what I am working on which is a heater - AC controller among other controlled endpoints. Being unrestrained by wires is key along with a mobile control module.

#78628 - Feature Request: Add Bluetooth to the Framework

I think is Ok. I have seen Robin removing the text ‘Feature Request:’ from the title and adding a ‘Feature Request’ label to the ticket.

I use W32-ETH01 modules when I can wire ethernet to the control point, and using wifi when no wire can be.
it’s working fine for a few years now. I tried bluetooth but it is way too complicated (for me at least !)
the only simple bluetooth is the serial one (same for usb) and xojo can handle them fine.
I have power wires around the whole house, I don’t have any battery powered sensors, so BLE is not needed for me.

Arduino programming them, along with OTA is really fun. and a central xojo app that is on my desktop macbook and not on a Pi but could be may be later. the esp32 is powerful enough to handle a central control center with touch screen.

Well, I have classes for macOS and Windows.

Maybe I could make a few for Linux, too.
But SimpleBLE library seems to be expensive to license.

1 Like

Holy cow.
$21,700 :flushed:

I thought I read there was some variability in pricing depending on use case, but maybe not?

If each Xojo developer having to pay >$20K is the only viable option, it’s probably not a good fit for the Xojo community/target audience.

I had seen this on their pricing page, but maybe that’s not viable/available if the library wqas to be part in a Xojo Plugin.

Image is from here:

Yes, it’s detailed in License.md

Since January 20th 2025, SimpleBLE is now available under the Business Source License 1.1 (BUSL-1.1). This means that the project is now free to use for non-commercial purposes, but requires a commercial license for commercial use. Each version of SimpleBLE will convert to the GNU General Public License version 3 after four years of its initial release.

I selected “unlimited license” because a yearly license means you lose the right to use the library you paid for after X time. To me, that’s a non-starter.

I appreciate this. I generally don’t like subscriptions or “subscription” like licensing. (although, if you qualify for the free tier you haven’t “paid” for anything?)

I also found it a little concerning the licensing converts to GPL3 after four years. I’m not very familiar with GPL licensing and what impacts this might have on a closed-source, commercial Xojo project.

So definitely some caveats, but I really didn’t see anything else out there which was full-featured and truly cross platform, and… I’m guessing the free tier would apply to most Xojo projects.

I now notice there’s also a Python library, so maybe Monkeybread Xojo plugin - PythonMBS class could leverage that, @Christian_Schmitz ?

of course you can use python code to do the BLE interface.

1 Like

Hi all! I’m Kevin, the creator of SimpleBLE.

This post was just brought to my attention. We definitely don’t want pricing to be a blocker and would love to find a way for Xojo users to use SimpleBLE. I’m not sure who is the right person to talk here, could you please tell them to reach out to contact@simpleble.org for us to follow up?

Edit: I’m not familiar with Xojo or how it’s used/licensed/sold, so please be patient until I catch up.

8 Likes