Suramya's Blog : Welcome to my crazy life…

March 12, 2013

Does your Handwriting suck? Now you can have a machine write for you.

Filed under: My Thoughts,Tech Related — Suramya @ 1:20 AM

This is something I really need. πŸ™‚ Those of you who know me, know that my writing is horrible and most of the time only I can read it. Here’s an invention by students from Olin College that solves this problem. Meet Herald, a machine that can produce beautiful calligraphy.

The machine uses a gantry to move the writing tip along the X and Y axes. The flexible-nib calligraphy pen is mounted on a sprocket which rotates the tip onto the writing surface, taking care of the third axis. The rig was beautifully rendered from their CAD drawings, then tweaked to ensure the smoothest motion possible before the quintet of Sophomores began the physical build.

Check it out in action at Herald Calligraphy. Now if only someone makes a portable version of this, I will be all set πŸ™‚

Thanks to Hackaday.com for the initial scoop.

– Suramya

March 8, 2013

Citrix on Raspberry Pi: Updated instructions and working download image

Filed under: Knowledgebase,Linux/Unix Related,Tech Related,Tutorials — Suramya @ 2:36 PM

A couple of folks have reached out to me via email/messages to tell me that the instructions I posted at the Raspberry Pi forums don’t work with the latest version of Rhaspbian. Basically the problem is that the latest version of the Citrix client is not compiled for the armhf architecture (Which is what the latest version of Rhaspbian OS is compiled for), so you need to download and install the armel version of the OS (‘Soft-float Debian Ò€œwheezyÒ€’) from http://www.raspberrypi.org/downloads.

To make life simpler for people I have created a snapshot of my Pi install with Citrix installed and configured. You can download it from here. The image is 4GB so you will need to use a card of atleast that size when using this image. Follow these steps to install the image to an SD card in Linux:

  • Download the image file from the mirror (Approx 1GB compressed)
  • Unzip the file using the command
  • unzip Raspberry_Citrix.img.zip
  • Find out what the partition the SD card you are using has been assigned running the following command as root
  • fdisk -l

    Once you run the command, you will get an output that will show you all the disks attached to your system, look for the entry that corresponds to your card. In my case it looked like this:

     Disk /dev/sde: 3965 MB, 3965190144 bytes
    122 heads, 62 sectors/track, 1023 cylinders, total 7744512 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00016187
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sde1            8192      122879       57344    c  W95 FAT32 (LBA)
    /dev/sde2          122880     7744511     3810816   83  Linux
    
  • So now we know that the card is at /dev/sde. All we have to do is write the image to the card and that is done using the following command. Make sure you replace the /dev/sde with the correct path otherwise you will end up destroying all data on the wrong drive.
  • dd if=Raspberry_Citrix.img of=/dev/sde bs=4096

    You will not see any output on the screen so don’t worry about it, just let it run and wait for the process to complete as it will take some time because of the amount of data being written. Once the process completes you can eject the card and if all went well you should be able to boot the Raspberry Pi from the card.

The login password for this image is root/password, please do change the password if you use the image. Let me know if you have any questions or have an issue using this image.

Update (3/28/2013): Adding instructions on how to write the image when using windows. (Please note that I haven’t tested the windows instructions as I don’t have a windows machine. Use at your own risk)

Once you download the zip file from the mirror, right-click on it and select extract (I think that’s what it says, but I don’t have a windows machine so can’t confirm). After the image is extracted you will have a file called Raspberry_citrix.img on your computer. Now follow these steps to write the image to an SD card (Instructions taken from eLinux)

  • Insert the SD card into your SD card reader and check what drive letter it was assigned. You can easily see the drive letter (for example G:) by looking in the left column of Windows Explorer. If the card is not new, you should format it and make sure there is only one partition (FAT32 is a good choice); otherwise Win32DiskImager can make corrupt your SD card!
  • Download the Win32DiskImager utility. The download links are on the right hand side of the page, you want the binary zip.
  • Extract the executable from the zip file and run the Win32DiskImager utility. You should run the utility as Administrator!
  • Select the Raspberry_citrix.img image file you extracted earlier
  • Select the drive letter of the SD card in the device box. Be careful to select the correct drive; if you get the wrong one you can destroy your data on the computer’s hard disk!
  • Click Write and wait for the write to complete.
  • Exit the imager and eject the SD card.

You should also go through the Basic setup guide for Raspberry Pi. Hope this helps.

– Suramya

August 4, 2012

Reinstalled system after accidental removal of KDE. Pleasantly surprised by ease of configuration

Filed under: Computer Tips,Knowledgebase,Linux/Unix Related,Tech Related — Suramya @ 11:19 PM

Last night I was trying out stuff on my computer and decided to install virtual box on the system to allow me to install Windows in a virtual environment. I ran the command to install virtual box and then said ok without paying too much attention to what it was doing. As a punishment for that, the apt-get program proceeded to uninstall most of the KDE environment on the system leaving me with Gnome as my primary desktop (and there is no way I am using Gnome as my primary desktop). I could have fixed it by reinstalling KDE but since I had been thinking about removing the 32 bit Debian and installing the 64 bit version I decided to use this opportunity to do so and downloaded the 64 bit version from the Debian site, put it on a USB drive and proceeded with the install which took about an hour to complete.

After the install completed, I upgraded the system to the latest ‘Unstable’ build (Debian Unstable has the latest software packages so I prefer using it as opposed to Stable which is rock solid but has fairly dated software versions.) which took most of the night thanks to the no of packages to download and install. Once everything was upgraded I started customizing my setup and initially was dreading the amount of time it would take to get both my monitors working (based on previous experience) but surprisingly this time I didn’t have to do a lot to get both the monitor’s working.

If you remember, the last time I tried enabling the second monitor I hit a lot of hurdles mostly thanks to the mess I had made with my previous meddling and experimentation but this time it was fairly simple. I thought that I would follow the same steps I had the last time I installed the monitor so I started by installing the fglrx driver but the latest version of the driver no longer supports my chipset (ATI RS880 [Radeon HD 4250]) and the installer told me to install the free Radeon driver in the package xserver-xorg-video-radeon instead. So I did that after purging the fglrx driver (See here for instructions). I also had to install the Firmware for the Radeon card which I did by issuing the following command:

apt-get install firmware-linux-nonfree

After the driver was installed I rebooted (to make sure all systems started up clean) and setup my dual monitors by following these steps:

  • Click on Start -> System Settings
  • Click on ‘Display and Monitor’ under Hardware.
  • Under ‘Size & Orientation’ change the ‘Position’ dropdown to ‘Left Of’ the first (If your second monitor is to the left of the first one)
  • Set the Primary output to the monitor where you want the Task bar etc to show up. If you don’t know which monitor is which, click on the identify Outputs button.
  • Once you are done, Click on ‘Apply’ and if all looks good you can set it as default by clicking on the ‘Save as Default button’.

If you are ok with the resolutions available to you in the dropdowns above then you are done and you can skip the steps below.

Unfortunately for me I wanted a resolution of 1440×900 as the default instead of 1600×900 which was too small & the fonts looked pretty bad at that resolution and the 1280×1024 which was the next available size looked worse because my of my monitor shape (16:9 resolution as opposed to 4:3). So I had to do a bit more work to fix the problem.

First I tried manually setting the mode to 1440×900 using xrandr but I got an error message that “xrandr ‘cannot find mode'”. So I did a little Google search and found a forum post where another person was having the same issue. That link told me how to add a custom mode to my system which I did using the following steps:

First we need to figure out if our configuration will support the mode we are trying to use and if so get the modeline we need for the new config, so we run this command:

cvt 1440 900

If the system can support the resolution specified (1440×900 in the above example) it will return a line that looks something like:

# 1440x900 59.89 Hz (CVT 1.30MA) hsync: 55.93 kHz; pclk: 106.50 MHz
Modeline "1440x900_60.00"  106.50  1440 1528 1672 1904  900 903 909 934 -hsync +vsync

Luckily for us my system can support the resolution so we then need to tell xrandr about the new mode using the following command:

xrandr --newmode "1440x900"  106.50  1440 1528 1672 1904  900 903 909 934 -hsync +vsync 

Where the first paramter (“1440×900” in this case) is an identifier and the rest is the information returned by cvt. (If successful the command will return no output.)

Then we need to tell the system that both the displays (called DVI-0 and VGA-0 on my system) should use the new mode which is accomplished using the following commands:

xrandr --addmode VGA-0  "1440x900"
xrandr --output VGA-0 --mode 1440x900
xrandr --addmode DVI-0  "1440x900"
xrandr --output DVI-0 --mode 1440x900

If the commands were successful then your screen should resize and start using the new resolution. Now that this is done we want this to happen everytime we log in without having to run the commands manually.

When you click on the ‘Save as Default’ button in the ‘Size & Orientation’ dialog box, KDE saves your settings in a file at the following location: ~/.kde/share/config/krandrrc that is executed everytime you log in to KDE. So to make the changes permanent we have to modify the file with the new settings.

The file contains the following lines right at the top:

[Display]
ApplyOnStartup=true
StartupCommands= 

We need to modify the StartupCommands= line to use our new settings. Basically it should contain all the commands we used above in a single line delimited by \n. On my system the file looks like the following after I updated it:

[Display]
ApplyOnStartup=true
StartupCommands=xrandr --newmode "1440x900"  106.50  1440 1528 1672 1904  900 903 909 934 -hsync +vsync\nxrandr --addmode DVI-0  "1440x900"\nxrandr --addmode VGA-0
  "1440x900"\nxrandr --output VGA-0 --pos 1450x0 --mode 1440x900 --refresh 59.9782\nxrandr --output DVI-0 --pos 0x0 --mode 1440x900 --refresh 59.9782\nxrandr 
--output DVI-0 --primary

Once you make the change, save the file and log out. After loging out I usually restart X to make sure everything came up cleanly and then if all went well then the changes should take effect after you log in.

Hope others find this useful when configuring their systems.

– Suramya

PS: The best part is that after re-formating and using the Opensource version of the display driver instead of the proprietary one, my average memory usage went down from about 3GB about 1GB with all the same programs running in the background. πŸ™‚

July 19, 2012

Sensordrone brings us one step closer to having a real life StarTrek Tricorder

Filed under: Interesting Sites,My Thoughts,Tech Related — Suramya @ 10:56 PM

Anyone who has watched Star Trek would love to get their hands on a Tricorder, but till recently Tricorders have been the stuff of Science Fiction. However slowly but steadily the technology to build them is getting there. We have the Tricorder Project which gave us the blue prints to create a basic version of the tricorder. It was cool and let you watch Magnetic field fluctuations etc (among other things) but still required you to build the thing yourself. Now comes Sensordrone, a project that pairs a sensor-heavy dongle with your smartphone and then opens them up for use using different apps. Me Want! πŸ™‚

Its basically a sensor package that you pair with your phone and then run apps to visualize the various data, with no need to build the hardware yourself (I am more of the software building person.) Sensordrone is a Kickstarter project so its not really a real product yet but since people have pledged $153,655 for the project already (target was $25,000), it does seem like this is going to be an actual release pretty soon. They are aiming for an Oct 2012 release and it would cost about $200 or so. When it comes out I think I probably will end up buying it… Does that make me a Geek? Hell yeah… πŸ™‚

Excerpt from their website:

If you have a Sensordrone, you can run apps on your tablet or smartphone to monitor carbon monoxide and air quality, find gas leaks, measure your child’s temperature, log the weather, and much more.

For example, apps using the capacitance sensor can work as a stud finder, a proximity monitor, or a liquid level monitor. Apps using the pressure sensor can work as a barometer, an altimeter, calculate elevation differences so you can measure the height of a building, be hooked up to a pressure cuff to work as a blood pressure monitor, and more. Humidity sensing is not just for weather, it determines comfort level for infants, finds the optimum conditions for storing foods, and could even help prevent mold from growing in your home

Sensordrone makes any sensor application as easy as running an app!

Thanks to Engadget: Sensordrone lets your smartphone monitor temperature, air quality, inebriation for the heads up.

– Suramya

July 15, 2012

Got the Jelly Bean Update on my Nexus

Filed under: My Thoughts,Tech Related — Suramya @ 10:21 PM

After waiting for a day for the update to show up on my Nexus, I forced the update to download on my Nexus. It was a fairly simple process which I had used before to get the 4.0.4 update as well. The steps are as following

  • Go to Settings -> Apps -> All
  • Click on Google Services Framework
  • Click on Clear Data
  • Click on ‘Force Stop

Once you do this you need to:

  • Goto Settings -> About Phone
  • Click on ‘Check for updates’

You might have to do this a couple of times (I had to do it 3 times) before the update shows up and downloads. The overall process took about 1/2 hour including the time required for the update to download.

Have been using it for about 2+ days so far and wanted to document my reactions/findings:

* System is now extremely fast, the screen switching is about 3-4 times faster and smoother.
* The Google bar on the top is a bit distracting. It had a black background previously, now its grey so is noticeable.
* Love the voice recognition. The system can do voice recognition without being connected to the web (tested in Airplane mode) and is about 90% accurate. Seems like its a bit more accurate when connected to the web, but don’t have any hard data for that.
* Battery life is a lot improved, my phone went about 2 days with regular usage. (I was getting about 1 day+ earlier)
* Camera gives a visual feedback when a photo is taken so people don’t take a million photos thinking it wasn’t taking photos.

Some downsides/issues etc:

* I think my Wireless connects gets disabled a min or so after the screen switches off. Haven’t verified it yet but if that is the case then it will be a major issue.
* The soft buttons feel a bit less reactive on some screens, but again its a bit subjective and haven’t verified it.

Overall I like the new update. I think Google did a good job with this update.

– 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

July 4, 2012

Interesting Troubleshooting step

Filed under: Humor,My Thoughts,Tech Related — Suramya @ 11:49 PM

This is a question that has been bugging me for a while and I see most tech support people do this; both here in India and in the US and I can’t figure out how it helps, maybe one of you guys can help me figure this out. Basically if you someone from tech support is working on your computer, lets say installing a driver, or troubleshooting why your net connection is not working, they will minimize all the windows, right click on the desktop and then click refresh. They usually do it a couple of times before continuing with the troubleshooting. Supposedly this helps resolve issues, I did ask them why they do it but didn’t really get a clear answer and it bugs the hell out of me… Any idea what that is supposed to accomplish, other than refresh my desktop icons? I have only one icon on my desktop right now: Trash, which really confuses people and its fun to watch them.

Some of the troubleshooting questions I have heard and the statements people make when I call to complaint about issues are just hilarious. For example I was once told that you can only connect to the internet using a DSL connection if you have windows installed. No other OS’s are supported. I asked the guy to just give me the settings I needed to have and the password to the modem but he kept telling me that since I didn’t have windows it would never work (the conversation started when he asked me to install a software to configure the modem).

It would be interesting to know if others have seen similar behavior when they talk to helpdesk?

– Suramya

July 1, 2012

Had a fun weekend

Filed under: My Life,Tech Related — Suramya @ 11:08 PM

This weekend was fun, parents are in town so they came over. I originally wanted to go watch the new Spiderman movie but couldn’t do so because something came up, but other than that the weekend was great. Mom and dad spent most of the weekend here before Surabhi called them back. Having parents over is both a positive and negative thing. Positive in the sense that your house gets cleaned and stuff gets arranged/organized, the downside is that stuff gets arranged/organized. Simple example, for the past year the switches in my kitchen were wired in a certain way, 1st switch was for the exhaust fan and the second was for the lights. Now dad rewired them so that the 1st switch is for the light, now it makes perfect logical sense but for the past few days every single time I go to the kitchen I switch on the fan when I want to turn on the lights… and its annoying…

As some of you know I use a hard-drive platter as a coaster and over the past year the platter I was using got a lot of scratches and it seemed to be ready to be replaced. I had a 200GB drive that had died a while ago sitting in my drawer so after I made sure it didn’t have any important data (stuck in it the freezer and then was able to read the drive. Yes you read that correctly, sticking drives in the freezer actually helps recover data) I dismantled the drive. Surprisingly it was a pain to dismantle the drive, there were 6 screws in the spindle that took me almost 1/2 hour to unscrew because everytime I tried to unscrew the entire platter would rotate. Finally had to stick another screwdriver in there and got the platters out. Now I have a brand new coaster. πŸ™‚

The drive had three platters so if anyone wants a coaster, let me know. BTW its also reflective enough to be used as a mirror.

Other than that I finished some work and upgraded the OS on the RaspberyPi. Initially I had installed the Debian Squeeze (Ver 6) standard install but today I upgraded to Debian wheezy public beta build. It installed without issues and I like the new build, it seems a bit snappier than the old install, also they have included a new configuration tool that comes up the first time the system boots up that allows you to configure various options using a menu based system (sort of like the Debian installer used to work). Haven’t really played with it yet, but looking forward to it. Maybe the stupid wifi card will work on the new build. If not I am going to go steal a powered USB hub from someone.

Going to connect the Pi to my TV and try playing a movie on it to see how it works… lets see… Hopefully it will play without issues. If not, then its an excuse to fiddle with it till it does work.

Well this is all for now. Will write more later.

– 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

June 23, 2012

Experience so far with the RaspberryPi

Filed under: My Life,My Thoughts,Tech Related — Suramya @ 10:46 PM

In one word, the experience so far has been awesome! I recently got my hands on the RaspberryPi and as I mentioned earlier I will be blogging about my experience with it. I had to go buy a USB keyboard as I didn’t have any USB keyboard at home (yeah yeah, lot of people ask me about that… My old PS2 keyboards worked fine so didn’t even realize I didn’t have USB). I bought the mouse as well since I didn’t want to disconnect the mouse from my main system every time I booted into X on the Pi. I got the wired version of both because I wasn’t sure if the Pi could support wireless. It does support wireless stuff but it depends on how much power each device pulls and since I didn’t want to take a chance I went with wired.

Set it up, hooked it to my 2nd monitor and booted and it came up perfectly. Initially there was a problem with the display switching of for about 1/2 a sec at random intervals but that was easily fixed with a line added to the config file. Basically the problem was that the HDMI output wanted more power than the board was giving and since that is software controlled I was able to change it by adding the following line to /boot/config.txt

config_hdmi_boost=4

The other, I won’t call it an issue but distraction I had to fix was that when the system started up in full screen, there was an inch of black space around the display on all four sides. This also was easily fixed by adding the following line to the config file (more details on troubleshooting and available config options are available Here):

disable_overscan=1

I added the line, restarted and both the issues listed above disappeared. After that I played around a bit with the system and found that the average boot time is about 10-15 seconds to the login prompt. If I start the GUI interface it takes between 20-30 seconds for it to come up and be usable. Was able to browse the web and install software without any issues at all.

One interesting fact that I noticed was that the system didn’t appear to honor the rcX.d convention. I was trying to get ssh to start be default on the Pi when it booted up so I put an entry in the /etc/rc2.d directory called S25ssh which was a symbolic link to /etc/init.d/ssh and this should have started up SSH everytime the system booted up but for some reason that wasn’t the case. I tried fiddling with the number, made sure the file was executable etc but nothing seemed to work so I finally ended up adding the line in /etc/init.d/rc.local and then it worked fine. Haven’t really debugged it but it felt like it wasn’t supported or something else was overriding the instructions.

Finally once everything else was working the way I wanted it to, I decided to try get my Wireless dongle working on the Pi. Unfortunately I could only get it to work partially. The system detected the dongle without issues but gave the following error as the firmware for the dongle wasn’t installed:

zd1211rw 1-1.2:1.0: couldn't load firmware. Error number -2
usb 1-1.2: Could not load firmware file zd1211/zd1211_ub. Error number -2

The fix for this was easy, all I had to do was run the following command to install the firmware:

apt-get install zd1211-firmware

Once the command finished, the card was activated and I was able to see the networks around me including my home wireless network. However for some reason it was unable to get a DHCP lease from the router no matter what I tried, I even tried setting a static IP but it still wouldn’t go out to the net. I think the problem might have been because the dongle was trying to pull more power from the USB than the board supported, but since I didn’t have a working powered USB hub I couldn’t test the theory. Wondering if I should go buy a powered USB hub… Haven’t decided yet but it might be required as the Pi only has two USB ports and already I have three devices that I want to connect (the number will go up as I find more and more uses for the board).

Well this is all for now. Will post more once I play with the board a bit more.

– Suramya

« Newer PostsOlder Posts »

Powered by WordPress