Alex's blog

Alex's blog

Alex Pearson  //  runner, freelancer, techie

http://twitter.com/what_ho

Feb 19 / 7:04am

A pure ADSL modem

An ADSL connection holds frames of data in a point-to-point protocol like PPPoA. A pure ADSL modem converts back and forth between PPPoA frames conveyed over the analogue tones of ADSL and the same frames of data conveyed over an ethernet cable. Other than the transmission medium changing the frame data is left untouched. Old school dial-up modems operated much the same way.

Almost all ADSL modems however do more than just forward raw data, they are also a router. By analogy they act like a postal sorting office. PPPoA frames get unbundled and the internet packets within examined, then forwarded to the appropriate computer or device on the home network matching the address on the packet. When an ADSL modem holds username/password login details for the ISP account, that's the sure-fire sign it is acting as a router.  

There are scenarios however where you want a modem to just pass on PPPoA frames untouched. I had such a need where I already had a device entrusted with performing all my home network needs - an Airport Extreme basestation. I didn't want a modem to duplicate this functionality.

My previous setup was a kludge - I had an ADSL router providing a home network but to just one device - my Airport Extreme. The Airport then provided my actual home network to everything else. All my traffic was therefore going through two networks which was unnecessary. 

So I got myself a pure ADSL2+ modem, a DrayTek Vigor 120: 

Img_20110219_121023

(the tiny Vigor 120 sitting on top of my Airport Extreme basestation) 

This just outputs raw PPPoA frames over ethernet. If I connect this modem to my laptop for example, in Windows I can configure a dial-up networking connection, type in my ISP login details and then connect to the internet. There is no router my computer is hiding behind; my computer is the single device assigned the public IP address my ISP gives me.  

To provide a home network I connect the Airport basestation in the same way. An ethernet cable connects the modem to the WAN port of the Airport. The Airport configuration holds the ISP login details, the Airport does its own dial-up networking and logs into my ISP, so the Airport becomes the device exposed on the internet with an external IP address. The Airport then separately provides a home network over wifi and ethernet and shares that internet connection with this network.       

Setting up the Vigor 120 with the Airport Extreme 

This was pretty much just entering my ISP login details in the Airport utility software, connecting an ethernet cable from the modem to the WAN port of the Airport, and that was it. 

One issue was out of the box the modem does provide a DHCP server used just to access the modem admin webpage. This caused a conflict with the Airport, which refused to act as a DHCP server itself because it could see this other DHCP server on the WAN port. As soon as I disabled the modem DHCP server, the Airport was then happy to be a DHCP server for my internal network. 

My internal network is on the 10.0.1.x to 10.0.1.200 address range. I set the static address of the modem to 10.0.1.201. When the internet connection is active the Airport is expecting only PPPoA frames over the ethernet cable from the modem and does not expect any other kind of network traffic, so the admin webpage is inaccessible. To work around this I temporarily unplug the ethernet cable from the WAN port and plug it into any of the 4 ethernet ports on the Airport instead. The router can then be accessed from the home network on any web browser by browsing to 10.0.1.201. Once I finish configuring, I plug the cable back into the WAN port and the internet comes back up pretty much immediately.   

Other ADSL only modems 

The Vigor 120 is the only one I'm aware of that is just a modem and not a router. However you can configure some other routers and switch them to 'PPPoA bridging mode' or some equivalent phrase, which disables all the router functionality and gets the router to act as a pure modem. If you use another device to provide your home network and that device supports a PPPoA input I can recommend setting things up in this manner. Avoid setting up multiple TCP/IP home networks just to chain devices together.   

Feb 13 / 4:00am

Looking for search

Google1999
(original google homepage, 1999)

Interesting take from Techcrunch on 'Search Still Sucks', search getting worse over the years, being swamped by SEO spam diluting the quality of results. 

I agree with the sentiments in the article, it does feel like quality search results are harder to come by these days. For example in the NY Times article on the JC Penney takedown, they cite one case where across 2015 other webpages hyperlinks were placed back to JC Penney for phrases like 'casual dresses', 'evening dresses' etc. The sites these links were placed on were low page-ranking spammy, sham websites, not authorities on anything related to clothing or dresses. But apparently 2000-odd links from insignificant sites was enough to overcome their insignificance, and all the links combined had enough clout to gain JC Penney the top search spot for those search terms. Google have struck them down now, but I can easily see if 2000 links will get you top search results, that's not an impossible feat to achieve and people therefore try to game the system all the time. Think of how many websites are out there, how many people will try this on, and it's easy to see how the internet can just turn into a sea of spam, its hard for any search engine to make sense of it all and pluck out results we care about in a fair order. 

I think search engines can do a lot better, and they are probably going to. There is a lot of room for improvement here, they have not reached any limits of what is technically or logistically possible. Just in the JC Penney case, if we as humans visited any of those 2000-odd sites linking back we would have dismissed them as spammy and not given the links any credence. There must be more that search engines can do to dismiss link-spam in the same way without having to be alerted to it by whistleblowers. 

Google must know their deficiencies in search, they will be working internally very hard on the problem of link spam right now, and I'm expecting to see marked improvements in the quality of their search results over time. Think of the visible engineering effort going into Android : Search is still their core business, so behind the scenes there must be at least the Android-level of effort if not more going into search. 

My theory is this is a key motivation behind Google calling Microsoft out on copying from Google search results. If Google are going to be changing their search algorithms any time soon to filter out spammy link building and provide a step change in the quality of results, they don't want Bing copying Google results and being taken along for the ride. Google want clear headway between their search results and those of other search engines so they have something to shout about and they can say 'look at us - we're better'. I speculate this is the reason for putting the spotlight on Bing. 

Filed under  //  bing   google   search engines   seo  
Feb 12 / 7:51am

Mobile Obsolescence

Gran_torino

(Gran Turino classic car, creative commons photo thanks to Danny McL)

The best consumer products are looked after and tended to long after the manufacturer stops selling it. Hence we see classic cars still out on the road or lovingly protected in a garage / shrine. Where manufacturers encourage this, providing spare parts and supporting owners clubs, one could argue that has a positive effect on their brand.

The mobile phone industry traditionally has never had this. Phones have about a 2 year lifespan, at that point manufacturers do all they can to cajole you to throw the phone out and buy their latest phone models. They do not encourage enthusiast modification ('modding') communities, they do not want people tinkering with phones and adding new software features beyond the limited trickle of manufacturer updates. For both hardware and software, mobile manufacturers are very strongly of the view 'No User Servicable Parts Inside' 

Consumers would not buy a car where the hood / bonnet is padlocked and can only be unlocked and serviced by a manufacturer-authorised service garage. It suprises me that consumers are therefore apparently okay with manufacturers doing exactly this with mobile phones. 

Whether the phone OS is user-updatable or not is a feature, a feature consumers can make purchasing decisions on. I think people need to be better educated about this issue so they can make an informed choice when choosing a phone. Being able to update a phone yourself and not be beholden to manufacture updates is a key issue that effects the longevity of the device. 

Most smartphones these days have an app store and can run applications users choose. Some apps can extend core phone features, but mostly apps are for games, content and productivity. By referring to software updates I'm not talking about apps, but about the core software on the phone itself - the OS. Improvements made to an OS can make it run faster, fix bugs, give better battery life, and provide new core phone features beyond that which a phone app could provide. If manufacturers stop providing software updates, I think we have a right to go into our own phones and make updates for ourselves. 

With the Nokia / Microsoft partnership announced this week it became clear continued Symbian OS development is stopping. It gave the feeling that the current line of Nokia phones like the flagship E7 were going to become obselete. My point is: These phones were always going to become obselete, as is the case with many other phones on sale from other manufacturers and carriers. I don't think the product lifecycle of any of the Nokia Symbian phones has changed as a result of the partnership announcement. If consumers now have second thoughts buying from the remaining Nokia Symbian range, they should be having the same second thoughts about every locked device on the market - these all suffer the same obselence fate, it's just the manufacturers and carriers in those cases have not signalled that obselence up front.   

There are some phones on the market where you can indeed modify the OS like the HTC Dream, HTC Nexus One, and Samsung Nexus S. There are many other phone models where the OS offically cannot be customised, but the enthusiast community has figured out workarounds to provide custom updates anyway. While it is good such updates are available, it is also unfortunate since it removes consumer pressure on manufacturers to provide officially updatable devices. Consumers should not have to pick the locks on their own possessions. 

I hope more phones will be shipped in future where we as consumers can officially update, tinker with and look after our phone, they are not black boxes where only the manufacturer and carrier has access. This is the 'classic car' world view applied to the mobile phone industry. I think consumers would look favourably on brands if they did this, and I don't think it would cut into future sales. If anything as a brand differentiator I think it helps drive future sales. I would argue a part of the success of HTC these past few years have been the bets they have taken on the Android platform which have paid off, in particular providing some fully-unlocked, user-updatable devices. 

Filed under  //  android   mobile   nokia   symbian  
Feb 4 / 4:15pm

How to disable T-Mobile UK mobile broadband image compression

T-Mobile by default intercepts images in webpages accessed using their mobile network, and recompresses the images to take up less data.

Pros:

  • For T-mobile this keeps down overall network congestion.
  • For the consumer they can browse more within download quotas.
  • For the slowest GPRS connections the smaller page size will mean pages will load faster. 

Cons:

  • Image quality noticably poorer.
  • For faster mobile broadband connections the delay introduced by image recompression may cause the webpage to take longer to download than just letting the original images load.
  • Html pages get forcably modified, a reference to a javascript file called bmi.js* is injected into every page.
  • Once the poor quality images are in the browser cache they stay there. Even if you switch away from mobile broadband to a different internet connection you'll still see the low quality images when returning to those webpages until you clear the browser cache. 

I've recently discovered the easy way to turn off the image proxy entirely. Just go to accelerator.t-mobile.co.uk from the mobile browsing session and change the settings to "Lower speed = original image quality".

T-Mobile mark the original image setting as 'not recommended'. I disagree, in most cases I would rather have the original webpage as intended, even if it takes a little longer to load. If I am browsing within restrictive data quotas or at low data rates better options would be to just turn off all image display, or switch to browsing via Opera Mini which can compress everything on the page for maximum efficiency, not just image content.     

The sure-fire way to turn off image proxys from mobile providers other than T-Mobile is to add the cache-control:no-transform HTTP header to all page requests. Whether you can achieve this is dependant on the web browser you are using. I provided a little more info in a previous blog post.     

(*bmi.js enumerates through all images in the webpage and gives the user a keyboard shortcut to display the original, unrecompressed image. When an uncompressed image is requested, the image is loaded again from the source url, but this time 'bmi_orig_img=1' appended on the querystring at the end of the image url. This signals to the T-Mobile image proxy servers to not touch the image)

 

Jan 22 / 4:22am

No disc left behind

I have been downsizing my stacks of old CD and DVD backups to modern external hard disks. It looks like a whole boxful of backups will fit on one tiny disk. 

I've noticed both Mac OS X and Windows 7 are particularly inefficient when it comes to copying a whole CD or DVD. What I see happening is a file-by-file copy, with the optical drive head assembly darting around the surface for each file. Depending on how scattered files are over the disc this movement can add minutes to the copying process. There is no built-in logic that goes 'well the user has asked for the whole CD here, so lets minimise read head movement and just do one sweep across the disc, picking up files in the order in which they were recorded'. 

So instead I manually forced this logic to occur as follows: 
  • Make a image file of the disc
  • Mount the image as a virtual disc 
  • Copy the virtual disc contents to my backup drive 
On Windows I used ImgBurn to make a virtual .iso image file, and WinRar to access the .iso contents and copy to my backup drive

On Mac OS X I used the built in Disk Utility to create a read/writable .dmg image file (just in case I wanted to edit the contents), mounted the .dmg file as a virtual drive, and then used the regular Mac finder to copy files from the virtual drive folders to my backup. 

On both Windows and Mac this arrangement is far faster. I did not time with a stopwatch but it cut down copying from sometimes an estimated 14-16 minutes per disc to a few minutes per disc.       

There are other considerations in downsizing my backup collection. One is the 'all eggs in one basket' issue that once all files are on one tiny hard drive, that is just one drive to get lost, damaged or stolen and then I have lost everything. I'm taking redundancy precautions against this to make several copies on different small hard drives, stored at different locations, and to keep my most important files backed up in the internet cloud. 

More than anything this exercise has really highlighted the end of optical media to me now. I look at floppy discs, audio tapes as quaint historical throwbacks that it would be a hassle to even contemplate using today. CDs and DVDs are in the same boat now. I don't see myself ever buying a blank CD or DVD again, all the use cases have been supplanted by using hard disks and / or data streamed across the network.
Jan 20 / 2:48am

Nintendo 3DS region-locked

The new Nintendo 3DS handheld console will be fully region-locked to 3 regions, Japan, USA, Europe/Australia. Wherever you purchase the hardware, you have to buy games from the same region. I read web commentary speculating this will only affect the import market. Not so! 

This affects me directly, since I have always kept an eye out for the latest Nintendo DS games when travelling abroad. I buy games while abroad and then play them on my DS when on public transport and moments of downtime on my travels. If I look at my DS games collection most of my games cartridges have been impulse purchases made while travelling. 

This would all stop with the 3DS. If I head out to the states with a European 3DS in my luggage I have to take any UK games I want to play with me - nothing from the states will work. Although not yet specified, I doubt whether I would be able to participate in any multiplayer games - would a European 3DS with European games carts be allowed to participate in an American 3DS multiplayer game with American games carts? Would DS download play be allowed? (So just one player has the games cartridge and transmits the game to the other players).

Until I hear of some stellar 3DS titles not available anywhere else I might just stick with my region-free Nintendo DS for now. 

Jan 6 / 4:53am

Android Honeycomb vs Chrome OS

The Honeycomb version of Android provides:

  • a comprehensive web browser
  • runs html5 offline apps
  • runs Android apps
  • touch-screen support 

The Chrome OS netbook provides:

  • a comprehensive web browser
  • runs html5 offline apps
  • runs native code apps 
  • a hardware keyboard
  • no touch-screen  

I don't know if I am missing something but I would rather have a device with a web browser + Android App support, as opposed to just a web browser.

Native code app support is a differentiator, but such apps are thin on the ground at present, Google would have to rally developer troops to get community support going. And it is technically feasible for Google to provide native code support to the Android webkit browser too if they wanted.

So I really like the concept of the Chrome OS notebook, but basically it is a subset of what Android Honeycomb is already capable of. For portable devices where we care about packing as many useful features as possible into a small form factor, I think most consumers would like a device to do more things, not less.

I am sure Google are aware of these issues themselves - for one thing Android Honeycomb is destined for upcoming shipping products, whereas Chrome OS notebooks are strictly on a pilot programme only, no word of production devices. But even as just as an r&d project if the Chrome OS notebook can raise the profile of html5 web apps, encourage consumers to make use of such apps and developers to write them, that will be a very good thing. 

There has traditionally been a discrepancy between the UI experience achievable with a native app, and the experience afforded by an html5 app. For various reasons the html5 app experience is often not as good, or developers have to work harder to get the experience up to native app levels. Working on Chrome OS has forced Google engineers to tackle the issue and ask 'what is lacking from html5 apps?' and provide solutions for this. There would have been no incentive to fix deficiencies in the web browser if there had not been a push to build something like Chrome OS. Evem if the notebook never sees the light of day, we will all still benefit from the browser improvements that will filter into other Google tech.      

Here are two videos to the Android Honeycomb preview, and to the Chrome OS notebook:

Dec 8 / 7:56am

ZTE Blade / Orange San Francisco Android phone

On paper the ZTE Blade Android phone sounds good. But there are 3 major problems with the Wifi connectivity on this device. The problems are severe enough in my opinion to downgrade this from a great phone to being one to avoid.  

Img_20101208_142508

The ZTE Blade (a.k.a Orange San Francisco) 

Here are the phone specs: OLED 480x800 screen, 512MB Ram, 600Mhz CPU, Android 2.1 OS, AGPS, FM Radio, 3.2MP camera, Bluetooth, Wifi, 3G .

For the price it is the best equipped phone out there at the time of writing. With the Orange 15% Sale at present this phone is £84 + a required £10 sim card top-up. Here are favourable reviews from Android Police and Paul O'Brien at MoDaCo.

 

So this could be a great phone. Except, there are the wifi problems. Here are the 3 big issues: 

- Faulty wifi reception on some handsets 

This is just the luck of the draw whether you pick up such a handset. Wifi will work but you will have poor reception. Access points where my Nexus One phone would have 'excellent' or 'good' reception, my ZTE Blade in the same location would claim 'poor' reception or not be able to see the access point at all.

The problem was bad enough that the ZTE Blade would not be able to connect to an access point in an adjacent room, when every other wifi device in the house could connect fine.  

Through Orange customer services I've had my handset replaced and wifi reception is indeed better. More discussion on MoDaCo from other people with the same issue here

While it is good that a replacement has fixed the issue, it is bad this was not picked up by quality control before such phones ever got into the retail chain. 

- Wifi conflicts with specific routers

If you are unfortunate enough to own one of a number of specific routers like the Netgear DG834G, when the ZTE Blade phone comes out of sleep mode and tries to reconnect to wifi, it will fail to connect and will never reconnect again until the router is rebooted. This is a router specific issue - for other routers (like the Apple Airport Extreme or Airport Express) this does not happen.

- Wifi fails to reconnect after coming out of sleep 

Even if you dodge the above two issues, the following one will trip you up. After unlocking the phone screen and it comes out of sleep mode, on occasion the wifi will fail to reconnect. You have to manually go and select the access point under your wifi settings.

The workaround here is to install the helper utility 'Wifi Blade Fix' from the Android market, which automatically retries to connect the wifi if it does not reconnect by itself. 

Froyo Compatibility

For the modding community be aware that while there are Froyo Android 2.2 firmwares knocking around, all of them are based on two unreleased beta ZTE Blade Froyo builds, and all these builds to date suffer a common problem of the screen occasionally locking when you bring the phone out of sleep - you just stay stuck on the lockscreen, pulling the battery and rebooting is the only fix.

For me this screen freeze issue means none of the Froyo builds are stable enough for everyday use yet, but if this can be fixed then Froyo does run really well on this phone hardware. (The same wifi issues are present on Froyo as well unfortunately) 

 

 

 

Nov 3 / 5:26am

Javascript - checking for non-zero value in array

I came up with the following code to check for non-zero values in a javascript array of numbers as fast as possible:

var arr = [0,0,1,0,0];
var nonZeroFound = (new Number(arr.join('')) != 0);

Pleased with the result. I think this should work for arbitrarily large arrays and arrays that contain elements other than numbers. The Number constructor may return Infinity or NaN for these cases, but crucially it will only evaluate to 0 if all elements have the number or string 0 which is what I want.

If array elements could possibly hold float strings like 0.0 then the variation (new Number(arr.join(‘’).replace(‘.’,‘’) != 0) should be used to remove all decimal points before evaluating the array contents against zero.

Sep 19 / 8:17am

PS3 security / pricing fail

I forgot my password for my Playstation 3 account. I went through the forgotten password procedure, which lets you reset the password by retyping in the secret phrase.  

"Enter your secret phrase" the playstation asks. I press one key and bam! the whole-phrase auto-completes, saved from when I originally entered the secret phrase. Whoops Sony. That is not very secure or secret. 

(simple fix: The secret phrase text entry screen should not add this phrase to the auto-complete dictionary)

I guess if I used the PS3 a lot there would be more saved auto-complete words so my secret phrase might not stick out like a sore thumb, but in the general case I think most people would be able to reset any PS3 password by just cycling through the on-screen keyboard alphabet and looking for an obvious secret phrase.


I haven't browsed through the Playstation store for a while, but the going rate appears to be:

  • £4.50 for a hi-def movie rental
  • Retail games appearing for digital download at full retail price

Now hold on a cotton-picking second, for games and movies sold in a bricks-and-mortar retail store there are costs before Sony sees any profit:

  • the retailer takes their percentage
  • stock costs
  • shipping
  • duplication
  • printing
  • manufacturing
  • marketing / PR 

After all this is accounted for Sony make a profit

For a digital download the costs are different

  • server hosting
  • online store website development
  • marketing / PR

But crucially there is nothing physical, just digital bits shipped to the customer, and no retailer taking any cut. Therefore Sony makes more profit with digital downloads.  

So does Sony comparatively reduce the price of digital downloads? No, from the evidence I saw they have elected to take all that extra profit. 

Businesses are there to make a profit, but I as a consumer can choose where to take my custom, and I can tell you Sony are not getting my custom with price structuring like that. 

Amazon have started to get my custom for digital downloads of eBooks. The downside is no resale or lending rights for the Kindle eBooks I buy. However a lot of the more popular books are around the £2-£4 price point at present, at that price I have put moral objections to one side to purchase a few and I've enjoyed reading them from my phone screen on the morning commute. The device restrictions are also not too bad - I can view an eBook on most of the different computers and phones I have. 

So while not being happy with Amazon's eBook restrictions, we all have a price to put aside our objections, and Amazon have found that price point for me.

Sony have not found that sweet spot yet, they are attempting to flog full-price digital downloads with maximum playback restrictions.. no thanks. It needs to be cheaper, and I want an expanded range of allowed playback devices before I consider buying movies as a digital download instead of buying DVDs and Blu-Ray. Otherwise my PS3 is just going to gather dust in the corner.