Wednesday, October 22, 2008

Misnamed Package

Intech yesterday had these TMNet advertisements:
'Wang' means money in malay, however combining it with 'Package' certainly gives it a whole different spin. This poor combination is definitely a branding fail for TMNet.

For those unclear of what 'Wang' could be a slang of, JonJonB clearly illustrates what it means.
Purely in the interests of science, I have replaced the word "wand" with "wang" in the first Harry Potter Book ... (read it)
This will certainly evoke horrible imagery when you next go to Sungai Wang.

yk.

Tuesday, October 14, 2008

Mentally Challenged Parkers

While in McDonalds Shah Alam, this young scrawny punk drove his red sports car and parked in the middle of the two handicapped parking bays. So not only did he park in a space allocated for the Physically Challenged, he also took up two spaces for his precious car. I managed to snap a picture of him as he walked by:

Me: Please don't park in the handicapped bay
Doofus: Huh?
Me: Are you physically challenged?
Doofus: No?
Me: Then why did you park there?
Doofus: Cannot ah?
Me: No!
Doofus: Who are you?
Me: Just a concerned citizen.
Doofus: So? ... Do what you have to do lah
Fine! So I took this picture:
Some may say that technically he is "correct", because the sign says handicapped to the left and right. It doesn't say anything about parking in the middle! Hah. But driver of BJD 8282, you are a true pillock.

A wonderfully bubbly McDonalds waitress walked by offering free refills (FTW), and I described to her the driver who parked there. 2 minutes later, he was seen driving off and going around in circles looking for a proper place to park.

However 15 minutes later, two other drivers decided that they too are handicapped, and parked in the spot.

Drivers of BHW 262 and WMB 4425, you too must be mentally challenged to be so totally inconsiderate. Shame on you. Parking Cretins.

yk

[Update: 28 Oct 08: Peter Tan has picked up this item "How to become famous without even trying" and commented:
Driver of car BJD 8282. Pray very very hard that you never ever officially qualify to use these parking spaces. It is no fun for a disabled person to travel twenty kilometers to run errands only find all accessible parking spaces taken up by inconsiderate people like you and leaving us no place else to park.
Update: 31 Oct 08: Eleanor of "Freewheeling" wrote a post "Being caught parking in disabled car parking spaces" and featured our SYN.net smugfaced friend.
"... its one way for them to catch notoriety and be marked by their behavior and be splattered over different blogs for being shown to be inconsiderate. Shame on them!"
]

Monday, October 13, 2008

I love OOo (and how to convert odf to pdf on the command line)

In continuation of Khairil's meme for foss.my, "I love OOo!"

OpenOffice.org has been my only office suite for the past 5 years (or more?) and its extremely flexible.

Just today I learnt something new: a certain govt agency needed files in PDF because their "IT Department" just haven't gotten round to install OpenOffice.org in their machines. Its quite a few files, and I didn't fancy doing it manually.

So a quick google brought up two options: Use the Macro language, which involved copy and pasting some Basic code, or using unoconv which is a command line python script, by dag wieers. I prefer the command line, so I apt-get installed it.
#sudo apt-get install unoconv
And then running it may get you this error:
# unoconv -f pdf TC4-*.od?
Error: Unable to connect or start own listener. Aborting. javaldx: Could not find a Java Runtime Environment!
The reason is because you need to have OpenOffice.org running in the background (or in a remote server) first. Launch soffice, and run the command line again, and everything will succeed quietly.

Isn't it wonderful that a UI app can be used to convert files from the command line? Isn't it great that it can be driven from the command line with the wierd wildcards (*s and ?s). Isn't it just awesome?


Sign up to foss.my, Malaysia's premier community driven, community focused conference for Free and Open Source Software. Be there and be square. 8-9 Nov 2008

yk

Friday, October 03, 2008

Dialup with Ubuntu, Bluetooth, Blackberry Bold and Maxis 3G.


Since the E61, I have used the iPhone, and Blackberry 8820 both of which didn't support blue tooth Dialup networking features. Now that Im testing out the Blackberry 9000 Bold, I had to make sure that it can be turned into a mobile modem. Im happy to report that it does!

I followed the same setup sequence as the Nokia E61, which I described here "Ubuntu dialup via bluetooth" The modifications are as follows:

The device address would obviously be different, so you will need to do
# hcitool scan
Scanning ...
00:1E:37:E5:FB:xx n/a
00:21:06:FD:5C:AB yky phone
00:1A:6B:87:EE:xx HP-IMD-10042A
00:1E:37:0B:85:xx HP-RSM-10046A
Test that the phone has the required features, and find out the Channel number:
# sdptool browse 00:21:06:FD:5C:AB

Browsing 00:21:06:FD:5C:AB ...
Service Name: Dialup Networking
Service RecHandle: 0x10000
Service Class ID List:
"Dialup Networking" (0x1103)
"Generic Networking" (0x1201)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 1
Profile Descriptor List:
"Dialup Networking" (0x1103)
Version: 0x0100
Edit the /etc/bluetooth/rfcomm.conf file with the appropriate values
rfcomm0 {
bind yes;
device 00:21:06:FD:5C:AB;
channel 1;
comment "yky phone";
}
Resetting the /etc/init.d/bluetooth restart may or may not have rfcomm0 registered. To manually do so, use this command:
rfcomm bind 0 00:21:06:FD:5C:AB 1
This will create the /dev/rfcomm0 modem file.

Now here comes the part which took me a while to figure out. I just ran wvdial BB with the same settings as with e61, but ran into this error:
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATZ
ATZ
OK
--> Sending: ATM0
ATM0 <-- here is the error: No "OK" received
--> Sending: ATQ0
ATQ0
--> Re-Sending: ATM0
ATM0
OK
--> Cannot get information for serial port.
--> Cannot open /dev/rfcomm0: Transport endpoint is not connected
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
I noticed that whenever a command is at Init3 in the /etc/wvdial.conf file, the dialer will fail, and the modem will never return a "OK". So remove all Init commands except for the single most crucial one, which is the AT+CGDCONT one at Init2:
[Dialer Defaults]
Phone = *99#
Username = maxis
Password = wap
New PPPD = yes
Dial Command = ATDT

[Dialer BB]
Modem = /dev/rfcomm0
Baud = 115200
Dial Command = ATDT
Init2 = AT+CGDCONT=1,"IP","unet"
FlowControl = crtscts
Modem Type = Analog Modem
Stupid Mode = 1
New PPPD = yes
I have added two more lines in the config file. "Stupid Mode" is required. Otherwise for some strange reason, the authentication process will not start. "New PPPD" is optional, it starts a new PPP Daemon on connection.

Now, it should run without a problem:
# wvdial BB
--> WvDial: Internet dialer version 1.60
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: AT+CGDCONT=1,"IP","unet"
AT+CGDCONT=1,"IP","unet"
OK
--> Modem initialized.
--> Sending: ATDT*99#
--> Waiting for carrier.
ATDT*99#
CONNECT
--> Carrier detected. Starting PPP immediately.
--> Starting pppd at Fri Oct 3 19:14:00 2008
--> Warning: Could not modify /etc/ppp/pap-secrets: Permission denied
--> --> PAP (Password Authentication Protocol) may be flaky.
--> Warning: Could not modify /etc/ppp/chap-secrets: Permission denied
--> --> CHAP (Challenge Handshake) may be flaky.
--> Pid of pppd: 31565
--> Using interface ppp0
--> local IP address 121.123.102.115
--> remote IP address 169.254.1.1
--> primary DNS address 10.213.17.1
Whoopedoo.
Dialup works via the command line. Ctrl-C kills the connection.

Now that Im trying out KDE, I wanted to see if KDE's dialer would make things easier. So I ran "kppp"

Click on "Configure", and "Add" a new Account. Skip the Wizard. In the "Dial" tab, enter in
Connection name: maxis
Phone number: *99#
Authentication: PAP/CHAP
Check the "Store Password" checkbox
You dont have to modify anything else, so click OK.

Then in the "Modems" tab, click "New...". In the "Device" tab, enter in these details:
Modem name: BB
Modem device: /dev/rfcomm0
Flow control: Hardware [CRTSCTS]
Line Termination: CR
Connection speed: 115200
Use lock file: checked
Modem timeout: 60 sec
In the Modem tab, click on "Modem Commands ..."
Just add in Initialization string 2: AT+CGDCONT=1,"IP","unet"
The other default values should be OK. Click "OK"
You can try out the modem by clicking on "Query Modem..." but I just got blank fields for AT1 ... AT7.

Now that you've defined the Account and Modem device, you can try to connect. Use
Login ID: maxis
Password: wap
and click on "Connect"
It should work, sometimes it hangs at setting the modem volume, but a quick reconnect knocks it into order. You should then be rewarded with a screen like this:

So a nice GUI dialer also works too!

yk