Tuesday, March 19, 2019

BLE Beginner



Last week I was optimistic about getting some Android and iOS software done for establishing a Bluetooth Low Energy (BLE) connection to the RFU220 wireless unit that is used for long-range communications with AMOS. Unfortunately things didn't turn out as nicely as I had expected. The latest BLE libraries for Android required that I download and use Android Studio for my development work, rather than the tried and tested "Eclipse" software that I have been using for the last 6 years or so. A couple of days were required for downloading and installing Android Studio, porting over my project files for the Boat Captain software, and figuring out how the new build scripts (Gradle) work for actually compiling my application. Android Studio tends to run very slowly on my 7 year old MacBook Pro (running Windows 10 32-bit), or in some cases not at all. In order to build and debug the Boat Captain software, it actually needs to allocate 1 gigabyte of memory for the Java Virtual Machine (JVM) and about half the time my computer seems to balk at this step and requires a reboot or two before it decides it can afford to shell out that much memory. Boat Captain is by no means a large application; I think Android Studio just always decides to take that much memory for the JVM when debugging.

This morning I secretly installed Android Studio on my wife's computer (i7 processors with 16 gigs of ram and a solid state drive) and may continue the rest of my Android development work on that computer when she's not around. Things are definitely a lot faster on it!

The actual BLE code development for Android is going slowly too, mostly because it's all new to me and I don't really know what I'm doing. Good examples on the Internet are kind of hard to come by, and the official documentation for these libraries is a little bit short on details sometimes. However, I have so far managed to at least send data to AMOS through the BLE connection; just haven't figured out yet why nothing is coming back. I'm sure it'll all get sorted out eventually though. And when it does, it'll be awesome! 😎


No comments:

Post a Comment