Tag Archives: open-source



In my journey to ARM mastery, I’ve been interested in SWD as a way to program, control and debug an embedded ARM core. Due to my obsession with cheap boards and open source, finding a satisfying solution to my SWD connectivity needs has been a journey in itself.

There are commercial SWD interfaces available, like ST-LINK and JLink. But those aren’t open source. You can get cheap JLink clones from China, but those appear to just use stolen firmware images from the JLink products. This interface, with open source firmware, seemed promising, especially since I could get a firmware binary running on a cheap VCC-GND STM32 board I had around. But since I couldn’t build the source without the Keil tools, and the free version of the Keil tools didn’t seem to work, and the free version of the Keil tools is not open source, my hunt continued.

Whereupon I landed at IBDAP. Someone had taken the same journey and decided to market a board and GCC/makefile-compatible open source firmware, using the CMSIS-DAP standard that is itself an open product of ARM. Very cool. The only downside being that Armstart is sorta out of business. I ordered what may be the last IBDAP board they sell, because after I bought it, everything on their site was marked as sold out. It took a bit of (email) arm-twisting to get them to ship me the board. But, it arrived, I was able to build the firmware (flashing it using another SWD interface), and I’ve connected to a couple boards through it with apparent ease. I may have finally now reached a point in my journey where I can release my obsession with open SWD.

The board may be found at other places, like Adafruit.

In case the Github link disappears, here’s an IBDAP fork. Here’s the firmware I built most recently, as a check for your build/board. Below are some documentation resources.

user manual, schematic.


TV firmware

I wonder when the day will come when the firmware in more consumer-electronics devices, like TVs, will go open-source. I would love to be able to modify the firmware in my TV. For one thing, there’s a very annoying video bug that I’m 98% sure is a firmware bug, but Sharp (ooops, I didn’t mean to say the name of the company, but it’s too late to backspace now) refuses to acknowledge that it’s a bug or fix it. I bet if I had a source tree/build tools/loader I could fix it in about a day, regardless of the fact that I don’t know anything about TV firmware.

But the real reason is this: some PS3 games do 720p and some do 1080p. When the mode switches, my TV has an indicator that comes on briefly that says “Video: 720p” or “Video: 1080p”. I want to change the former indicator to “Video: 720p (teh suck)” und express the anger than I am feeling about games that don’t do 1080p.


Perverse geekery

Have you ever run NetBSD/x86 on qemu in Linux on your PS3? Don’t bother, it’s not that cool.


Sociology of software

I’m pretty fascinated by the concept that there’s a sociology of software, that the patterns of relationships in the little world of software components installed on a computer mirror, to some degree, the patterns of relationships in the world of users and developers. I suspect that some academics out there study such things, so I’ll have to see what they’ve learned some day.

I did find one interesting paper in an earlier search: Sociology in machines (PDF). It’s not hitting quite the nail with the exact hammer I’m thinking of, but it might be a good starting point.

Anyway, I was reminded of this when I was researching my problem in MediaPortal as mentioned in Geek TV: open source rocks. In that situation, we have at least three development groups (Nero, Team MediaPortal, and Microsoft) plus one user participating in transactions, specifically, User wants to use software from all three groups on the same computer. The sets of components are developed pretty independently of one another, but there are significant dependencies on Microsoft for both Nero and MediaPortal. Each set of components can be installed and uninstalled in somewhat independent ways. Nero and MediaPortal make calls to Microsoft components, but Microsoft also makes calls back to both. It’s in that particular web of interactions that problems arise.

I could go on, but won’t.


Geek TV: the Microsoft stack

I mentioned that MediaPortal is open source. Well, there’s some truth to that, but there’s also the fact that what MediaPortal is doing is tightly tied to a big stack of software that isn’t open source.

Microsoft TV technologies forms the bulk of the hard core of the system. Microsoft has apparently spent some significant effort on laying a foundation for TV on their platform; from my look at what’s there, it’s pretty extensive. I’m guessing the effort went into their Media Center Edition and its associated applications, then they distributed the core components for use in XP, allowing various other parties to build user interfaces around the services.

Hauppauge/Conexant supply another bit of closed-source in their drivers. Hard to see what’s going on in there, although maybe we’ll get a peek when Linux drivers come. And I say, they will come. Go Hans!

I started looking into the underlying software as I discovered various problems in the various applications I tried with the card. I figured I might as well see what the effort would be to write my own bits to cover the holes. Some things are not that hard to do. For example, you can grab GraphEdit and build a graph in about two minutes (I mean, after learning some about how DirectShow graphs work, which I did in the process of getting MediaPortal to recognize my card) that will run and give you audio and video.

I used that to verify that it was at least possible to play PS2 again. See, the interesting thing about an MPEG-encoding card is that it takes a couple seconds for the signal to crawl through the MPEG pipe and back out to get to your screen. A couple-second lag makes playing real-time video games rather impossible. But, I was able to configure a little filter graph that bypassed the MPEG encoding/decoding, instead using UYVY format (and don’t ask me what that is, all I know is that it doesn’t have interframe compression and so doesn’t suffer from the time lag), run it, and see no perceptible lag. So, it’s theoretically possible to play PS2 still, and in a pinch I can use GraphEdit to do so, but I’m hoping that MediaPortal or DScaler can be used in that way too.

Geesh, that was a boring post. Sorry.


Geek TV: protocols and such

I mentioned TSReader at the end of my last post. I was pleasantly surprised to find such a program, and that the ‘lite’ version was free for non-commercial use. I’m no television engineer, I just play with my TV. Playing with TSReader gave me some insight into the structure of digital TV, MPEG, the software stack that puts the signal through to the screen, etc. I grabbed “DTV Survival Guide” from the library to give me a bit more detail on what’s going on, without diving too deep technically. I’ll tell ya if I find out anything particularly cool.


Geek TV: software

OK, so I mentioned that I was not completely thrilled with the Hauppauge bundled software. I won’t get into why:

  • one part of the install failed, “MPEG SW decoders”. Not knowing the architecture of this system as I now do, and seeing that it was an optional component, I figured, not a big deal. Well, knowing what I know now, I’d change the label to “You don’t need this, except if you want any of the other software to work, like to watch TV or record it or something. Good luck installing it!”. Turns out that the sub-installer just doesn’t work if you have a TMP envvar set (only took an hour with ProcMon to figure that out), and, well, that’s bad.
  • the TV app isn’t too great
  • scheduling recordings is… I did I say I wasn’t going to get into this.

I went off in search of some other options. Luckily, the market is rife with options. Let’s see:

  • Beyond TV: not bad. If I hadn’t found a cheaper solution, I might have dropped the $60 on this. Critically, it provided the confirmation that the hardware and drivers actually work.
  • Power Cinema: didn’t actually look past the $100-$120 price tag, but I have had reasonable success with Cyberlink products in the past.
  • Windows MCE: not gonna go get a new OS to watch TV, if that’s even possible outside of pre-built computers. I accidentally have it on my laptop, but that doesn’t do me much good.
  • Meedio: already gone.
  • MeediOS: not here yet.

Well, it goes on, but I don’t seem to have links to many others. Anyway, none of that matters, because I finally found MediaPortal. Wicked-cool! Open source (even if in C# and tied tightly to Windows), pretty, very active community, lots of plugins, lots of builtins, PVR, DVD, EPG, all the good stuff you expect, and free. Granted, it was unstable while I was setting it up, and it didn’t support my card initially. But my patience was not exceeded and was rewarded: I got it working on my card according to the developers’ instructions (and submitted my work so y’all HVR-1600 people don’t have to do it after the next release), and it just started stabilizing after a while.

Not to say that it’s everything a person could want or bug-free, but I’ve gotten a lot farther with it than with any other free solution, and as far as with Beyond TV, so I’m quite happy.

That gets me to the point of basic end-user functionality, which is good. My hardware works, I think the drivers are actually stable, and I don’t have to wretch my back working around bugs in the software.

In the process of figuring all these things out, I also found some tools that are kinda nice. This is where things get fun, right?

  • VideoReDo, despite its somewhat odd interface, is a quite capable cut/join MPEG editor, with support for all the sorts of MPEG that get thrown around (.mpg, .ts, .dvr-ms, res up to and beyond full HD), surprisingly capable automatic ad-cutting, etc. Possibly worth the $50, but I’m keeping my eye out for an OSS solution of similar quality, that, yeah, runs on Windows.
  • Speaking of cutting commercials, a neat OSS tool is Comskip. Good cleaning fun.
  • This is bleeding into my next post a bit, but TSReader is a very in-depth tool for looking at DTV streams and being very impressed with all the numbers and stuff. From $0 to $400.

Speaking of my next post, see ya then.


Geek TV

[I’m not referring to the excellent and when-is-season-two-ever-going-to-start Cringley series Nerd TV, though if I were going to write a post about that, I’d say, go watch ’em all, and maybe send PBS a few bucks to encourage them to produce such simple yet enlightening content and continue to make it available for free download.]

[Nor am I referring to any of the hundreds of other things named Geek TV or GeekTV or geekTv or whatever that are everywhere out there.]

[I should just retitle this post. But I’m too lazy to do that.]

[I still use ‘cat’ as my editor, see. Haha, get that?]

I recently bought a Hauppauge WinTV-HVR-1600 as my new TV tuner. Wanted to step into the world of digital timeshifting. I don’t watch a ton of television, but I do watch more than people claim to when they’re trying to impress their friends at the coffeehouse.

At first, I was just going to replace my old Hauppauge WinTV-Radio. OK, Hauppauge makes some decent hardware and cheap, but damn if they can figure out the concept of software. I replaced their drivers with some open-source ones a while back, btwincap. I replaced their TV app with the open-source DScaler. I was fairly happy with the combo (well, technically, DScaler bypasses the drivers on 8×8 hardware), but still couldn’t really do the timeshifting thing reliably, either due to crashes or CPU hoggery or VfW bit-rottery or ffmpeg command-line-arguments-confusery. So I said, how about I spend $100 instead of 100 hours. I mean, the software, at least, must have evolved.

I started shopping at the “just equivalent hardware but different manufacturer” level. Heard reasonably decent things about the ATI TV Wonder series, and it even seems to use the same BT8x8 chipset. But, ya know, hopefully better software. In the process of getting more info on the competitors in that space, I ended up deciding I better at least get a hardware MPEG encoder. Should give a great improvement in reliability and let me get work done while I’m recording. Important work, like writing blog posts about TV hardware.

So that led me to stuff like the TV Wonder 550, PVR-150 and brethren, even junk like Pinnacle (OK, I have an irrational dislike for Pinnacle because of the horrific experience I had with another of their products), which I’m not sure really does hardware anything.

The good news in that sphere is that the PVR-150 is highly recommended for MythTV, and if I were completely insisting on Linux compatibility today, I would have stopped there. But I didn’t; I let my good judgment about driver compatibility slide because someone mentioned OTA HDTV, and I said, why not, unless it’s really expensive.

Turns out that it’s quite cheap. Thanks to the various converging technologies of the world, and let’s not forget those sports fans who provide the bulk of the market for HD stuff that drives down the prices to let the rest of us watch Nature in HD, getting an analog tuner, an ATSC tuner, and hardware MPEG for the analog side only sets ya back $100 or less, in the case of the HVR-1600. Not bad. Well, not bad if you’ve read my next post, which tells you how to replace that DAMN HAUPPAUGE WinTV 2000 CRAP. 🙂


NDS for handheld computing?

I’ve got a bit of an itch again these days to find a good handheld computer that I can write software for. I have a couple PalmOS things, but developing for PalmOS is not great, from what I can tell.

I happened to be playing around with my Nintendo DS these days, too, and thought, hey, maybe it’s a decent little platform. It does have some things going for it.

However, it’s not really that hot, and there’s considerable difficulty in developing for it, or even getting to the point where you can run what you write. There’s that homebrew excitement associated with it, but that’s not really that valuable to me.

Anyway, I did some research on what I might do if I did try to get homebrew development going on the DS, and I figured I’d blog it in case someone might care. This isn’t going to be a substitute for your own research, but maybe some good pointers for where to start. It can be a bit difficult to figure this stuff out, partly because of the intersection with the cartridge piracy crowd (the same hardware tech is needed for both piracy and homebrew).

[Here’s a link to Wikipedia’s Nintendo DS Homebrew entry. I should have looked there earlier; that is probably a better starting place than anything mentioned in this post.]

I think what I’d do is get a Supercard Lite/MicroSD, a Passcard 3, and an SD card.

The nice things about that combo are:

  • doesn’t stick out of the case (the Supercard is a GBA cart, but made to fit just like that dummy cart does on the Lite)
  • adds 32MB RAM (which may not be useful in general, but is useful for DSLinux)
  • seems to be well-supported in terms of development tools/libraries, including DSLinux.
  • uses standard flash memory

The bad thing is that it needs the three pieces, which makes it more complex and costly (about $100)

There are a few “Slot 1” solutions, I think Supercard DS (One) looks like the best one there. Again, uses MicroSD for flash, but is more straightforward and cheaper. Just doesn’t give you the extra RAM. (People say that it’s impossible to extend the RAM with a Slot 1 solution). The DS-Xtreme looks kinda good, partly because it seems to have good support from the designers. But it’s pretty new, and it only has the built-in flash, and it doesn’t have the RAM.

Anyway, like I said, I’m probably not going to act on any of this, so the quality of my research may reflect a lack of investment.

One thing I found out today that’s pretty cool is that it seems like the homebrew development environments support an OpenGL-alike interface for graphics. I was also impressed by all the work that’s going on to support homebrew on the various consoles. It’s a weird pursuit, in a way, but also kinda neat.

Here are some links that seem useful:

Unrelated to DS, here’s one of the handheld Linux boxes out there that’s pretty cool. Far better hardware than a DS, except maybe in 3D, and Linux is completely supported by the manufacturer. ‘course, it costs $400.


Infra Recorder

Because this was a bit harder to find that I figure it should be, I’ll help Infra Recorder shoot up the search-engine charts. It’s an open-source CD and DVD writing/burning solution for Windows. It’s a GUI that appears to be a front-end for the various CLI-oriented tools ported over from Unix-land (like cdrecord, cdda2wav, mkisofs, etc.)

I bought a laptop with a DVD-writer, but the burning software that came bundled is pretty abysmal. So of course I went off in search of an (why not?) open source solution. I didn’t find Infra Recorder (though I did find burnatonce, which ain’t too bad). But it found me on del.icio.us yesterday. I am getting a little freaked out about how del.icio.us can read my mind, but I guess I’ll live with that…