Apple’s Do Not Disturb feature already on Android

I was pretty amused to discover that Apple’s Do Not Disturb feature in iOS 6 is pretty close to my Android application I’m sleeping, which was available long before their version.

Android doesn’t offer such feature by default (but some ROMs do). At first, I was puzzled by that lack. I searched on Google Play but didn’t find anything that suited me, namely:

  • simple and intuitive user interface
  • intelligent design, with separate settings for week days and week ends
  • white list, allowing close friends or family to call you at all times
  • manual mode for naps or out-of-schedule sleeps without having to reconfigure everything

So I wrote it myself. Apple’s version is similar except it uses favorites instead of a white list. It also has a “go through” mode if the caller insists but doesn’t feature a manual mode (Apple still didn’t “invent” widgets).

Screenshots below:

Apple’s version
My version

Available on Google Play for free and without ads.

Android, WiFi and power consumption

Android is not very well documented when it comes to power consumption. Most user manuals tell you that, in order to save power, you have to turn off the features you don’t need. While these advice have their merits, they often involve a significant trade off. For this article, we’ll focus on wifi usage.

Wifi versus mobile data

When it comes to power usage, wifi behaves quite differently than 2G/3G mobile data. To keep things short, wifi is more power efficient when doing actual data transfer but less when staying on doing nothing, at least that’s the case with simple implementations. For example, my Sony Ericsson Xperia X10 Mini Pro (Android 2.1) will barely last a day when wifi is turned on and connected to an access point (AP) and there’s a reason for that:

contrary to what happens with mobile data, Android cannot sleep while a wifi link is active, even idle

Well. At least that statement was true until fairly recently.

Wifi powersaving mode

Since recent versions of Android, a power saving mode (PS-Poll) was implemented and many phones use it. It works in the following way and is only active when the screen of the mobile device is off:

  • the AP will keep packets for the phone buffered
  • the phone will periodically (typically every few seconds) poll the AP and asking if there are new packets
  • if there are, the AP will send them in a burst

It’s like if the phone was taking a dive, surfacing each few seconds to ask if there are packets. This decreases greatly power usage. The drawback is that it increases latency significantly and some APs don’t handle power save mode properly and simply disconnect the device. This is fine for “background data” usage though (syncing, email checking and so on).

Here’s how to test if your phone supports PS-Poll:

  • connect to your AP
  • on the phone, go to Settings / About phone / Status and look the IP address field
  • on a terminal on your computer, type:
  • ping -t <ip_address> (note: on Linux/Unix, drop the -t)

You should get some output like:

Reply from 192.168.1.71: bytes=32 time=452ms TTL=64
Reply from 192.168.1.71: bytes=32 time=200ms TTL=64
Reply from 192.168.1.71: bytes=32 time=1512ms TTL=64
Reply from 192.168.1.71: bytes=32 time=762ms TTL=64
Reply from 192.168.1.71: bytes=32 time=1768ms TTL=64

Anything bigger than 1000ms indicates that PS-Poll is active. Turn on the screen and notice how the timing become smaller because then PS-Poll is disabled, bringing better latency.

Sleeping is the key

While PS-Poll helps a lot, it still doesn’t solve the main issue. Phones’ greatest power saving strategy is to put the processor (CPU) to sleep mode, basically the same that happens when you put your laptop to “sleep”. You close the lid, the machine stops but the memory content stays intact so that you can quickly wake up again to resume work.

And this is also what recent phones are able to do. For example the Samsung Galaxy S II and the Galaxy Nexus have a dedicated ARM Cortex-M3 chip (a full blown CPU) and dedicated memory in their wifi subsystem. This allows the phone to be put to sleep while the wifi link stays active.

Android 4.0 and default wifi sleep policy

This is probably why the default sleep policy in Android 4 (ICS) was changed from “sleep when screen turn off” to “never”. I was actually surprised to see the change and had to do some research to find out why this was done.

Now not all phones implement this but if your phone is recent, chances are it does.

Rise FM remastered version

RiseFM

Which is the best in the GTA serie? The last GTA4? GTA: San Andrea? Vice City?

No, it’s GTA3 because it contains Rise FM! The best radio station in the serie, by far. Unfortunately the PC version uses the track from the PlayStation 2 which has a mediocre quality (4-bit IMA ADPCM, 32 KHz) and doesn’t do justice to the mix, which is why, I did a remastering from scratch.

Download the RiseFM mp3

The original was mixed by Terry Donovan. The tracklist is as follows:

  • Chris Walsh & Dave Beran – Shake (Revolt Clogrock Remix)
  • Shiver – Deep Time
  • R.R.D.S. – Innerbattle
  • Slyder – Score (Original Mix)
  • Slyder – Neo (The One)
  • Chris Walsh & Dave Beran – Shake (Revolt Clogrock Remix) (yep, again)

The remix is as close as possible as the original, the only notable difference being that unfortunately I wasn’t able to get hold of Andre The Accelerator so his voice is missing.

Enjoy!

How to stop multicast packets flooding the wireless interface in dd-wrt

For some reasons, they don’t provide a simple GUI switch for this and their wiki page doesn’t have the correct commands.

Anyway, the way to do it is this:

Check what is your wifi interface. Go to status/Wireless and check the Interface field below (you need to connect at least one client). In the following example, we assume it’s eth1.

Go to Administration/Commands

Type the following (assuming your LAN is on the 192.168.1.x range):

insmod ebtables
insmod ebtable_filter
insmod ebt_pkttype
insmod ebt_ip
ebtables -A FORWARD -o eth1 -p ipv4 --pkttype-type multicast --ip-source ! 192.168.1.0/255.255.255.0 -j DROP

Press Save Firewall and reboot.

Voilà! No more multicast flooding of the wireless interface! This is handy if you’re using IPTV. As a bonus, normal multicasting on your LAN will still work (Samba, Homegroups, etc…)

Radioactivity

Because of the recent events at the Fukushima nuclear power plant, I got myself a Geiger-Müller counter (also known as dosimeter or radiometer).

Here’s some testing I did with it:

Those are background radiations. The range I usually get are from 0.07 μSv/h to 0.15 μSv/h.

Background radiations are what someone normally gets since everything around us is a bit radioactive. It mostly comes from cosmic rays and terrestrial sources. The unit used is the sievert (Sv). A microsievert (μSv) is 0.000001 sieverts. A milisievert (mSv) is 0.001 Sieverts. The counter displays how many microsieverts it gets per hour, so if for example you stay near a source of 1 μSv/h during 5 hours, the total radioactive dose you’d get would be 5 μSv. In this article I’m focusing on gamma radiations.

Normal background radiations shouldn’t exceed 0.30 μSv/h.

Dust has a tendency to gather radioactive particles. 0.19 μSv/h for a sample of dust that my wife didn’t find 🙂
Radioactive rock
I’m not sure what this rock is but it’s slightly radioactive.
Radioactive bench
No worries. It can still be used safely as a bench.

For now I didn’t detect anything abnormal during my testing, and I hope it stays that way. These readings were taken around Geneva, Switzerland. It seems someone is doing the same as me but in Tokyo.

The joke called DVB-T

DVB Logo

You can’t stop progress. When TV switched from Black & White to Color it was amazing. Now that the TVs are switching from analogic to digital transmission, a major step is done. See the following comparison:

Analog DVB-T
Resolution 720×576 720×576
Digital sound yes yes
Progressive (no interlacing) no no
Works with all antennas yes no
Reception with low signal yes no
Free MPEG image artifacts no yes
Channel switching delay none 2 seconds
Station transmission delay none 5 seconds

As you can see, DVB-T is clearly superior. You can’t stop progress.

Syobon Action

Syobon Action (also known as Cat Mario or Neko Mario) is a platform game with a similar gameplay experience as Super Mario Bros, except it’s more difficult and was written by some psychopath.

I improved the SDL version and made a Windows port.

Notable changes (see the README.txt in the archive)

  • fullscreen mode
  • improved sound quality
  • english translation
  • joystick support
  • bug fixes

Downloads:

Syobon Action for Windows (if you get a DLL error you need to install the VC2010 redistributables). Was tested on Windows XP, Windows Vista, Windows 7 and Windows 10.

Syobon Action for Linux/BSD/Unix (contains the source code, you need sdl, sdl_image, sdl_gfx, sdl_mixer and sdl_ttf to build it). If you want to help building distro specific packages (eg. deb) feel free to provide them. Many thanks to Christian Birchinger for testing and improving the build.

Dell Inspiron 9400 ATI x1400 driver

Update: this driver is reported to work under Windows 10

Since Dell is unable to provide a recent Catalyst release for its Dell Inspiron 9400 for Vista or Windows 7 and explicitly forbids ATI from distributing one, here it is.

Download Catalyst 8.12 for Inspiron 9400 (32-bit)

Note: The Inspiron 9400 is also known as Inspiron E1705 in some countries.

Catalyst 10.2 has a bug related to laptop panel scaling which is why I’m providing 8.12.

Street Parade 2010

On the 14th of August, held the Street Parade in Zürich with the many love mobiles and techno music. Unfortunately the weather wasn’t very great with a few rains from time to time. I didn’t find it very crowded at first but then people started to arrive. All in all an excellent event as usual.

N95 unlocking and battery extension

Following up on Vodafone’s inability to unlock my Nokia N95 I bought from them, I decided to use other ways.

First, there are tons of “online unlockers” websites who claim to be able to unlock phones but nobody explaining how they do it. I tried 2 of them and they weren’t successful, even though they advertise handling the N95.

The first one was E Distributions UK Ltd. They reimbursed my Paypal payment the same day with “unlock code cannot generate full refund”. Fair enough.

The other was a bit more problematic. I ordered an unlock code for my girlfriend’s LG KU990i from MobileUnlocked which is really Unlockingonline. After 2 days they claimed to have found the unlock code which was: “NO UNLOCK CODE”, which obviously was of no use for me. I complained to them asking for a refund and 2 days later they did so.

My guess is that those online unlockers probably work for older phones which have key generators available for them, but these companies also advertise that they can handle new phones for 2 reasons:

  • be indexed by search engines
  • be able to provide the service as soon as a keygenerator appears

Unfortunately this is just going to waste your time. You can try, but if you do make sure you always use Paypal as they have a reimbursement policy if the merchant fails to provide the service (make sure you keep copies of mails and website results).

I ended up unlocking both phones from a local store. No problems whatsoever.

Now on to fix one of the most annoying problem of the N95, and any modern smartphone: the limited battery life.

The N95’s original battery is a 950 mAh li-ion battery and has the amazing property of lasting about one day with moderate usage. Even worse, if you use your N95 to listen to some music, it dries out in 2 to 3 hours.

So I ordered a 2400 mAh li-polymere battery from mobiltec24. Unfortunately the phone was constantly switching itself off and crashing.. weird! I mailed them and they quickly sent a replacement battery which works fine so far. The phone lasts about 4 days with moderate usage, at last! This was the N95’s biggest problem and newer phones seem to have that problem as well. The battery is bigger and heavier (needs a modified battery cover, which is supplied) but the trade off is really worth it.

Intelligent software