Monday, March 23, 2009

Working without root access

For so many years I've worked with unix machines where I've had root access. To be honest I've got a bit slack, it's so easy to install software, libraries and python modules as root and I'd forgotten that you can live without root access and have the environment you want.

Naturally there is a security benefit to installing everything possible with just user rights.

My own bin path

Create a bin directory in your home directory.

Add this to ~/.bash_profile:


export PATH=~/bin:$PATH


So my local binary is favoured over the system ones.

When building with configure, use this option to build and install in your own $HOME.


./configure --prefix=$HOME


When you do make install, everything goes in ~/bin and ~/lib

Personal python modules

When installing a python module use this:


python setup.py install --home $HOME


Watch where it installs the files and in ~/.bash_profile add a line like this:


export PYTHONPATH=$PYTHONPATH:~/lib/python



rsync to a machine with my own rsync binary

When deploying software I like to use efficient rsync to copy over what's changed. If the remote machine doesn't have rsync installed, you can install your own copy in your own ~/bin directory and use rsync over ssh while telling it where your binary is at the other end. Here's the trick:


rsync -avz --rsync-path=/home/$USER/bin/rsync $SOURCE_PATH $USER@$DEST_HOST:$DESTPATH


So the --rsync-path is set to the path to an rsync binary at the other end.

Any other handy tips?

Friday, March 20, 2009

Django is Awesome

Unlike the computer systems at this airport in Malaysia, Django is Awesome.

photo.jpg


I've been using the neat trick of simultaneously gathering requirements and turning them into Django "Models" (which are object wrappers for database tables). This allows me to immediately show a lovely Admin user interface and try entering data.

Entering data into a new schema is an excellent way of finding out what you've forgotten and where the foreign keys should be.

For the first time, I'm using Django's Model Inheritance which makes it much easier to model the real world.

The only danger is that the customer sometimes thinks the software is virtually complete.

Three weeks working in Singapore and Malaysia is coming to an end tomorrow. Some things I saw:

  • Food is cheap, I've been having a hearty lunch for about AU$3

  • One low cost airline charges you AU$40 if you have any luggage at all

  • One of my workmates was robbed of his cellphone and laptop as he slept in his car near a toll plaza with a window down a bit

  • While the economy may be down, the building of hi-rise apartments seems to be booming

  • Most of the internet connections here, even in businesses, have high packet loss

  • Traceroutes from Malaysia to Australia sometimes go via Japan. IP geocodeing sometimes puts me in the middle of Paris

  • There is massive over air conditioning here. Often you go from steamy outside to freezing taxis to steam to freezing offices. I went out and bought a coat. I wonder what the electricity consumption per head is?



  • All good fun, looking forward to getting home.

Tuesday, March 17, 2009

If the Internet is oxygen, I'm suffering anoxia

I'm currently working in Malaysia, home of the Internet Super Corridor.

When I moved into an apartment with broadband supplied via an ethernet socket in the wall. It didn't take long to realise that the service was bad.

Picture 1.png


It's not just at the apartment, at a local cafe I tried to sign up for a Wifi service AIRZED. After messing about for around two hours I gave up and emailed them from elsewhere:

"I could not log in to your service after registering and paying.

Please cancel my account and refund the payment."

They wrote back:

"Please accept our apology.
It was due to some techical errors on the billing system which did not capture the payment made.
I have manually updated your payment into the system. Could you please try whether it is working now.


Regards,
Ivy Chan
Accounts Dept
Airzed Broadband Sdn Bhd"

Can you read Ivy?

Apparently not. My money's gone and I'm not at that particular cafe any more.

The PJ Hilton's room internet was pretty bad (but not as bad as at this apartment).

Oddly, the best internet service I've experienced was wireless when I tried a Wimax modem.

I complain about the Internet in Australia but after spending time in marvellous Malaysia, maybe things aren't so bad.

It is time for quality of service guarantees for internet connections.

Thursday, March 12, 2009

8Mhz IF notes from VK3EPW

Regular readers will have seen that I've been publishing construction notes from Peter, VK3EPW for his multi-band transceiver.

He's just sent me detailed notes on the 8Mhz IF section which I've incorporated into the original posting here.

Aside from the electronics theory, Peter's construction is simply wonderful with circuit boards laid out manually with Dalo pen and shielding compliments of Milo tins.

if.jpg


Thanks Pete.

My Tracks - nice Android App

The Google integration really is useful. Grabbed a little App from the Market called My Tracks that records your travel and then allows you to send direct to Google My Maps.


View Larger Map

That's the taxi ride from where I'm working to where I'm staying. Wish I'd collected more of them, you get some interesting deviations catching taxis here.

Liking the G1 but it doesn't take much data and GPS use to run the thing flat within a day. This tends to happen when I'm in a taxi and we're both lost on the way home.

Monday, March 09, 2009

Getting through registration on an unlocked G1

Purchased an unlocked T-Mobile Google Android HTC G1 phone over the counter in Singapore. It worked when I put my roaming Telstra SIM into it, great.

But, silly me, I did a factory reset on it to start fresh - it was cluttered with all sorts of junk from whoever unlocked it.

After a factory reset it reverted to just knowing about T-Mobile APNs and demanding that I authenticate with a Google account. Wifi is off and inaccessible, and of course it can't get to the network using T-Mobile APNs.

So I was stuck.

After much research (mostly incorrectly searching for how to bypass registration), here's the trick that worked for me.


  • Turn off the phone (hold the hangup button)

  • Hold down, and keep holding the Menu button while powering on

  • After the Android splash screen, you can let go of Menu when you see you're in SAFE MODE

  • Press Menu and you'll see an APN button, press that

  • When the list of T-Mobile APNs shows up, press Menu again and you'll get the option to add your carrier's APN

  • Make sure you get the MCC and MNC numbers right, that's how it decides which APN to use. Mine came up automatically but I've seen another phone that had the wrong ones.

  • Turn off the phone. Turn on the phone as normal (no Menu hold down).

  • Go through the intro and register a Google account, or make one if need be.



After all that I'm happily doing 3G data on a Maxis SIM in Malaysia. I notice that automatic setting of the time didn't work but that is no drama. Great toy.

A big walk around Singapore and a G1

weather.jpgTook the opportunity of a Saturday off to take a big walk around Singapore. In the end I walked for about four and a half hours.

Oh, looks like it's going to be a bit hotter on Sunday, better dress for that!

Starting where I stayed near the Tanjong Pagar MRT station, along South Bridge road, left at Cross street, along Havelock, over the river on Kim Seng Road, right up to famous Orchard Road in the North.

Walked the length of Orchard Road turning right at Rochor Canal Road to arrive at my destination, the shopping centre of technology Sim Ling Square.

I got to Sim Ling at 9:45 and it was mostly shut. There was a street market near by so I hung out there until things opened up. Most of the shops didn't open until about 11am.

Picked up a little box that plays video, such as DivX encodings into your TV. It has a USB host connector and an SD card reader. It does a pretty good job but I feel it is under powered and perhaps skips every other frame but it will do the trick.

Back down to Victoria Street, South Bridge Road and home. Maybe just a lazy 10Km walk but it passed easily with all the entertainment of looking around a strange, for me, city.

shooting.jpgSingapore certainly is tidy and organised. The toll card system is impressively widespread. Like many asian cities with English signs, there's a war on the plural. You see "beware of pedestrian" as just one example.

Later we visited Lucky Plaza where TMobile G1 Android phones are on display and sell for SG$800 (7% of which is refundable GST at the airport).

If I hadn't used an iPhone, this phone would have been a revelation but up against a very polished competitor it's clear that there is still some work to do.

Screen and touch screen is very nice and responsive. We all struggled to guess where certain settings might be in the menus. The little keyboard is handy but I'm not sure that the extra depth of the device makes it worth it. It's narrower and thicker than an iPhone and doesn't sit in the pocket as well.

gphone.jpg


When the screen is swivel/slid up to expose the keyboard it won't lie flat on a surface while you type so I guess you are meant to hold it in one hand and peck with a finger.

I have a couple of Google accounts, I set up for one and then wanted to change but couldn't see how. In the end I did a factory reset.

Google's phone platform is a welcome addition to the marker, HTC makes some fine hardware under a couple of brands but the iPhone is still the benchmark in my book. Funny how the absence of multitouch, scroll physics and an accelerometer make quite a difference.

Update: it looks like it has an accelerometer but just doesn't use it for obvious things like screen rotation.

Thursday, March 05, 2009

On the road in Singapore and Malaysia

Not much time for blogging at the moment. I'm working in Singapore and Malaysia. It's great to be back, in particular Malaysia is an old favourite.

Malaysia.jpg


Normally I go into the ABC's Ultimo studio to talk with Fran Kelly on Radio National breakfast but rather than either missing a spot or doing it over the phone I conspired with Roi Huberman to do the item over the phone while I recorded my audio locally and sent him the file.

Roi then skilfully glued the two tracks together.

Aside from some mic popping at my end I think it worked out rather well. Sounds like I'm there.

The amazing bit is that I'm using a Verbatim brand headset mic that cost just $12. They seem to have a particularly good microphone but do fall apart pretty quickly.

Back in Singapore, I'm running a workshop on the Google Maps API and staying in an apartment on the 44th floor, pretty spectacular when there's interesting weather.

Singapore.jpg


At night the sound of bad karaoke singing can be heard through the walls. Last night it was "I will survive" for hours.

All going well as long as I don't explode from all the food.

Food.jpg


My news addiction is being satisfied by tuning in to the BBC world service on 9.740MHz. Seems strange hearing a super strong station on short wave. Presumably there's a local transmitter.

The boss picked up a couple of HTC Google Android phones today, they do look very nice but the keyboard keys are rather small. I'll have a better play and report back soon.

Saturday, February 28, 2009

Multi-language madness

Picture 2.pngRecent weeks have been dominated with work rather than hobbies.

In the current climate I'm pleased to be fully employed. I'm working on a very ajaxy web application and jumping between PHP, Javascript and python which is driving me slightly around the bend.

When doing modern web development you realise just how vital a tool FireFox with Firebug is, but this week saw the release of a beta of Safari 4. Safari's built-in tools are getting really good and partially because of the speed I've moved over to it for my primary testing, debugging and general web use.

If, like me, you had the Growl notifier for Mail.app installed you'll find that Mail crashes right away after you install Safari 4. You need to remove the growl plugin from ~/Library/Mail/Bundles/.

For the last few years I've been working in Python and using the Django web framework. The project I've just taken over is built with an excellent PHP framework called CodeIgniter.

Like any MVC style framework there are two immediately good things: there's a place for everything and everything has it's place, and you do get some good stuff for free. It certainly helps someone coming to an existing code base to quickly be able to guess where in the tree parts of the code are.

I like CodeIgniter, but Django is a hard act to follow and I find myself comparing how few lines of code would be needed to do each part in Django/python. PHP just feels like a mess of a language and library compared to python.

The tools I'm using mostly at present are:



I'm off to visit my end customer in Malaysia tomorrow, it will be interesting to see how the "multimedia super corridor" is faring these days.

Monday, February 23, 2009

New kitchen radio AWA Radiola 565MA

Picked up my new valve radio last night.

Radio.jpg


A magnificent item of architecture I hope you'll agree. Many of the original capacitors have been replaced and internally condition is excellent.

Here it is tuned to 2FC, err ABC Radio National. Hums a bit but sounds very official. Great to see some 1950s technology still going strong.

Saturday, February 21, 2009

80m dipole antenna back up

Over the past year or two I've been incrementally improving my HF antenna situation here. I've pushed higher and higher and on a windy night early in the week it came down.

Luckily I still had a spare line over the branch of the gum tree out the back and was able to get it back up again pretty easily (the hard part is getting the line high into a tree).

The configuration looks like this:

antenna.png

There's a magnificent tall gum tree in the neighbour's yard at the back and a tree in the street in the front. Happily the power runs down the other side of the street.

The central support is a netball hoop base, with a steel pipe and then a long two part extension from a pool cleaning pole. It's guyed on the sides and the dipole forms the other guys kind of.

The antenna consists of a 40/80m trap dipole and I have a 20m dipole off the same balun going at another angle. The extra 20m dipole detuned the 40m part a bit but hasn't affected 80m.

In fact I'm getting terrific reports on 80m with many stations in a net saying I have the best signal of the group. In the Friday night, 8:30 QRP Natter Net on 3.615MHz, both Barry, VK5BLS and Gerard, VK4TGL were complimentary. I dropped to 25W and was still quite strong.

As Gerard said, "if your antenna stays up - it's not big enough".

Monday, February 16, 2009

Antique radio collectors

Local ham Rob, VK2ZNZ called me after the Sunday broadcast to propose an excursion to visit some chaps he met at the Historical Radio Society of Australia.

First stop was Joe and Anne's place where the decorative furniture included this amazing cabinet radio.

DSC01857.jpg

Joe spend many years working on ships and has built boat style storage spaces throughout the house for storing radio restoration parts including a huge range of valves. Here's the view up a trapdoor above the loo into some previously wasted space.

DSC01868.jpg

DSC01872.jpgOff a small but lush garden, the workshop is actually a tiny cupboard like space but is surrounded with all the parts he needs easily at hand.

Throughout the house there is no wasted space that is not filled with bits and pieces, this includes the attic all the way down to a crawlspace under the floor.

Upstairs there's an official long wire antenna that looks like it might do for transmitting too.

DSC01886.jpg

Valves are even stored under each bed.

DSC01883.jpg

So no bouncing I guess. Lots of drawers are full too.

DSC01880.jpg

Everywhere.

DSC01891.jpg


If you want something, it gets looked up in the catalog..

DSC01894.jpg

Ah.. it's in a box under the floor near the front door, off we go.

DSC01904.jpg

There it is!

DSC01896.jpg

Next we were off to visit Jack, he also has an extensive collection of valves.

DSC01914.jpg

Now Jack was quick to say that he's not a radio collector but he does seem to have accumulated a few sets.

DSC01915.jpg

In several rooms.

DSC01916.jpg

Around the house.

DSC01917.jpg

Here's radios for listening to while doing the washing.

DSC01918.jpg

I found a set to buy, Jack turned it on and wasn't happy with the sound so got to work fault finding.

DSC01930.jpg

I'm going to collect it next week.

DSC01935.jpg

Thanks Rob, Joe, Ann, and Jack for a very entertaining Sunday afternoon.

Tuesday, February 10, 2009

I want my GreenPlug

greenplug-widget.gifWe have dozens of little power adapters, sometimes I want to use a gadget, but can't locate the particular plugpack or special little charger that it needs to live - the device becomes useless.

GreenPlug came to my attention a couple of years back and I've been waiting patiently for devices to appear. The recent Consumer Electronics Show was another missed opportunity.

Clearly, the profitable business in selling replacement plugpacks and chargers means that manufacturers have little incentive to move to a standard approach. A small chip, that talks the GreenTalk protocol would also be required. My understanding is that this chip is cheap, but perhaps it should be subsidised by state power suppliers or even mandated.

Imagine a world free of "wall warts", where your desk has just one mains lead into a clever little device with a display that shows all the devices and their state of smart charging. Imagine a world where there are standard charging sockets on everything.

To some extent USB has become the de facto standard, but it's not a great standard: only 5V, low current, and you still need intelligent charging circuitry in each device.

What can I do? I've voted through the link above, where you can nominate the gadget that means the most to you presumably to send the manufacturer a message. The other thing is to talk about this technology and take every opportunity to tell manufacturers that I would choose a GreenPlug equipped device over another in a heartbeat. Duh.

Sunday, February 08, 2009

A Wyong field day 2009 report

Today was the Wyong field day. What a fine day it was for it, not too hot thankfully.

DSC01795.jpg

The crowd was a little down on past years but the vendors were very happy with the sales.

I bought a few panel meters.

DSC01797.jpg

I bought a Philips 1.3Ghz frequency counter for $50 that seems to work fine and a calibrated Philips RF probe for $20.

DSC01799.jpg

The commercial vendors seemed to be doing a great trade but happily I wasn't in the market for a black box this year.

DSC01814.jpg

It was my pleasure to run into Peter who is a part of the excellent AmateurLogic TV video podcast. I thanked him for his excellent reports.

DSC01827.jpg

Under cover it was very pleasant with a cooling breeze flowing through.

DSC01805.jpg

Soon it was time to hop upstairs for a refreshing cup of tea.

DSC01829.jpg

And some crackers and cheese cubes.

DSC01831.jpg

The NSW Home Brew group had a great display and answered lots of questions.

DSC01836.jpg

Even 13 year old girls are going for the foundation licenses which is a good thing.

DSC01832.jpg

Wyong wouldn't be Wyong without the embroidery display which was excellent again this year.

DSC01842.jpg

I bought a nice embroidered bag for $5.

Wednesday, February 04, 2009

iPhone/iPod touch as an application platform

AppleStore.jpgI was invited to the Sydney Apple store today to get a briefing from Stan Ng, Senior Director of iPod Product Marketing and Christi Wilkerson, iPod Product Marketing Manager, who have trekked out from California to spread the word on how well everything is going.

There's no doubt they're doing really well at the moment - 4.4 million iPhones in the last quarter alone, available in 70 countries, the iPod touch is the top selling iPod (but mostly because it's the only model in it's class).

I asked if they had any comment on the recent decline of the Microsoft Zune and Stan said he "didn't want to hit them when they were down".

The proprietary iPod connector is spreading too, aside from a few cars, it's now in some United and Singapore Airlines planes and apart from charging you can show the video on the seat back screen. Pity about the lack of WiFi internet though.

Quizzed about the bungling over restrictions on apps available in the store, Stan gave me the company line about seeking to protect customers from objectionable or poor value software. He kind of argued that reproducing a built-in software feature was bad value, I suggested that surely the market should decide that.

The built-in App store works well for iTunes and the iPhone/Touch, I asked when we would get a version for the Mac itself? Stan said that the concept has now spread to GarageBand and he sees "a lot of future in this style of store".

We're starting to see some traces of new iPhone hardware in web server logs so just for fun I asked about a new model and got the amused "we don't talk about unannounced products" laugh.

Sam.jpg


I expressed my frustration that the push service, expected last October, hadn't come out so things like staying logged in to instant messenger while the app isn't running are still not possible on the iPhone. No comment on that one of course.

ChrisIpod.jpgChristi demoed some nice apps including Sim City (which is said to be the most sophisticated version on any platform), a Ralph Loren collection presentation app, Hero of Sparta, and Word Fu which looks like a fun word game.

Great to see the local OzWeather doing so well in the store too - there's some wonderful success stories about small developers making good money through their applications.

A couple of pre-release games including Time Crisis from Namco were on show and I have to say that Chisti had done her preparation and seemed to play exceedingly well...

Platform vitality depends on the developers attracted to it. Apple has a good lead right now but Google Android, and Palm Pre are attracting a lot of developer interest. One possible weakness for Apple is that their developer tools aren't cross platform but it's amazing how over-represented Macs are amongst software developers at the moment.

My thanks to Stan and Christi for their time.

NSW Home Brew radio meeting

Here's a few shots from last night's meeting of the group at Seppo's at Putney. Being a nice warm night we had the garage door open.

DSC01760.jpg


Lots of friendly chat about all manner of technical topics.

DSC01765.jpg


I took along my 80m DSB transmitter and receiver, Kevin had some great work, but Stephen VK2BLQ has excelled once again with a very nicely constructed valve transmitter.

DSC01777.jpg


Everyone's very much looking forward to the Wyong field day next Sunday.

Saturday, January 31, 2009

Crystal locked 80m direct conversion receiver

To go with my recently constructed 80m double side band transmitter, I've just completed a crystal locked direct conversion receiver.

DC receiver.jpg


The circuit is based on the Neophyte receiver from QST except that I used a crystal oscillator configuration in place of the LC controlled one.

It's an NE602 connected to the antenna via a single tuned stage, with balanced audio feeding an LM386 audio amplifier.

As you can see, it's very simple. I spend more money on boxes than on all the components.

I purchased a bunch of common crystals at 3.5795Mhz and have put one in the receiver and another in the DSB transmitter. I zero beat the residual carrier to match their frequency.

As Peter Parker commented on an earlier post, I am able to hear DSB on a DC receiver. He said that frequency stability was more important that with SSB reception so I went for a crystal locked receiver.

The next thing I need is a nice way to switch RF and power between transmitter and receiver - currently this process is rather cumbersome and takes too long.

I'll see if I can find someone for a fully home brew contact with me.

Update: First fully home brew contact

To make it a bit more practical to switch between receive and transmit I've constructed a switch box that switches both RF and DC between two sides.

The whole set up looks like this, the switch box is on the left:

transceiver.jpg


While I did have to ring up VK2BVS to get him to tune to my crystal locked frequency, it was a great pleasure to have a conversation using a home built transmitter and receiver.

As the receiver was zero beat to my carrier and Sam had tuned to my carrier he sounded excellent right away.

The direct conversion receiver sounds very pleasant, as this one is crystal locked the only adjustment is a 1K pot on the antenna as RF gain - this works just fine as a volume control too.

It's a very happy day here at VK2TPM.

Friday, January 30, 2009

Amazing transmitter that uses an ATMega16 sampling audio in real time and instructing an AD9851 DDS to FM

The arrival of the WIA's "Amateur Radio" magazine is always a pleasure but as a home brew enthusiast I find myself flipping through looking for circuits (often from the fabulous Drew Diamond).

This month an article really caught my eye...

ARItem.jpg

While I'm up to speed with the use of microprocessors I don't welcome seeing projects in many magazines that are just a Pic or Atmel chip with a bit of I/O and nothing else. What's more annoying is that the interesting part - the bit that shows how it works - the source code, isn't printed; so the article is not very useful on it's own.

Promoted strangely on the cover of AR as "A transceiver for an interesting and exciting band", Dale Hughes, VK1DSH presents his design for a 10m FM transceiver where the transmitter's microphone audio is sampled at 14kHz using the on-chip analog to digital converter. The chip converts the audio samples into the data stream needed to tell the AD9851 DDS chip to frequency modulate at the output frequency.

Bill wrote to me "Basically, during transmit the code enters a tight loop which does an auto-trigger ADC conversion then uses the previously converted value to adjust the current DDS frequency, so the output is always one sample behind. This happens at about 14k Hz and each DDS value is sent via SPI to the DDS chip which then updates its operating frequency. It's quite simple really and I was very pleased with the result."

It never dawned on me that these little chips had the grunt for real time audio sampling or that the DDS chip could be FMd like this.

The receiver is elegant too, based on a MC3357 FM receiver chip with the local oscillator also coming from the DDS.

Dale's email address wasn't easy to find so I wrote to the credited reviewer, Bill Maxwell, VK7MX who put me in touch. Dale quickly sent through the assembly source and also a slide show he presented at Gippstech last year about DSP with AVRs.

In that slide show Dale describes both FM generation and AM demodulation (the latter sampled at 7kHz), he mentions that SSB is not possible with the AVR. Mind you he's running the chip at 16Mhz and I'm sure I've seen some overclocking experiments.

Thanks Dale!