Silicon ChipGetting Into WiFi, Pt.3 - July 2005 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Low-cost digital cameras no match for 35mm equivalents
  4. Feature: Getting Into WiFi, Pt.3 by Ross Tester
  5. Feature: CeBIT Sydney 2005 by Ross Tester
  6. Feature: Unleashing Unwired by Ross Tester
  7. Project: Remote-Controlled Automatic Table Lamp Dimmer by John Clarke
  8. Salvage It: Salvaging & using common thermostats by Julian Edgar
  9. Project: Lead-Acid Battery Zapper by Jim Rowe
  10. Project: Serial Stepper Motor Controller by Greg Radion
  11. Feature: PICAXE In Schools, Pt.3 by Clive Seager
  12. Review: Altronics 250W Aussie-Made PA Amplifier by Ross Tester
  13. Project: AVR200 Single Board Computer, Pt.2 by Ed Schoell
  14. Vintage Radio: The 1951 AWA 433MCZ 4-Valve Battery Receiver by Rodney Champness
  15. Book Store
  16. Advertising Index
  17. Outer Back Cover

This is only a preview of the July 2005 issue of Silicon Chip.

You can view 37 of the 104 pages in the full issue, including the advertisments.

For full access, purchase the issue for $10.00 or subscribe for access to the latest issues.

Articles in this series:
  • Getting into Wi-Fi (May 2005)
  • Getting into Wi-Fi (May 2005)
  • Getting Into WiFi, Pt.2 (June 2005)
  • Getting Into WiFi, Pt.2 (June 2005)
  • Getting Into WiFi, Pt.3 (July 2005)
  • Getting Into WiFi, Pt.3 (July 2005)
Items relevant to "Remote-Controlled Automatic Table Lamp Dimmer":
  • PIC16F628A-I/P programmed for the Remote-Controlled Automatic Table Lamp Dimmer [autolamp.hex] (Programmed Microcontroller, AUD $10.00)
  • PIC16F628A firmware and source code for the Remote-Controlled Automatic Table Lamp Dimmer [autolamp.hex] (Software, Free)
  • Remote-Controlled Automatic Table Lamp Dimmer PCB pattern (PDF download) [10107051] (Free)
Items relevant to "Lead-Acid Battery Zapper":
  • Lead-Acid Battery Zapper PCB pattern (PDF download) [14107051] (Free)
  • Lead-Acid Battery Zapper front panel artwork (PDF download) (Free)
Items relevant to "PICAXE In Schools, Pt.3":
  • PICAXE-08M BASIC source code for "PICAXE in Schools", part 3 (Software, Free)
Articles in this series:
  • What’s this? Free PC Boards for Schools? (May 2005)
  • What’s this? Free PC Boards for Schools? (May 2005)
  • PICAXE In Schools, Pt.2 (June 2005)
  • PICAXE In Schools, Pt.2 (June 2005)
  • PICAXE In Schools, Pt.3 (July 2005)
  • PICAXE In Schools, Pt.3 (July 2005)
  • PICAXE In Schools, Pt.4 (September 2005)
  • PICAXE In Schools, Pt.4 (September 2005)
  • PICAXE In Schools; Pt.5 (November 2005)
  • PICAXE In Schools; Pt.5 (November 2005)
Articles in this series:
  • AVR200 Single Board Computer, Pt.1 (June 2005)
  • AVR200 Single Board Computer, Pt.1 (June 2005)
  • AVR200 Single Board Computer, Pt.2 (July 2005)
  • AVR200 Single Board Computer, Pt.2 (July 2005)

Purchase a printed copy of this issue for $10.00.

GETTING Part 3: INTO infrastructure, APs, PoE and much more! by Ross Tester When we ran out of space last month, we’d just explained how easy it was to install an “ad hoc” Wi-Fi network to wirelessly connect a few computers. Now we’ll move on to the next logical step, the “infrastructure” network and connection to the world via the Internet. ­­A ccess Points (APs) are sometimes referred to as wireless base stations, WAPs, even (albeit incorrectly) as hubs or routers. You may also see terms like residential gateway or Internet gateway device mentioned. Despite the number of synonyms, as far as the wireless network is concerned, they all mean basically the same thing. Some may have more features than others, which often explains their incorrect names – eg, a WAP can have a hub or router built in. First of all, though, if the ad hoc system works, why do you need to go to the expense of buying this extra equipment? Can’t you do a lot with the simpler ad hoc network? Yes you can, but. . . As we briefly mentioned last month, it is possible (for example) to connect to the internet from an ad hoc network. It is also possible to set up a wireless access point using software on perhaps an old PC – that is, without buying extra hardware. But the truth is that it is not very often done – most wireless networks use the infrastructure mode with an AP. Why? (a) it offers more features and more security than the ad hoc mode; (b) it is usually much simpler to go the hardware route, especially if you want to do more than swap files; and (c) if you only have a dial-up conenction, there are good reasons, associated with the way IP addresses are handed out, not to use a software AP. You would normally also expect better range from an AP, if for no other reason than the AP can be mounted in a much more beneficial location. In an ad hoc system, communication is direct from the wireless network card in each computer to its counterpart in another computer. But unless there is a (often lossy!) antenna extension cable, the antenna is normally located hard up against the back plane of the computer – it normally directly screws Two different types of Access Points, showing both front and rear so you can see the difference. At left is a Wireless Router/AP ($179 from Jaycar Electronics) which combines the functions of an AP for wireless networks and a router for wired networks. At right is a basic Access Point ($99 from Freenet Antennas). 8  Silicon Chip siliconchip.com.au DESKTOP PC WITH WIRELESS CARD NOTEBOOK WITH WIRELESS USB “STICK” ACCESS POINT Reproduced from Part 1 of this series, this diagram shows the basic arrangement for an infrastructure mode wireless network. This isn’t the only possible arrangement: it’s quite likely that at least some of the computers would be in a wired network. There may also be more than one access point if larger areas, or more difficult wireless areas, needed to be covered. The main point to note from this diagram is that data does not travel from computer to computer, as it does in an ad hoc network. Here the access point acts as a “traffic cop”, sending ‑data direct to the appropriate device. NOTEBOOK WITH WIRELESS PC CARD INTERNET VIA DIALUP, BROADBAND, ETC PC WITH WIRELESS PCI ADAPTER PDA WITH WIRELESS into the internal wireless network interface card, or NIC. And the computer is often at floor level or hard up against a wall – hardly the best radio environment. In any event, the bulk of the computer case often provides a very effective radio shield over about 180°! The AP too usually has integrated antenna(s) but it can be mounted well clear of obstacles, filing cabinets, people . . . we’ll get back to this shortly. Naturally, all computers on the wireless network will still have to have a wireless NIC to be able to talk to the AP (many modern laptops have them built in). But it helps to have the AP mounted in as good a position as possible to give each of those computers a fighting chance! AP cost With the price of all wireless hardware – not just NICs but APs as well – dropping all the time (prices have probably halved even in the last year), there now really isn’t a good reason to suffer the limitations of an ad hoc system for the sake of a few pennies. A good, “no frills” access point these days should be no more than about $100 – and possibly less if you hunt around. We’ve seen a lot of refurbished, guaranteed Netgear WG602 (802.11g) access points – basic but with a good reputation – being sold on Ebay lately for sub-$50 (and even less). If you’re prepared to settle for an 802.11b AP, you could pick one up for a song. Incidentally, you shouldn’t notice any Internet performance difference between 802.11b and 802.11g. The limitation will be the ’net, not your AP. Even all-singing, all-dancing AP models (such as the siliconchip.com.au “MAIN” PC WITH MODEM Linksys WAG45G wireless router, switch, ADSL modem and gateway, so you get everything you need in one package) retail for well under $200 (eg, www.freenet-antennas. com.au). And there’s the power wastage factor too: an old computer set up as a software access point will normally consume a hundred watts plus (even without a monitor on) while a dedicated access point might draw one tenth of this. While the power cost is minimal, remember these devices are usually left on 24 hours a day, seven days a week. It all adds up! APs with two antennas Apart from their cost, whether they are “b” or “g” models and their reputation (sometimes unearned!), one other thing you might notice about APs is their physical construction. Some have one antenna (or provision for connecting an antenna); others have two, as depicted in the diagram above. What’s the difference? APs with two antennas are almost invariably what is known as a “diversity” models. This means that a comparator of some type (usually controlled by a microprocessor) keeps monitoring the signal level at each antenna and uses the one which is picking up the best signal at that moment in time. It can – and does – switch back and forward at will, sometimes many times per second. Because the wavelength of microwave signals is so small, they are subject to a lot of reflections, interference, etc – so the signals arriving at the two antennas can be quite different, even spaced as closely as they are. July 2005  9 A 20m Power-over-Ethernet (PoE) cable ($40 from FreenetAntennas) – note the DC connectors as well as the RJ45s. This gives you the ability to provide power to your Access Point without running extra cables or looking for a power outlet at the top end. Diversity APs are usually better performers than their single-stick cousins. What is infrastructure mode? Look at that name – infrastructure. It implies equipment and planning (as distinct from ad hoc, or “throwing something together”). And that’s just what infrastructure mode is – a network which is planned to perform bigger and better functions and has the hardware to do so. In a wireless network set up in infrastructure mode, data doesn’t directly flow from computer to computer; instead, the access point acts like a traffic cop and directs data to the appropriate place. It also acts as a bridge, linking the computer containing your internet connection to your wireless network. For this reason, the access point is almost invariably connected to the computer which connects you to the wonderful world wide web (wwww!). All computers on the wireless network have their own wireless network card (which you might also called a network adaptor or even a WNIC). We’re getting just a bit ahead of ourselves here but all of those adaptors need to have the same service set identifier (SSID) so that they all know they are on the same network; they also need to have the same encryption (WEP or WPA) keys so they can actually understand each other. You set the SSID and WEP/ WPA keys as part of the installation process. Don’t get too worried about all these acronyms and terms – the computer industry breeds them like no other – but most will become clear as you set things up (or you don’t need to know what they mean anyway!). Setting it up As suggested for the ad hoc mode last month, it’s always a good idea to plan your wireless network before rushing in boots and all. That way, you can get a better idea of how the various bits DO connect to each other. It also helps you work out what you need to buy, avoiding costly mistakes. And if something doesn’t work as it should (or something fails in the future) a network plan can really help in troubleshooting. Incidentally, there’s not much difference between a wireless network and a wired network from an operational point of view – if you were putting in wire instead of wireless you should do the same thing and plan it out first. The 10  Silicon Chip biggest difference between wired and wireless is that the speed of a wireless network will decrease as the quality of the wireless signal decreases (either by range, obstruction, etc) whereas a wired network normally keeps working until it drops out. In some cases, you might be adding a wireless network onto an existing wired network – perfectly practical and often done. For example, a company might expand. It already has a wired network but wishes to add a few new users. Way to go: wireless! Or even in a new installation, you might find there are a couple of computers (or more) on which it makes sense to network with wire (using Cat5e for example) – wireless NICs, even though cheaper these days, are still relatively a lot more expensive than Ethernet NICs (you can often pick those up for just a few dollars). The combined wired/wireless network approach is often handy to remember if you get into signal problems with wireless. You might find that you have plenty of signal in one room but nothing in the next. It could be the wall construction (metal or insulation in the wall?), could be a wireless black spot (shielded by something?), could be simply running out of puff (too far from the access point). . . or it could simply be wireless acting ornery (it does that sometimes!). By the way, brick walls are often a real drama – especially external brick walls. It’s not so much the bricks themselves but the fact that bricks naturally absorb water when they get wet. And as you will find out, water absorbs microwaves very nicely! When planning the network, consider which computer you are making the “main” computer. It’s almost certainly the one which has your internet connection (eg, modem) and probably has your printer and other peripherals attached. That’s the one which should also have your access point attached. Physically locating the Access Point The key word here is access – you must be able to access the AP itself and wireless signals also must have access. This rules out anywhere with aluminium foil-type insulation, for example (as is often used under roofs and sometimes within walls). Remember too that in many old buildings, fine-mesh chicken wire was used under tiles and in walls. Fine mesh (say 1cm or less) wire will stop WiFi signals very nicely. Plaster and brick walls are also quite unkind in many cases – and if you’re sharing with next door, trees and shrubs are a no-no. The problem with trees and shrubs is that they contain water and they also get wet (rain, dew, etc). Would you believe I have a normally excellent wifi network between myself and my next-door-neighbour which stops dead when it rains – that’s when the wood paling fence between us gets wet! (If I raise my laptop above fence height, away it goes again). If possible, keep your access point at least a few metres away from anything else which shares the 2.4GHz band – and that includes microwave ovens, digital cordless phones, some intercoms and baby monitors, wireless doorbells, home automation equipment, etc. The other gear doesn’t even have to share the same 2.400-2.483MHz frequency range to severely upset your wifi network. It also makes sense to keep the AP away from electric siliconchip.com.au motors, fluorescent lights and so on which might generate fields which upset the AP operation. If you are linking to a wired network, the AP also needs to connect to your router, hub or switch, so it needs to be within reasonable cable distance. And finally, it also needs a source of power. That’s usually not so much a problem (what else were extension cords invented for?). Or . . . POE: Power over Ethernet There is an excellent alternative in finding a site for your AP – and it’s even more a proposition when power is a long way away, or needs to be supplied outside. It’s called Power over Ethernet, or PoE, and as its name suggests, power for the AP comes over the same cable which takes signal from the AP to the computer. In an normal Ethernet cable (Cat5e, for example), there are four pairs of wires. Two of these pairs are not normally used (pairs 7/8 and 4/5), so can be used for other purposes – like running power! It is usual that both wires of each pair are used (ie, two wires in parallel for each polarity). Even though the IEEE has a PoE standard (IEEE 802.3af) which should determine which pairs are which polarity, unfortunately many manufacturers have done their own thing and ignored the standard, so there is no hard-and-fast rule. Cisco, for example, use pairs 7/8 for +12V and 4/5 for 0V but Intel, Orinoco and others use the opposite. Most APs are very low power devices – a few tens of milliwatts or so. But even higher power APs (up to the 4W legal limit) can be run via PoE – even the thin wires in the Ethernet cable can normally handle the required current with ease, especially as they are paralleled. PoE-fitted Ethernet cables are readily available made up in various lengths. If you buy your cable from the same place you buy your AP, the chances are it will be correct for that AP (but don’t bet the house on it!). If in any doubt, check and check again. Freenet Antennas have 20m PoE cables in the $40-$65 range (see picture) and they allow you to site the AP where you want it for optimum performance, without having to worry about finding local power. Interference It may seem like commonsense but one other consideration is the location of the rest of the devices on your network. If you have some “must always have on” devices, the AP location should favour those to some degree. Otherwise it makes sense to locate your AP at about the central point for all your devices. If you find you have a rock-solid signal for most devices but one or more at the extremeties suffer dropouts or slow speed, you might want to move the access point closer to them if the rest of the devices can handle it. If you have to mount the AP in an unfavourable location (and there are times when you must), consider connecting a gain antenna to help it out. There is nothing magical about a gain antenna – you don’t get something for nothing. A gain antenna merely sacrifices performance in one direction for better performance in another. The higher the gain, the more accurately the antenna must be aimed. If your AP is at one end of the house and the other wireless devices are at the other, an antenna with some gain aimed towards the other end might do wonders. Note that running long antenna leads is not a good idea due to the high losses of most coax cables at 2.4GHz. All coax siliconchip.com.au has loss and the higher the frequency, the higher the loss. For example, common RG58 cable has a loss not too far off 1dB/m at 2.4GHz. That means you are going to lose most of your signal in the cable. Run a 10m cable and a 10dBi antenna and you are pretty much back to square one! Some cables are available which have lower loss – for example, Freenet-Antennas have various CFD400 coax cables from 6m to 15m in length (losses from 1.3dB to 3.3dB loss <at> 2.4GHz) which can be fitted with N-male or N-female connectors to order – a 6m cable with N-connectors would cost you $60.00; the 15m version $84.00. A better answer? Mount the AP close to the antenna with a short antenna lead and use a long ethernet cable from the AP back to the computer. I can’t think of a situation where you can’t get away with a lot longer ethernet cable than you can a long antenna cable. If all else fails, another AP can usually be connected to the system in a location which picks up the black spots. Or you can buy a repeater (sometimes called a signal booster) which does much the same thing. But these devices are starting to get a little outside our “simple” wifi system. Finally, you may find that a few centimetres (or tens of) in the location of your AP (or its antenna/s) makes a lot of difference in the performance of your wireless network. Even though you have decided on the “optimal” spot, be prepared to experiment a little later on to see if you can get better range and/or speed by moving it slightly. Also remember that the antenna(s) on most APs can be rotated through about half a sphere, so don’t be afraid to experiment there as well. Should we have to say it? All antennas need to be oriented, or polarised, the same way. That is, if some vertical, all are vertical – and vice versa. Trial and error might not be the most scientific way to determine best positioning but failing some pretty fancy test gear, it might be the most sensible! Installing the AP This is the easy bit! Once you’ve decided on the location, there are two parts to getting it going: plugging it in and running installation software. As a general rule (in other words, not always!), if your AP comes with its own installation disk (CD, usually these days) it’s a good idea to run that, if only to take advantage of any “extras” your particular AP might offer. Note that some APs need to be plugged in and turned on before software installation; others require the software installed first. And some we have seen must be plugged in and/or turned on at a certain (prompted) point in the installation. This 8dBi omindirectional collinear antenna called “The Stick” has an N-type connector and is shown here with a pipe-grip base for external mounting. However, it can also be fitted to a magna-base, which comes with 3m of low-loss coax terminated in a reverse-polarity SMA connector. (Antenna only: $70 from Freenet-Antennas). July 2005  11 Simply follow the instructions which came with your access point. As we said last month, Windows XP has a very easy, very smooth installation process for wireless networks (as it does for wired networks). Simply click on to Control Panel, My Network Places and “Set up a Wireless Network for Home or Small Office”, then follow the bouncing ball. If your AP doesn’t come with a disk (or you’ve lost it), use the Windows XP install. Later, you might be able to log onto the manufacturer’s website and download up-tothe-minute installs. Sharing your internet connection Now that you have your wireless network up and running, you want to be able to share the internet connection over the network. Again, Mr Gates’s disciples have provided a very simple, step-by-step way to do this. It’s called “Internet Connection Sharing” (ICS). If you get stuck, Windows “Help and Support Centre” will get you out of trouble. Sharing the internet with a neighbour Now you know that you can share the internet connection via WiFi amongst the computers on your network, what it to stop you sharing it a bit further afield – say with your next-door neighbour? As we have said time and time again, not only is this possible, it’s probable – if you haven’t enabled (at least) WEP and preferably WPA (not to be confused with mobile phone WAP). Your sharing might not even be by choice! But is it legal to share internet next door? We touched on this in the first part of this WiFi series (May issue) but since then we’ve done a lot more research on the subject. We’ve often heard it claimed (even since May!) that sharing an internet connection over the boundary of your property is illegal. It harkens back to the days of the Wireless Telegraphy Act of (I think!) 1906, where running any form of communications over a property boundary was specifically not allowed – mainly because when that Act was written and for maybe half a century later, “communications” involved running a wire over the property boundary. But this is 2005 – and things have changed a little. For a start, that Wireless Telegraphy Act has been replaced (by many volumes of Acts!). While we are only bush lawyers (whose advice is normally worth about the same as is charged for), the bottom line appears to be, at least as far as the powers-that-be are concerned, that allowing your next door neighbour to log on to your wireless network and use your internet connection for free is perfectly legal. Note that word, for free: that is, as long as you don’t charge your next-door-neighbour for the privilege. If you do that, then under one of those Acts, legally you have become a carrier and require a carrier licence (and that’s expensive ~$10,000!). Of course, if you shared your wireless network with a neighbour and a slab or two of universal currency appeared on your back doorstep every couple of months – your neighbour just being friendly, of course – then that hardly counts as charging, does it? That, at least, appears to be the official line from the Australian Communications Authority (ACA) who are re12  Silicon Chip sponsible for administering everything to do with wireless in Australia (yes, even WiFi). You might have read, because it is often said, that WiFi (or at least 802.11/b/g) is in the 2.4GHz “unlicenced” band – but the ACA is very quick to point out that there is no such thing in this country. Everything, even flea-powered WiFi, is licenced – it’s just a matter of how! WiFi equipment broadly fits into a class of communications gear known as LIPD, or Low Interference Potential Device. It’s covered by a “class licence” which basically means you can use it as long as you (a) don’t modify it and (b) don’t interfere with other spectrum users. If other people cause you interference, tough luck: you are not offered any protection nor redress. And your ISP? OK, so that’s the Government line. But what about your Internet Service Provider (ISP)? Do they like you doing it? Obviously they’d much rather your next-door-neighbour sign up for their own broadband service. In fact, some ISP contracts specifically prohibit you from sharing your broadband connection with others. Then again, some don’t even mention it. Elsewhere in this issue, I mention that I have installed the Unwired wireless broadband system. Their contract simply says, “You must not use our Services or attempt to use our Services or allow our Services to be used by anyone else.” Gee, that’s pretty tough. Anyone? What about your own family members? (It’s OK, Mr Unwired. I don’t share yours – my next-door neighbour shares his [wired] connection with me). Optus cable doesn’t appear to worry about it. All they say is you are responsible for any charges including extra download charges if applicable! Check the fine print on your ISP broadband (ADSL or cable) agreement/contract to see where you stand. Whether you take too much notice of fine print is entirely up to you (it’s much like all those software agreements where everyone ticks the “I agree” box at the end. If you actually read half of them, you’d be too scared to turn the computer on, let alone use the software!). But here’s the rub: by sharing your broadband connection with your next-door-neighbour, you can probably afford to go for a much better service – faster and with perhaps unlimited downloads. (Of course, once again, we’d never say something like suggesting you share costs). But if you go for an unlimited (or even high limit) download agreement, who’s to know that you haven’t started downloading full-length movies or lots of music off the net? Hence your usage might . . . umm, double? The ISP is unlikely to complain because you are paying them more for the better service! That’s my own situation. My NDN and I share his unlimited (12GB/month at full speed) broadband. He initally installed this service because he needed speed – he virtually never even made it to 1GB. A few months back, the download limit was increased from 3GB to 12GB at no extra charge (reduce the price instead? Naah!) – and even between us, we never get anywhere near 25% of that limit. And apart from my battles with the wet paling fence, it works well, too. Gee, I must remember to buy a slab or two on the way home. Now what does he drink again . . . SC siliconchip.com.au