Technical


NMAM Institute of Technology, Nitte held an International Level Conference on “Computer Architecture, Networking and Applications” (IC-CANA 2011) at Mangalore on 7th and 8th January, in association with Penn State University, Harrisburg USA. The conference was co-sponsored by Nitte University, Nitte Education Trust, ISTE, NewDelhi. CSI Division-V (E&R), VTU Belgaum, TCS, EMC, Veriguide and Robosoft Technologies. I was invited as one of the speakers in the tutorial session. I presented Intelligent Workload Management in the cloud track on the first day. I co-chaired the thesis presentation along with Dr. Swarnalatha on the second day and participated in a panel discussion on “Relevance of Industry Institute Interaction in the Global Education Scenario”.

One of my technical writers asked me how they can leverage cloud computing.  Interesting thought!!!. From a developers perspective, we have been talking about cloud as a development and testing resource.  For eg.  I can easily scale up my resources using the cloud environment if I need to run a scalability test.  In the past, I used to raise a request and wait for the resources to arrive before I can even start my test; and I used to call this time as the planning phase.  How do you leverage cloud for technical writing?

The immediate benefit came to my mind is online collaboration.   Desktop publishing is going to be a thing of past.  Google Docs (I’ve been using google docs over 4 years now) revolutionized online shared editing though there were other players in the market at that time.  Adobe, Zoho, Whiteboard and a number of others came in, but none of them could attract us as much as Google. The latest addition to this list is Microsoft with its office live and SkyDrive.  BTW, I just noticed that Office Live doesn’t use a secure connection.  Online documents and collaborative editing will help me to update documents the way we add notes or review comments in Acrobat, Word and OpenOfffice documents.  It will be faster for developers and testers to update the documents as and when they find some changes required and a team member from the technical writers group can merge the changes easily.

Another area is ePublication.  I would assume that all documents need to be available (or online conversion when I download) in one or more of the epub format as eBooks and smart phones are going to be used more for reading and getting our work done.  Today, I read my Books24x7 using my Blackberry when ever I get time. 

Other areas worth considering are location aware content which also includes online translation, integration of product documents with user supplied content, etc.  A couple of blogs I read recently support these predictions. 

Agile development methods are overly hyped; probably after cloud!!!.  I happened to read SKORKS today.  I agree with his observation, ie. measuring velocity does not replace planning and scheduling on an agile project.  Velocity is just a metric to measure team productivity.  I would compare this to kloc or design complexity metrics of the traditional development.  One difference is that velocity should always be measured in the team level and so, a constant team is more important.  I heard people talking about shuffling people in a team.  The team velocity is invalid or useless if  team members change constantly in a team.  Once indication of team getting a good grasp of the project is the constantly increasing velocity in the initial phase of the project.  As Alan Skorkin says, a proper estimation process is a must to achieve good and consistent velocity for a team.  More about this later…

Google’s acquisition of Grand Central a while ago was seen as a smart move by industry.  They took almost two years to invite fresh accounts to try out their new beta program, . The good thing about Google Voice (for that matter Grand Central) is that it lets users integrate all of their existing phone numbers and voice mailboxes into one account.  I have been using VoIP from Gizmo for more than 18  months.  I use a SIP device (Linksys ATA PAP2T) to connect my analog phone and make and receive calls as if using a regular line.  Gizmo provides the basic instructions to configure a SIP device.  BSNL blocks (I believe most of the ISPs do this) the SIP Port (5060) and fortunately, sipphone supports port 5061 also for SIP connectivity.  I also have a call in number through Gizmo so that, colleagues at US can reach me anytime. As far as mobile is concerned,  Nokia removed the native VoIP stack from N96.  However, fring is a reasonable alternative (except support for call mute, DTMF etc.)

Another pretty good collaboration by Google and Gizmo a week back added SIP support for Google Voice through Gizmo.  I just got my Google Voice and Gizmo integrated for both incoming and outgoing calls.  Google Voice call quality is amazing.  Its very easy to use and integrates well with your google address book.  Now, my next project is to get my phone, google and ovi to sync contacts and appointments so that I have a single list of contacts across all my collaboration services.

Collaboration is all about getting information easily and through the tools that you want to use.  So, in this respect, I need complete connectivity.  Since I started using facebook actively, I wanted my blog posts to appear on my wall automatically.  So, I configured wordbook which takes care of this syndication.  It appears to work fine now.

I wanted to explore the possibility of using Reliance Netconnect with my openSUSE 11.1. Finally, I managed to try this out today at two different outlets in Jayanagar.  I must say that I’m partially successful as I could get it working once and got a speed of 0.5Mbps.  Here is the summary.

Several new USB devices have their MS Windows drivers onboard; when plugged in for the first time they act like a flash storage and start installing the driver from there. After that (and on every consecutive plugging) this driver switches the mode internally, the storage device vanishes (in most cases), and a new device (like an USB modem) shows up. The WWAN gear maker Option calls that feature “ZeroCD (TM)”.  Reliance Netconnect modems are of type ZeroCD.

The first thing that you notice when you plug-in the modem is that, it mounts as a storage device.

Jul 11 17:07:34 jjaimon-ibm kernel: usb 1-2: new full speed USB device using uhci_hcd and address 7
Jul 11 17:07:34 jjaimon-ibm kernel: usb 1-2: configuration #1 chosen from 1 choice
Jul 11 17:07:34 jjaimon-ibm kernel: usbserial_generic 1-2:1.0: generic converter detected
Jul 11 17:07:34 jjaimon-ibm kernel: usb 1-2: New USB device found, idVendor=19d2, idProduct=fff6
Jul 11 17:07:34 jjaimon-ibm kernel: usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jul 11 17:07:34 jjaimon-ibm kernel: usb 1-2: Product: USB Storage
Jul 11 17:07:34 jjaimon-ibm kernel: usb 1-2: Manufacturer: ZTE, Incorporated
Jul 11 17:07:34 jjaimon-ibm kernel: usb 1-2: SerialNumber: 000000000002
Jul 11 17:07:34 jjaimon-ibm kernel: Initializing USB Mass Storage driver...
Jul 11 17:07:34 jjaimon-ibm kernel: usbcore: registered new interface driver usb-storage
Jul 11 17:07:34 jjaimon-ibm kernel: USB Mass Storage support registered.

As you notice, the modem is not connected as a serial device and its registered to usb-storage.  One way of getting the serial device created is by unloading the usb-storage module and reloading the usbserial.  For eg.
modprobe -r usb-storage usbserial; modeprobe usbserial vendor=0x19d2 product=0xfff6

However, this alone will not be sufficient as the product id is still pointing to storage device.  This is where usb-modeswitch comes handy.

The device was listed as ZTE 8710 and there is an entry for this device already in my /etc/usb_modeswitch.conf.  All that I had to do was uncomment the following lines

# No. 2

DefaultVendor=  0x19d2
DefaultProduct= 0xfff6

TargetVendor=   0x19d2
TargetProduct=  0xfff1

You must run usb_modeswitch once the modem is connected.  You will see the following output if everything goes well.

jjaimon-ibm:/etc # usb_modeswitch -W

 * usb_modeswitch: tool for controlling "flip flop" mode USB devices
 * Version 1.0.2 (C) Josua Dietze 2009
 * Works with libusb 0.1.12 and probably other versions

Reading config file: /etc/usb_modeswitch.conf
DefaultVendor=  0x19d2
DefaultProduct= 0xfff6
TargetVendor=   0x19d2
TargetProduct=  0xfff1
TargetClass=    not set

DetachStorageOnly=0
HuaweiMode=0
SierraMode=0
SonyMode=0
MessageEndpoint= not set
MessageContent="5553424312345678c00000008000069f030000000000000000000000000000"
NeedResponse=0
ResponseEndpoint= not set
Interface=0x00

InquireDevice enabled (default)
Success check enabled, settle time 2 seconds

usb_set_debug: Setting debugging level to 15 (on)
usb_os_find_busses: Found 005
usb_os_find_busses: Found 002
usb_os_find_busses: Found 004
usb_os_find_busses: Found 001
usb_os_find_busses: Found 003
usb_os_find_devices: Found 001 on 005
usb_os_find_devices: Found 001 on 002
usb_os_find_devices: Found 003 on 004
usb_os_find_devices: Found 002 on 004
skipped 1 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 004
error obtaining child information: Inappropriate ioctl for device
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 014 on 001
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 003

Looking for target devices ...
 No devices in target mode or class found
Looking for default devices ...
 Found default devices (1)
Accessing device 014 on bus 001 ...
Using endpoints 0x0a (out) and 0x89 (in)
Inquiring device details; driver will be detached ...
Looking for active driver ...
 OK, driver found ("usb-storage")
 OK, driver "usb-storage" detached

Received inquiry data (detailed identification)
-------------------------
 Vendor String: ZTE
 Product String: USB Storage FFF1
Revision String: 2.31
-------------------------

Device description data (identification)
-------------------------
Manufacturer: ZTE, Incorporated
 Product: USB Storage
 Serial No.: 000000000002
-------------------------
Setting up communication with interface 0 ...
Trying to send the message to endpoint 0x0a ...
 OK, message successfully sent
USB error: could not clear/halt ep 10: Protocol error
Device is gone, skipping further steps ...
Checking for mode switch after 2 seconds settling time ...
USB error: failed to open /dev/bus/usb/001/014: No such file or directory
USB error: could not claim interface 0: Bad file descriptor
 Original device can't be accessed anymore. Good.
usb_os_find_devices: Found 001 on 005
usb_os_find_devices: Found 001 on 002
usb_os_find_devices: Found 003 on 004
usb_os_find_devices: Found 002 on 004
skipped 1 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 004
error obtaining child information: Inappropriate ioctl for device
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 015 on 001
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 003
 Found a new device in target mode or class

Mode switch succeeded. Bye.

After this, you must have a /dev/ttyUSB0 device created. You can verify this with lsusb command.  You should see the new product id now.  wvdialconf should also report the presence of new modem device.

And with the following entries in your /etc/wvdial.conf, you should be able to connect...

[Dialer zte]
Init2 = AT+CRM=1
Stupid Mode = 1
Modem Type = Analog Modem
ISDN = 0
SetVolume = 0
FlowControl = Hardware (CRTSCTS)
Phone = #777
Modem = /dev/ttyUSB0
Username = 93xxxxxxx
Password = 93xxxxxxx
Dial Command = ATDT
Baud = 460800

jjaimon-ibm:/etc # wvdial zte
--> WvDial: Internet dialer version 1.60
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: AT+CRM=1
AT+CRM=1
OK
--> Sending: ATM0
ATM0
OK
--> Modem initialized.
--> Sending: ATDT#777
--> Waiting for carrier.
ATDT#777
CONNECT
--> Carrier detected.  Starting PPP immediately.
--> Starting pppd at Sat Jul 11 18:04:31 2009
--> Pid of pppd: 14798
--> Using interface ppp0
--> local  IP address 115.240.5.100
--> remote IP address 220.224.141.129
--> primary   DNS address 202.138.97.193
--> secondary DNS address 202.138.96.2
--> Script /etc/ppp/ip-up run successful
--> Default route Ok.
--> Nameserver (DNS) Ok.
--> Connected... Press Ctrl-C to disconnect

This can be automated by using a udev rule.  More information is provided here. There are also some references in reliance usergroups.   Here is one post that helped me to look at usb_modeswitch

jjaimon-ibm:/etc # usb_modeswitch -W

* usb_modeswitch: tool for controlling "flip flop" mode USB devices
* Version 1.0.2 (C) Josua Dietze 2009
* Works with libusb 0.1.12 and probably other versions

Reading config file: /etc/usb_modeswitch.conf
DefaultVendor=  0x19d2
DefaultProduct= 0xfff6
TargetVendor=   0x19d2
TargetProduct=  0xfff1
TargetClass=    not set

DetachStorageOnly=0
HuaweiMode=0
SierraMode=0
SonyMode=0
MessageEndpoint= not set
MessageContent="5553424312345678c00000008000069f030000000000000000000000000000"
NeedResponse=0
ResponseEndpoint= not set
Interface=0x00

InquireDevice enabled (default)
Success check enabled, settle time 2 seconds

usb_set_debug: Setting debugging level to 15 (on)
usb_os_find_busses: Found 005
usb_os_find_busses: Found 002
usb_os_find_busses: Found 004
usb_os_find_busses: Found 001
usb_os_find_busses: Found 003
usb_os_find_devices: Found 001 on 005
usb_os_find_devices: Found 001 on 002
usb_os_find_devices: Found 003 on 004
usb_os_find_devices: Found 002 on 004
skipped 1 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 004
error obtaining child information: Inappropriate ioctl for device
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 014 on 001
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 003

Looking for target devices ...
No devices in target mode or class found
Looking for default devices ...
Found default devices (1)
Accessing device 014 on bus 001 ...
Using endpoints 0x0a (out) and 0x89 (in)
Inquiring device details; driver will be detached ...
Looking for active driver ...
OK, driver found ("usb-storage")
OK, driver "usb-storage" detached

Received inquiry data (detailed identification)
-------------------------
Vendor String: ZTE
Product String: USB Storage FFF1
Revision String: 2.31
-------------------------

Device description data (identification)
-------------------------
Manufacturer: ZTE, Incorporated
Product: USB Storage
Serial No.: 000000000002
-------------------------
Setting up communication with interface 0 ...
Trying to send the message to endpoint 0x0a ...
OK, message successfully sent
USB error: could not clear/halt ep 10: Protocol error
Device is gone, skipping further steps ...
Checking for mode switch after 2 seconds settling time ...
USB error: failed to open /dev/bus/usb/001/014: No such file or directory
USB error: could not claim interface 0: Bad file descriptor
Original device can't be accessed anymore. Good.
usb_os_find_devices: Found 001 on 005
usb_os_find_devices: Found 001 on 002
usb_os_find_devices: Found 003 on 004
usb_os_find_devices: Found 002 on 004
skipped 1 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 004
error obtaining child information: Inappropriate ioctl for device
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 015 on 001
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 003
Found a new device in target mode or class

Mode switch succeeded. Bye.

I used to post from my N70 using lifeblog earlier.  I have been looking for a similar feature after I upgraded to N96.   While N70 used to have a simple lifeblog interface, N96 changed that to more feature rich Share Online.  Nokia device is preloaded with Share Online 3.0.  Being an adventurous one, and prefer to be on the cutting edge always, I upgraded my device to new Share Online 4.x.

Phoneboy posted the instructions to post to wordpress from lifeblog last year.  I have been using this in my N70 and it used to work great.  I knew he is smart enough to find a way to post from share online.   I was not surprised when I saw this post a few weeks back.

However, it was not that easy since I use N96 and Share Online 4.x.  I could add my blog as one of the service in the Share Online configured services in the phone.  I couldn’t post as it always failed.   I was not ready to gave up.  Setup requires two php scripts as described in the phoneboy post.  All instructions remain same.  I tried to debug this with the help of phoneboy.

Share Online sends two or more xml files depending on your post.   This can be tracked by enabling (by default) complete dump of phone upload. The first xml file looked something like this…


2009-04-08T01:17:02Z: method: POST
2009-04-08T01:17:02Z: rawpostdata:

06042009004
2009-04-08T19:15:53Z
1
/9j/4AAQSkZJRgABAQAAAQABAZsoO6heBU7x81CykCsnFrckaxFMBwwIpcZ5NN2mkJm1avujHParKHmsvT5D930rTXpVJ3OWasyXGaa8YIoVscU5m4qiTMlG1yKrTcCr90uTkVQmBKmo
aNosqGXBxTfOqKUYY1HmoSNrk5mpPNqIAmlKEdaLIdx5kNKHPao1U5qxHFmk7IaQICRUypxUkceBUqrxSKsQeXRjFTEcVE3BxQFgBxShvWmAc08CmIkU04NUPSl3UCZ/
/2Q==

Nokia N96 (12.043) Series60/3.2 ISF/4.0.08.45

2009-04-14T01:09:15Z: action: post
2009-04-14T01:09:15Z: postaction
2009-04-14T01:09:15Z: filetype: .jpg
2009-04-14T01:09:15Z: filename: /lifeblog-10042009010.jpg
2009-04-14T01:09:15Z: id: url:/lifeblog-10042009010.jpg,type:Image,format:Image,summary:

The data is in the base64 encoded content tag.  lifeblog.php used to parse the code something like this…


} elseif(preg_match('/(?P.*?)<\/title>.*?<content\s*type="(?P<contenttype>.*?)\/(?P<contentsubtype>.*?)"\s*m<br /> ode="(?P<contentmode>.*?)">(?P<content>.*?)<\/content>.*?<br /> <summary>(?P<br /> <summary>.*?)<\/summary>/si', $HTTP_RAW_POST_DATA, $data))<br /> {<br /> </code><br /> But, Share Online sends title with an attribute, type.</p> <p><code lang="xml"> </p> <p><title type="text">06042009004

So the regular expression for preg_match need to be changed to <title.*> in all places.

I have been trying with sample icons in the phone since they are very small and easy to upload.  Problem started when I started uploading actual photographs.  I noticed that preg_match fails when the base64 encoded data is large.  (50-70KB approx).  I googled and found that this is a known problem with PCRE library that php uses for preg_match.   Some references suggested to increase the pcre backtrack_limit as a work around in the php.ini.

[Pcre]
;PCRE library backtracking limit.
pcre.backtrack_limit=5000000

I can post  to my wordpress blog now.  Here are the modified shareonline.php and lifeblog.php.  You will have to change all references to jjaimon.net/blogs in shareonline.php.  Follow the instructions given in the phoneboy blog.

I talked about creating a playlist without the Nokia Music Player or Windows Media player.  I was not very clear about how to get the new playlist updated in the Nokia Music Player.  All that I need to do is a “refresh media” operation in the Nokia Music player.  One problem is that, this doesn’t idenitify moved or deleted playlists.  It appears to be just an add/append operation and not a refresh (add or delete) operation. Hmmm….

Nokia and other current smartphones use a video format called 3GP. 3GPP, 3GPP2 are the new worldwide standard for the creation, delivery and playback of multimedia over 3rd generation, high-speed wireless networks. Defined by the 3rd Generation Partnership Project and 3rd Generation Partnership Project 2 respectively, these standards seek to provide uniform delivery of rich multimedia over newly evolved, broadband mobile networks (3rd generation networks) to the latest multimedia-enabled wireless devices. Tailored to the unique requirements of mobile devices, 3GPP and 3GPP2 take advantage of MPEG-4, the standard for delivery of video and audio over the Internet.

Nokia provides a video converter software.  Its slow and works only on Windows.  Since I can mount Nokia mass-storage directly on my openSUSE11.1 laptop, I decided to use ffmpeg to convert videos.  You can copy the converted files to your Nokia device over cable or bluetooth.  Video Center recognizes the new video file and list them in the list of available videos.  I use h264 + AAC codecs which provides the best quality/compression rate for Nokia phones currently.  Surprisingly, I found this works better compared to Nokia’s software on my phone

Here is the script. Usage is very simple.
videoencode.sh source_file dest.mp4

#!/bin/bash

ffmpeg -y -i "$1" -acodec libfaac -ab 72k -s 320x240 -aspect 16:9 -vcodec libx264 -b 300k -qcomp 0.6 -qmin 16 -qmax 51 -qdiff 4 -flags +loop -cmp +chroma -subq 7 -refs 6 -g 250 -keyint_min 25 -rc_eq 'blurCplx^(1-qComp)' -sc_threshold 40 -me_range 12 -i_qfactor 0.71 -directpred 3 "$2" > /dev/null

This was an interesting story. According to Microsoft research chief Rick Rashid, around 20 per cent of all the servers sold around the world each year are now being bought by a small handful of internet companies – he named Microsoft, Google, Yahoo and Amazon. That is an amazing statistic, and certainly not one I’d heard before. And this is before cloud computing has really caught on in a big way.  And all this before cloud computing as really taken off. in-Aptly said by IBM CEO in 1943 and  then aptly re-phrased by Sun Microsystems CTO in the present context – The world only needs 5 computers

Anyway, cloud computing is a different paradigm.  Cloud computing is not fluff, its future of IT. For end users, cloud computing means there are no hardware acquisition costs, no software licenses or upgrades to manage, no new employees or consultants to hire, no facilities to lease, no capital costs of any kind — and no hidden costs. Just a metered, per-use rate or subscription fee. Cloud computing is changing the economics of Computing from being a Capital investment to Utilities.  The only question is how secure is your data in the cloud?  How do you trust your cloud provider?  Do you place mission critical data in the cloud?

Next Page »