Monday, July 30, 2007

Free stepper motors

Another entertaining meeting of the Amateur Radio New South Wales Homebrew Group on Sunday at Dural. Peter O'Connell VK2EMU presented an introduction to the use of stepper motors.

He explained how they work, (by stepping normally 200 little steps per revolution), how they are wired (4 wire, 5 wire, 6 wire arrangements), and how to drive them with a few darlington transistors and a PC parallel port.

It will be a great loss when no computers are available with parallel ports any more but I guess the wide availability of USB chipsets will help here.

A few interesting projects were discussed such as a plotter that can directly cut the copper on a circuit board to make printed circuit boards without etching, and home built milling machines for manufacturing.

The great thing about stepper motors is that they are one piece of precision equipment that can be obtained free. All of those ink jet and laser printers that get left out on the curb during council junk collections contain one.

Show and Tell was great too, Graham VK2GRA showed how he was using electric fence insulators for dipole construction, Stephen showed off his excellent 80m AM challenge transmitter, and Alan VK2ZAY had built a 2M AM transceiver in an Altoids tin plus a fantastic tiny short wave receiver.

Tuesday, July 24, 2007

OpenWRT router fun

Recently we've been debugging some network issues with clients that connect through broadband routers to remote servers. The best way to solve this type of thing is to capture the traffic right on the broadband interface with tcpdump -w filename.cap (plus some suitable filters) and then decode the capture with the fabulous WireShark.

The only "hard" router I've used that can do these network captures is the Netgear FVS338, it's a great feature. I wanted this at home, where I normally run an Apple Airport so I decided to fork out $95 and get a Linksys WRT54GL so I could flash the firmware with OpenWRT.

Flashing firmware was very smooth. What you get is a very basic web interface for configuration, enough to get up, and the ability to ssh in and do very powerful stuff with iptables.

The things I needed were:
# forward port 999 to 22 on the home linux box at 172.16.1.100
iptables -t nat -A prerouting_wan -p tcp --dport 999 -j DNAT --to 172.16.1.100:22
iptables -A forwarding_wan -p tcp --dport 22 -d 172.16.1.100 -j ACCEPT


Also, to allow for PPTP passthrough I had to:
# ipkg install kmod-ipt-nat-extra

and reboot. See here.

The hardware and software seems totally reliable so far. I hope there is more in the web interface in future. For me, what is great is that I can get a command line for pings, traceroutes and tcpdumps (there is 7Mb available in /tmp for saving the captures).

For $95 you get a very powerful router, similar to devices costing an order of magnitude more. Recommended for network geeks.

Friday, July 20, 2007

To infinity... and beyond, internet plans

Our house has four active internet users. Wifi everywhere, desktops, laptops, Wii, DSlite, etc. We're already on the "unlimited" plan but for the second time in recent months, this turned out to not be enough.

Silly me, I thought that "unlimited" was as high as you can go, but no, it turns out we can upgrade to "unlimited pro"!

You've got to agree that this sort of naming is dishonest, or at least short sited.

Secondly, when you look around and see other countries getting 100Mbs (symetrical) fibre connections for $50, while we in Australia pay $95 for 1.5Mbs/.235Mbs, you've got to wonder if we're paying too much.

Sunday, July 08, 2007

Antenna hoist installed

It's great to be back home after a few weeks away. Apart from cleaning up the pool (which had gone green), doing my washing, and trying to sync up with local time, I've been trying as always to improve my HF antennas.

Hanging an 80m dipole on a suburban house is no easy task, my goal is an inverted V from the tree at the front of the house to the tree at the back of the block with the feed point above the roof of the (two story) house. 

Shown here is a vertical pole with a pulley at the top that raises up the balun feed point. This arrangement is still not idea, it doesn't clear the peak of the roof and those palm trees you can see in the image are a real problem on our block - they invariably grow and catch on wires I string up.

Just before I went away, "Experimental Methods in RF Design" by Wes Hayward and others, arrived. What a fantastic book! For anyone interested in designing and building RF projects, this is a must get book, clearly it has influenced many other designers.

Tuesday, July 03, 2007

Bonjour/Zeroconf fun on Linux

I have a headless Fedora linux box that plugs in to my home network and gets an IP address from DHCP.

To find it I've been pinging the broadcast address, in my case 172.16.1.255, and then trying to ssh to each of the IPs that answer until I find it. Very agricultural. Seems like a great reason to use Zeroconf.

To advertise the sshd service, put this in /etc/avahi/services/ssh.service:

<?xml version=\"1.0\" standalone=\'no\'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM \"avahi-service.dtd\">
<!-- See avahi.service(5) for more information about this configuration file -->

<service-group>

<name replace-wildcards=\"yes\">ssh on %h</name>

<service>
<type>_ssh._tcp</type>
<port>22</port>
</service>

</service-group>

Here's another example showing how to include the path in the http url:

<?xml version=\"1.0\" standalone=\'no\'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM \"avahi-service.dtd\">
<!-- See avahi.service(5) for more information about this configuration file -->
<service-group>
<name replace-wildcards=\"yes\">myservice on %h</name>
<service>
<type>_http._tcp</type>
<port>80</port>
<txt-record>path=/0/1/</txt-record>
</service>
</service-group>

It's a good idea to set the hostname to something reasonable in /etc/sysconfig/network and reboot.

As root:

# chkconfig --level 35 avahi-daemon on
# service avahi-daemon start

Now you can Command-Shift-K in the MacOS Terminal to browse for the sshd service.

Even better, you can use Chicken of the VNC client to browse for a VNC desktop by putting this in /etc/rc.local

# start vnc for my username at boot
su -l username -c "/usr/bin/vncserver -geometry 1200x900"

(Replace username with YOUR username).

As you, run vncpasswd and set a password. You probably want to edit ~/.vnc/xstartup to uncomment the two lines that give you the full gnome desktop. Reboot.

Now run Chicken of the VNC, do an "Open Connection..." and you'll see the host in the list. Mine comes up as Display 1, your's might be different.

I wish this stuff was just on by default.

Monday, July 02, 2007

Winning the war on tourists


My 14 hour flight arrived at 6:20am on Monday morning at Sydney International airport.

I got to a taxi at 8am. It's not the time that bothers me, it's all the other little things that added up to make it a stressful, confusing, and frustrating experience for me; and I dread to think how it was for the poor folks who don't speak English.

Running the gauntlet of customs, baggage and quarantine is a horrific experience.

Here's my suggestions for how to make it a better experience for the newly arrived:

* Have "fair queues" (where there is a single queue entrance and at the end people fan out to be served) everywhere.
* At the entrance to each queue station a person who checks that people are joining the right queue and have the documents and forms required when they are served.
* If the baggage conveyer fills up (because of the backlog at immigration) have someone take bags off rather than stopping the conveyer and holding up those who are waiting.
* Put a "stand behind this line" around the baggage conveyer so people stand back until they see their bag. This works really well in Japan.
* Have one person who's job is to enhance the experience for travelers through the whole process. If there is such a role, have them contact me or sack them. (Yesterday, in the US where they are on threat level orange, we had a fairly rigorous security process but it was clearly explained, fair and queue time was being actively measured).
* Signs in more languages are required.
* Make sure the TV monitors above queues are working (one was out this morning and people were being sent away for being in that wrong queue)

I felt bad for non-english speaking travelers who waited a long time to get to the end of the wrong queue and didn't have the form filled in. They were sent away with a wave. I also felt bad for me, who is cursed with always joining the slowest queue. Other's jump from line to line, trying to judge the complexity of processing the people or the slowness of the agent by appearance.

Clearly several flights arrive at once at this time, but it's no surprise. It didn't appear to be a staffing level problem, more an organisational problem. Individual staff seemed efficient and friendly, I have no complaint there.

The ultimate irony is just how fantastically efficient the duty free store is on the way in and the taxi rank on the way out.