Wednesday, November 25, 2009

Saturday, October 10, 2009

Saturday, July 25, 2009

Fix your totally insecure password in 1 minute

There is this interesting article on Slate called Fix Your Terrible, Insecure Passwords in Five Minutes The method mentioned is quite good but there is another way through which you can create strong password and it will probably not take more than one minute. And you can even continue using your current password.We are just going to make it very strong. Let us  start with a word that you will not forget that easily, any word will do ,even your current password, but I will start off with the word password. Using 'password' as a password is not only pointless but is also quite stupid. Let us insert two symbols in the word to get p@$$word. Replace the o with a zero to get p@$$w0rd. Now capitalize one of the letters, usually it is recommended to capatalize one of the latter letters but making p capital works too. So the final password comes to p@$$w0rd. This password is too short for using in a system environment but it is superb password for any user.

Tuesday, July 21, 2009

Weather Updates on Linux Desktops

There are a lot of options for displaying weather information on Linux Desktops. There are some KDE plasmoids which usually ship with most distributions. There's the Weather plasmoid and there's yet another weather plasmoid (yaWP). Unfortunately, they are examples of what I would like to call as inadequates. The Weather plasmoid is not that much customizable and yaWP just got rid of an ominous bug. I hate it when plasmoids eat 100% cpu. I want my computer to be responsive and having a plasmoid eating 100% cpu is, basically, a bummer.

So I searched around until I stumbled into a gem, called Customizable Weather Plasmoid, this plasmoid shows the power of customization, shows why great softwares (including desktop plasmoids) allow high level of control by users, and shows how to make a great plasmoid. It is themable, it is versatile and it can include much more information than other plasmoids- the key is to know how to customize it.(Don't forget we are talking about Linux users :-)) The website has some screenshots.

For those who don't like KDE, there's something in a great desktop environment called Xfce. It is THE choice for desktop managers. It has a plugin for Xfce panel called the weather plugin. The plugin automatically determines your location based on the computer's IP address and updates weather information from the weather channel. The weather information scrolls in the panel and it is pretty accurate.

Saturday, May 23, 2009

PDF Editing in Linux

There are very few professional quality PDF editing tools in Linux. There is a "PDF editor" called PDFEdit which does not even have an undo key. Yes, you can do a lot of things (like add text and objects) but you can't go back from any mistake. In other words, a bummer. I like Pdftk which can do such simple things as merge and extract pages from pdf file/s. It is much more useful than PDFEdit. Then there is the PDF import extension for OpenOffice. Unfortunately, it has miles to go. The pictures and text (of the original pdf) appear so out of sync when I use the extension. The formatting looks terrible. For me, the best PDF Editor, by a large measure, is an application not even meant to be used as a PDF Editor. It is called Inkspace and it is a vector graphics (think SVG) editing program.

The formatting stays, the texts are in place, the graphics are not jumbled and adding objects and texts is very easy. It is actually easier to do things in InkSpace than many commercial PDF programs. Unfortunately, there is a huge problem with InkSpace in regards to PDF editing. It can only import one(yes one) page from an existing PDF document. So you need to edit each page separately, save those files and combine them with something like pdftk. One feature request for Inkspace developers is to make Inkspace import all pages from PDF. I believe it is on track and will be implemented soon. After this, Inkspace should be THE choice for anybody wanting to edit PDFs in Linux.

Checking CDMA Phone/Modem signal quality through Minicom

In the last two blogs, I wrote about how to use a Chinese PCMCIA Express CDMA Modem to send and recieve voice calls and SMSs using Minicom. In this blog, I will write about how to check the signal quality of the Modem/Phone through Minicom.

First a little understanding of what we are measuring. We are measuring the signal power strength in dBm. Since dBm is a logarthmithic unit, the decrease of about 3 dB implies roughly doubling of power. We typically get CDMA signal strength in the range from 0 to -104 which equates to 1.0 mW to 0.1pW. A -50 value is better than a -60 value.This is because -50 dBm comes to 10nW whereas -60 dBM comes to 1nW. A value of 105 from the modem implies that the modem is in a no service zone.

Now my Minicom output

AT+GMR will give me the software version.

AT+GMR
+GMR: S/W VER: SUC6002 Ver 1.0

OK

AT+GMM will give me the model number of the modem.

AT+GMM
+GMM: SRE 100
OK


AT+GMI will give me the manufacturer information

AT+GMI
+GMI: BELLWAVE CO. LTD.
OK


A simple Google search finds that the Bellwave Co. Ltd. is a South Korean company based in Seoul. I don't know whether the Chinese manufacturer bought the data module from Bellwave or not or they simply "copied" the module.

Now to check the signal strength. The command to check signal strength is AT$RSSI. It gives me the results in dBM.

AT$RSSI
-48

OK

Signal Strength is -48 dBM

AT$RSSI
-50
OK


Again,

AT$RSSI
-48
OK


Now I am shortening the retractable antenna. The signal quality immediately drops.

AT$RSSI
-61
OK


The antenna is completely inside the card. The signal strength is low.

AT$RSSI
-76
OK


I can now call and receive calls, send and read SMSs and check signal quality in Linux through Minicom.I don't need to boot to Vista for these functions anymore. If anybody reaches these Blogs and needs my help, leave a message.

Friday, May 22, 2009

Sending and reading CDMA Phone's SMSs through Minicom

In my last Blog post, I wrote about how I used Minicom to call phones through a Chinese PCMCIA Express CDMA modem called SEP 6000. As I could now receive and send calls, I only wanted to know how to send and read SMSs received.

By the way, the AT command for accepting voice call is AT$QCCAV which is a Qualcomm specific AT Command. AT+CHV will hang up the call.

I already had the text version of the commands from reading the srt.exe in Vim editor. So, all I needed to do was to find the commands for sending and receiving SMSs. First I googled around, until I reached two links, one in Chinese and one in Indonesian . The Indonesian link is very helpful.

After I fired up Minicom and connected to the phone, I send AT$MTCNT and got the reply 3,3. This means that there is 3 SMSs and I have read none. Now to read the SMS. First I had to do

AT$SMSTYPE
1
OK

I need to change the SMSTYPE to 0 if I want to read the SMS

AT$SMSTYPE=0
OK

Then to read the first SMS

AT$SMSMT1
20090522215437,403,4098,0,"SMS Message"


It tells me the date and time of the Message and gives me human readable SMS Message.

Now to send SMS Message,
AT$SMSMO00=Number,,4098,4,0,0,0,"Message"

Number is the number that I am sending the SMS to and Message is the SMS message.
After some time, I get
$SMSOACK0
which means that the SMS has been sent successfully.

Next blog, how to check the signal strength through Minicom.

Calling phones through Minicom and CDMA ruim card/PCMCIA

I needed a cheap PCMCIA Express card for my CDMA card to access the Internet. I bought this one. Called SEP 6000, the application only works in Windows and unfortunately is a piece of junk. Most of the times, it would stop immediately after I start the application (by the way executable is srt.exe) telling me that ruim card is not found. The choices are abort, ok and cancel. If I click abort, sometimes I can use the internet but that's it. I can't call or send or receive SMS.

But I don't need the call and SMS features right? After all, I bought the card for Internet. Not true, turned out that the only way I can charge (or recharge) money in the phone account is by calling. No other way. A really crappy telephone company.

So I needed to charge the account last week but the windows application refused to work. Maybe it is Vista, the worst operating system in the world, or maybe it is that awful application that the crappy Chinese company made -no quality control, no testing, and no feedbacks. Immediately after I started the application, it would hang and the ominous windows message- the application needs to close- pops up.

Most of the times I use Linux, right now Mandriva 2009.1 to be precise, and I need to reboot to Vista to do these stupid things (like recharge account) and use applications that don't work in Linux (like this one). Since the windows application would not work,I had no choice but to do something in Linux.

First I downloaded BitPim and then Gammu and Gnokii . Through BitPim, with a little bit of tweaking I can access the ruim memory to see the SMSs and that's all. I could not get the phone to work from either Gammu and Gnokii even though I tried a lot.

Then I had no choice but to go to Minicom, the common serial console program in Linux. So I loaded it up. My /etc/minicom.dfl file is:
pu port /dev/ttyUSB0
pu callin
pu baudrate 230400
pu mnocon1 NO CARRIER
pu mnocon2 BUSY
pu mnocon3
pu mnocon4 VOICE
pu rtscts No

/dev/ttyUSB0 because the PCMCIA card uses a USB serial emulation.


Now I needed a set of AT commands for CDMA and I got them at this site. To call phones the standard way (through AT) is ATD number in CDMA. After I connected the card through Minicom, I tried ATD number which did not work- threw out a bunch of unreadable data, and then I looked around the commands until I stumbled into at+cdv=number. It worked perfectly. Now I could call phones from minicom. But I also needed to dial numbers after the call is initiated - DTMF and even though the commands for DTMF are AT+VDS=Tone (Tone example: At+VDS=1 for dialing 1 after the call is initiated) and AT+WSTD=Tone both of them did not work. I cursed the Chinese manufacturer but what could I do. I needed to charge the account and to enter the numbers, I needed DTMF to work.

Then it stuck me, reverse engineering. I opened srt.exe in Vim, my favorite text and hex editor, and voila -there it is- in clear text- no need for reverse engineering- the commands. And here they are:
AT+CDV%s
AT+CHV0
AT$DTMF%c
AT$VOL=%d
AT$VOL?



Clearly the AT+CHV is for hanging up the phone. It could also be found in the AT command set. But that set did not have AT$DTMF. Therefore, AT$DTMF%c must specify the DTMF with %c being the tone (1-9#*) and AT$VOL=%d must specify the volume of the phone. I tried it and it worked. Now I can send and receive phones and SMSs, check signal strength and recharge through Minicom, the Chinese SEP 6000 PCMCIA card and my RUIM CDMA card.

Next blog, how I send and received SMSs from Minicom