BLEGUI Log Parsing and Filtering
Silicon Labs (i.e. the company that purchased Bluegiga) informed me that they’ll be rolling all their BLEGUI and BLE Update functionality into Simplicity Studio (which will also be Mac compatible). This will hopefully happen (unofficially) in Q4/2015.
This is pretty great news, especially as this will allow me to do my Bluegiga development while traveling (I travel with my Macbook Air, because it’s lighter than my Surface Pro 3). I’m wondering whether the BLED112 will work with the Mac seamlessly (I had some issues in the past using it when I rolled a Python Serial-To-BLE app).
My hope is that they fix some of the issues I mentioned in Summer of (Bluegiga) Code - which, incidentally has not gone as planned, mostly because I’ve been traveling since I posted that. In any event, if they don’t include filtering, my BLEGUI Log Parser will probably not work out of the box with Simplicity Studio. But, I’ll deal with that down the road.
Without further ado, the source code for my BLEGUI Log Parser is located here: https://github.com/RobotPajamas/blegui-log-parser, and the binaries are hosted here: https://github.com/RobotPajamas/blegui-log-parser/releases/tag/v1.0.0
How do I use it?
- Install/build from source (use Visual Studio Community 2015 for free)
- Open BLEGUI
- Open BLEGUI Log Parser
- Select a refresh-time (how often the logs get updated)
- Decide what you want to filter on
- Click ‘Start Logging’
How does it work?
I’ll be the first to admit, the approach for this program (which I wrote to help me debug firmware specifically for one client), is incredibly bush league.
It is a C# app (as BLEGUI is Windows only) that simply digs into the Windows ‘window’ hierarchy by looking for the BLEGUI program name, finds the appropriate window which houses the log data, and ‘clicks’ the ‘Copy to Clipboard’ button. This puts all of the log data onto the clipboard. It then pastes everything from that copy into the Log Parser’s window (and applies some filtering).
The obvious problem here is that, while you’re working, you’ll have a hard time copying and pasting (unless you do it between refresh cycles or when the logging is stopped). There is also probably an issue when your BLEGUI log gets too big, the copy/paste/filter might be slow but I haven’t run into that yet.
A secondary problem is that I just pull what’s in the BLEGUI log itself, meaning if you clear the log, you clear the log parser… That shouldn’t be a surprise, as it’s only intended as a run-time log parser, not a historical tool as well.
I would have preferred to be able to find the window handle I wanted, and call a WM_GETTEXT, however I wasn’t able to do that because BLEGUI is written in QT and thus I’m stuck with the QT ‘alien widget’ problem. This is all mentioned in my StackOverflow question here.
Can it be fixed?
Probably… Looking at the accepted answer in that SO post, I could (and should be able to) use the Windows Assistive Technology, which QT supports. Basically, it’s a way around the alien widget problem, so that I could do something similar to what I originally planned.
Will it be fixed?
Probably not. I was going to take a weekend to try to use the AT framework and do the app up properly, however, as the functionality is being moved from BLEGUI to Simplicity Studio - I’d be spending a lot of time for a mild problem that wouldn’t work in a few months anyways.
What about problems?
If there are any problems with the app, please report a bug.