Disabling wifi kill-switch on Inspiron 17R (N7010)

The wireless kill-switch (Fn+F2) on my Dell Inspiron 17R (N7010) laptop is getting on my tits, as I occasionally hi that key combination by accident when trying to use Ctrl + F2.

I can’t seem to see any way to disable this, and Google doesn’t seem to be able to find anything useful. Anyone have any ideas? There must be some way to ignore that key combination.

Running xev whilst pressing that key combination shows me:

KeyPress event, serial 33, synthetic NO, window 0x5c00001,
    root 0xb0, subw 0x0, time 39357273, (121,-345), root:(1426,350),
    state 0x0, keycode 246 (keysym 0x1008ff95, XF86WLAN), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 33, synthetic NO, window 0x5c00001,
    root 0xb0, subw 0x0, time 39357273, (121,-345), root:(1426,350),
    state 0x0, keycode 246 (keysym 0x1008ff95, XF86WLAN), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

So, if it’s being triggered by software, it’s keycode 246 I need to deactivate/map to something else, I believe.

However, I tried with:

xmodmap -e 'keycode 246 = NoSymbol'

… but no effect, it still kills the wireless. I’m hoping that someone might know how to do it, and/or that someone else Googling for how to do this will find this post, and perhaps share any ideas. If I figure it out, I’ll of course update this post with the solution.

UPDATE – I probably should have mentioned that this machine is running Ubuntu Linux. Also, I found that, in System > Preferences > Keyboard Shortcuts, I can assign a shortcut to the Fn+F2 key combination (the shortcut column shows 0xf6), and pressing Fn+F2 does indeed trigger that shortcut (launching a terminal window, for a test), but also still triggers the wifi killswitch. I suspect that, as well as being seen by the OS and software, it’s being directly intercepted by hardware to toggle the card?

UPDATE – to help people Googling for info on how to disable the wireless/wifi kill switch key combination / shortcut for this laptop, it’s a Dell 17R / N7010 with a Broadcom BCM4313 802.11b/g LP-PHY wireless adaptor.

Debugging WWW::Mechanize scripts – printing requests and responses

Just for fast and easy reference really, but for easy debugging to find out the exact HTTP requests being sent and HTTP responses received by a web-scraping script using the excellent WWW::Mechanize, you can simply add:


$mech->add_handler("request_send", sub { shift->dump; return });
$mech->add_handler("response_done", sub { shift->dump; return });

This will cause all HTTP requests and responses to be output, so you can see exactly what’s happening.

Monitoring network traffic with jnettop

Just a quick post about jnettop, a tool I find really useful for monitoring network traffic to see what other machines a machine is talking to, and how much traffic is being sent/received between them. (It also includes traffic going via the host you’re running it on, so very useful for firewall/gateway machines.)

Jnettop is a traffic visualiser, which captures traffic going through the host it is running from and displays streams sorted by bandwidth they use.

Basic screenshot:

Useful stuff.

ATV docked with space station – impressive stuff

This afternoon, ATV Johannes Kepler docked with the International Space Station (video here).

It’s delivering “4,534kg of propellant for International Space Station reboost and attitude control”, “1,600kg of dry cargo, 850kg of propellant for Russia’s Zvezda module and 100kg of oxygen”. Whilst attached to the ISS, it will “boost” it, compensating for decaying orbit caused by drag.

The thing, once released from the launch rocket, navigates itself into orbit behind the ISS, and automatically docks with it with astonishing 1.5 cm precision, all whilst while the spacecraft and the ISS are hurtling around the Earth at 28 000 km/h. Impressive stuff indeed. (See ATV flight phases.)

Commenting now works again…

Whoops – when I migrated my blog from blog.preshweb.co.uk to www.preshweb.co.uk, commenting was broken because the keys I was using for reCAPTCHA’s API were no longer valid for the new hostname.

I’ve just changed the keys to ones which will work, so commenting should be fixed now. Thanks to Barbie for emailing me to let me know about it!

How many hard drives?

Just how many hard drives and other bits of kit did the Government waste our money on for their stupid, ill-conceived and now abandoned ID cards scheme? "The government destroyed the final 500 hard drives that contained the national identity register…"

In total about 500 hard drives and 100 back-up tapes that contained the details of around 15,000 holders of the ID cards were magnetically wiped and shredded.

Even if they were going to store a buttload of data on each individual, 500 hard drives for 15,000 people? Seriously?

I’d hate to know how much taxpayer money they wasted in total on this hare-brained scheme.

The taxpayer copped a £400,000 bill for contractors to delete the data collected during the scheme, which was brought in by the previous Labour government.

Part of the cost included the Identity and Passport Service writing to those few people with an ID card to tell them that it was no longer worth the plastic it was printed on.

How much does it send 15,000 letters? I’m sure it shouldn’t cost much to safely destroy hard drives (or, better and less wastefully, securely wipe them then donate them to some computing charity or auction them off…).

David Precious – professional Perl developer, motorcyclist and beer drinker