Share your Windows printers using AirPrint

When AirPrint was first introduced in iOS 4.2, I have spent some time trying to share my Windows printer to my iPad. Of course a free solution was already there, one that involved installing Apple Bonjour Service with CUPS Lite for Windows. So I’ve quickly found that solution on Google and downloaded the necessary tools, namely Bonjour Print Services for Windows and Airprint.zip, which contains the CUPS service.

Making it work was quite easy. You need to unzip the Airprint.zip file to C:\Program Files\AirPrint (on a 32-bit Windows), or to C:\Program Files (x86)\Airprint on 64-bit Windows.

The next step is registering the service: log in as a user with admin rights, click “Start”, “Run”, enter “cmd” and press “OK”.

In the console, enter the following commands:

sc.exe create AirPrint binPath= "C:\Program Files\AirPrint\airprint.exe -s" depend= "Bonjour Service" start= auto
sc.exe start AirPrint

IMPORTANT: If you use 64-bit Windows, use the appropriate Program Files (x86) directory instead.

It worked! …until iOS 5. So I’ve run the Wireshark to see if Apple changed anything to the AirPrint protocol. It was not a surprise that they did:

Luckily, CUPS Lite has several command line switches and it can be adapted to the change.

To make Airprint.exe compatible with iOS 5 and above, run the following commands from the command prompt:

sc.exe stop Airprint
sc.exe delete Airprint
sc.exe create AirPrint binPath= "C:\Program Files\AirPrint\airprint.exe -R _ipp._tcp,_universal -s" depend= "Bonjour Service" start= auto
sc.exe start Airprint

IMPORTANT: Remember to use the right Program Files or Program Files (x86) directory.

Since you’ve seen the picture and the modified entry for Airprint service, you might already have guessed that -R binds CUPS Lite to a slightly different service name (the one which my iPad was looking for). This allows the iOS 5.x devices to be able to find shared printers again.

Make sure airprint.exe is allowed through in Windows Firewall. Some tutorials will tell you to disable Windows Firewall alltogether – don’t do that, it’s a security risk!

Some tutorials will tell you to enable guest account for the sharing to work. Don’t do that, it’s a security risk. If someone accesses your network (for example cracks or guesses your WiFi key), he will be able to print anything on your printer. Use one of the user accounts on Windows instead, and when you order iOS device to print something, iOS will automatically ask you for username and password.

The above has been tested with iPhone and iPad, both running iOS 8.1.2.

PS. If you are running Linux it is still possible to use CUPS and avahi daemon to share a Linux printer to AirPrint enabled devices.

The new iPad announced; iPad 2 price down to 1699 PLN

Yesterday Apple has announced a “Resolutionary” device: “The new iPad”. I’m sure you have already read about the official list of features, but in case you didn’t, here’s a list:

  • 2G/3G/4G (LTE) modem capable of:
    • HSDPA (7.2 Mbit/s)
    • HSUPA (7.2 Mbit/s download and 2 Mbit/s upload)
    • HSPA+ (21 Mbit/s)
    • HSPA+ DC (42 Mbit/s)
    • LTE (72 Mbit/s)
  • WiFi 802.11 a/b/g/n (2.4 GHz & 5.0 GHz)
  • 2048 x 1536 resolution Retina display
  • Apple A5X SoC with 4 graphical cores
  • works 9 hours on battery (LTE mode) or 10 hours in WiFi mode
  • 5MP iSight camera with five-element f/2.4 lens

Pricing didn’t change and the new iPad costs just as much as the old one did. But here is one more thing: as usual, Apple has lowered the price of the now-old iPad 2. The cheapest iPad 2 (WiFi 16GB) now sells for 1699 PLN!

You can order yours on polish Apple Store.

PS. iOS 5.1 is now available both through iTunes and as Over-the-air update.

iPad 2 16GB WiFi 1699 PLN
iPad 2 16GB WiFi+3G 2199 PLN

Android 4.0 running on x86 CPUs

This morning the android-x86 team has released a RC build of Android Ice Cream Sandwich. It comes in a few flavours: Asus EEE-PC, Asus notebook and AMD Brazos to name a few. If you have a different netbook, fear not: the EEE PC build should run just fine.

I have installed the new build on my Acer Aspire One AOA110 (ZG5) and most features work out of the box:

  • Atheros WiFi card
  • Intel 945 graphics
  • Touchpad
  • Android Market
  • Fake SD card
  • Camera
  • Suspend – a bit buggy

Unfortunately, ethernet networking is still not supported (it’s been this way since 3.2), so this build will not have connectivity when running in VMware or Virtualbox. The same applies to the ethernet adapter in netbook itself.

EDIT: The following ISO image supports Ethernet on Virtual Machines: http://www.buildroid.org/Download/android-x86-vm-20120307.iso.gz Please keep in mind that this build does not have Android Market/Google Play.

Remember not to install GRUB if you install Android alongside other operating systems – it will leave other systems unbootable!

To remedy this, I have added these lines to my /etc/grub.d/40_custom file:

menuentry "Android-x86 4.0 Ice Cream Sandwich" {
insmod ext2
set root='(hd0,5)'
linux /android-4.0-RC1/kernel quiet root=/dev/ram0 androidboot.hardware=eeepc acpi_sleep=s3_bios,s3_mode SRC=/android-4.0-RC1 DATA=
initrd /android-4.0-RC1/initrd.img
}

UPDATE: First paid 3D game that works on Android x-86 is Fruit Ninja. Congratulations, Halfbrick!

And here you can have a look at some screenshots from this new build:

iPad 2 over-the-air screen mirroring using Apple TV

For polish version please go to tabletowo.pl.

This post is not an attempt to review the Apple TV. There is a whole lot of those already on the internet. Instead, I will focus on one of the functionalities which convinced me to buy the $99 black box from Apple: over the air screen mirroring from iPad 2 (and iPhone 4S). The same feature unfortunately turns out to be the Achilles’ heel of the device. But let’s see why.

Setup

As with most devices from Apple, setting up Apple TV is very easy. After the Apple TV has been connected to the TV set and the network, it’s time to turn on mirroring on the iPad 2. To do this, double click the home button and then scroll the multitasking bar all the way to the right to access media controls. You will notice a new button there, press it:

The same menu is used for AirPlay – a feature that allows streaming audio or video content wirelessly form any Apple device (iPod Touch, iPhone or iPad) to Apple TV or AirPlay-enabled speakers. Choosing Apple TV from the list will only set the default output to Apple TV. To enable the mirroring itself, you just have to switch the “Mirroring” switch to ON. Simple, eh?

Performance

Apple did not allow iPhone 3G to set the Home screen wallpaper, because they were worried about performance. Does over-the-air mirroring perform? Yes and no.

It works. It’s easy. But it has all the disadvantages of video streaming:

  • It introduces latency. There is a noticeable delay between what happens on the iPad screen and on the TV set. This is caused by buffering, which is necessary to keep any streaming connection up. If the buffer is too small, the stream will stutter. If it is too big, it will become even more laggy. Lag is noticeable in games that require reflexes. Even though Real Racing II has very good controls, the lag makes it barely playable.
  • Performance is not as good as without mirroring. The A5 SoC CPU is a really powerful piece of technology, but when forced to compress full screen and send it over WiFi, it’s processing power suffers. You will not see it in simple programs like Keynote or Safari, and surprisingly, neither in Infinity Blade 2. Most 3D-intensive games will stutter, more or less, as the A5 will try to do its best and run both the program itself and compress the output stream. Real Racing II works, but the animation slows down in more complex parts of the track. Dungeon Hunter III is playable, but the stuttering is more less noticeable.
  • Mirroring support is still on the devs side. By default, iPad will stream a 1024×768 image, which leaves black areas on the left and right part of the HDTV screen. If the application developer added further support, the resolution can change to fill the whole screen. For example: in Keynote, the presentation is shown on the HDTV, while on the iPad screen the presenter can see his notes and a miniature of the slide currently displayed. Real Racing II draws the game on the TV, while leaving telemetry (speed, position on the track, stats) on the iPad. Dungeon Hunter III will draw the same scene on both the mirror and the iPad screen, but image on the TV set will match the TV resolution instead of the default 1024×768.
  • Touch controls. When you’re watching the TV, you can’t see if your fingers are on the right parts of the screen. IMHO the best is the dual joystick approach used by many games. The virtual joysticks are usually placed under thumbs, so one doesn’t need to constantly watch if the fingers are placed accordingly. Gesture controls like in Infinity Blade are almost as good: you feel where the iPad is, so you just slash the gestures on the screen as usual. Fruit Ninja is a bit more tricky, because you need not only to draw the gesture, but also aim correctly to slash the fruits. Accelerometer control in Real Racing is probably the best one to play games with mirrored screen: all you need to do is tilt the iPad.
    When it comes to pressing virtual buttons, matters complicate: you have to peek at the device every time to see if what you are about to press is the button that you really intended to press, and not the one next to it.

Summary

While Apple TV in itself works rather well, including the AirPlay features, wireless mirroring is not that great. It’s OK when you want to show a Keynote or a movie from your iPad on the TV set. It just works out of the box and is really easy to set up. Some games are playable too, but the performance is noticeably decreased. Because of this, WiFi mirroring is more of a gadget rather than an actually useful feature.

Infinity Blade II review

On 1st of December, Chair Entertainment Group has published a sequel to its flagship and critically acclaimed iOS game called Infinity Blade. The second iteration has the same praised sword combat mechanic as the first part, but has been enhanced with more features, so it is no longer a “dodge-slash” game, which many reviewers saw as boring and repeatable.

>> Read more here.

Infinity Blade II
Infinity Blade II

Android Honeycomb 3.2 running on x86 CPUs

NEW: Android 4.0 Ice Cream Sandwich running on x86 PC/netbook: check this post


The Android-x86 project has recently released Android Honeycomb 3.2 compiled for x86 processors. It can easily run on a PC, laptop, netbook or even inside a virtual machine. Moreover, this version includes Android Market! Unfortunately, the current RC2 build does not have any Ethernet kernel modules compiled, so it is not possible to access the Internet if you install it on a VMware or Virtualbox virtual machine.

Is it just a toy for geeks or can it be actually useful? I vote for the latter, but not just yet. Developers need to notice and support the new platform first. We also have to know, that some netbooks have already been sold in dual boot Windows – Android configuration (look for Acer Aspire One D250). Android can be actually more useful for netbooks than Windows. This is due to short boot times and lots of useful widgets, which display information right on the desktop. I have successfully used Android 2.2 for a while on my Acer Aspire One for some time, and I was only missing the Android Market and a bit more stability regarding power management (problems with waking up from stand-by).

But as you recall, I have also mentioned the need for developer support. Why? Because Android running on x86 CPU will only run SDK based apps. It won’t however work with more advanced games or apps written in NDK. Why? Because NDK apps are compiled for a specific CPU – ARM in this case. NDK based apps would have to be recompiled in order to run on x86 CPUs. So until x86 Android becomes a widely recognized platform, we will probably not be able to run most games and programs on this platform.

UPDATE: First paid 3D game that works on Android x-86 is Fruit Ninja. Congratulations, Halfbrick!


EDIT: I have just installed the Honeycomb 3.2 on bare metal – Acer Aspire One (AOA 110 / ZG5). The eeepc build works out of the box, with smooth accelerated graphics, working WiFi and Android Market.

Works out of the box:

  • WiFi
  • Sound
  • Touchpad
  • Browser
  • Android Market
  • Mail
  • Settings
  • Widgets

Does not work:

  • SD card emulation (storage works as USB instead)
  • Screen will sometimes rotate randomly
  • After one sleep/wake cycle it can’t wake up.
  • Voice commands (Audio error)
  • Ethernet (there is no kernel module)

To install it alongside an existing linux distribution, about 3-4 GB of space is required. You can use GUI based GParted to shrink your exisiting linux partition, or console based e2fsresize. DO NOT LET THE ANDROID INSTALLER TO INSTALL GRUB – it is known to cause your previous linux unbootable. Instead, after performing the Android installation, edit your existing GRUB2 configuration (Ubuntu example for /dev/sda5 below)

sudo vi /etc/grub.d/40_custom

Add the following lines at the end of the file:

menuentry "Android-x86 Honeycomb" {
  insmod ext2
  set root='(hd0,5)'
  linux /android-2011-11-13/kernel quiet root=/dev/ram0 \
     androidboot_hardware=eeepc acpi_sleep=s3_bios,s3_mode \
     SRC=/android-2011-11-13 DATA= DPI=160
  initrd /android-2011-11-23/initrd.img
}

Save file, run update-grub

A bug in iOS results in poor battery life

It seems a lot of people is displeased with the battery life of the new iPhone 4S. Unfortunately, the problem is not limited to the new iPhone users: other devices have been impacted by the problem as well. My iPhone 3GS with iOS5 is almost half discharged after a day on standby. I blamed it on the battery age at first, but many other people have started complaining about the same issue.

I did have a similar issue with my iPhone 3G at some point – when one of the processes kept running on the CPU. This issue looks similar, but is related to Location Services. In iOS5 Apple has divided System Services from other apps, and one of them seems to be the problem – the Setting Time Zone service. If you enable the Status Bar Icon, it will constantly show near the battery icon, meaning that something is using Location Services all the time. Disabling the Setting Time Zone service seems to fix the problem.

Location Services on iPad Location Services on iPhone

I’m back!

Important Downtime information between 14th and 25th of October

On 14th of October my old webserver’s hard drive died of old age, bringing the entire machine to its knees. An ext3 filesystem corruption has also occured as a side result, taking part of the mysql datafiles with the dying drive.

Me and my coleagues (who I share this server with) have decided to buy a new webserver. So we bought this little pizza-box (a refurbished IBM eServer x345):

IBM eServer x345
IBM eServer x345

The machine’s core consists of two Intel Xeon 3.2 processors, backed up by 3 gigs of RAM, powered by two redundant PSUs. Data is stored on five 10kRPM SCSI disks, 36GB each. RAID5 makes sure that even if one of the disks should fail, all the data is still safe. Two Gigabit Ethernet ports are connected to the datacenter’s backbone. We are planning to buy some spare hard drives, so the array will be eventually extended with sixth hot-spare hdd, which role is to take over immediately at the time of failure. Such redundancy allows the machine to continue service even if two hard drives should fail.

Unfortunately I was very busy during the last week, so I could not immediately bring my website back. After 11 days we have finally brought the box to the datacenter. It has been online for the past 6 hours and I have already recovered most of the broken datafiles.

What happened is actually very positive. The old server should have been replaced long ago, and this box, even though it’ not entirely new, has four times more juice than the old one. I am not going to mention the redundancy of its core elements.

Trouble with installing iOS 5

I have always updated my iDevices just after the new firmware was available, and never experienced any problems. Unfortunately, installing iOS 5 was not as smooth ride as I expected it to be.

To my surprise, iTunes has reported errors 3004 and 3200 several times, and my iPad remained stuck in DFU mode. I have quickly googled to check if none has similar issues to mine and read several posts on forums. People suggest to add a manual entry for Apple’s gs.apple.com to the hosts file.

Unless you have jailbroken any of your iDevices, just be patient and keep trying every now and then – it will update at some point. If you did jailbreak any device on your computer, it is possible that the jailbreaking tools has added an entry to the system hosts file.

To check if your computer is affected:

  • Go to C:\Windows\system32\drivers\etc\hosts
  • Remove any entries regarding gs.apple.com

Once done, just keep trying to restore your iDevice every few minutes.

 

iOS 5 goes public on the 12th of October

Most Apple fans have mixed feelings after yesterdays press conference, mainly because intead of iPhone 5 Apple will serve a slihgtly updated iPhone 4S. But fear not, iOS 5 and iCloud are coming soon. Scott Forstall did not say much about the new system itself, but we know when it arrives in iDevices: 12 of October. Golden Master release has already been released for developers.

Most important features of the new iOS:

  • Notification Center (non-disruptive notifications)
  • Reminders (time and location based)
  • iMessage (instant messenger for all iDevices)
  • WiFi sync (no need for cables anymore)
  • Newsstand (for those who like reading newspapers on iPad)
  • split keyboards (great for thumb-typing on iPad)
  • AirPlay mirroring for the iPad 2 (and for iPhone 4S too)
  • Siri voice recognition (for iPhone 4S only)
  • Wireless activation (no need for iTunes)
  • OTA iOS updates

iCloud storage will provide a free 5GB (which is now a de facto standard for most personal clouds – same as Windows Live Mesh and Ubuntu One). The most important feature is however automatic push synchronistation between all iDevices.