Failed power supply causes impromptu wireless network upgrade

This content is 17 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

Two-and-a-half years ago, I upgraded my wireless network in order to move to 802.11g and to implement some half-decent Wi-Fi security but, last Friday, just as I was packing up the car for a weekend away, I noticed that my PC had lost contact with the mail server. Then I saw there were no lights on my wireless access point. This was not good news.

I couldn’t fix it quickly and running a cable was not an option either as it would have meant leaving the house unsecured all weekend. So, I just had to accept that I had no DNS, no DHCP, and that the mail server would be offline for the weekend.

When I got home last night, I set up a temporary (wired) connection and thought about how to fix the Wi-Fi – it seemed I had a few options:

  • Buy a new DC power adapter for my D-Link DWL-2000AP+ – inexpensive but the D-Link was a cheap access point – a new DC adapter could cost almost as much as the unit is worth and if the power adapter has blown up, the main unit could be next.
  • Buy a new access point (and optionally move up to 802.11pre-n) – a new access point could be good, but pre-n equipment is still quite expensive – and I’ve never been that happy with pre-anything standards, even back in the days of 56Kbps modems. Add to that the fact that I have a mixture of 802.11g and 802.11n equipment (mostly built in to computers) – and the “g” kit would slow an “n” network down to 54Mbps.
  • Replace my individual router and access point with a combined wireless-modem-router (like the Netgear DG834G that one of my friends lent me – a left-over from his disastrous encounter with Virgin Media’s ADSL “service” – or one of the Draytek devices that I’ve heard so many good things about) – but my Solwise ADSL router is still going strong (aside from the occasional reboot) and I’d have to reconfigure all my firewall rules.
  • Dump Wi-Fi in favour of HomePlug AV technologies – potentially faster (at least faster than 802.11g) but also quite expensive, still a relatively immature technology and, based on most of the reviews I’ve seen, highly dependant upon the quality of the wiring in the house.

In the end, I decided to splash out on a new access point – and this time I got the one that I thought about in 2005 but didn’t want to spend the money on – a Netgear ProSafe WG102. I got mine from BroadbandBuyer for a touch over £80 (the added bonus was that they are only 7 miles away from my house, had them in stock, and I could collect) so by late morning my Wi-Fi was back online and the temporary cables down the stairs were gone and the garage door was closed again.

Netgear ProSafe WG102After having set this up, I realised that this is what I should have done first time around – Netgear’s ProSafe range is aimed at small businesses but is still reasonably inexpensive – and so much better than the white plastic consumer rubbish that they churn out (or the D-Link access point that I’ve been using). The WG102 is well built, has a really straightforward web interface for management (as well as SNMP support) and supports all the wireless options that I would expect in a modern access point, including various security options and IntelliRF for automatic adjustment of power transmission and channel selection. I’m using WPA2 (PSK) but the WG102 does include RADIUS support. It’s also got a nice big antenna and I’ve switched off 802.11b to prevent the whole network from being slowed down by one old “b” device. I also use MAC address filtering (easy enough to get around but nevertheless another obstacle in the way of a would-be attacker) but the best features are the ones I haven’t implemented yet – like multiple SSIDs and VLANs for granular user access. If I put a VLAN-capable switch between the access point and my router, I could provide a hotspot for my street but still run my own traffic over it’s own VLAN. I guess VLAN-hopping would be a potential attack vector but my Wi-Fi traffic would be encrypted anyway and there’s another firewall between the wireless network and my data. If that switch supported Power over Ethernet (PoE) then I could even manage if the WG102 lost it’s power supply (it has PoE support too).

The WG102 is certainly not the least expensive access point I could have bought but it seems to be money well spent. It includes a bunch of features that are generally only found devices intended for the enterprise market but comes at a small business price. I should have bought this years ago.

When “non-destructive” edits start making changes to the original files…

This content is 17 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

A few days back, I was extolling the virtues of the Sidecar (.XMP) file format that Adobe uses for storing updated metadata and edits to digital images in Adobe Camera Raw (ACR):

“It turns out that Bridge (together with ACR) is exactly what I needed to organise my images, open them in ACR (and optionally Photoshop) to perform non-destructive edits, with the changes (and associated metadata) stored in Sidecar (.XMP) files alongside the original image (avoiding the need to maintain multiple copies of images.”

Well, soon afterwards I found out that, for raw image files, ACR does indeed create XMP files (which are also used by Adobe Photoshop Lightroom and are visible in Bridge) but, if ACR is used for JPEGs (or TIFFs), then the original files are modified.

In a blog post from February 2007, Adobe’s John Nack explains why non-destructive edits to JPEGs may be considered an oxymoron – basically Adobe appends the metadata that would normally be stored in the .XMP file to the JPEG. That means that, if I view an edited file using an Adobe product, it can see the changes but other viewers are unaware of the additional data and ignore it.

The accompanying images show a JPEG file that I opened in ACR (via Bridge) to adjust the exposure and to straighten the image. Bridge shows the updated file as being 2848×1894 pixels in size and the image edits are visible in the preview:

JPEG file edited with Adobe Camera Raw 4.0 and viewed in Bridge CS3

Meanwhile, the Mac OS X Finder (or any other image viewer) sees the original 3008×2000 pixel image, still underexposed and leaning to one side:

JPEG file edited with Adobe Camera Raw 4.0 and viewed in the Mac OS X Finder

If, like me, you like your digital asset management software to maintain the original images untouched and only perform non-destructive edits, then this may come as a bit of a shock.

Customising a Cisco 79xx IP Phone: directory services

This content is 17 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

I’m still working on customising the the Cisco 7940 I use with SIP firmware for VoIP calls and one of the items that’s now working well is the directory services functionality.

At the most basic level, the directory_url directive may be set in one of the SIP configuration files (either SIPDefault.cnf or SIPmacaddress.cnf), for example:

directory_url: ”http://webserver/directory.xml”

The contents of the directory.xml file are actually quite simple:

<CiscoIPPhoneDirectory>
  <Title>IP Telephony Directory</Title>
  <Prompt>People reachable via VoIP</Prompt>
  <DirectoryEntry>
    <Name>Bob</Name>
    <Telephone>1234</Telephone>
  </DirectoryEntry>
  <DirectoryEntry>
    <Name>Joe</Name>
    <Telephone>1357</Telephone>
  </DirectoryEntry>
  <DirectoryEntry>
    <Name>Operator</Name>
    <Telephone>0</Telephone>
  </DirectoryEntry>
</CiscoIPPhoneDirectory>

The trouble with this is that it’s just a static file. If I have a large directory, then I need to keep it up-to-date. That’s where a directory service comes into play. The Open 79xx XML Directory looks useful but it’s another application to install and manage on my infrastructure. I already have a directory (Microsoft Active Directory), so I thought it would be great if a piece of code could query the AD and output the file in a format that the 7940 understands.

Luckily I found such a piece of code, courtesy of a message posted to the Asterisk Users forum back in 2004 by Jeff Gustafson:

<?php
$ds=ldap_connect("ldapserver");  // must be a valid LDAP server!

if ($ds) {
  $r=ldap_bind($ds);  // this is an "anonymous" bind, typically read-only access

  $sr=ldap_search($ds, "ou=People,dc=domainname,dc=com",
"telephoneNumber=*");
  echo "<CiscoIPPhoneDirectory>\n";
  echo "<Title>IP Telephony Directory</Title>\n";
  echo "<Prompt>People reachable via VoIP</Prompt>\n";

  $info = ldap_get_entries($ds, $sr);

  for ($i=0; $i<$info["count"]; $i++) {
    echo "<DirectoryEntry>\n";
    echo "<Name>" . $info[$i]["cn"][0] . "</Name>\n";
    echo "<Telephone>" . $info[$i]["telephonenumber"][0] .
"</Telephone>\n";
    echo "</DirectoryEntry>\n";
  }

  echo "</CiscoIPPhoneDirectory>";
  ldap_close($ds);

} else {
  echo "error";
}
?>

Jeff’s code is great (my PHP skills are certainly not good enough to have written this myself) but Active Directory has an attribute for IP phone numbers (ipPhone), so I made a couple of edits to change the phone prompts and to make the LDAP query search on the ipPhone attribute:

<?php
$ds=ldap_connect("domaincontroller.domainname.tld");  // must be a valid LDAP server!

if ($ds) {
  $r=ldap_bind($ds); // this is an "anonymous" bind, typically read-only access

  $sr=ldap_search($ds, "ou=directorycontainer,dc=domainname,dc=tld",
"ipphone=*");
  echo "<CiscoIPPhoneDirectory>\n";
  echo "<Title>IP Telephony Directory</Title>\n";
  echo "<Prompt>Active Directory Users</Prompt>\n";

  $info = ldap_get_entries($ds, $sr);

  for ($i=0; $i<$info["count"]; $i++) {
    echo "<DirectoryEntry>\n";
    echo "<Name>" . $info[$i]["displayname"][0] . "</Name>\n";
    echo "<Telephone>" . $info[$i]["ipphone"][0] .
"</Telephone>\n";
    echo "</DirectoryEntry>\n";
  }

  echo "</CiscoIPPhoneDirectory>";
  ldap_close($ds);

} else {
  echo "error";
}
?>

I still needed a couple of tweaks to get this working though – not to the script, just to: the webserver I used to serve it; to Active Directory; and finally to the phone configuration.

First up, you need a web server with PHP installed (I used PHP 5.2.6 on IIS 6.0). This also needs the LDAP extension to be enabled by uncommenting extension=php_ldap.dll in php.ini. The extensions folder (e.g. C:\phpinstallationfolder\extensionfolder) also needs to be appended to the %path% system variable.

The script is actually for a generic LDAP directory (nothing wrong with that) but recent versions of Active Directory do not allow anonymous access by default. Daniel Petri has a detailed article on anonymous LDAP operations in Windows 2003 AD and that gave me the information that I needed to open up the parts of the directory that I wanted the script to read – basically: setting the 7th bit of the dsHeuristics flag on CN=Directory Service,CN=Windows NT,CN=Services,DC=domainname,DC=tld to 2 on the forest root domain; waiting for replication to complete; granting ANONYMOUS LOGON read access on the appropriate objects and List Contents access on the OU that contains the object(s). Alternatively, it should be possible to edit the script to use an authenticated logon (and sorting by surname wouldn’t go amiss either) but it’s getting late now and that will have to wait for another day! In the meantime, Geoff Jacobs’ post on creating a personal directory for the Linksys SPA942 using LDAP should provide some inspiration.

Last, but by no means least, the directory_url directive needs to be edited to reflect the name of the PHP script instead of the original static XML, for example:

directory_url: ”http://webserver/directory.php”

In order to pick up the changes, the phone will need a reset.

Now, when I access the external directory from the phone using the directory button and option 5, I’m presented with a list of contacts from Active Directory. Furthermore, because the web server uses dynamic content, the details are as current as the directory server that it refers to.

Installing PHP 5 on IIS 6

This content is 17 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

I’ve run PHP with Microsoft Internet Information Services (IIS) before (running on a Windows XP laptop) and I seem to remember the installation being quite straightforward. Even so, tonight I was installing PHP 5.2.6 with IIS 6 (on Windows Server 2003 R2 Enterprise x64 Edition) and I ran across a few issues. This post describes what was involved:

  • Firstly, PHP can be installed in CGI, FastCGI or ISAPI mode. I used ISAPI.
  • Secondly, there is anecdotal evidence that the Windows Installer version is problematic – for that reason you may prefer to use the ZIP file and perform a manual installation (as I did), following the instructions on the IIS Admin blog, which were:
    • Extract the files to a location of your choice (I used C:\PHP to keep it simple but C:\Program Files (x86)\PHP would be better).
    • Rename php.ini-recommended to php.ini.
    • Edit the extension_dir line in php.ini to read extension_dir = C:\phpinstallationfolder\ext.
    • Add the PHP installation folder to the %path% system variable (e.g. append ;C:\PHP to the existing path).
    • Create a web service extension for PHP using cscript iisext.vbs /AddFile c:\phpinstallationfolder\php5isapi.dll 1 PHPISAPI 1 “PHP ISAPI”. The new extension should show in IIS Manager with a status of Allowed.
    • Create an application extension mapping for .php files. Following the advice on the IIS Admin blog article that I referenced previously will remove all other mappings so I used the IIS Manager MMC instead (Default Web Site Properties, Home Directory, Configuration to add a mapping to the executable at c:\phpinstallationfolder\php5isapi.dll using extension .php for all verbs).
    • Create a test file called phpinfo.php containing <?php phpinfo(); ?>.
    • Use a web browser to navigate to http://servername/phpinfo.php and the PHP information page should be displayed.
    • If you are running on 64-bit Windows there are some extra steps in order to avoid an HTTP 500 Internal server error or the message %1 is not a valid Win32 application. It seems that this is caused by trying to load a 32-bit application (in this case PHP) inside a 64-bit worker process (as described in Microsoft knowledge base article 895976). To resolve this issue, enter cscript adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 1. adsutil.vbs is one of the scripts installed into the wwwroot\AdminScripts folder but if you have removed it to secure the server (as I had), then it may be temporarily copied back to the server from another IIS installation.
    • To ensure that PHPinfo reflects the correct location of the php.ini file, create an environment variable called PHPRC referring to c:\phpinstallationfolder and restart the server or, alternatively, set the appropriate registry keys (although neither option seemed to have any effect for me).

Microsoft virtualisation news

This content is 17 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

Some time back, there was talk of System Center Virtual Machine Manager 2008 (then called SCVMM vNext) shipping within 90 days of Hyper-V. This link was later denied, or at least downplayed (depending upon who you spoke to at Microsoft) but it seems that SCVMM 2008 is expected to ship in September… that’s ooh… about 90 days after Hyper-V. Of course, speculating on product release dates is always a risky business, but Rakesh Malhotra should know (he runs the SCVMM program management team).

On a related note, he also explains why SCVMM requires virtual center in order to integrate with VMware ESX (a question I asked a few days back after the release of the VMware Infrastructure Toolkit for Windows v1.0 (PowerShell cmdlets for VI).

Last, but not least, a Microsoft Virtualization User Group has been formed and have an inaugural meeting planned at Microsoft’s London (Victoria) offices on 24 September.

Using BITS to manage file distribution

This content is 17 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

Microsoft’s Background Intelligent Transfer Service (BITS) has been around since Windows 2000 SP3 and provides a “firewall-friendly” means of transferring files across the network which also allows for restarts. It’s also the file transfer mechanism used for Windows updates (but is not exclusively used for Microsoft products) and is now at version 3.0 (included with Windows Vista and Windows Server 2008).

A few weeks back, I was discussing the problem of rebuilding remote servers with some colleagues. We considered that it may be advantageous to keep a copy of the build image locally (e.g. on a branch office server) but image management (making sure that the locally cached image is the latest version) is an important concern. One of my colleagues asked if BITS could be used to control the distribution of the image files (which could be expected to be around 2GB) so I decided to dig a little further. The short answer is “yes”, but there are some things to be aware of:

Microsoft provides a command line tool called BITSAdmin (bitsadmin.exe) for monitoring the progress of BITS jobs. BITSAdmin is available as a support tool for Windows XP SP2 and Windows Server 2003 but is included with Windows Vista and Windows Server 2008. James Finnigan has a good post introducing the concept of transferring files using BITS; Aaron Czechowski has another BITSAdmin script; Frank-Peter Schultze has a good post on scripting downloads with BITS; or refer to the full BITSAdmin syntax and examples for further details.

Various third party wrappers also exist, including:

I haven’t seen a PowerShell wrapper for BITS yet but I have used Alexander Sukhovey’s BGet command (batch) file to initiate and manage BITS file transfers.

If BITS is not appropriate, those with plenty of bandwidth might consider RoboCopy (I have used it in the past to synchronise folders across the network) but, for me, Mads Klinkby’s BITSync looks perfect – unfortunately the download link was unavailable at the time of writing this post.

Adobe Photoshop CS3 from a photographer’s perspective

This content is 17 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

Photography has been one of my hobbies for almost 30 years now and for the last four years I’ve been exclusively shooting in digital format but I’m still struggling to work out a decent workflow. Adobe Photoshop CS3 box shotSo, last Friday I took the day off work to attend a short course introducing key features of Adobe Photoshop and Lightroom (provided by my local Adult Education service and presented by David Tunnicliffe) and, at £36 for 6 hours of tuition, it was a bargain. I learnt a lot – and some people might find what follows to be a little obvious – but I’m hopething that for others it might be as useful as it was for me.

Adobe Photoshop CS3 is just one product from the Adobe Creative Suite, providing many more features than most photographers will need as it is designed for the graphics art industry in general. Even so, Photoshop CS3 includes some additional components that may be very useful for a photographer:

  • Introduced with CS2, Adobe Bridge literally bridges the gap between a file browser and the various applications in the Creative Suite, providing digital asset management functionality for organising, previewing and editing images.
  • Frequently updated for new proprietary raw formats, Adobe Camera Raw (ACR) provides the tools to open and edit raw image data from a digital camera. In addition to this, it can also work with JPEG and TIFF files to provide basic editing functionality without Photoshop.

In addition to the CS3 components above, there are two more products that may be of interest:

  • DNG is Adobe’s non-proprietary and royalty-free Digital Negative format which is intended to provide a solution for archival of digital images and has now been embraced by many camera manufacturers – the notable exceptions being Canon and Nikon. I don’t fancy my chances of being able to open .NEF images from my Nikon D70 in 30 years time but I’ll stand a better chance if I convert them to .DNG and Adobe provides a free DNG converter for Windows and Macintosh users.
  • Adobe Photoshop Lightroom 2 125x125Adobe Photoshop Lightroom is a product designed by photographers, for photographers using separate library, develop, slideshow, print and web views and including the ability to import (including creating folders), catalogue (with keywords) and backup in one action.

For me, Bridge was a revelation – I use my Mac for photography (so Windows utilities were no good to me) but I’ve always found Apple iPhoto a little too simplistic. It turns out that Bridge (together with ACR) is exactly what I needed to organise my images, open them in ACR (and optionally Photoshop) to perform non-destructive edits, with the changes (and associated metadata) stored in Sidecar (.XMP) files alongside the original image (avoiding the need to maintain multiple copies of images). In addition, now that I’m using Bridge I can drop a couple of utilities that I had previously relied on:

Previously, I’d struggled to get to grips with ACR (in fact, episode 40 of This Week in Photography featured a question from me asking for some guidance) but, armed with the knowledge I gained on the course and Adobe’s understanding Adobe Photoshop Camera Raw 4 white paper, I now understand that ACR is more than just a converter and it’s often all that’s required to make many adjustments to images (the exposure control in ACR let me recover an image that had been three stops underexposed) – and that it can handle JPEG and TIFF files too.

Adobe Camera Raw 4.0

As for Lightroom, David Tunnicliffe was very keen on the product (not surprising as he took part in its development) but, whilst I can see that its potentially useful for a professional photographer and that the ability to import, catalogue and backup images in one go would make a huge improvement to my workflow, I’m still not totally convinced by the interface. Maybe I’ll change my mind at version 3!

Adobe Photoshop Elements 7 125x125For those who don’t want to spend the money on Photoshop CS3 (it is very expensive if you’re not going to use it to it’s full potential) and who can manage without Bridge (which is only sold as part of Photoshop), Photoshop Elements (for Windows or Macintosh) includes enough functionality for many photographers, although some elements are hidden from the interface (find out more about the hidden elements at Richard Lynch’s site). Also, expect to see Photoshop Express become more and more useful over time. Meanwhile, ACR and the DNG converter are free downloads so they are available to Elements users too.

For me, I’m pretty sure that my new digital photography workflow will be built around Bridge and ACR and I expect to be writing some more photography-related posts as that workflow starts to come together.

Upgrading Hyper-V (pre-release to RTM)

This content is 17 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

A few nights ago, I finally got around to upgrading my own Hyper-V installation from release candidate 1 to the RTM version. I’d already updated the notebook PC that I use for work but I’d forgotten about the server at home – it was working well (and if it ain’t broke…). What follows explains the process for upgrading a server that is already running a pre-release version of Hyper-V to the RTM code:

  1. On the parent partition, run the 64-bit version of Microsoft update 950050. This will update the Hyper-V components and will require a restart. After the restart, the version of Hyper-V Manager should be 6.0.6001.18016.
    About dialog from RTM Version of Hyper-V Manager
  2. On each virtual machine, upgrade the integration components ICs – also known as integration services). To do this:
    • Connect to a VM using the Virtual Machine Connection (VMC) tool and log on.
    • Cancel the Found New Hardware Wizard and select Insert Integration Services Setup Disk from the Action menu in the VMC tool.
    • A previous version of the Hyper-V integration services should be detected. Click OK to upgrade.
      Upgrade prompt for Hyper-V integration services
    • When the integration services have been upgraded, restart the virtual machine.
    • Following the restart, there should be no new hardware detected and all synthetic devices (e.g. the Microsoft Virtual Machine Bus Network Adapter) should be at version 6.0.6001.18016.
      Device driver dialog for RTM Version of a Hyper-V synthetic device

The process is time consuming and it does involve restarting every computer in the virtualised infrastructure, which should not be surprising as it also involves some pretty deep changes in the operating system (this upgrade is also from a pre-release version of Hyper-V, which implies it’s not running a production workload).

Customising a Cisco 79xx IP Phone: Ringtones

This content is 17 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

In my recent post on configuring a Cisco IP phone for VoIP using SIP, the RINGLIST.DAT file pointed to a file called CTU.raw – a custom ringtone for my phone. I hadn’t realised at the time but CTU is something to do with the TV series “24” and had been passed over to me with the rest of the configuration files that I used for reference. If you want to generate your own ringtones it’s quite simple but beware – there is not room for anything more than a few seconds.

I followed Jozef Janitor’s advice to create a custom ringtone, using the SoX Wrap to generate a .RAW file from an .MP3 on my Mac (I can handle the command line but SoX Wrap is also an easy way to get sox into Mac OS X). If you don’t use a Mac then Leigh Harrison offers some alternatives in his blog post on the subject and Josef’s advice suggests some others. Unfortunately though, even after truncated the file to 16KB using dd it was too long and when I tried to select it the phone displayed Custom Ring Unavailable!. Chopping it down to 15 bytes seemed to work but that left a very short clip indeed (about 2 seconds).

If you’re after a good source of pre-recorded tones, then try The Caretakers’ Website or here. I found that, including the two built-in tones, my 7940 only offered a choice of 50 tones.

Incidentally, RINGLIST.DAT is one supported file format but you can also use an XML file (as described in the Cisco Call Manager documentation for custom phone rings).

If your IP phone is in a work environment, the chances are that the administrators won’t let you add your ring tones to the system. Logan Ingalls found a workaround by using his own TFTP server but I have to warn you that they probably won’t like that either!

Useful links: July 2008

This content is 17 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

Not all of the stuff I stumble across on the Internet makes it into my blog posts so, here’s a list of items I’ve come across this month that I found potentially useful, interesting, or just plain funny:

This Modern Life (original artist unknown)