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?
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.
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.
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.
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.
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…
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.
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.
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.
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.