Archive for category knowledge base

Some OS X DHCP Esoterica

Because I develop Software Defined Radio (SDR) software, I have occasion to connect, and disconnect, various network devices to my wired network in order to test them all day long. Most of the SDRs are designed to configure using DHCP, or can be convinced to do so. That saves some fooling around, and is a good thing. However, my network is extensive, devices are always being moved around, WiFi devices arriving and leaving, and so once the SDRs are assigned an IP, I have to go hunt them down. It was annoying that they’re always showing up somewhere different.

However, my Mac Pro had an unused second ethernet port sitting. right. there. Hmmm. So…
Read the rest of this entry »

Tags: , , , , , , , , , , , , ,


NewBurgersOk, here’s the deal. I was sitting around one day recently, contemplating having some hamburgers for dinner, and feeling kind of “meh” about it, because I never get them right. They’re too big, they’re too small, they aren’t cooked right in the center, or if they are, they’re overcooked on the outside, they’re too thick, too thin, they shrink too much (some burger is made by mixing shaved ice in during the grind down process in order to increase volume; if that’s been done, the burger will shrink quite a bit when cooked as the water evaporates out.) Anyway, it just never works out. Burgers have been my cooking downfall forever. And I really don’t like those frozen patties much, either. So I thinks to meself, see, “can this be gotten around?” Well, as it turns out, yes, I figured out a way.

The result is fabulous.
Read the rest of this entry »

Catching ALL exceptions in Python

When working with Python, sometimes, more than anything else, you need to know what went wrong. Quite aside from all the debate about what you should do in response, and particularly when developing, you need more than just a vague idea that your CGI bailed and that there might (or might not) be some usable indication of this in the system web logs.

Even when working in a pure command line context, you may need to catch anything and everything. If you do, the following gives you a basic model of just how to do it.

import sys try: a = 5 / 0 except Exception,e: # the Exception class provides messages print 'Exception caught, message: '+str(e) raise SystemExit # bail out (optional) except: # other exceptions e = sys.exc_info() # so we mine sys library info instead print 'Non-Exception class Exception caught, message: '+str(e) raise SystemExit # bail out (optional) else: # and, well, sometimes things work out. print 'it worked, no exception!' # whoo hoo... finally: # always happens print 'Glad THAT ordeal is over -- one way or another.' print 'And here we are. Aren't we?' # you only get here if things worked out

Try out the above with code you know will work, like a=1 immediately subordinate to the try: clause, and then with code you know won’t work, like a=5/0 and see what it does.

Something to keep in mind: The ELSE clause of a TRY block only runs if execution proceeds off the end of the TRY section. So if you have two statements in the TRY section, and the first one runs but the second one does not, the ELSE clause will not execute. The EXCEPT clause will due to the exception. FINALLY always, always runs, even if the EXCEPT clause has an exit in it.

You can think of the ELSE as being functionally equivalent to just putting code right after the TRY-EXCEPT-ELSE-FINALLY sequence if you build an unavoidable exit into the EXCEPT portion. Of course, it’s nice to put related code in, because that makes the functionality and intent more obvious. And if you don’t have an exit there… then ELSE can be quite useful, as it won’t run if the TRY block fails, but the code after the entire TRY-EXCEPT-ELSE-FINALLY sequence will.

Hope someone finds this useful. Took me a while to dig through it all and wrap my head around even the basic idea that sometimes, you just need to know!

Tags: , , , , ,

Headless Raspberry Pi B+ via Ethernet – from zero to success

R.Pi B+ BoadSo (somewhat late to the party, but anyway), I came up with a project I could use a Raspberry Pi for. Off to Amazon I went, and purchased this starter package (select the ULTIMATE kit), which I highly recommend. Everything you need, all in one place. I’m assuming you either bought this kit, or have the things you need, which I will also call out in case you’re a masochist and plan to try to assemble all this stuff by yourself.

Take note that I’ll be updating this post as I discover more stuff about the Raspberry Pi I think is worth sharing; so you might want to bookmark it and come back again from time to time. I’ll try and make it worth your while.

To start, you will require the Pi B+, a storage card with NOOBS on it, a power supply, a wired USB keyboard, a wired USB mouse, an ethernet cable, a free port on your network router or network switch, an HDMI cable and an HDMI capable monitor.

No, there’s no other way. You need the monitor, keyboard and mouse. Sorry. Not my fault. Everything I listed except the network cable, keyboard, monitor and mouse is supplied in the kit I linked to just above. As well as a lot of other really cool stuff. Hint. Hint.
Read the rest of this entry »

Tags: , , , , , , , , , , , , , , ,

Let’s talk Evidence.

One of the common aphorisms we hear in two varieties is, first form, “absence of evidence is evidence of absence”, and second form, “absence of evidence is not evidence of absence.” Either statement seems to make sense on its face; but this is because of a common misunderstanding. In truth, only one form actually works for us within the bounds of reason.
Read the rest of this entry »

Tags: , , ,

Buitoni Toaster Pizza

Buitoni Toaster Pizza.

Buitoni Toaster Pizza

Buitoni Toaster Pizza

Seriously? Yes, seriously. These were amazing frozen little za’s you put in, heated a bit, let sit so they’d defrost all through, then you subjected them to another heating, and finally let sit for a minute after that, and then you could eat them. Oh, man… these were amazingly good. A great sauce, excellent cheese, and the shell came out as a lightly browned, delicious crust.

You could do it wrong… over- or under-cook, not let it defrost completely, not wait that extra minute and burn the heck out of your mouth… all risks eminently worth taking.

Ever think you might like to do me a favor if it was easy? Then please go to Buitoni’s facebook page or their website and nudge them about this. Or go to the Buitoni Toaster Pizza page, join, “like” them, and say something nice to encourage them. I guarantee the odds are very high that if you love good pizza, you’d like these. It wasn’t fast food. It was something else entirely. Call it an accident, or a fortuitous event in frozen foods, but don’t write it off.

Buitoni Toaster Pizzas. Oh, man.

Tags: , , ,

Marantz MA700 troubleshooting

I have quite a few Marantz MA700′s; of the group, four of them exhibit random popping sounds of moderate energy at the speaker output with no audio input to the unit. Clearly this is a very common failure mode for the MA700.

I have opened one of the “poppers” up on the bench, and with the buffer amplifier signal cable to the power amplifier disconnected, the popping noise remains, so it’s definitely not in the audio path on the buffer amplifier board. The buffer amp is connected to the power amp via an electrolytic, so there’s no problem unplugging the buffer from the power amp.

There’s another problem with this unit, too: I see somewhat random engagement of the high power rail mode for the amp, but this is not co-incident with the clicking coming from the speaker.

When the high/low power state switches randomly, the associated relay clicks, which is audible at very low volumes, and this is obviously not the design intent. Erratic high/low power switching problems are going to be nearby QU05, very likely the electrolytic CU08, the diodes DU01 and DU02, or QU05 itself. I’d suspect CU08 first.

The main amp PCB shows evidence of excessive heating towards the front of the chassis, where the driver section is located. Unfortunately, it looks to me that the mechanical assembly is complex with regards to the main amp and attached heat sink; taking it apart looks to be quite a big deal, my vision has become very poor, and I don’t actually need the amp, so I’m just going to close up. However, at least this exonerates the buffer amp and provides a pointer as to how to troubleshoot high/low rail power issues.

If anyone locates a specific component that is responsible for the clicking and popping, I would very much appreciate hearing about it; I’m willing to hack in a replacement electrolytic from the component or solder side of the board if that’ll solve the problem. Likewise, if circumstances lead me there — if one of my working MA700′s fails and I really need to fix one of these “poppers” — I’ll post what I’ve learned.

I’ve put the service manual for the MA700 online here.

–Ben, AA7AS

Tags: , , , , , , , ,