amateur-radio

Geographic IPv6 using Maidenhead locators

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.

IPsec query: Configuring on-the-fly from unprivileged userspace

Well, I’m not sure where to ask this, I did ask on the netdev mailing list and while I don’t think it’ll get ignored indefinitely, I’m not sure that was the right place.  A stab in the dark if you will.  In the hope of netting more answers though, I cast this query into the blogosphere…

I’ve been toying with the idea of a small multicast VoIP/digital comms protocol for use over wireless radio links. The typical use case might be to replace UHF FM radio transceivers with modern smart phones, using multicast IPv6 networking over 802.11b. (It will have other modes too, transmission over amateur radio bands for instance.)

In some commercial settings, or over the Internet, it’d be great for traffic to be authenticated using HMAC-SHA1 or even encrypted. Looking at IPsec, I see it provides exactly this. My thought, why re-invent the
wheel when a solution may already exist?

The question though: Is it possible for a userspace application (non-privileged) to request that the UDP packets it generates/receives from/to a particular address be encrypted or hashed against a specified key?

i.e. if I decide to communicate with someone on the same wireless link, and by means of asymmetric crypto at higher layers we establish a shared AES key, can I configure the stack for traffic between these two hosts
on-the-fly and without root privileges?

LCA: Mark Pesce’s warning about centralised communication

Well, I won’t say much but point-to-point and point-to-multipoint does not have to be short-range or rely on centralised infrastructure.

People have been using a means of such communication for over 100 years, which allows for ad-hoc, distributed communications. Yes, it prohibits the use of encryption, but that doesn’t prevent us from using it as a means of communication over great distances.

Come join us.

LCA Day 2

Yesterday was great. A lot of interesting discussion on Ardunio and the business of Open Source, particularly the commercial implications of the GPL. Well worth seeing.

Today has been good so far too. Been in N515 listening to the parallel computing talks, and it has been very interactive as well.

Whilst listening, I’ve set myself up on the unofficial LCA planet (in leiu of the official one) and I’ve duly noted the LCA2011 simplex frequency of 145.525MHz into my handheld … I’ll programme the FT290 later. Other radio amateurs at the conference may wish to have a look at this page I put together yesterday.

New toy

I picked up a few new toys recently.  I’ve been looking around for a small microcontroller based device to act as a combined remote face / DTMF generator for my FT897D.  The idea is that this device could interface with the FT897D via its CAT port, and allow me to adjust the frequency and mode, recalling the information from internal flash or an SD card.

The remote face would then be mounted on the front of the bicycle, and connect to the radio at the rear to allow easy bicycle mobile operation.  An extension of this would be control of a separate 2m radio, and a GPS to allow APRS from the bicycle.

The idea was to have the memory work like a relational database.  Rather than just recalling memory channels, and having a big long list, I could scroll through the repeaters by callsign, location (service area), or combined with GPS, proximity.  Modern flash technology would make this easily doable.

Likewise, for DTMF, rather than having to carry around a cheat sheet or remember IRLP node numbers, wouldn’t it be nice to just be able to scroll through a node list by country/region/callsign, select one, hit the “Call” button, put your callsign across and have it automatically dial the moment you raised the PTT?

I don’t have the ability to manufacture PCBs of the standard required for ICs such as most 32-bit microcontrollers.  SOIC is about as fine as I can muster, and prototyping services are expensive.  Thus I was looking for a stamp module or premade board.

Luminary Micro (now TI) make a few nice ones, and during my work at Laidley, I got to use the LM3S8962 Ethernet/CAN evaluation board.  One nice feature was that it had the JTAG built-in via a FTDI USB-serial chip.  However, the licensing for the board support package irks me — despite their code being useless on anything other than one of their chips, they still see it necessary to modify the BSD license adding a clause that prohibits its use on non-TI microcontrollers.  I had a crack at writing my own “free-software” Stellaris library, but haven’t gotten that far with it.

I happened to stumble on this board based around the STM32F103VET.  They were being sold on eBay for about $60 at the time, so I decided at that price I’d buy three.  ST’s driver library appears to be very liberal in its licensing (in fact they claim there is “no license”, I don’t know if this means “public domain”, or whether I treat it like BSD).

The LCD panel uses the Ilitek ILI9320 display controller with internal graphics RAM, and is capable of 18-bit colour.  The board also features a RTC backup battery, Texas Instruments TSC2046 touchscreen controller and on-board RS232 level converter.  The STM32 also functions as a USB peripheral, and can be programmed using the stm32loader bootloader script via RS232.

Interestingly, the LCD controller documentation states that no part of that documentation may be reproduced without written permission.  I’m not sure if writing an open-source driver classes as “reproducing” the documentation (as I’d be making documented #define statements in C).

The devices come with example source and have a pre-loaded µC-GUI demonstration on them.  So far I’ve managed to distill enough out of these sources to get working touchscreen, LCD and UART.  I’ll probably start looking at FreeRTOS next and seeing if I can get a workable device going.

STM32F103 board

STM32F103 board running a simple "Hello World" app

Hello world application for STM32

Hello world application for STM32

Guess now I had better start planning my application. 🙂

Gentoo/MIPS Progress update and LCA news

32-bit Gentoo/MIPS stages for both big and little endian systems are now available for MIPS-I, MIPS-III and MIPS-IV.  For now I’ve got these on my devspace, but I hope to get some of them out to mirrors as soon as possible.  I’d appreciate any feedback on this release.

The little-endian stages should work on Loongson systems.  All stages include a patched binutils binary (see bug #338405) which adds some fixes for errata in the Loongson 2F CPUs and the little-endian stages for MIPS-I and MIPS-III have this fix enabled in the CFLAGS, enabling their use on Loongson hardware.  They will also work on non-Loongson systems.

I’ve been doing quite a bit of testing with the little-endian stages in particular, and have had few problems with getting many software packages to work.

binutils-2.21 already includes the fixes needed, along with lots of other MIPS-related fixes… and so when that is released (they’ve already done a branch freeze for 2.21) I plan to build new stages based on this newer toolchain, and with the newer Perl release.  Current stages use Perl 5.8.8 since I found I hit a few snags at the time which I thought were better dealt with later (some package complained there was “something funny about this Perl version” and bombed out) as the primary concern for the Gentoo/MIPS port at the time revolved around gcc.

I downloaded and installed binutils last night, based on that day’s CVS snapshot.  I’m now trying to see if I can get qt-webkit to build (the biggest sticking point so far) using that, with the view of having a workable KDE-based desktop going on the Yeeloong and the Fulongs here before LCA 2011.  (For now I’ve got FVWM.)  In the meantime I’ll be keeping an eye on the binutils mailing list.

On the LCA front… I got formal confirmation of my payment on the weekend… so I’m definitely a go-er… I’m still trying to find out if I’ll be helping out with any stalls…

There’s a social meeting of the Brisbane Amateur Radio Club this Friday, wherein our involvement in LCA will probably be discussed — club president was supportive of the idea when we discussed it on our 2m net last Wednesday evening… we just need to figure out what we can do, who can do it, and what needs to be done.

I’ve managed to get fldigi going on Gentoo/MIPS, and so maybe interfacing one of the computers I have (either one of the Fulongs or the O2) to a radio transceiver… (perhaps one of the ships’ radios on the HMAS Diamantina… nice mix of old+new-er) decoding some RTTY or PSK31, is an option.  We’ll have to decide this formally.

Those who wanted to drop in… we meet at the Queensland Maritime museum this Friday (and every second and fourth Friday except fourth in December and second in January) at 7:30PM — entrance is via “Service Gate 2” off Lower River Terrace.  We meet in the lunch room under the bridge.  If anything is decided, we will likely make our final decision at the following business meeting, which happens a fortnight later.

BARC Meeting entry point

BARC Meeting entry point... via Service Gate 2 off Lower River Terrace

If Gentoo has a stall, it’d definitely be worth setting up one of the Fulongs there… and for that I’d want a reasonable desktop going (KDE, or maybe XFCE… I know people have done some stunning work with FVWM, but I’m not that good).  I look forward to LCA regardless… if neither Gentoo nor BARC are running a stall in the open day, then I’ll just have a look around and see what it’s all about.  I look forward to the event anyway. 🙂

You know you’re a ham when…

I stumbled upon this looking up information on magnetic receiving loops.  Content is below, with my comments added.

1. When you look at a full moon and wonder how much antenna gain you would need.

2. When a friend gets a ride from you and remarks that you have a lot of CBs in your vehicle, it turns in to an hour long rant on how ham radio is not CB radio.  (Not quite… but I have had people ask if that’s a “CB” on my bike, and I’ve responded no, it’s an amateur set.)

3. When someone asks for directions, you pause, wondering if long or short path would be best.

4. When you can look at a globe and be able to point to your antipode (and you know what an antipode is).

5. Your cell phone ring tone is a Morse code message of some kind. (Yep… my phone taps out “VK4MSL”)

6. You have accidentally said your Amateur Radio call sign at the end of a telephone conversation. (Almost did this once leaving a phone message back when I had a F-call… almost blurted out “VK4FSJL clearing the frequency”)

7. Your favourite vacation spots are always on mountain tops.

8. You notice more antennas than road signs while driving your car. (I do notice antennas a lot more these days when I’m riding the bike)

9. You have driven onto the shoulder of the road while looking at an antenna.

10. Porcupines appear to be fascinated with your car. (We don’t get porcupines in Australia and echidnas are rare in suburbia.)

11. If you ever tried to figure out the operating frequency of your microwave oven.

12. When you look around your bedroom of wall to wall ham gear and ask: Why am I still single? (This bloke can see his bedroom wall?!)

13. The local city council doesn’t like you.

14. You actually think towers look pretty.

15. Your family doesn’t have a clue what to get you for Christmas, even after you tell them.

16. Your HF amplifier puts out more power than the local AM radio station.

17. The wife and kids are away and the first thing that goes through your head is that no one will bother you while you call “CQ – DX” a few hundred times.

18. When you pull into a donut shop and the cops there on their coffee break ask if they can see your radio setup.

19. You refer to your children as your “Harmonics”.

20. Your girlfriend or wife asks: “You’re going to spend $XXXX on what???

21. You plan family vacations around hamfest dates.

22. When you see a house with a metal roof, and your only thought is what a great ground plane that would be.

23. You have pictures of your radio equipment as wallpaper on your computer’s desktop.

24. Every family vacation includes a stop at a Ham radio store.

25. The first question you ask the new car dealer is: “What is the alternator’s current output”?

26. You buy a brand new car based on the radio mounting locations and antenna mounting possibilities.

27. You have tapped out Morse code on your car’s horn. (I may try this if I ever mount a horn on the bike)

28. A lightning storm takes out a new Laptop, Plasma TV, and DVD Recorder, but all you care about is if your radios are okay. (Good riddance to the Plasma… they should be banned… I too have more concern for my radios…)

29. Your wife has had to ride in the back seat because you had radio equipment in the front seat.

30. Your wife threatens you with divorce when you tell her that you are going on a “fox” hunt.

31. Your wife says ‘the kids need to be fed’ and you first wonder what their impedances are.

32. When house hunting, you look for the best room for a radio shack and scan the property for possible tower placement.

33. When house hunting, you give your realtor topographical maps showing local elevations.

34. The real estate agent scratches his head when you ask if the soil conductivity is high, medium, or low.

35. You have Ham radio magazines in the bathroom.

36. When your doorbell rings, you immediately shut down the amplifier.

37. Fermentation never enters your mind when “home-brew” is mentioned.

38. Instead of just saying no, you have said “negative”.

39. You have used a person’s name to indicate acknowledgement.

40. You become impatient waiting for the latest AES catalog to arrive.

41. You have found yourself whistling “CQ” using Morse code.

42. You always schedule the last full weekend in June for vacation.

43. You walk carefully in your back yard to avoid being close-lined. (Make that step carefully around back deck to avoid tripping over feedlines)

44. You have deep anxiety or panic attacks during high winds or heavy ice.

45. You and the FedEx/UPS men are on a first name basis.

46. You really start to miss people that you’ve never seen.

47. Your exercise machine is a Morse code keyer.

48. You walk through the plumbing section at the hardware store and see antenna parts.

49. Your neighbours thought you were nuts when you ripped up your lawn to bury chicken wire.

50. Your next door neighbour thinks that your wife is a widow.

51. Your wife has delivered meals to your Ham shack.

52. If you sold all your Ham radio equipment, you could pay off your mortgage.

53. Removing snow from the roof of your car requires working around the antenna and wires.

54. You have never seen a Meteor Shower because you are inside on 6 meters when they occur.

55. If your radio equipment has a more advanced processor than your PC.

56. You hear about a pileup on the local news and you run to your radio equipment and start calling CQ.

57. If you install ferrite beads and place shrink tubing on your toaster appliance cords.

58. If your wife puts something on and asks “Does this make me look too fat?” and you reply with: “Honey you have an excellent front to back ratio with appreciable forward gain on the front lobes.”

59. If you think the half human / half machine individuals on a Borg Cube are really just a friendly group of electronic experimenters with similar interests.

60. You have no idea as to the weather forecast for tomorrow, but know the solar forecast for the next month.

61. If your blood type is RF positive.

62. You sell your dog to buy an amplifier.

63. Your XYL says communication is important in a marriage…so you buy another radio for the shack.

64. You doodle Hartley and Colpitts oscillators during boring meetings.

65. ..your boss asks if you understand? And you reply “QSL” !!!

66. You have been going to the library since you were three and the only shelf you ever go to has Dewey Decimal number 621.

67. You have invested more on your radio equipment than on your kids education.

68. You hire a babysitter to come over, and then you never leave the house-you just go to the shack so you can contest undisturbed.

69. You occasionally buy a Playboy magazine and let your Mum find it , just so she can think that you are ‘normal’.

70. You’ll spend hundreds of dollars on a new rig, and then wander the hamfest pausing each time you pass the booth selling those $7 embroidered call-sign hats thinking “I wonder if they’ll take $6?”

71. When shopping for a new vehicle the first think you look for is space to mount the radios – you end up sitting in the front seat staring blankly at the dashboard area, feeling underneath seats, and poking around the back seat for ways to route the coax. If caught looking under the hood for holes in the firewall for your power cables, you tell your wife, “Nothing honey, just checking things under here.”

72. Your family has a special annual garage sale just to get rid of the boxes of wire, coax, and power adapters-but you pay your friends to “buy” the stuff and get them to quietly return it to you the following weekend.

73. The $10 bargain you got at the flea market that smoked up the whole house when you turned it on is one of your prized possessions.

74. Your wife has called you three times for dinner – then she calls you on the repeater.

75. When going on vacation, the first thing you think about packing is your hand-helds, chargers, scanner and frequency book.

76. The total number of radio related books in your home are five times the total number of all other books and magazines.

77. You visually check your outdoor antennas and coax once a week, regardless of the weather.

78. You have more certificates and licenses on the wall than your local veterinarian or dentist.

79. All the local cops know your vehicle on sight – “it’s the blue Ford with six antennas”. (“It’s that bike with the 6′ whip”)

80. You think an upside to gaining weight is more belt space for radios.

81. You immediately think of `tower’ when someone says the word – `erection’.

Some additions I’d add to the above list

82. When naming kids, you immediately think: Charlie, Juliet, Mike, Oscar, Romeo and Victor.

83. You prefer the grandkids call you Papa.

84. You plan your week around regular nets. (“C’mon, they’ll be expecting me on 3.590MHz in 15 minutes”)

LCA2011: I’m going… are you?

Hi all,

I’m in the process of registering for LCA2011… since it’s in my home town, I figure I may as well show up. 🙂 This will be the first LCA that I’ve attended, last one I was looking at going to was the one in Sydney a few years back … however at the time I just didn’t have the funds.

Now, with it in Brisbane (therefore no need for a hotel room), and having some money in the bank, there’s no excuse for me.

I’m not certain if Gentoo is organising a stall there or not this year, and there’s mention of the Brisbane Amateur Radio Club (of which I am a member), not sure what activities are going there either (this could be in error… I’ll inquire with the group and see what’s doing). If we have a stall… figured it’d be a good opportunity to get one of the Fuloong computers up and running as a bit of a demonstration of Gentoo/MIPS… maybe get my O2 running fldigi with my FT-897D decoding some PSK31 as well if BARC are involved. We shall see.

What is certain though, is that I’m taking the plunge this year… before the earlybird pricing expires in early November.

CQ JOTA 2010

Hi all,

This year I will be activating the Robertson Scout Den as part of this year’s JOTA. I’ll be working as a one-man band at least on the Saturday, working under my personal callsign of VK4MSL. Bands planned are:

  • 80m
  • 40m
  • 20m
  • 2m

I can also do 15m, 10m, 6m and 70cm and may have a listen there too… however the above listed bands are where I suspect most of the action will be. Modes will be FM and SSB. On 2m, we can be reached on the VK4RBR-L Echolink node (#284321). JOTA documentation lists as also contactable via VK4RBS, which at last check was on IRLP node 6408. However, it appears this node has been down for some time, and as such we will likely also be making use of other 2m (and possibly 70cm) nodes in the region. I can also do 2m SSB, however that was very quiet last year.

Hope to hear many young voices on the air this weekend… let’s see if we can push the average operator’s age well below 20. 🙂 And next time I’m in contact with ZL2JOTA, I’ll try to keep the topic away from asking about sheep (ahh well, gotta forgive inquisitive minds… you could hear the groans baseband).

Qtel and svxlink in Gentoo

Hi all…

It’s been a long time since I took over the maintenance of svxlink in Gentoo, and to be frank, I’ve done basically nothing with it because for the most part, it worked. Much development has gone on upstream, however no newer releases have been made, the only way to get the latest stuff is via SVN. This includes the somewhat experimental Qt4 branch.

Since Qt3’s demise, we’ve had to drop Qtel from the package… prompting bug #336993. There are also issues with initialisation scripts (bug #335307).

Consequently, I decided to try out this new Qt4 branch from SVN. For those playing along at home, the installation instructions are simple enough:

$ svn co https://svxlink.svn.sourceforge.net/svnroot/svxlink/branches/qt4/
$ cd qt4/src
$ make
$ sudo make install

At first, I found it wasn’t working… completely deaf and mute.  Vox didn’t show any sign of hearing my audio from the microphone… and I couldn’t hear anything back.  I tried some other ALSA devices… at this point Qtel only supported one audio device at a time.  Some tinkering, I found I could get it to hear me, but audio was very scratchy.

I had noticed this with aplay too… the problem being that the audio CODEC on the Yeeloong runs at 48kHz, and does not support other rates.  I managed to set up dmix to enforce a 48kHz rate (and give me software mixing as a bonus), then set up a rate converter atop this… but a snag, you can’t record from dmix, and Qtel (or rather libasyncaudio) expected a two-way device.  I suggested to Tobias that having separate microphone and speaker devices would be a good idea.  In double quick time he had updated the Qt4 branch to support this.

Some tinkering, and I managed to get it to hear me, but I was still effectively deaf.  It took some more investigation to track down some of the other issues, but eventually this morning I cracked it.  I had working audio both ways… but received audio was still very scratchy.  Further testing with aplay, after thinking I had solved the problem confirmed this.  More fooling around with .asoundrc ensued.  I finally tried an upgrade of the kernel to 2.6.36-rc7 (linux-loongson-community git HEAD).  Voila, rate converted sound out of aplay came through crystal clear.

I started Qtel and tested it initially on *ECHOTEST*, then on a local repeater (VK4RBR-L node 284321 / 147.950MHz FM) listening via RF as well. No problems there, it seems to be able to make contacts no problems at all. I will have to try svxlink itself at some point to see if I can successfully construct a node using the software, but for now my own node is back on the air after a long hiatus… and I hope to have new ebuilds in the tree.

In particular, svxlink will be split into a few packages.

  • dev-libs/libasync: Asynchronous I/O Library
  • net-libs/echolib: Echolink Communications Library
  • media-radio/svxlink: svxlink and remotetrx
  • media-radio/qtel: Qt Echolink client

I should probably try it on the O2 as well, but Qtel, libasync and echolib will probably get keyworded ~mips too, since they work fine on the Yeeloong   The others… well, I’ve got the parts to make an interface cable for the FT-897D here, in fact, enough for two.  The plan is to make up this interface cable, and try setting up a node on FM simplex.

There’s a second ‘897D as well… however it has a burnt out microphone preamp after a storm blew it up (and a blown up DDS chip, so no SSB or AM TX on this rig).  Miraculously, its finals seem intact as it’ll happily blast out 50W RF on 2m (with no modulation).  If the data interface works okay though, it may work well enough for a temporary 70cm node on one of the local repeaters, VK4RBC Mt. Coot-tha.

In the meantime, my personal node is now up and running again after a long hiatus… Look for VK4MSL in your client or dial  37 37 40 via RF.

Obligatary screenshot of Qtel in action

Obligatary screenshot of Qtel in action on the Yeeloong