Marco's Corner

Just another Software Developer's Musings

Browsing Posts published by mw46d


No comments

I played with my UNI-T UT61E and Linux before. But now a friend pointed me to a little graphical display/grapher for the DMM data called QtDMM. It looked interesting but it did not work completely for my meter:-( So I looked around and found two source bases, one on github which was moved to Qt5 and the original version which is still based on Qt4. Both seem to have moved apart a bit but neither worked really for me. So I picked the github base, partly because I’m running Qt5/KDE and partly because it seemed easier to keep it sync.

So I had to do a couple of things:

  • Try to incorporate most of the changes on the original version since the fork. I don’t know how, successful I was there. It still works for me;-)
  • Add the complete decoding for the data as it comes from the device. The specs of the main chip are available online and sigrok and some CLI tools support that. So it was just a matter of integrating the ideas into the QtDMM source.
  • There are two different computer cables for the UT61E. One is using a real RS-232 which is hard to find on current computers. Since that adapter is powered by the RS-232 connection, it seems to be picky  on the used USB->RS-232 cable. I have one which seems to be working. But I saw some videos were people had problems with others.  The second UNI-T cable is a native USB connection, but that is recognized as a USB-HID device. So I had to add support for that as well. Again, this was mostly the integration of QtDMM with the hidapi-libusb. It seems to well now;-)

Overall, I’m happy with this little excursion in C++ and Qt5 land. Things seem to work for what I tested. If somebody wants to play with it, yet another fork of the code is here:’m not planning to take this over, but iff I find problems, I”ll try to fix them.

As always, have fun at what you’re doing;-)

Adventures in Audiobooks

No comments

Audio books are fun. Downloading them legally and using  them on your systems should be as fast and as painless as possible. But that’s not completely true when you buy  audio books from Borders and try to use/handle them on Linux:-(

Once you decide and buy your audio books, Borders adds links into your account which are only useful for a program called OverDrive Media Console which is not available from Linux:-( Or more precisely Linux on x86 PC’s. It seems to be available for Android;-)

OK, I have a VBox image for those cases when I really need to run some Windows software. But even after the download was successful, there is the next problem:-( You end up with MP3 files which represent the content of a complete audio CD. So that does not really help when you want to listen to those files with anything other than OMC:-( Car stereos, especially the ones which would understand MP3, would see the files as 65+ minute files without any borders were you could easily restart to listen:-(

But OMC somehow had chapters and boundaries.  So something was in the files, which helped OMC but was not normally useful for other programs. I looked for a program to check the MP3 meta data. One program which seemed to be useful was metaguru . It’s was not available for my x86-64 Ubuntu system but the compile was easy;-)

So running metaguru on one of the MP3 files showed one interesting tag:

TXXX {OverDrive MediaMarkers} = {<Markers><Marker><Name>Introduction</Name><Time>00:00.000</Time></Marker><Marker><Name>Chapter 1</Name><Time>00:33.000</Time></Marker><Marker><Name>\a0\a0\a0\a0\a0\a0Chapter 1 (05:11)</Name><Time>05:11.000</Time></Marker><Marker><Name>\a0\a0\a0\a0\a0\a0Chapter 1 (10:06)</Name><Time>10:06.000</Time></Marker><Marker><Name>\a0\a0\a0\a0\a0\a0Chapter 1 (15:06)</Name><Time>15:06.000</Time></Marker><Marker><Name>\a0\a0\a0\a0\a0\a0Chapter 1 (19:12)</Name><Time>19:12.000</Time></Marker><Marker><Name>Chapter 2</Name><Time>23:02.000</Time></Marker><Marker><Name>\a0\a0\a0\a0\a0\a0Chapter 2 (27:57)</Name><Time>27:57.000</Time></Marker><Marker><Name>\a0\a0\a0\a0\a0\a0Chapter 2 (32:46)</Name><Time>32:46.000</Time></Marker><Marker><Name>\a0\a0\a0\a0\a0\a0Chapter 2 (35:55)</Name><Time>35:55.000</Time></Marker><Marker><Name>\a0\a0\a0\a0\a0\a0Chapter 2 (39:18)</Name><Time>39:18.000</Time></Marker><Marker><Name>Chapter 3</Name><Time>43:20.000</Time></Marker><Marker><Name>\a0\a0\a0\a0\a0\a0Chapter 3 (48:13)</Name><Time>48:13.000</Time></Marker><Marker><Name>\a0\a0\a0\a0\a0\a0Chapter 3 (53:12)</Name><Time>53:12.000</Time></Marker><Marker><Name>\a0\a0\a0\a0\a0\a0Chapter 3 (58:07)</Name><Time>58:07.000</Time></Marker><Marker><Name>Chapter 3</Name><Time>01:02:52.000</Time></Marker><Marker><Name>\a0\a0\a0\a0\a0\a0Chapter 3 (01:07:28)</Name><Time>01:07:28.000</Time></Marker><Marker><Name>\a0\a0\a0\a0\a0\a0Chapter 3 (01:10:42)</Name><Time>01:10:42.000</Time></Marker></Markers>}

That was the way OMC was able to have boundaries. My first test was to try to use that info to create meta info ( a CUE file) to be used with the KDE CD burning application K3b. I wrote a little cue_creator.rb Ruby program to do just that.  That program creates a CUE file with the same base name as the MP3 file with the info from the OMC data. At least K3b seems to be happy and I think I could also use that to split the large MP3 into a couple of smaller files.

I don’t know if that’s useful for others, but maybe;-)

Have fun,

— Marco

L1022028 2 OK, I spend most of most of Saturday and Sunday in San Francisco @ the local RHoK installation. I met some very interesting people, learned a lot of different thing about software projects and I hope my little changes will make a bit of a difference.

I played with Ushahidi, an Open Source crowdsourcing platform written in PHP, which is used in different crisis situations. GeorgeCh. wanted the included alert mechanism to be expanded so that alerts could be limited to different categories. That patch was working fine on my test setup;-) If somebody is interested in playing with it, u.diff based on 2.0rc1.

The second application, I was playing with, was FrontlineSMS, a SMS management application in Java. This is a desktop application which can work with MySQL as backend database. So we were trying if we could run multiple instances against the same DB. That pretty much works except `client instances’ without wireless modems could not send any SMS out. The messages would end up in the Outbox and would only be sent when the `server instance’ would be restarted. I looked at the code and found that it would only on startup check in there are any messages in the Outbox. So I added a little daemon thread to wake up every five minutes and flush the Outbox. The thread seems to run and check but we had not enough time to set the complete test environment up again. If somebody is interested, the patch f.diff is against

Overall those were two interesting days;-)

Thanks to TROPO & inveneo for sponsoring such events. They even provided some prices and I got a Amazon gift card;-) Thanks to JasonG for the photo, I’m normally the guy behind the camera;-)

As always have fun;-)

It’s already almost a week since we made it back from our first stay in a really snowy Yosemite Valley. We started spending our Thanksgiving week up there something like five years ago.

So far, all years had pretty good weather. Or let’s say mostly sunny & dry;-) Because the snowy weather was a lot of fun as well. So the weather was just as good, but somewhat different;-) Two feet of snow limit where and how far you can hike, but even so, we found enough to keep busy all the days;-)
Just some impressions;-)

As always, get out there and make the best of every day;-)

So far, the weather was really nice here in central CA, but even so, winter is coming and with it the daylight leaves earlier. Maybe the little monkey to the left can give you a suggestion, what to do with those longer evenings;-)

Find a good book, a warm blanket, and have fun;-)

— Marco

We manage a couple of Bugzilla installations. For some stacks, the Bugzilla admins manage many or even all products, but they still don’t have shell access to the backend servers. In order to make the live for those people a bit easier, I added a simple SQL edit form to the Administration page for those admins.

But be careful, what you wish for. As it is right now, my diff (against 3.2.8) uses the same DB-user as Bugzilla overall! So one wrong move and the admins could ruin the DB.

Maybe this is helpful either directly or as an example how to extend Bugzilla.

Have fun

— Marco

GlassFish Gem for 3.0.1

No comments

I just played a bit with the GlassFish gem for JRuby. But I realized that there was a new version for GF out there but the gem was not updated. A short search @ google did not show anything, and I had the build environment setup already. My Gem is here;-)

So here are the diffs I did to build a GF gem for GF 3.0.1 & JRuby 1.5.2. My first little tests did not reveal any problems. If you find something, let me know. The SVN repo for the base is @ (

gf_gem/gem$ svn diff pom.xml
Index: pom.xml
— pom.xml     (revision 1740)
+++ pom.xml     (working copy)
@@ -8,12 +8,12 @@
<description>This module creates the jruby gem distribution image</description>

–        <glassfish.version>3.0-b74b</glassfish.version>
–        <gem.version></gem.version>
–        <jruby-container.version>1.0-b17</jruby-container.version>
–        <hk2.version>1.0.0</hk2.version>
+        <glassfish.version>3.0.1-b15</glassfish.version>
+        <gem.version></gem.version>
+        <jruby-container.version>1.0-b18</jruby-container.version>
+        <hk2.version>1.0.9</hk2.version>
–        <jruby.version>1.4.0</jruby.version>
+        <jruby.version>1.5.2</jruby.version>

I don’t know if/when I’ll look at this again, but since I had it, maybe it’s useful for others;-)

Have fun out there,

— Marco

OK, so it’s swim season again for the Tracy Tritons. And we are going to host a big meet with 700+ swimmers age 4 to 18 years plus their families.

Our biggest concern is to make sure, everybody has updated information so that the meet can flow smoothly without much waiting for swimmers or volunteers.

So far we have a PA system around the pool. But the big grass area at the high school where we host the meet is like 150++ meters away from the pool. So our speakers will not reach there. Putting extra speakers that far away from the amp without a good way to run cables would need really heavy-duty cables if it would be possible at all.

So the idea was to find a wireless setup which could be placed somewhere in the grass area where there is a power outlet. The problem here is that most commercial systems have a wireless microphone which reaches 25-35 meters. And they are expensive when you need a larger, outdoor rated system 🙁

I’m running a Wi-Fi access point at the meets to basically let people check the meet information based on my mmweb code. So the idea was to add a streaming server to that host so that any Wi-Fi client could actually receive the PA stream as well. So we  set up a special client, which would send the stream to a second Amp somewhere in the field. The Wi-Fi client is based on the internet radio setup from MightyOhm. Unfortunately, the newer OpenWRT sources get pretty close to the flash limit of the Asus WL-520GU. So I had to build a very specialized image for my use.

So far, the setup works fine for a distance of two meters in my living room;-) Let’s see how it works over the weekend;-)

As always, have fun playing with stuff.

— Marco

OK, we saw some ‘Too many connections‘ errors related to MySQL in various log files for the infrastructure. The easiest way to fix that, would be to increase the max_connections setting and be done with it.

But that brought a bigger problem back to light. We don’t really have a good understanding of what our MySQL servers are doing:-( So I was looking to improve our monitoring to include MySQL statistics as well.

Some background: We run on OpenSolaris, so a lot of stuff has to be compiled/ported to work in that setup. We use Zabbix as monitoring tool and Puppet as a configuration management tool.

So I found quickly the ‘Heavy MySQL monitoring solution‘ on the Zabbix wiki. But the problem was, we don’t really have PHP installed on our DB hosts. Instead we have Ruby installed on all our hosts because it’s the implementation language for Puppet. So I ended up translating the original PHP script into Ruby.

Here is my first version of the code: mysql_monitor.rb . It also has some changes where the original was somewhat Linux specific. It might change over the next couple of days as I experiment with it on different hosts. But the general setup works already.

Have fun,

— Marco

When I was a kid, there was a joke: “How many [politically in-correct Northern Germans] do you need to change a light bulb? – Five – One stands on the table and four turn the table to screw the bulb out and back in.” One Sunday I played “How many screws do you have to remove to replace a head light bulb on a VW Passat?” The answer is 26. I actually removed both head lights in the end (30 screws) and replaced all the bulbs in the hope that I don’t have to do it that quickly again. But with the nearest VW dealer now something like 25-30 miles away, a quick stop is not so easy any more.

But at least I learned something about cars;-)