Sep 302012
 

Just thought I’d post this up here for “backup” purposes… lately I’ve been doing a lot of AVR programming, the first step of course was to procure a programmer for the devices.

The following is a schematic for the programmer I have built myself. It can be built out of scrap bits, none of the components are critical in value.

It gets its name as it is essentially identical to the “DASA” serial cables, only all the signals are inverted.  The inverting buffers serve to provide voltage level conversion along with crude tri-state functionality when the AVR device is not being programmed.

Inverted-"DASA" serial programming cable for AVR

Inverted-“DASA” serial programming cable for AVR

The design is released under the TAPR Open Hardware License.

Apr 212012
 

Some may recall my old set up I used to record the AWNOI net. A bit fiddly, but it worked, and worked well. However the machine I used was short-lived. Basically, I wanted to stream in both directions between a sound device connected to a HF radio transceiver, and a USB wireless headset, with a feed being recorded to disk.

The problem with newer sound devices is the rather limited sync range possible with the modern audio CODECs. Many will not do sample rates that aren’t a multiple of 44.1kHz or 48kHz, and I have a headset that won’t record any other sample rate other than 16kHz. ALSA’s plug: doesn’t play nice with JACK, and I shelved the whole project for later.

Well, tonight I did some tinkering with gstreamer to see if it could do the routing I needed. Certainly all the building blocks were there, I just had to get the pipeline right. A bit of jiggling of parameters, and I managed to get audio going in both directions, and to a RIFF wave file to boot. I’ve put it in a shell script for readability/maintainability:

#!/bin/sh
# GStreamer bi-directional full-duplex audio routing script
# Stuart Longland VK4MSL

CAPT_BUFTIME=50000
CAPT_LATTIME=25000
PLAY_BUFTIME=20000
PLAY_LATTIME=1000

STREAM_FMT=audio/x-raw-int,channels=1,width=16,depth=16,rate=16000
OUTPUT_FMT=audio/x-raw-int,channels=2,width=16,depth=16,rate=16000
OUTPUT="${1:-out.wav}"

HEADSET_DEV=hw:Headset
HEADSET_CAPT_FMT=audio/x-raw-int,channels=1,width=16,depth=16,rate=16000
HEADSET_CAPT_BUFTIME=${CAPT_BUFTIME}
HEADSET_CAPT_LATTIME=${CAPT_LATTIME}
HEADSET_PLAY_FMT=audio/x-raw-int,channels=2,width=16,depth=16,rate=48000
HEADSET_PLAY_BUFTIME=${PLAY_BUFTIME}
HEADSET_PLAY_LATTIME=${PLAY_LATTIME}

SNDCARD_DEV=hw:NVidia
SNDCARD_CAPT_FMT=audio/x-raw-int,channels=2,width=16,depth=16,rate=48000
SNDCARD_CAPT_BUFTIME=${CAPT_BUFTIME}
SNDCARD_CAPT_LATTIME=${CAPT_LATTIME}
SNDCARD_PLAY_FMT=audio/x-raw-int,channels=2,width=16,depth=16,rate=48000
SNDCARD_PLAY_BUFTIME=${PLAY_BUFTIME}
SNDCARD_PLAY_LATTIME=${PLAY_LATTIME}

exec    gst-launch-0.10 \
    alsasrc device=${HEADSET_DEV} \
            name=headset-capt \
            slave-method=resample \
            buffer-time=${HEADSET_CAPT_BUFTIME} \
            latency-time=${HEADSET_CAPT_LATTIME} \
        ! ${HEADSET_CAPT_FMT} \
        ! audioresample \
        ! audioconvert \
        ! ${STREAM_FMT} \
        ! queue \
        ! tee name=headset \
        ! audioresample \
        ! audioconvert \
        ! ${SNDCARD_PLAY_FMT} \
        ! alsasink device=${SNDCARD_DEV} \
            name=sndcard-play \
            buffer-time=${SNDCARD_PLAY_BUFTIME} \
            latency-time=${SNDCARD_PLAY_LATTIME} \
    alsasrc device=${SNDCARD_DEV} \
            name=sndcard-capt \
            slave-method=resample \
            buffer-time=${SNDCARD_CAPT_BUFTIME} \
            latency-time=${SNDCARD_CAPT_LATTIME} \
        ! ${SNDCARD_CAPT_FMT} \
        ! audioresample \
        ! audioconvert \
        ! ${STREAM_FMT} \
        ! queue \
        ! tee name=soundcard \
        ! audioresample \
        ! audioconvert \
        ! ${HEADSET_PLAY_FMT} \
        ! alsasink device=${HEADSET_DEV} \
            name=headset-play \
            buffer-time=${HEADSET_PLAY_BUFTIME} \
            latency-time=${HEADSET_PLAY_LATTIME} \
    interleave name=recorder-in \
        ! audioconvert \
        ! audioresample \
        ! ${OUTPUT_FMT} \
        ! wavenc \
        ! filesink location="${OUTPUT}" \
    headset. \
        ! queue \
        ! recorder-in.sink1 \
    soundcard. \
        ! queue \
        ! recorder-in.sink0

Now the fun begins ironing out the kinks in my data cable for the FT-897. At present, it works for receive, and seems to work for transmit. I use VOX on the radio itself and keep the headset’s microphone on mute when I don’t want to transmit.

At present, I was getting a bit of distorted audio coming back through the headset when I transmitted, almost certainly RF-pickup in the cable and line-in circuitry of the computer’s sound card. I’ll have to see if I can filter it out, but the real test will be seeing if such distortion is present on the outgoing signal — or rather, if it’s significantly audible to be a problem.

Apr 012012
 

Well, it’s been a while since I touched this tablet.  I basically chucked it in a corner in disgust after it shat itself rather unceremoniously on the trip before we even got to the NSW/Victorian border.  By “shat” itself, I mean corrupting files on the internal microSD card, intermittent device resets, display flickers, all the hallmarks of a dry joint.

The seller on eBay that sold me the device have been completely unresponsive as to the problems, so looks like I kissed about $250 goodbye.  Ahh well, such is life.  They are still being sold on eBay, but buyer beware, they are cheap, and it’s pot luck whether yours is cheerful, or nasty like mine.  If you want something reliable, look elsewhere.

Having made this mistake, well, I’m looking to make lemonade from the lemon.  First step, was to figure out what on earth I had.  So out with the screwdriver.

You’ll notice on the top and bottom of the unit, there are four small plugs concealing screws.  These hold the LCD screen assembly in place.  Undo these, then you need to carefully work your way around and release the clips that hold the LCD screen assembly.  Do not try to detach the LCD touch panel from the LCD!  I initially couldn’t get it to budge, so I tried doing exactly this in the hunt for possible hidden screws (there were none).  This was the end result:

Shattered Flytouch III touch panel

Why one should not try to detach the touch panel.

Never mind I say… the unit was just about destined for the bin as it was.  External USB HID devices work for what I’m after, but it’ll mean any touch-related fun is out unless I can pick up a replacement 4-wire panel.  Element14 and RS have them at >$80, to which I say, bugger it, I’ll do without.

Having pulled the unit apart, the main PCB is held to the back shell by a few screws, one thing is immediately apparent.  The whole device is based on what looks to be a fairly generic System-on-Module based around the Vimicro VC0882BCXA System-on-Chip, and the Vimicro VC7822EL companion chip.

Flytouch III PCB

Top left is a Wifi module based on the Realtek RTL8111, and to the right, the GPS module (which hooks to one of the serial ports from what I recall).  Down the bottom of the image are the USB ports.  Near the HDMI socket is a Silicon Image SiI9022ACNU HDMI transmitter.

The system on module looks interesting, and I’m curious to find out more about it, as for hobby projects, the pins are not too small to deal with using a soldering iron.  The OS and boot loader exist on the microSD card.  I tried putting a 16GB card in, but evidently I wasn’t getting the partition table right as it wouldn’t boot.  I haven’t tried hooking up a serial port as yet, so it’s hard to know what is wrong.  Some research indicates that ttyS0 lurks on this board just near the aforementioned microSD socket:

The system on module within the Flytouch III

The system on module within the Flytouch III

I haven’t spotted the bad joints that were giving me grief. In fact, having gotten it out of the case, I find the top USB port (flakey from day one) seems to be behaving, and I’ve had no issues with it running with the case apart.  Otherwise I’d be running a soldering iron over a few joints just to make sure everything was right.

Next step?  Well for now, I’ll put it back together (minus touchscreen) and put it aside.  I’ll have a look at tacking a connector onto those serial pins, with a level shifter so I can interact with the serial console.

Having gotten bootloader access, I should be able to debug the SD card cloning issue, then I can have a close gander at what the current u-boot and kernel are doing to tickle the hardware.  End game?  Well, Android isn’t much use without a touch screen, so I’ll be probably hacking together a Gentoo-based environment with some amateur radio related software.  We shall see.

Mar 242012
 

Prior to my road trip to LCA 2012 Ballarat, I bought a new toy, namely a Yaesu VX8-DR handheld.

At that point it turned up only just before I was due to leave, so I wasn’t able to get the accessories I wanted. I cobbled together my own 12V charger lead by snipping the original power supply and soldering on a cigarette lighter socket, but otherwise I used the handheld in its out-of-the-box configuration.

Having gotten back, I have purchased the FGPS-2 GPS module, CT-136 GPS adaptor and the BU-1 Bluetooth module.

Transceiver performance

The set works quite well. The antenna is pretty deaf and useless on 6m, maybe I can get a better after-market tri-bander whip, but on 2m and 70cm it works reasonably well. I’ve heard APRS traffic over distances of 100km, and even been heard on APRS by a digipeater some 90km away.

Audio quality is good, both transmit and receive. Plug in a pair of stereo headphones, and the wideband FM receiver sounds excellent; in stereo to boot.

Probably my biggest nit, is you can’t simultaneously charge and externally power the set. To charge, you must either detach the battery and drop it into a separate charger cradle (an optional extra) or turn off the set.

GPS Performance

When I purchased the VX-8DR, it was a real toss up between it and the VX-8GR. The reason I went the VX-8DR was because it had 6m, and Bluetooth. Having gotten the GPS, I’ve run into the problem a lot have reported; the GPS module is deaf as a post.

The VX8-GR doesn’t improve on this either. However, the good news, is that because my module is external, I can (1) mount it in a better spot, or (2) replace it with a better compatible module.  For VX8-GR owners, this is the end of the road, they can do nothing but moan to Yaesu.  I at least have options.

The module is mounted vertically inside the FGPS-2 casing. Usually with GPS modules such as these, they embed a small patch antenna, whose radiation pattern is perpendicular to the plane of the antenna surface. Being vertical, this means when you hold the radio vertically (as you normally would), GPS reception is poor because the radiation pattern is directly in front of the radio.

The radio seems to perform a lot better, if the radio is held with the screen facing upwards towards the sky. It’ll even work inside my house if I do this. It seems this is a screw-up on par with the iPhone 4.  Another alternative is to replace the module, the FGPS-2 apparently uses 9600 baud serial with NMEA format strings.  However, it seems the parser in the VX-8 is rather crude.  I have a module that does NMEA at 4800 baud, so I’ll either need to coax it up to 9600, or use a microcontroller to buffer and convert rates, and perhaps do some tweaking of the sentence format to make up for the VX-8’s shortcomings.

My hunch; if I make an alternative bracket to the CT-136 adaptor, I can nail this, and another problem, the inability to plug in the GPS and a headset. I have the CT-M11 cable, and thus I plan to make a bracket to connect the FGPS-2 to the end of this cable; allowing me to also plug in a wired headset.

Bluetooth

I bought the Bluetooth as an insurance policy to give me another means of interfacing a headset. Then began the fun of getting it to work with my headsets. I have a couple; a Bullant earmuff-headset, a lightweight mono Digitech headset, and a “MyTalker” headset.

The first was one set I bought some years ago, back when the Bluez was far less stable than it is today, and also long before I was into Amateur Radio or possessed a Bluetooth-capable phone. I tried pairing using a USB Bluetooth dongle, but had little luck, so they got put on one side. Also despite advertising being able to stream music, it only supports HFP and HSP profiles, so you get to listen to your tunes in 8kHz 8-bit mono. They are sold at some hardware stores, such as Mitre 10 The Gap (where I bought my set).

The handheld did pair with this set, but I couldn’t get PTT to work, and the headset itself also had a few faults; namely it was always noisy, and the broadcast receiver stopped working, so I’ve taken them apart for now to see if I can fix these issues. I can key the radio up using the radio’s PTT, but then both internal and headset microphones go live.

The second set is sold by Jaycar, catalog number AA2080. This would be my preferred set to use with the radio as it can pair with two devices simultaneously. It supports the same profiles as the earmuffs, but it’s at least more lightweight.

The BU-1 takes one look at this set, and turns its nose up at it, with the VX-8 giving up and displaying “PAIRING ERROR”.

I also bought the MyTalker set from Jaycar, catalog number XC4894. This set is much like the earmuffs. It embeds its own microphone, but the unit itself provides a 3.5mm socket for you to plug in your own headphones, or use the supplied earphones (which are awful and uncomfortable, don’t use them). At the other end of the unit, is a lead terminated with a 3.5mm plug to plug into a music player. I’ve modded this set to be able to use an external microphone, switchable between a transceiver and the Bluetooth set, allowing a headset connected to a radio to also connect to a phone. I’m still working on this bit.

The VX-8 treats this set with much the same contempt as the mono headset before.

Today, I poppsed in and bought a more expensive set; this time I looked for A2DP functionality, Jaycar have one, catalog number AA2082. Like the AA2080 it can talk to two devices, unlike the AA2080 it supports AVRCP and A2DP. Also, not advertised, is it can function as an analogue headset; supplied in the box is a dual 3.5mm to mini-USB cable that can plug into the headset and allow you to use it with a non-Bluetooth capable device.

I plugged it into the bicycle’s battery to charge on the way home. When I got home, I read the instructions (which are in awful Chinglish). Basically, the English translation of the pairing instructions go like this:

  1. Hold in the MFB button (the centre one on the right ear-cup) in for several seconds. You will hear the voice prompts “Hello”, followed by “Enter Pin Code 0000 on phone”.
  2. When you hear the latter prompt, tell your device to start looking for the headset
  3. When it finds a device called “AA2082”, select it, and enter 0000 as the pin code

So, the steps I followed:

  1. Turn on the VX-8
  2. Hold in the MENU key to bring up the Set menu, then select BLUETOOTH PCODE
  3. Enter 0000 on the keypad.
  4. Hold in the MFB button on the headset until you hear the “Enter Pin Code” prompt
  5. Hit V/M on the VX-8
  6. After a few brief moments, you should see “PAIRING COMPLETE”, press PTT to confirm.

Having got this working, I notice a few things:

  • Stereo (A2DP) sounds a little weird, perfectly clear, but the compression is apparent. I’ll experiment with the laptop later to see if it’s the headset or the radio.
  • Mono works well, pressing MFB toggles PTT on the VX-8. VOX doesn’t seem to work, but no great loss as I find VOX to be a disaster when outdoors.
  • In mono mode, a buzzing is apparent on the received audio. This isn’t audible on transmitted audio, nor did I notice this on received audio when I tried using the headset with my mobile phone.
  • Range seems to be quite restricted, possibly due to where the module is installed it doesn’t get the reception it perhaps needs. A2DP suffers more from this than HFP, with drop-outs being frequent. Again, I’ll need to do some experimentation with the laptop, and perhaps some experimentation with the radio without the battery installed to see if that helps performance.

I’m tossing up whether I get one of these motorcycle Bluetooth headsets.  I ride on the bicycle quite a lot, and at the moment I use headsets embedded in the helmet that are home-built from old computer headsets.  The longevity of the microphone seems to be the biggest problem  I also am on the look-out for an earmuff headset for things like the Imbill car rally, ideally one that can do A2DP.  The Bullant ones I know can’t do this.  I see some earmuffs in the $400+ price bracket that offer Bluetooth, but no idea if that includes A2DP, and frankly, I shudder at that price.

The motorcycle ones are designed to fit a wide range of helmets, and they look as if they’ll fit a set of cheap regular earmuffs quite well.  They typically sell for about $200, support A2DP, multiple devices, and intercom.  Add in $30 for a set of earmuffs, and it makes this a much more attractive option.

More experimentation will be needed I think, but this is looking promising.  I’ll probably post up more details as I come across them.

It’d be nice if Yaesu had been a bit more up-front on what the BU-1 supports: the AA2080 supports both HFP and HSP, yet the BU-1 won’t touch it, the Bullant set supports the same profiles yet the BU-1 works fine with it.  The reasoning for this is not clear, but it does seem that it’ll reliably talk to A2DP capable headsets, so maybe that is a starting point for others.

Likewise with the CT-136, I’ll see if I can fabricate a bracket using the CT-M11 cable, and see where that gets me.

Jul 172011
 

The problem

For some time now, we’ve been putting up with interference from a few stations, who for now will remain nameless.  Foul language, deliberate interference, the list goes on…

Allegedly some of these people have been doing it for longer than I’ve been alive.

It is as if, these people, believe we are not entitled to use a small patch of radio spectrum to engage in a little friendly chat.

Some have even gone as far as vowing to do “everything they can” to “ruin” amateur radio.

This means war.

Well, we could complain to the ACMA… apparently some have done this already… many times.  If they haven’t acted after 20 years worth of complaints, I don’t think they’ll ever act.  Not without a very substantial amount of evidence.

There is nothing however, that stops us, getting on the band and having a chat, except one thing.  Someone parking on the frequency we choose and interfering with our communications.  Yes, we could QSY, but experience has shown the culprits just chase us up and down the band.

They cannot be on all frequencies however.  One big group, on one frequency, is vulnerable to attack.  Numerous smaller groups, scattered across the band however, is far more resilient.  They cannot be on all frequencies at the same time.  More to the point, more ears open and listening, means more data points … bonus points if those “ears” are directional.

My proposal

What we need to do is stir up some activity on the 80m band.  The 80m amateur band is a wonderful local chit-chat band.  It has almost guaranteed propagation for distances over 1000km on any given evening.  It is open to all license classes.  (Well, if you ignore the DX window.)  I’m proposing a contest with a difference.

Most contests, you make contact with a station, exchange numbers, then it’s ta ta… (or “73”) and you go your separate ways.  Not terribly exciting listening.

I’m proposing a social ragchew contest.  I want to encourage as many people, on as many groups, as possible.  The more people, the better.  Talk about anything you like.  QRP and QRO stations welcome.  Mobile and portable stations, also welcome.  Newcomers, especially welcome.  Make it a large group, or a small group, doesn’t matter.  It doesn’t have to be a formal net, just so long as there’s at least three people.

How will it be scored?

This is something I’m still thinking about… but I’m thinking something along these lines… I would love your input.

For every hour, or part thereof, each member of a group chatting on the same frequency, will get one point for each member of that group.

So if 3 of you talk for 2¼ hours, that’s 3×3=9 points.

Multipliers

  • Triple points for every station who has held their license:
    • Less than 12 months
    • Greater than 50 years
  • Double points for every:
    • Station that is “mobile” (i.e. moving between localities) or  “portable” (i.e. set up temporarily at some location for less than one week)
    • QRP station (running 5 watts or less)
    • DX contact (overseas)

I’m thinking these should be added together, so if in your group of VK’s you happen to score someone joining your group from Europe (for example) that only just got their license a month ago and is running QRP whilst mobile, add 24 points to each group member for every hour or part thereof that they participate on your group.

What about interference?

More than likely, this will stir up the trolls that seek to ruin our experience.  Part of the aim of this, is that a lot of people will be listening.  The following is something anyone can do, even the shortwave listeners.

  • Log the following:
    • the time in UTC
    • your location (latitude/longitude or Maidenhair Locater)
    • the signal strength
    • the nature of interference
  • If you can, record the interference
  • If you have a directional antenna, point that in the direction where the signal is strongest.  Use that to measure the signal strength, and log the bearing, along with the antenna type.

With enough evidence, we can flush out these serial pests once and for all.

When will it be held?

This is open to discussion… I’m thinking Friday or Saturday night.  I’m thinking it should start some time in the evening when the band opens up, maybe after 7:00PM.

The contest should remain open until the last group participating in the contest goes clear… if a group manages to successfully run to dawn the next day, good on them, maybe there should be bonus points for their efforts. 🙂

Let me know what your thoughts are… this is, as I say, a request for comment.  Feel free to get in touch with me directly or leave a comment here.

May 202011
 

During the International Rally of Queensland, it was interesting to observe how people made use of the radios provided for the event. In fact, watching peoples’ behaviour to me, made it clear that none of them had any training in how to use one of these devices. And they all struggled, mostly as a result of each others’ bad habits.

This isn’t an isolated case… my mother who works at the Brisbane International airport, often complains about the radio etiquette of her fellow colleagues. A lot of people have a radio thrust into their hands, and haven’t a clue how to use them. In trying to figure it out, they often fall trap to the same bad habits.

I myself have found a lot of this by mistake, and by observing others. A lot of this is also applicable to using regular telephones … I found the tip of standing still when talking helpful when I needed to make a call to emergency services on my mobile phone — the particular spot where I was at the time, the phone would drop out if I moved more than 6 inches in any direction. Learning not to talk too close, or too loudly into a microphone, also helps.

The following is a little chart I came up with. No, the stick figures are not XKCD grade, they’re not meant to be. Click on the image below for a copy as a PDF, or get the SVG source here.  File is provided in the public domain, but attribution would be appreciated.  If you use radios in your workplace, and observe this kind of behaviour in your colleagues, you might like to print this out and stick it on a wall somewhere.

 

Apr 292011
 

Well, the antenna I tuned up in my last post, I can say, while it doesn’t work that great on 80m, it did get a contact into Victoria this evening on the AWNOI net.  Terry VK2TEZ near Coffs Harbour gave me a 4-3 signal report, so still lots of room for improvement… part of that was due to static crashes from storms in NSW, but I think with a better tuned antenna, we should be able to get towards having a workable antenna.  At the moment the autotransformer I use has ~95 turns, with output taps at 0, 25, 50 and 75 turns.  I think one somewhere between 0 and 25, and/or some extra turns might help… so I might wind a new one and see where that gets us.

The headlight still continues to give me grief.  An interesting discovery though this evening.  Since the battery is no good, I’ve permanently mounted it to the bicycle frame.  This was achieved by removing the plastic bracket which is used to mount the headlight on the handlebars or on the helmet mount (using a rubber O-ring), and replacing this with a bracket bent out of a short piece of aluminium.  It fastens to the bicycle frame at the front right above the front wheel, using a bolt hole normally used for mounting rim brakes (my bike has disc brakes).

The upshot is that the headlight’s casing has a pretty good electrical connection to the bicycle frame.  Turns out this is a big no no with these lights.  Kiss goodbye HF if you do… you’ll get crap everywhere from 400kHz right up into the VHF.  I’ll have to do some further investigation, but I found that if I insulated the case from the frame, it helped on the 400kHz and HF emissions.  I think something parasitic is causing the 2m grief as this continues (that, or it’s less critical on the case being earthed).

For a while I thought it might’ve been something lurking around 415kHz… the standard IF frequency of most superhetrodyne receivers, but alas, can’t see anything there.  Otherwise it’d explain why it appears to be everywhere.  I definitely suspect it’s not supposed to be oscillating there though, so I think parasitic oscillations are the cause here.  I’m slowly researching my own power supply for the LED in this headlamp, so its days are numbered.

The insulation was achieved by breaking a cheap plastic picnic knife, drilling a couple of mounting holes, and mounting the headlight on that.  That quelled the HF interference quite a bit, and I was able to listen to the HF bands on my way into Brisbane.  At least it was nice to listen to something other than that sodding wedding in the UK.  (C’mon fellas, yes, great and all but can’t we just confine it to one station?)

I was concerned about the longevity of this arrangement however.  And as it turned out, I was right to be concerned.  It broke as I approached the Normanby Fiveways.  I went over a bump, heard a crack, and noticed the headlight dangling by the power lead.  I pulled over, threw it in the basket and grabbed the backup headlight.  At least there was one on the helmet, a 1W LED, so I still complied with local laws for night riding.  I didn’t have a mounting for the backup light, I just pointed it forward sitting in the bottom of the front basket, with it on flash as a warning to drivers.

Once at the destination, I reverted the headlight back to being directly mounted on the bicycle frame.  Interference was intermittent, but when it was acting up, it did wipe out 80m with S6 noise.  Not good when most stations are barely making S6 as it is.  I wound up turning off the main headlamp as for the most part I could see where I was going, and I knew the route.  As I got out of town this was less of an issue due to the lack of traffic, and of course I was on bicycle paths or the footpath for 90% of it.  That at least allowed me to hear what was going on with the net.

The other flaw I had was that the helmet’s speaker connections were acting up… wound up unplugging the earpiece side of the headset adaptor and using the internal speaker.  Thankfully I could still use the helmet’s microphone and the rest of the wiring harness… just not the speakers in the helmet.  I noticed this as I pulled out of my street, in fact I was aware there was a problem, but now I know where the problem is now.  I’ll get onto it tomorrow.  And I’ll look at a better way to mount this headlamp in an insulated fashion as an interim solution to a power supply replacement.

Mar 052011
 

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?

Feb 052011
 

The following was a news article that I intended to record and have included in this week’s WIA National News service, however I had problems cutting it down to the 1:30 required. So, I’ve put in additional information that there wasn’t time for, and I intend to put in a short piece for next week’s news.

For the technically minded, I do apologise if it seems a bit dumbed down, but not all the target audience are computer-savvy.


The IPocalypse is upon us, no I’m not talking about some new Apple product, I am talking about the Internet Protocol, specifically version 4.  IPv4 has been with us since 1980, and has come to dominate all aspects of computer networking.  In fact, so popular is this networking protocol, that earlier this week, the Internet Assigned Numbers Authority, ran out of addresses.

At the recently held linux.conf.au conference in Brisbane, Google Vice President Dr. Vinton Cerf, and APNIC Chief Scientist Geoff Huston both gave talks covering this very issue.  For those who want an in-depth overview of the problem, I recommend viewing both these videos:

Back in 1973 when the beginnings of what became IPv4 was being conceived, it was decided that an address space of 2³² addresses (or 32-bits, about 4 billion) would be sufficient for what was considered, back then, an experiment.  The “Internet” (then known as ARPAnet) barely spanned 5 computers.  Computers occupied rooms and were not portable, nor was there any significant wireless telephony infrastructure at the time.  The problem is, the experiment never ended, and now IPv4 in this modern age of handheld computers and wireless Internet, is being pushed to its absolute limits.

Most people are familiar with using a telephone.  You need to know the number of the person you want to want to contact (or the phone number for directory assistance and quoting a name).  Only then can you place the call, and get in touch.  Now unlike a telephone network, where the call is established and a bi-directional connection exists for the duration of the contact, on the Internet, its more like dialling a voice mail service and leaving a message.  I need to leave that person my phone number so that they can get back in touch with me (or rather, leave a message in my voice mail box).

Extending the metaphor a bit, it is common for computers to have multiple connections going on at a time.  Servers also often run multiple services on the same system.  Thus, each system uses separate ports, akin to individual mailboxes.  Each computer has 65536 of them¹.  On the sending side, a free port is usually allocated at random and used for the duration of the connection.  At the server end, a fixed port is used to “listen” for incoming requests.  When sending data from one computer to another, the sender needs to tell the receiver which mailbox (or port) the data came from, and which it belongs in, so that data goes to the right place, and any replies can be correctly addressed.

The problem now, is that the address space on this global network is now in the hands of regional registries.  These regional centres look after the Internet services for a given geographic region.  Once those registries run out, it’s game over.  Internet service providers are forced into deciding between one of four actions:

  1. Turning away new users (the infamous “No Vacancy” sign)
  2. Implementing Carrier-wide Network Address Translators
  3. Becoming a walled garden
  4. Moving over to something new

I can see option 1 is not going to be popular, so I’m not even going to discuss it.

Option 2 is already happening in parts of Asia.  Rather than giving everyone a number that is recognised world-wide, they give you and fellow customers private ones.  They then employ an intermediate server, a Network Address Translator to re-write the addresses on the IP packets so that they appear to be sent from that server.  NATs of course are not just things that exist in ISPs, home internet routers often do exactly this.  Another example of NAT is Microsoft’s Internet Connection Sharing.

When a computer sitting behind the NAT wishes to contact a server outside, the NAT instead picks one of its ports, and places the outgoing message there.  It then replaces the source address and port with its publicly visible address, and the port number it chose, and forwards that on to the outside world.  When the reply comes back, it re-writes the destination on the reply to point to the original address and port number of the originating computer.

There isn’t a theoretical limit to the number of computers that can exist behind a NAT.  The limitation is the number of ports.  Ports may not be shared by two applications, if a program or service is already using a given port number, it is essentially unavailable for others until that program or service is finished.

That means that for any computer, there can be a maximum of 65536 connections at any one time.  NATs are not magical devices, and this limit applies to them too.  In this modern age of parallel computing, even web browsers will frequently launch multiple connections in parallel.  Some of these connections are short lived (such as the time taken to download the text off this page), some take a while (such as the time taken to download one of the keynote speeches linked to earlier).  The resource demand will change over time with user habits.

The first big problem with NATs though, comes when you have an application that needs to be contactable from the outside world.  The application for all intents and purposes is like a server, and is listening for connections.  The trouble is, this computer is behind a NAT, and its actual address is a private network address.  Even if an outside computer knew what it was, it wouldn’t know how to get there, and quite likely, wouldn’t be allowed even if it did.  So the only way to be contacted, is via this NAT box.

Now suppose you tell someone (or the application does on your behalf) your NAT box’s IP address, and the port number your application is listening on and an outsider tries to make contact.  The NAT box hears the request, but where does it send it?  It knows nothing about this port!  The NAT box has to be told to reserve one of its ports (which again must be unique), and to forward any packets sent there, to the right port on your computer.

The hardest bit here is that not all NAT devices work the same way in this regard, there is no de-jure standard for configuring a port-forward.  Microsoft UPNP is one of many de-facto standards that exist, and not all NAT devices or applications support it.  A lot of these also have lots of problems of their own.  In some cases, you have to set this up yourself.  Doable if the NAT device is under your control, but in the future we may be faced with NAT devices that are controlled by ISPs.

The applications that will be hardest hit by this will be any applications that rely on peer-to-peer communications.  This includes, amongst other things, the file-sharing services in instant messenger clients, peer-to-peer file sharing services such as Bit-Torrent, and Voice-over-Internet Protocol applications such as Skype and EchoLink.  IRLP, which relies on nodes having a static public IP address will be hit particularly hard, many ISPs already charge extra for the privilege of a static IP.

Hardware devices that use the Internet are not immune from this too — in fact the situation there may be made worse, since in a lot of cases, the port numbers used are hard coded in the device’s firmware.   You may ring up to get that special port forwarded, and already discover that another customer of the same ISP rang up 5 minutes ago and claimed it before you.

Ignoring these niggles, NATs don’t sound too bad if everyone is playing by the rules.  But what if someone decides to set up an Internet marketing company and starts filling up everyone’s email boxes with yet more “Discount Viagra” offers.  The way things are here in Australia, the ISP gives each customer a public IP address (which may be static, or it may change on a regular basis), and that is used as the public address on a NAT device owned by the customer.  If a customer were to do that, the IP address of that NAT device is visible in the emails sent — an ISP can simply look up who had that IP address at that time, and can immediately take action.

Now, suppose that instead, the ISP relied on NAT.  The IP address would be that of the ISP’s NAT box.  The culprit could be any one of the many users sitting behind it.  “Jjust log each connection on the NAT box” you say.  Deary me, could you imagine how slow that would be?  Not to mention the disk space used!

Now what happened if at the same time, other users were legitimately sending emails to that same network?  The logs point to a dozen users, which one was it?  If the complainant told you the source port used in the connection when the email was sent, maybe you can look that up, but I’m yet to see that sort of information recorded in system logs, email headers certainly don’t have them.

Clearly, this is not a solution.  It’ll make address space stretch a little further, but not without causing a world of pain for software developers who have to make their software compatible with differing standards, and causing the rest of us grief as we drown in a mountain of malware and spam.  If you think spam today is bad, you ain’t seen nothin’ yet!

The other way ISPs can go, is to close off from the world, and becoming a walled garden.  That is, you need to be a member of their network, to be in contact with other users that happen to also use their network.  Or if they provide connectivity to neighbours, it’s costly, and/or heavily controlled.  Anyone remember CompuServe, America Online, The Microsoft Network?  Ring any bells?  Those long-ago isolated bulletin board systems?  If they do, I apologise for stirring up bad memories.  If they don’t, count yourself lucky, and hope like hell ISPs don’t go back there!

I did say there was a fourth solution didn’t I?  Something new?  The Internet Engineering Task Force weren’t naïve enough to assume 32-bits would be enough.  They recognised that this would be a problem way back in the early 90’s.  They formed the Internet Protocol Next Generation working group, which in 1998 produced RFC2460Internet Protocol version 6.  IPv6 extends the address space to 128 bits, a big improvement on IPv4.  It also addresses a number of other bug-bears that people had with IPv4.

Some notable ones include: Mobile IPv6 extensions to allow a portable computer (such as a smart phone) to remain contactable at the same address as it roams between multiple networks, improved quality-of-service handling for real-time streaming and multimedia, automatic addressing and simplified headers to make routing easier.

The biggest feature though is the address space.  NAT is not implemented in IPv6, it is not necessary as there’s enough space to move around.  Rather than being given a single IPv4 address which you must share with all your computers, in IPv6, you get given a whole network address prefix.  Typically this prefix is 64-bits long, leaving you the remaining 64-bits of space to allocate to each of your computers.  How many addresses is that?  Remember the 4-billion (approximate) number I quoted for IPv4?  Square it!  If you have a computer network bigger than that, I do not want to see your power bill!

Modern computer operating systems can function on IPv6 already.  Microsoft Windows XP includes support, which can be enabled by following a few easy steps.  Windows Vista and 7 come with it enabled out-of-the-box, as do Mac OS X, Linux and the BSDs (FreeBSD, OpenBSD, NetBSD, etc…).  Hardware devices can be made to support IPv6 by a simple firmware upgrade, if one is available.  If a manufacturer has not published a firmware upgrade for a device you own to support IPv6, contact them now!

ISPs world wide are dragging the chain on IPv6 take-up.  There are some notable exceptions, here in Australia for instance Internode offer native IPv6 for their customers.  I’m unaware of others in Australia.  If your ISP is one of the IPv4 sheep, it’s now time to contact your ISP and ask them what they are doing about IPv6.  In the meantime, you can get an IPv6-in-4 tunnel from a tunnel broker such as AARnet, Hurricane Electric or Sixxs.

Many online services are slowly making the move over to IPv6.  Google can be accessed via ipv6.google.com for instance.  This blog is accessible via IPv6 (thanks to AARnet).  Sixxs have a big list of sites that are IPv6 enabled.  In June (the 8th to be exact) this year, there will be a world-wide test of IPv6.  Google (as in their entire site), FaceBook and Microsoft’s Bing search engine among many other sites will be going IPv6-enabled on World IPv6 day.  If you’re not already on IPv6, it’d be great if you could join us.

Openness is one of the things that made the Internet popular.   There is a very real threat that this openness or freedom we currently experience will be lost.  If you’re a software developer, we need you to ensure your software works with IPv6 for it to keep working into the future.  If you’re a network administrator, you need to ensure your network is IPv6 compatible.  If you’re a consumer, we need you to start pestering the help desks of these software companies, device manufacturers and ISPs to ensure the commercial world sees the user demand for this!

To quote Mark Pesce, “a resource shared is a resource squared”.  We need to ensure the Internet remains open and free, for all people into the future.


1. To be more accurate, there are 65536 TCP ports, and 65536 UDP ports. However, a UDP port cannot be used for TCP traffic, or vice versa.

2. RFC = Request for comment

Feb 052011
 

A thought just occurred to me…

With addressing in IPv6, there’s enough addresses to cover every square metre of the earth’s surface with something like 100 addresses or so.  Not sure if a standard exists for mapping geographic co-ordinates to addresses, but one just occurred to me that I might try some day.

The Maidenhead locator system divides the world up into a series of squares.  At its coarsest level, it divides into zones which are each 10? latitude and 20? longitude.  There form a 18×18 grid, and are usually denoted by a letter.

Maidenhead Locator zones

Wikipedia: The world is divided into 324 (18²) Maidenhead fields.

These are divided further into grid squares, measuring 1? × 2? in size.  They form a 10×10 grid, and are usually addressed by a number…

Maidenhead grid squares

Wikipedia: Fields are divided into 100 squares each.

Within this, there are subsquares, representing 2.5’×5′ (that’s minutes, not feet) forming a 24×24 grid, addressed again by letter.  The grid square where I’m located, QG62LN represents an area that covers the suburbs of The Gap, the southwest bit of Enoggera, the northwest bit of Bardon, and the western end of Ashgrove.

Suppose we were to encode this maidenhead locator into the address.  It’s probably less useful in traditional IP networks, but maybe it will have a use.  In Amateur Radio it may be useful for the purpose of routing between mobile stations.  In fact, it’s this mobile context where I see it being most useful.  Lets first consider how many bits we’d need to store each component:

  • Zone level, 18×18 grid: 5 bits for latitude, 5 bits for longitude, or alternatively for 324 zones, 9 bits.
  • Square level, 10×10 grid: 4 bits for latitude, 4 bits for longitude, or alternatively for 100 squares, 7 bits.
  • Subsquare level, 24×24 grid: 5 bits for latitude, 5 bits for longitude or alternatively for 576 subsquares, 10 bits.

Logically you’d be using numbers starting at zero for the addresses in all fields, so A would be translated to 0, etc.  My QTH locator (QG62LN) would be translated as follows: Q?16, G?6, 6?6, 2?2, L?11, N?13.

You can either address latitude and longitude individually, packing them as separate fields, or you can lump them together to possibly save one bit of space.  For instance, I can concatenate the two 5-bit values representing the zone QG into a 10-bit value: 10,0000,0110? = 0x206. Or I can save some space by realising there are only 324 zones which can be represented with 9 bits like so: ((16×18) + 6) = zone 294 ? 1,0010,0110? = 0x126. The grid square can be similarly encoded (0110,0010? = 0x62 or 011,1110? = 0x3e), and likewise the subsquare.

How would you pack these into an IP address? I was thinking something along one of these two:

   Zone      Square   Subsquare
 Lat   Lng   La   Ln   Lat   Lng
.---. .---. .--. .--. .---. .---.
10000 00110 0110 0010 01011 01101 = 28 bits

  Zone    Square  Subsquare
.-------. .-----. .--------.
100100110 0111110 0100010101      = 26 bits

Presumably these would form the lower 28 or 26 bits of your prefix.