Potty Page

March 4, 2012

Possible solution to very slow iPod touch syncing (maybe iPhone too)

It's been a while since I've posted here. But one of my New Year's resolutions was to consider to start blogging again... so here's an attempt

A few weeks ago I bought myself a shiny 5G iPod Touch.

I had it delivered to work and within seconds of opening it up I was already surfing the web, syncing my purchases and allsorts to it via the wifi! Amazing, I thought, "OMG, the hype was right". When I came home I plugged it into my PC to sync all of my stuff. Disaster. It took about a minute per song to transfer. "Come back USB1, all is forgiven", I thought to myself.

After managing to convince it to do wifi syncing I soon found that this was about 3 times quicker - but still too slow! Rubbish. So... what could it be. Well, I was using my old iPod cable... so maybe it was that... so I swapped leads with the new one... no joy.

Somewhere along the lines, I plugged my mobile phone into the computer to charge (Sony Ericsson Elm, if you're wondering). Lo and behold, the transfer started zipping along at a rate I'd become accustomed to with my old iPod.

I thought to myself, "what the ...?"

After much debugging I realised that the transfer only went quickly when the "Sony Ericsson Device 1039 USB Ethernet Emulation (NDIS 5)" driver was enabled. That is, if I disabled that, the upload to my iPod would go slow... and as soon as I re-enabled it, it would go fast. I was like some sort of inverse device conflict!

So, I'd got a solution, albeit rubbish (my actual solution is still pretty pants to be fair). All I needed to do is make sure my phone was plugged in at the same time as my iPod. This clearly isn't that satisfactorily... so... I wondered if it was just that network driver it was after... or another (bearing in mind I'm well and truly in the 90s and have a wired LAN card in this PC!). So, I dug around and came across a USB wifi dongle thingy. I've plugged this in the back of the PC and just dumped it behind there. It's not connected to a network or anything. It's just plugged in. Sure enough... the iPod syncs at proper speeds!

I have no real idea why this works. I have spotted that when you do a sync to the iPod and look at "Resource Monitor" there's some pretty fast 'Network I/O' going on that's on a network device that's not listed - not sure if it's on the loopback device or if Apple are doing something funky. My guess is that somewhere along the line it's remembering me having that network connection present in the past as it's causing it to look for it or something.

Anyway, if you've got slow sync issues, try seeing if plugging in another network device does anything? I've not gone so far as to plug in another ancient wired network card to see if that'll work too. That's an exercise for the reader.

Maybe another solution (a proper solution) might be to remove all remnants of previous network adapters that have been plugged into the machine - I'm up to "Local Area Connection (20)" on my machine and see if that works. Another exercise for the reader!

Good luck and let me know how you get on!

Posted by Ed at 12:32 PM | Geek |

September 10, 2009

Prediction about the prediction

Maybe you watched Derren Brown 'predict' the lottery numbers last night. Maybe you didn't. Meh. Whatever. Speculation is rife about how he could have done it.

Here's my theory.

The first shot isn't live. It's pre-recorded. As is the shot where they show the camera man and him from behind. When it cuts back to the first camera, it's not really a man with a handheld camera, it's a fixed, floor mounted camera (and we're now live).

The image taken by the camera is bigger than the image they actually broadcast (say 10% bigger). This could be achieved by digitally zooming the image or cropping it or whatever. The means that a smaller window can be moved around the actual image - giving the impression that the static feed is actually a handheld camera as it's moving a bit.

As it zooms in loads at the end of the program, I can only assume that they 'unfix' the camera and use it as normal, or it's got a high resolution and they zoom in digitally rather than optically.

As the camera is fixed, you can now have the left of the screen (where the balls are) showing a still shot of the balls, with a perfect edge to the dynamic right video. As you can move the window around the full image, it looks like the camera is moving, thus making it look like it's 'impossible' to stitch the two images together.

As the balls are drawn the balls are replaced in the holder by some other dude. The time this takes is counted for by Derren writing out the numbers and what have you. So long as the balls just fit into the trough, they'll be in the same position in each shot.

Then, all you do is cut to the live feed on both sides of the image before he walks across and tada.

Of course, after tomorrow when he's shown how his prediction was made, I could well just change this to show what he said, and look like a genius :)

Posted by Ed at 7:19 PM | Ramble |

August 31, 2009

Double Opt-in E-mail lists

I've just been idly reading about ways to stop people claiming that the emails you send them are spams - hints for mailing list admins etc.

One idea (which pretty much everyone does now!?) is the double opt-in. The idea is simply, person signs up to list (opt in number one) and then you send them an email, with a link/code which they have to visit (opt in number two), to get on the mailing list/website.

So, I was reading about this on the Digital River site . One of the reasons they give for using double opt in for you list is to stop you from emailing spam traps - these are email addresses that exist purely to attract spam - nobody has any reason to email them as they are not real people.

The page then goes on to explain that just one email that's caught in a spam trap could have devastating consequences - as the people who run the spam trap might add you to a block list that's used by lots of ISPs. Fair enough.

However, they then go on to explain that double opt-in will work wonders, because the account isn't a real person, they won't click on the link and will never end up on the list...

Can you see where I'm going yet?

How, exactly, do you send them the opt-in email, without it setting off the spam trap alarms? Or is the plan that every email that arrives at a spam trap address does get manually checked to see if it's only an opt-in email... rather than an actual message to the mailing list?

Hmmm?

Posted by Ed at 9:20 PM | Geek | Rant |

April 7, 2009

SayNoTo0870 and banks

I wanted to phone my bank today and decided that I'd call them from my mobile (now I have a shed load of free minutes to use a month). However, they only have an 0845 number... (but, but that's a local number, right?). Despite BT's moves in January 2009 to start actually treating them as the name suggests in their call packages (rather than not including them in the phone package and charging them the full up non-discounted local/national rate), my mobile phone provider doesn't, and treats them specially.

My mobile tariff quite clearly states:

Inclusive minutes

Inclusive minutes can be used for calls to standard UK landlines (starting 01, 02 or 03) and all UK network mobiles. It excludes calls to non-geographic numbers (starting 05, 08), 07744 and 07755 numbers and premium rate (09) numbers.

(That also means that'll I'll have to pay to call a 0800 (freephone) number from my mobile. What a load of Banja Lukas!)

I ain't paying 25p a minute (that's a price I've found on Wikipedia from July 08, it might not be current) to talk to my bank.

Anyways, as you're probably well aware, the issue with non-geographic 08 numbers (03 is fine) has been going on for a while, so much so that the honourable bunch at SayNoTo0870 are giving us alternative geographic numbers for companies who only publish a non-geographic number (0870, 0845, 0800, etc) to contact them with. My question is, how much can they be trusted?

How easy would it be for me to put an entry in for a bank, that actually pointed to my number... and then the phonecall cost savvy people would call me rather than the bank?

Wouldn't it be chuffing easier (and more secure?) for the bank to publish a geographical number? I don't even care where it is geographically. If I'm phoning the Halifax I don't give two hoots if it begins with 01422 or not (I'm aware that might bother some people). Alternately, if you don't want people to think your call-centre might be based in Xtown get a sodding 03 number!

Similarly, if you've got an 0800 number, be aware that it'll cost some people a lot to call you... when if you had geographical number it'd cost them nothing... paradoxical but true.

Looking at the reasons of support of 0870/0845 numbers on Wikipedia is laughable, given today's technology (VoIP).

It means that you only need one number, even if you're based all over the country - I can answer my home phone anywhere in the world... and I ain't no multi-national and my phone number is geographical.

Revenue - VoIP...

Routing - VoIP...

Of course, the other option is to moan at the phone suppliers to treat the numbers as though they're geographical/free. Question is who'll win? Maybe companies could do the protesting for us by just not using them.

Anyways, I shall phone the bank from home this evening, where it won't cost the Earth.

Posted by Ed at 1:20 PM | Ramble | Rant |

April 2, 2009

Numbers and scale...

Today I read an article in the BBC News Magazine, it was all about how the use of numbers to describe stuff has become meaningless.

I saw a good example of this today, in some propaganda from the council...

Apparently, libraries cost 85p a week, that's less than a takeaway burger a week. City events cost 27p a week, less than a Mars bar. Link buses cost a whooping 6p a week, less than an apple (fruit, not IT, I guess). Care for disabled adults, £1.94, less than a dozen eggs. 28p a week on older people's day centres (less than a bag of crisps) and a whopping £11.68 is spent on children - less than a takeaway.

I've only listed things I don't currently directly benefit from...

Put another way, it's 784.16 quid a year. That's enough to buy return flights to Shanghai (with KLM this April) (£457 - ok, I know it's on offer...) and, erm, something else that costs 327 quid...

So, peanuts then.

Posted by Ed at 11:36 PM | Rant |

March 28, 2009

Tweet Tweet

So... ages ago I wrote a thing that'll let me send a SMS to my blog, and it'd automatically update a ticker thing in realtime...

Well, it appears that I wasn't the only person who thought this was a good idea...

Anyways, I've resisted the urge for too long and have joined twitter. Feel free to follow me, the more the merrier... I plan to overtake Stephen Fry by lunchtime tomorrow. Heh.

By the power of PHP, my Twitter feed also appears on my sidebar... how exciting?

Posted by Ed at 4:09 PM | Geek |

March 13, 2009

Six

Hardly seems worth it, but my calendar reliably informs me that my blog is a whole six years old today.

Doesn't time fly?

Completely unbeknown to me, it shares its birthday with the www, which is 20 today. Happy birthday Web.

Posted by Ed at 11:20 AM | Geek |

January 17, 2009

Bluetooth... to wake up my PC

This is a kind of follow on from the last post (about wake-on-lan and DHCP and stuff...)

One of the joys of leaving your computer running is that it's always ready for you - if you hibernate it, it takes a bit of time to respond. If you turn it off it's gonna take some time to come back. (Now I can hear some of you screaming... suspend, suspend... don't hibernate! Well, my fingers are in my ears and I'm not listening - I've found that my PC comes out of suspend waaay too easily, although to be fair there's probably settings I can change to make the mouse not turn it on.)

Anyways, so seeing as there's a server that runs all the time in the lab, I thought "ah-ha", if I put a Bluetooth dongle in it... and probe occasionally, when it sees my mobile phone it can start to turn the PC on (by wake-on-lan) that means that I can turn it on passively, by just being present so it's ready for my by the time I get there. I've not messed with full distances and the like, but I think it can see me as I leave the lift.

This has lead to me finding a somewhat annoying feature of Windows XP. This being that if you WoL a hibernated machine... after 2 mins of idle time it'll hibernate itself again. So, the bluetooth turns the computer on, but you don't check your emails - you're making a cup of coffee... and the bloody thing turns itself back off!

Now... this feature is documented on Microsoft's support site in KB810719 -

After two minutes, if no other activity or ping requests from the network occur, the computer automatically returns to standby or hibernation. This behavior occurs because Wake-on-LAN is typically configured to return your computer to standby or hibernation after two minutes of inactivity.

Now, in there it says "typically configured...two minutes". OK. How do I configure it to be atypical, at a time of say 24 hours or 1 year? I can't find this documented anywhere!

I guess I could write a program that convinces Windows that executes the command SetThreadExecutionState saying that the computer is always busy, but that's a lot of a fudge.

Ideas, anyone?

Posted by Ed at 4:53 PM | Geek |

January 15, 2009

Hibernation, Wake-on-LAN and DHCP

At work and at home I have computers that can both do Wake-on-LAN (WOL). That means that I can turn them on over the LAN (and as the LANs are connected to the Internet, from the Internet). This is dead useful. I don't have to think... hmmm... I might need to access my computer remotely... I'd best leave it on anymore.

I also hibernate my computer in both places - that's another reason for leaving it on... everything is just as you left if when you want to use the computer again.

Furthermore, in both places the computer gets its IP address (and other info) by DHCP (dynamic host configuration protocol) - that means that things like it's IP address and what namesevers to use are all configured centrally on another computer somewhere, and when I turn on the computer it checks to see what settings to use.

OK. So why am I talking about this?

When you enable Windows to do all of these three things... that is Hibernation, WOL and DHCP, it does annoying things.

A bit more background... Basically, the information from the DHCP server expires - it goes out of date - and when this happens (well before this happens) the computer will ask the DHCP server for what the current configuration settings should be. Now, for a stable network this will be the same configuration all the time. The people administering the DHCP server will set how long the information is valid for - it's up to them to suggest how stable they see the settings. If it's stable they might have a DHCP lease time of a week or more... if it's unstable, maybe an hour or two.

At home I'm the admin, and I've decided that DHCP is valid for day. At work the admins have decided it's valid for two hours.

OK, so when the computer hibernates its clever and knows that as it's could have to WOL it needs to keep it's network configuration up-to-date. So, when it's half way between when it got the lease and when it expires it turns itself on, gets a DHCP update, and turns itself off again.

The thing is, for wake-on-lan to work you don't need to know the IP address of the computer you need to turn on - you only need to know the MAC address of the network card (as that's the only thing that's listening on the network and it's not really aware of any IP address, just its MAC address).

Now, in some situations knowledge of the IP address could be useful - as I'm sure that there are network management programs that can be used to turn on computers remotely that are linked into the DHCP servers (DHCP servers keep a table linking IP addresses on the network to MAC addresses on the network) - so if you've a big network, want to turn on a random computer and have no idea what the MAC address is, but know it's IP address then this might be the way to go. (this is pure speculation... such management programs may not exist!)

I however know the MAC addresses of both computers I want to turn on (and by using the magic of the /etc/ethers file in linux I've got a table of IP addresses and MAC addresses that my wakeonlan program knows about.)

So, what's the problem. Well... number one, my computer lives in my bedroom... and it turning on at 5am to refresh it's DHCP is far from ideal - secondly it doesn't turn itself off again for some reason.... and the computer at work turns itself on every hour (half of two) to update itself... given that it takes ages to go through the BIOS etc etc... it's actually on for about 5 mins every hour. What's worse... if you arrive at work when it's in the middle of a refresh and it's starting to shutdown again you have to wait for this shutdown and then turn it on again...

So, what are the solutions to this problem...

At home I'm the admin... so I've changed my entry on the DHCP tables (in dhcpd.conf) to something like...

host blueberry {
hardware ethernet 00:12:56:2b:4b:f9;
fixed-address 192.168.1.10;
default-lease-time 8640000;
max-lease-time 10000000;
}

Which sets the lease time to 100 days, meaning the computer will turn on to refresh every 50! As the computer seems to refresh its DHCP anyway when it comes out of hibernation I basically have to not turn my computer on in 50 days for it to be a problem.

So, what about at work? Where I'm not an admin of the network. Well, I could set my settings in statically. This would be bad - and cause annoyance to me - they've set the lease time to 2 hours for a reason - they could go changing DNS servers at random, the Internet would appear broken and I've have to manually correct them!

My solution was to install Hibernate Trigger. This is a little program that sits in your systray and waits for the computer to start hibernating - when it does it can run a program. It'll then also be waiting so that as soon as you come out of hibernation it runs another program.

So, I have two batch files. One for hibernation and one from resuming - the hibernation one simply runs ipconfig /release. This removes all the automatically set IP settings from my computer - this convinces it that it never has to turn on to update them. My resume script runs ipconfig /renew, this forces the configuration to be pulled from the server. I'm not strictly sure that the renew one is required - the DHCP might get automatically updated when you start the computer from hibernate anyway - but it's there for good measure, I've not tested it without.

Anyway, that's how (or at least the only way I could think of) to stop your computer waking from hibernation when you've enable Wake-on-LAN. This was after searching for an answer for a good few hours. Hopefully it'll help someone else!

Posted by Ed at 11:04 PM | Geek |

January 9, 2009

Can't resist!

People who know me will know that I can't resist a dig at religion. So, imagine my glee when I read about some Christians complaining to ASA about the atheist 'adverts' on the sides of buses.

That's not really helping your case is it? It's just going to make you look petty and have atheists laugh at you. Ha ha ha.

As for asking to humanists to prove that there is no god, you're having giraffe? Looking at the 'advert' I'm a little lost as to whether it's actually an advert at all (as in should the ASA get involved at all). OK, so they've paid some people (who happen to sell advertising space) for some space to publish an important message to the people, but is it really an advert?... basically, is the paper version of a public service announcement an advert. I'd like to think not.

They also cleverly use the word "probably". Now, I'm well aware that it's possible to read text and throw half the meaning out of the window, or interpret it however you wish - after all that's what happens with the bible, but seriously! Despite clearly being used in jest, the word does change the meaning of the phrase!

I'm not totally convinced that there's actually a need for the advert to be honest (other than to annoy people who believe in god - mission achieved on that front) as it's not really going to convince agnostics/theists that there's no god.

Could I complain to the ASA about church bells? (not that I would 'cause I'm not a petty complainer... eww ewww... I'm so offended must complain to get my name in the paper)

Posted by Ed at 6:43 PM | Ramble |