March 2011

Apple MacBook first impressions

Well, I took the plunge this week.  One project I was possibly going to wind up working on involved the Unity game engine, which is available on two desktop platforms; Windows and MacOS X.

Being that I’m an absolute 1000% fan of Microsoft!!! (yeah, sarcasm got lost in the text there)… I’ve never used MacOS X, and someone was selling one second hand at what I thought was a reasonable price, I thought, what the hell.  Give something new a try.

I’ve spent the afternoon downloading the various applications that I’ll probably use.  First point of call was Firefox (I’m not a Safari fan) and Thunderbird (nor a fan).  I’ve got a few other applications installed too, including VirtualBox 4 OSE, and I’ve moved my Windows XP virtual machine over from my desktop to the MacBook, and it’s happily running in its new home, installing updates.

The machine in question is one of the 2008 models.  Apple have the full specs here.  It’s a little bit lighter to pick up than the old P4 laptop, but solidly built.  Despite being second hand, the battery appears to have quite a bit of life in it too, and it easily trumps the P4 (and the Yeeloong).  I turned it on in the car on the way home (I wasn’t driving), and watched MacOS X flash up with “Welcome” in some 16 languages, before going through the process of creating the first user account and setting things up.

Some things have taken some getting used to, for instance, setting the hostname is done under “Sharing”, not “Networking” where I thought it would be.  The key bindings are completely new to me, and slowly I’m getting the hang of it.  Exposé and Spaces make switching easy.  The machine is nice and responsive running its stock OS X 10.5.6 installation.

I’m considering whether I buy the upgrade to OS X 10.6, I’ll probably take the opportunity to buy a new HDD, and will perform the new install afresh on the new drive.

I was a bit disappointed to discover that Apple do not make available a basic C compiler toolchain as a stand-alone download.  They offer Xcode in their “app store”, for $5.00, okay, fine, but how do I pay for it?  I don’t have a credit card, Pay Pal or other means.  Then I look and see it’s a 4.5GB download.  Bugger that on a 512kbps link.  I’ll see if I can purchase a disc of it from an Apple store, and may look at Parallelis at the same time (although VirtualBox is doing fine for now).

Multimedia has always been Apple’s forté, and this machine does not disappoint.  I did a quick test with the internal microphone, and found the audio to be very clear, with no AC mains hum or other artifacts.  They only provide sockets for headphones and a line-in, surprisingly.  I thought maybe the line-in was switchable to provide the microphone bias needed for a headset, but no.  That said, a couple of mating USB connectors, two resistors and two capacitors, and voila, I should be able to interface a standard headset to the MacBook’s line-in no problem.  It’ll certainly be nice though when it comes to recording some of my LP records to CD.  It also could play DVDs out of the box, something Microsoft Windows XP (in my experience) could not do.

I’ll be looking around at an alternative to iChat.  It has crashed at least a dozen times in the time the laptop has been on the network, and I only turned the machine on for the first time at after 1PM today.  Given its 100Mbps Ethernet between XMPP server (running OpenFire) and MacBook, I don’t see why it should be so unstable.

I have Fink installed, I plan to look into Gentoo/MacOS X when I get gcc installed (even if I have to cross-compile it from my Linux/AMD64 desktop), and for now things are putting along nicely.  I might look at dual-booting (or tri-booting) when I upgrade the HDD, as 160GB doesn’t give me a lot of breathing room.

For now though, I’ll see what the native OS does for me.

The Hypnotist

It was entertainment night at the Senior Citizens Centre.

Claude the hypnotist explained: “I’m here to put you into a trance;
I intend to hypnotize each and every member of the audience.”

The excitement was almost electric as Claude withdrew a beautiful antique pocket watch from his coat.
“I want you each to keep your eye on this antique watch.
It’s a very special watch.
It’s been in my family for six generations”

He began to swing the watch gently back and forth while quietly chanting,   “Watch the watch, watch the watch, watch the watch. .. .” The crowd  became mesmerized as the watch swayed back and forth, light gleaming off its polished surface.
Hundreds of pairs eyes followed the swaying watch, until, suddenly, the chain broke, it slipped from the
hypnotist’s fingers and fell to the floor, breaking into a hundred pieces.

“SHIT!” said the Hypnotist.

It took three days to clean up the Senior Citizens Centre.
Claude was never invited back to entertain

uclibc-0.9.31 + Loongson 2E + bzip2 + -Os CFLAGS = crash

Well, one thing I’ll need to investigate… I’ve been battling a slightly broken bzip2 which when compressing some files, would cause the whole machine to lock up.  Environment is µClibc-0.9.31 based, using gcc-4.5.2.

Everything compiled with the CFLAGS: “-Os -pipe -mips1 -Wa,-mfix-loongson2f-nop”.  The latter flag is really for Loongson 2F but I find it helpful on 2E as well.  Things seemed to go well, except that I had no end of problems with the machine locking up when running bzip2 on some files.  I found it reproduceable while building autoconf within Catalyst stage 1.

It would appear it’s a compiler issue, as when I rebuilt bzip2 using the CFLAGS: “-O2 -march=loongson2e -Wa,-mfix-loongson2f-nop”, it worked fine.  I will have to investigate this further.  I don’t think it’s a MIPS-I vs Loongson 2E issue, my hypothesis is that -Os generates some instructions that Loongson 2E doesn’t like, as I normally don’t have any problems running MIPS I binaries… the thing that’s significantly different is -Os vs -O2.

Gentoo/MIPS µClibc stages

Well, it seems I might have µClibc stages going again, at least for little endian initially, then I might fire up one of the SGI boxes and see about a big-endian version.  For a long while, Gentoo/MIPS support for this lightweight C library was all but missing ever since an ABI change broke the µClibc port back around 2006.

I’ve tried on several occasions to build a new environment, and often I was met with technical difficulties which prevented me from producing a working environment.  Recently, I downloaded Rob Landley’s Aboriginal Linux distribution, both big and little endian variants, and took it for a spin.  Having done that, I’m pleased to report that I now have a µClibc chroot that’s merrily compiling various components of the Gentoo system, and will soon be sufficient to make a seed stage for bootstrapping the port once again.

This should mean new netboot images in the medium term for all little-endian ports (and proper ones too, not glibc-based hacks) and new images for SGI Indy (R4000) and O2.  In theory, support for Octane and Indigo2 R10000 is possible, however the systems I have are no longer functional, only my Indy and O2 still work, thus it’s impossible for me to test media for other systems.  Fingers crossed this initial build will go to plan, and we’ll have shiny new stages shortly.

New antenna

For a little bit I’ve been struggling with poor performance on my bicycle mobile station.  It was an intermittent fault.  Sometimes it’d work great, other days the FT-290R II would complain bitterly about a SWR issue, and receive performance would be abysmal.  But then I’d set off anyway, get a block away, and the problems just disappeared.  Or the thing would be working perfect, and I’d get down the road and it’d stop working.

Damn frustrating.  Intermittent faults such as these are the worst kind to try and locate.  I thought of all kinds of possibilities, but the one thing I hadn’t considered was the antenna.

Performance had been pretty patchy ever since the weekend before LCA.  It was on the Saturday that somewhere between Annerley and Milton, I lost the ¼ wavelength stainless-steel whip that I had been using.  So I spent that evening rigging up a SO-239 socket so that I could use the commercial antenna I had; a Nagoya NL-77BH that I bought at BARCfest in 2008.

I rigged that up, and on the Monday I did successfully make a contact from the bicycle on my way to LCA, but it was patchy.  I did find a few glitches, so fixed those, and Friday I made a contact in the afternoon, but it was still pretty hit-and-miss.  Not the consistent behaviour I got out of my ¼ wave at all.  Okay, maybe the coax is damaged.  Tried different leads, no dice.  Recently I bought a front basket for the bicycle, and so I could put the FT-290RII in there.  Ran coax back to the antenna, last Wednesday afternoon and Thursday morning it worked beautiful.  However Monday it gave me no end of grief.

Suspecting that the weight of the radio pressing down on the BNC terminations may have damaged that section of coax, I grabbed a length of RG195 and terminated it with BNC connectors.  Still no good.  Using the SWR meter in the FT-897D, the impedance match was out by miles.

Today I had another look.  I took the antenna off the bicycle and placed it on a mag-mount antenna base, and placed the base in the centre of an open garage door.  So big ground plane, not much different to most cars.  Checked SWR, still through the roof.  Tuned to the Mt. Cotton repeater on the FT-897D, no signal.  Pulled out a hand-held, perfectly clear 5/8 signal on its original rubber-ducky antenna.  As I was unplugging the antenna base, I watched the signal strength suddenly shoot up and the radio crackle to life when the shield was disconnected (leaving just the centre pin).  I had noticed a dead short before, but thought it was the antenna mount on the bike… something was up.

So, I grabbed a bit of solid copper wire, a PL-259 plug, and some offcut insulation.  I made a new ¼ wavelength antenna, cutting it initially at 60cm.  Swapped it for the NL-77BH and the performance was beautiful.  Check SWR, and yes, it’s high, but then again, 60cm is waay too long.  I estimated about 51cm and folded the wire over at that point, twisting the excess around the body of the antenna.  Signal strength immediately went up two S points, and on checking SWR, it was significantly reduced.  I moved it back to the bicycle where I tweaked it further.

Once happy, I cut off the excess, used pliers to fold the end sharply and soldered the folded end to the body of the antenna to prevent it hooking anything.  Then used some heat-shrink tubing to finish it off so there were no sharp ends to poke eyes out with.  The antenna provides a good match from 144 right through until 148 MHz at 30W using FM.

I haven’t tried a contact on the bike yet, nor have I got any pics to share, but the radios seem happy with it, and it appears to be hitting repeaters in the area once again, including Ipswich.  Given it’s a good 30km between The Gap and Marburg (as the crow flies) with some decent hills to boot, that’s not bad going.

It would appear the additional complexity of these high-gain commercial antennas comes at a significant cost, they don’t like getting shaken to bits on the back of a bicycle.  I’m not sure how repairable the commercial antenna I have is, it may be a case of throw the thing out, at which case I think any love affair I had with commercial mobile whips might be over.  At least my ¼ wave antennas can be made for <$20 in about 10 minutes from parts I can buy in town, versus spending >$50 and having to wait for it to arrive in the post.

“Ever thought of using a mobile phone instead”

This is a question raised on an earlier post of mine.

It’s an interesting comparison between radios and mobile phones.  And some are of the belief that all you do with a radio, is talk on it, or that mobile phones can completely replace radios.  Rather than respond there, I’ve decided there’s enough content there for a completely separate post.  I have highlighted my main arguments here for those who just want to quickly skim through.

Indeed, mobile phones do exist, and they are very handy things.  They do generally come with some sort of hands-free capability.  This is true of my Nokia 3310 … the connectors are available from JayCar, and the headset schematic is trivial.  This is not true of all mobile phones unfortunately.  Much the same is true of my radios, the FT-897D takes a standard RJ45 connector for the microphone, the FT-290R II takes a more obscure 8-pin “Foster” connector, but even they can be sourced if you look around.

RFI is a worse problem for mobile phones however, GSM seems to have a happy knack of being able to inject itself into almost anything unless you’re careful with your circuit design.

It’s worth considering what the primary point of the exercise is however, and how radio and mobile phones differ.

Mobile phones are great if you want to call someone specific. They are highly optimised for one-to-one conversations.  In fact, it’s highly expensive to do anything else.  Conference calls are a rare thing and you pay through the nose for the privilege.  Mobile phone charges are high enough already — I would not like to be paying for the cost of a one hour conference call twice daily on my way from/to work.

To contrast the fees, it costs me $20/month for a mobile phone service through Telstra (excluding calls).  I rarely see a phone bill above $30, but I’d probably see that climb to triple digits if I used it in the manner I use my radio.  The radio license costs me $65/year, regardless of whether I leave my station packed-up and inoperable, or whether I’m using it all 31557600 seconds of the year.

When I was riding frequently however, I regularly participated in discussions on my commutes.  It does make the ride more enjoyable when you can have a friendly chat on the way in.  The beauty of radio though is that you don’t all have to be in close enough proximity to hear each other baseband.

Radios are well suited to group discussions, since radio is an inherently shared medium. At most a repeater site which can relay the traffic between stations is all that is necessary.  I’ve also had quite successful simplex contacts on the 2m band over 50km, and overseas on the 40m band.  Mobile phones only achieve coverage over a few kilometres line-of-sight, coverage is extended by cellular towers which perform a similar function to repeaters.

If you’re in a discussion on the radio, good operating practice states that you leave a gap between transmissions so that other stations may break in if needed.  The breaking station may be someone wanting to get in touch with one of the other operators on frequency, may be an interested party, or could even be a person in distress.

It’s relatively simple for someone to jump in on a conversation.  Mobile phones however, prohibit this unless, once again, you pay severely for the privilege.  How often have you been in a situation where you’ve been trying to chase a caller off the phone so that the line is free for that important call you’ve been waiting for?  Not such a problem with radio.

Mobile phones give you a certain degree of privacy in communications.  Encryption standards vary between mobile phone standards, but all of them (except AMPS, which is now extinct) provide some means of privacy.  Radios generally don’t unless you pay through the nose for a set and a suitable license.  Encryption is also forbidden on amateur bands.

Both allow a certain amount of experimentation.  If you have a mobile phone that provides an antenna socket, it is theoretically possible to construct your own antennas.  You are not however able to alter the transmission mode or frequency of operation, nor are you able to construct your own mobile phone (homebrewing) without significant expense, as the device you construct must be tested and approved by local authorities before you may connect it to a network.  (In Australia, the body responsible is the ACMA, and the approval you need comes in the form of a “regulatory compliance mark”, formerly “A-tick”.)

You can however readily experiment with software running on top of modern smartphones, if you phone is that new.  (Mine isn’t)  Or, if you have a >= 3G capable phone (again, mine isn’t), you can hook a small computer up and use standard VoIP software.

Radios on the other hand, if your license permits it (mine does), can be completely constructed from scratch.  You choose the frequency and mode, there are boundaries where you cannot go, but there’s still a hell of a lot of freedom that mobile phones do not provide.  All amateur transceivers have socketed antennas, allowing experimentation with other antenna types.  Multi-band sets permit experimentation with different frequency bands, all of which differ in their properties.  Transmission modes include pretty much all analogue modes, and in most license classes, many forms of digital communication.

Mobile phones typically are fairly easy to use (there are people however that never seem to get it however), while radios almost always require a certain level of training.  Amateur radio requires you to sit two or three separate exams (usually two written exams for theory and regulations, and a practical test).

Some might ask why I use such an old mobile phone?  Well, you’ll notice the FT-290R II isn’t a spring chicken either.  I use stuff because they do the job.  The old Nokia 3310 has been solid and reliable.  There’s minimal “fluff” to cause problems.  Someone dials my number, it rings.  I dial a number, it calls that person.  Text messages, easy.  My needs don’t require anything more sophisticated.  Don’t unnecessarily complicate, I say.  When I’m out and about, this means I’m contactable two ways … primarily by radio, but if the phone rings, I can pull over and plug the phone in instead to take the call.

In my situation on a bicycle, it is also paramount that I do not have my hands tied up manipulating radio/phone controls. My solution was to wire up a small keypad which provides push-to-talk and four directional buttons.  On the mobile phone, the PTT becomes my answer button, and I can dial a person by momentarily pressing the button, waiting for the prompt, and announcing the “voice tag” of the person in the phone book.  The phone then rings that person automatically.

On the radio, I mainly use memory channels, so I’m moving up and down the memory channels.  Usually I just switch to a given frequency, and stay there.  When I want to talk, I press the button down — or, more recently I added a switch which is equivalent to “holding the button”.  So I just flick the switch to go to transmit, and flick it back again.  In the meantime, I’m able to use my hands for operating the bicycle.

Contrast this with trying to juggle a netbook computer running a VoIP package such as Skype.  It’d be a nightmare, those user interfaces are not designed for mobile operation. They’re simply not appropriate.  SIP-based VoIP is better in some ways as you can code your own application, but even then, you’re at the mercy of the mobile phone carrier’s network.  VoIP is very sensitive to NAT and dynamic IP addresses, and I think operating mobile in this manner would be a bit much to expect.  Skype also cannot handle a group as large as radio can.  (SIP can handle over 200 participants in a conference, limited by server bandwidth.  On the radio, I’ve regularly participated in nets with more than 10 people on air at a time.  Skype is limited to 5 IIRC, or maybe you pay for more.)

Amateur radio is largely infrastructure independent. On the bicycle I can get around obstacles that would be impassable in a car.  With high capacity batteries, and a reasonable power set on a high mountain top, I can achieve significant simplex range, thus allowing me to relay traffic over great distances, without any requirement for intermediate infrastructure.

“Ohh, I’ll just use the phone for that” you say.  Yeah, right.  Try that in the Lockyer Valley just now.  Many of the mobile phone towers went for a swim, as did the exchanges.  Areas around Grantham are without any forms of mobile or land-line based telephony.  And of course, no Internet.  The same situation was the case for people caught up in the Black Saturday bushfires down in Victoria.  I’d imagine communications are under very heavy strain in Christchurch at the moment.

Mark Pesce made a very valid point in his LCA2011 keynote, communications can also be disrupted for political reasons, such as what has happened in Egypt and Lybia.  What do you do then?  Radio’s not perfect, but it sure beats being left without a means to let people know you’re okay.  With mobile phones, you are dependent on others to bring online infrastructure, before you can make a call from your phone to the other.  (Unless you experiment with something like the Serval Batphone, which has its limitations.)

So one does not completely replace the other.  They are complementary. The theory requirement keeps a lot of people away from amateur radio, however I’m happy to report I’ve never received a telemarketing call on the radio. 🙂  More to the point, there is more to amateur radio than just talking to people, just like there’s more to the police force than just arresting people.

As for me, radio has fascinated me for a long time.  I first became interested in radio from a very young age, but I particularly got into it after studying how it worked at university.  This is what lead me on to amateur radio.  So for me, it’s as much technical as it is social.  I enjoy meeting up and talking with people, but I also enjoy the experimental aspect of it.

At the moment, a large amount of my energy is going into bicycle mobile operation, particularly with regards to HF communications.  This does necessitate big antennas.  Antenna installations are always a trade-off between physical size, efficiency and band-width, and it can be a real challenge to get things working, but it’s rewarding when it pays off.

Some would argue: “Why bother? Just use a mobile phone.”  That’s like asking a car enthusiast, “why muck around under the bonnet when you can take your car to the garage down the road?”  Or to the avid gardener, “Why bother growing your own veges, there’s a greengrocer in the shopping centre?”.  Yes, they do exist.

I also would like to point out that the commercial world has gained lots from home experimenters.  You use a NAT router for your home Internet connection?  What’s the OS it runs?  Many run Linux.  Did we get Linux from a big commercial organisation originally?  No, it came from an avid homebrewer of operating system kernels, and was never intended to be “big and professional like gnu”.  Did we get Single Sideband from the commercial world?  No, it was an Amateur Radio inspired invention.  Likewise with a lot of high frequency design techniques that are in mobile phones today.  Heck, in the future we’ll probably be adding Codec2 to that list.

The world needs amateurs of all persuasions.  For this reason, declaring something “obsolete” just because you can do the subset of things you do with another more contemporary technology, is a short-sighted way of viewing things.  The amateur world benefits from the professional world, and vice versa.  It’s often the case that someone who works in a particular industry for a living, goes home then hacks on various projects related to that industry for fun in his/her spare time.

So, “why not just use a mobile phone”?  Because I find radio fun, I enjoy it, and I hope that some day, what I learn can be shared and applied in a professional setting to improve technology as a whole.  After all, isn’t having fun what the world is all about?