Suramya's Blog

Visit suramya.com Who am I?

October 11, 2014

Microsoft Research releases Android Wear keyboard prototype

Filed under: Computer Hardware,Computer Software,My Thoughts,Techie Stuff — Suramya @ 5:33 PM

Yes, you read that correctly. Microsoft Research has released the prototype of it’s new keyboard for Android Wear which allows you to input text by drawing letters on the watch face. This is not the first time MS has released stuff of android and I am quite happy with this trend.

The idea of inputting text by drawing characters is not new. If you remember the Palm OS devices they had a keyboard call Graffiti which used a sort of shorthand of letting you input text. I used to love it and had it installed it on my Galaxy Nexus and used it quite often till it got replaced by the voice typing option on the Google Keyboard.

As touch screens are getting smaller, soft keyboards are getting harder to use. For example, on a 1.6” smart watch, a soft keyboard with 10 keys across has keys less than 1/8” (3mm) wide. Speech recognition can be a viable alternative, but unfortunately, speaking into your watch is not always appropriate or even possible (noisy environments).

With the Analog Keyboard Project we are exploring handwriting recognition for text input on small touch screens. Handwriting, unlike speech, is discreet and not prone to background noise. And unlike soft keyboards, where many keys have to share the small touch surface, handwriting methods can offer the entire screen (or most of it) for each symbol. This allows each letter to be entered rather comfortably, even on small devices. In fact, it has been shown that some handwriting systems can be used without even looking at the screen . Finally, handwriting interfaces require very little design changes to run on round displays, which are becoming increasingly popular.

Interestingly the developers decided to support lower-case alphabets instead of upper-case in this first release. I would have thought they would go the other way as it is easier to identify upper case letters for the most part than lower-case.

Please keep in mind that this is a prototype (Alpha) release so it possibly has a lot of bugs and is not production ready. Plus it can’t be installed on the watch from Google Play, it has to be side loaded and the process is a bit complicated so might not be the best option for non-tech savvy folks right now.

Source: androidcentral.com
Project Page: The Analog Keyboard Project
Download: Analog Keyboard for Android Wear

– Suramya

October 1, 2014

Erase Your iCloud Drive by reseting your iPhone settings

This has not been a good month for Tech, we are getting issues across the board on all fronts. First we had the iCloud hack (or fappenning as it was called). Then ShellShock hit followed by this new issue in iOS 8 where if you reset your iPhone settings your backups on the cloud also go bye-bye. Ouch! I hope if you are using the iCloud (or any cloud for that matter) you have a duplicate copy of your data somewhere else or you better not try to reset your phone.

The bug creeps up when you select Settings > General > Reset > Reset All Settings. Typically, this is just supposed to reset your network settings to give your iOS device a clean slate to work with, but it turns out it’s also deleting all your files from iCloud Drive.

The issue was discovered by members of the MacRumors forum. It just shows that no matter how much we try nothing is perfect and there are bugs in every system. The best way to ensure that don’t loose data is to store it in multiple places using multiple types of media/services.

I have a lot of my data backed up on a RAID array and am in the process of setting up a cloud server at home to sync it across different locations. I am not using Dropbox or other such services because I don’t want to trust my data to any external provider. Earlier I used to back up data on DVD’s/CD’s. Before that I used to store the data on Floppy disks.

Fun fact, I was recently looking for some code that I had written around 1998 and ended up searching through my old Floppy disks to find it. Interesting thing was that about 90% of the disks still worked and I was able to read the data without issues. (Well… no issues other then the fact that I had to buy a USB floppy drive as my mother board doesn’t have a connector for floppy drives…) I don’t see the same level of longevity in either DVD’s or CD’s so far. I haven’t tried Blue-Ray disks yet because of the cost and the fact that HDD’s are getting cheaper / larger.

Thanks to lifehacker.com for the initial links.

– Suramya

July 10, 2012

Wireless finally working on the RaspberryPi

I finally managed to get wireless working on the RaspberryPi (Go Me!). The main problem was that when I connected the USB dongle directly to the Pi it wasn’t getting enough power, then when I connected it via a powered USB hub I kept getting error messages. If you like you can read about me previous attempts to get the wireless working here and here. Since I didn’t feel like spending more time on this (and because I thought that the problem was caused because of a problem with the USB hub) I stopped fiddling with it. Then I had to switch the SD card I was using in the Pi (the old one was the card from my camera so I replaced it with another 2GB card) so I downloaded and installed Debian Wheezy on it.

Turns out that the Wheezy doesn’t have the same problems with the USB hub as Squeeze did, so all I had to do was plug in the stuff, install the firmware and I was ready to go. To configure the wireless network I installed wicd as I have found that to be the easiest way to work with wireless networks, I also installed the wicd-curses interface so that I could configure the system from the commandline. The commands I used were as follows:

apt-get install wicd wicd-curses

Then ran wicd-curses to configure the Wifi, That’s it. Now my Pi is connected to net wirelessly and I have one less cable running across my desk, which is great.

Well this is all for now. Will post more later, its time for me to hit the sack. Have an early day tomorrow.

– Suramya

June 27, 2012

Installing Citrix on the RaspberryPi + Other Pi related stuff

One of the use cases I had for the Pi was to use it as a portable thin client that could connect to a Windows server using Citrix. After a little experimentation I managed to get Citrix installed on the Pi and was able to connect to a Windows server successfully and work. I documented the steps I followed to get this to work on the RaspberryPi forum, check out the Tutorial (How to get Citrix working on a RaspberryPi) if you are interested.

Getting Citrix working was a positive thing, other than that I spent some time trying to install my Wireless network dongle (3Com OfficeConnect Wireless. Model # 3CRUSB10075) on the Pi and hit some hurdles in the process. If you remember the last time when I tried this I thought the problem was caused because the card was pulling more power than the Pi could provide. So I went and got a Belkin powered USB hub (I needed it anyways as I need to connect more than 2 USB devices to the Pi).

When I initially plugged in the hub everything seemed to work without issues and the keyboard + mouse I had connected to the hub worked without issues. So I plugged in the wireless dongle, as soon as I plugged it in my mouse and keyboard both stopped working. I then unplugged the dongle and both the mouse & keyboard started working again. I then plugged the keyboard directly on the Pi and the dongle on the hub, now the keyboard worked but the mouse had issues. Looking at the /var/messages log I saw a ton of error messages like the following:

Jun 21 18:10:46 raspberrypi kernel: DEBUG:handle_hc_chhltd_intr_dma:: XactErr without NYET/NAK/ACK
Jun 21 18:10:46 raspberrypi kernel:
Jun 21 18:10:46 raspberrypi kernel: DEBUG:handle_hc_chhltd_intr_dma:: XactErr without NYET/NAK/ACK
Jun 21 18:10:46 raspberrypi kernel:
Jun 21 18:10:46 raspberrypi kernel: DEBUG:handle_hc_chhltd_intr_dma:: XactErr without NYET/NAK/ACK
Jun 21 18:10:46 raspberrypi kernel:
Jun 21 18:10:46 raspberrypi kernel: DEBUG:handle_hc_chhltd_intr_dma:: XactErr without NYET/NAK/ACK

Tried a few things but nothing worked and since it was 3:30 in the morning I gave up and crashed for the day. Will try again when I have had some sleep and get some dedicated time to play with the Pi.

– Suramya

March 13, 2012

Running Ubuntu on my Samsung Galaxy Tablet

Filed under: Computer Software,My Thoughts,Techie Stuff — Suramya @ 1:25 AM

A couple of days about someone at work posted an email asking about Ubuntu Installer and if anyone has tried installing Ubuntu on their android tablet using this software (Sorry I can’t remember your name but am too lazy to log on to the office network to find it in my mailbox). I volunteered to try it out because it sounded interesting and cool to have. This application allows you to install Ubuntu on your Android device on top of android so you basically run Ubuntu as a virtual machine in Android in a fairly easy and painless way. From the FAQ on the developer’s website:

This projects aim is to bring a range of linux distros to your android device through a method known as ‘chroot’, see it has running a linux distro within a virtual machine on your phone. You can access this virtual machine and run it on your phone without causing any damage to your device, or having to overwrite anything. Why might you want this? well my apps are designed to make the install and set up process as easy as possible (more so in the paid apps) while still giving you some flexibility. Once you have the distro up and running then you can pretty much run and install any linux software you like (so long as there is a arm port or it is not architecturaly depenedent), sure there a very few big benefits over what android itself can do but it is still pretty dam cool. (and with the free ubuntu version, hey its free does it matter how useful you find it?)

Excluding the time it took to download the image, the entire process took me about 15 mins to complete so that shows you how easy & painless the entire process was. The app install takes only a couple of mins to complete and that just installs an application that gives you a user guide that explains the install process and buttons to make the process faster/easier. The process is pretty self explanatory and if you can read and understand English and are good at following directions you should have no issues installing. :) I would really suggest downloading the images over WiFi because downloading 1.5GB over 3G/GPRS would be too expensive.

There are two Ubuntu images available: small (450 MB) & large which is 1.5 GB, The large image requires 3.5GB of free space on your SD card and the small image requires 2.5GB of free space. If you have enough free space then you should go for the larger image as that has the Gnome desktop plus a ton of applications pre-installed the small one doesn’t have too many applications preinstalled and uses LXDE instead of GNOME. I first downloaded the small image to try it out and liked it enough to download the large image.

The install itself was mostly painless. I did hit an issue initially when unzip’ing the small image file (the download is a zip file) with AndroZip as it was unable to handle the large file size and kept dying on me. Using Astro’s built in extractor resolved this and I was then able to extract the file without issues. Learning from this I downloaded the large image on my computer and copied it over after extracting it there (plus I didn’t have enough space to download the file and then extract it on the tablet itself).

After you download the images, the instructions tell you to install the VNCViewer app and the Terminal app. It wasn’t clear from the instructions that VNC was required to see the actual desktop itself so I didn’t install it at first thinking that it was so that you could connect to your laptop/desktop from the tablet. I later realized that it was needed to see the Gnome desktop so installed it and was good to go.

The process to start Ubuntu is a bit cumbersome and requires you to type a few commands on the Terminal but once you start the image and select the desktop size you are good to go and all you have to do then is connect to the Ubuntu desktop using VNC. The desktop is fairly responsive and you can zoom in for more fine grained control. The large image installs the Gnome desktop and not Unity but still it was pretty good. Would have liked to get the option to try Unity as it was designed for tablets but I guess that is a project for another day.

Below is an photo of the tablet with the Gnome desktop running on it (Taking a photo of a tablet at night is a pain because the flash reflects off the screen and without the flash the photo is too dark):

Ubuntu on Samsung Galaxy Tab
Ubuntu on Samsung Galaxy Tab

Over all a cool and geeky thing to have, but not really that useful in the long run unless you have programs that you want to be able to work on when not at your desktop and don’t have net access.

– Suramya

January 13, 2012

Official style guide for Android developers launched

Filed under: Computer Software,Interesting Sites — Suramya @ 3:01 PM

Google has just launched Android Design, a website created to help aid developers in the creation of applications for ICS. This makes it easier for developers to code visually consistent applications, so if you are interested in Android development check it out. I took a look and it has some good tips/suggestions on design etc.

Duarte wants to remedy this. On Thursday, Google launched Android Design, a web site created specifically to help aid developers in the creation of applications for ICS. The site offers a comprehensive visual to third-party application developers, giving suggestions on everything from how to implement different visual elements to overall back-end patterns for the OS itself.

In theory, it will help developers better understand just how the Android team thinks about layout and implementation, while simultaneously giving suggestions to interaction designers on how to maintain visual integrity. Basically, it will help both first-time developers and Android veterans make apps look less crappy.

Since have been thinking of diving back into mobile development for the past few days, this site will be very useful and has been launched at just the right time. Considering the previous experience I have with mobile development was on Symbian using Python, I can use all the design help I can get.

– Suramya

October 26, 2011

Connecting a WordPress blog to Facebook

Filed under: Computer Software,Linux/Unix Related,Techie Stuff,Tutorials — Suramya @ 5:01 PM

Over the past few months I have been trying to connect my blog to my Facebook account so that whenever a post is made on the blog it automatically gets posted on Facebook to varying degree’s of success. Most of the attempts would work for a while and then stop. I even tried using some of the existing plugins for WordPress but since they required a developer account (which needs a valid phone no or CC#) and for some reason I never get the validation code on my cell I was never able to get them to work.

Then I found an article on Linux Magazine on a Command Line interface for Facebook and decided to build on top of that to get the linkage working. Now this is a very hackey way and is not at all elegant or anything but it gets the work done which is what I wanted, so I am good. :) All the work was done in about 2 hours including testing so that should tell you something on its own.

I had to install this on my local system since my webhost didn’t have all the per-requisites to get this to work. That and the fact that I can’t connect to my MySQL db’s from a machine outside of my hosting provider is why this convoluted method was created. The steps I followed to get this to work are as follows.

Install Facebook Commandline

To install Facebook Commandline, follow the instructions on their site.

Authenticate the Application to be able to talk to Facebook

For some reason there was a difference when I run the application from the commandline and when I run it from the web, in as to where the preferences file and the session details were saved, so all the steps have to be done either from the command line or via the web, you can’t interchange the two.

Creating a Web interface for the FBCMD

Since I wanted to be able to get data from WordPress and pass it on to FBCMD I created a new PHP page called run.php that basically pulls the data from WordPress and then passes it to FBCMD as command line parameters. I know that using passthru is probably not very secure and I should have modified the FBCMD file to accept parameters as a URL but didn’t want to spend that much time trying to get this to work. (Hey! I told you it was a quick and dirty ‘fix’).

The contents of this file are very simple:

error_reporting(E_ALL);
$handle = fopen('http://www.suramya.com/blog/LatestPost.php', 'r');
$current = fopen('/var/www/fbcmd/latest.dat', 'r');
$current_id = fgets($current, 4096);
fclose ($current);

if ($handle) 
{
 $ID = fgets($handle, 4096);
 $link = fgets($handle, 4096);
 $title = fgets($handle, 4096);
 $content = fgets($handle, 596);
 $content = chunk_split(htmlspecialchars(strip_tags($content)), 500) . "...";

 if($ID != $current_id)
 {
  // If we have a new post then call FBCMD to make a post
  $command = '/usr/bin/php /var/www/fbcmd/lib/fbcmd/fbcmd.php POST " " "' . chop($title) . '" "' . 
              chop($link) . '" "' . $content . '"';
  passthru ($command);
  // Write the new PostID to a file
  $current = fopen('/var/www/fbcmd/latest.dat', 'w');
  fputs($current, $ID);
  fclose($current);
 }
}

The file basically calls ‘LatestPost.php’ and gets the latest post details on the blog(see below for details), then it checks if the post made is newer than the last post processed and if so it proceeds to post to Facebook using FBCMD.

‘LatestPost.php’ file looks like this:

< ?php

define('WP_USE_THEMES', true);
require_once( dirname(__FILE__) . '/wp-load.php' );

$month = $_GET['month'];
$year = $_GET['year'];

$args = array( 'numberposts' => 1);
$myposts = get_posts( $args );

//print_r($myposts);

foreach( $myposts as $post ) : setup_postdata($post); 
echo $post->ID . "\n";
the_permalink();
echo "\n";
the_title();
echo "\n";
the_content();
endforeach; ?>

This file need to be put on the server in the WordPress Root directory and when called returns an output in the following format:

Post ID
Post Link
Post Title
Post Content

Once all this is done and the FBCMD has access to post to Facebook all we need is a cron job to run on a frequent basis to run the code. So I created a shell script that contains the following line and have it run every 15 mins.

/usr/bin/curl http://localhost/fbcmd/run.php > /tmp/FBPost.out

That’s it. So far it looks like its working great and if this post shows up on my FB wall then all is well. If not, then its back to the code to see what went wrong this time.

– Suramya

September 19, 2011

Trouble-Maker: Learn to fix computer issues

Filed under: Computer Software,Linux/Unix Related,Techie Stuff — Suramya @ 2:38 AM

This interesting app randomly breaks your system so you can learn how to fix it.

Haven’t tried it yet because as of now I only have one working Linux system at home, but as soon as I fix that I will be installing this on my secondary system. Once I do that I will log my experiences here.

You can download it from Trouble-Maker‘s site.

– Suramya

May 18, 2010

Boot From a USB Drive even when your BIOS Won’t Let You

Filed under: Computer Software,Computer Tips — Suramya @ 11:37 PM

If you are like me then you have gotten into the habit of carrying a Live Linux CD with you at times, I keep mine in my Laptop bag so its there when I need it. However CD’s have a lot of inherent problems like, an inability to update the version without burning a new disk and a susceptibility to scratches.

Having a Bootable USB drive with the latest version of Linux solves all these problems. USB drives are quite cheap now and it makes sense to have one available loaded with the latest diagnostic tools. But till date I didn’t carry a bootable USB drive with me because a lot of the systems I encountered didn’t allow me to boot from USB which made the bootable drive pretty much useless. Now, there is a way to fix the problem. What you need is a Blank CD and the latest version of PLoP.

PLoP is a Bootmanager that allows you to create a boot CD that will enable the system to boot from a USB drive even when that option is not supported by the BIOS. You can download PLoP from here. Installing it is quite easy. You just need to extract the .ZIP file that you downloaded and burn the .iso image to a CD. There are two ISO images on the CD and you can use either one of them, however according to the readme file plpbtnoemul.iso should work “everywhere” so if you have some doubt use that image.

Once you burn the image to the CD, reboot the system and configure it to boot off the CD. When the system boots up you will get a boot menu that will allow you to choose USB as the device to boot from. Once you do that the system will boot off the USB drive as normal and you can proceed from there.

Hope you find this as helpful as I am going to.

– Suramya

Source: Boot From a USB Drive Even if your BIOS Won’t Let You – How-To Geek.

February 24, 2010

Getting Wireless on my HP Pavilion DV5000 to work on Linux

Filed under: Computer Software,Knowledgebase,Linux/Unix Related — Suramya @ 10:46 PM

I have heard that connecting to wireless networks can give a lot of trouble in Linux. I have even experienced the same when I tried out Debian and Red Hat Enterprise Linux (RHEL) 5 on my HP Pavilion DV5000 laptop. In Debian I managed to get the card working but on RHEL I couldn’t get it to work.

Actually I could have gotten it to work but lacked the time to spend trying out various solutions. Plus the final solution wasn’t very elegant or portable. Basically what I ended up doing was hardcoding the config file to connect to a particular wireless network. Which obviously wasn’t a very portable solution.

When I decided to try out Backtrack 4 which is a Linux-based penetration testing distribution that is based off Ubuntu I was worried that my wireless card (Broadcom BCM4318) would again cause issues. If you have been using Linux then you probably have heard of this-chip set as earlier versions of Linux had a lot of problems getting this card to work and so I was expecting a lot of work before I got the card to work.

While the OS was installing I did a little search on google and that reminded me of a post on Tech Republic that talked about 10 tools to connect to wireless networks in Linux so I decided to try out each of them to see which one worked for me.

Fortunately for me the first program I tried (wicd) solved my problem. All I had to do to get the network working was: log in as root and then run the following command:

/etc/init.d/wicd start

Once I ran the command all my network cards were automatically detected and I could configure them. However since its a pain to configure the cards manually, I ran the following command to start the GUI based client for wicd:

wicd-client

When you run wicd-client a new icon shows up in the system tray (next to the clock) and if you double click on the icon the Wicd manager starts and allows you to configure any wireless/wired network that the system detects.

Over all, wicd is quite easy and a lot more intuitive than the default KDE Network manager, plus another advantage is that wicd supports WPA which the default KDE Network manager doesn’t.

Now that I have gotten the card working on Ubuntu I am going to re-install RHEL on the laptop and see if wicd can get the card working over there also. But that’s work for another day.

– Suramya

Older Posts »

Powered by WordPress