Friday, November 14, 2008

AT command on Mac

Not the UNIX command "at", but modem's AT command. Here is how to run AT command on Mac OS X.

The modem device is at /dev/, the name begins with ttty. The command is "screen". For example, here is how with ZTE modem:


$ screen /dev/tty.ZTEUSBModem_0000201A



Facebook app on MacOS X Leopard + PHP + MySQL

PHP is preinstalled on MacOS X Leopard, so just go to system configuration, go sharing panel and activate web sharing. PHP is not initially enabled, so edit /private/etc/apache2/httpd.conf and uncomment this line:


LoadModule php5_module


MySQL is not preinstalled, so go to MySQL.org, download and install MySQL for Mac OS X. Start it, and then do the following:


/usr/local/mysql/bin/mysqladmin -u root password ’passwordhere’


Then edit /private/etc/php.ini (if there is no php.ini, then copy php.ini.default to php.ini) by adding the sockets for MySQL as follows:


mysql.default_socket = /private/tmp/mysql.sock
mysqli.default_socket = /private/tmp/mysql.sock


Now you are ready to access MySQL via PHP, using localhost as hostname and the password you set above as password.


Then download Facebook libraries for PHP, and try the Footprints application as explained in the doc. You'll have a jsonwrapper related error. Leopard comes standard with PHP 5.2, and jsonwrapper does not need to be included, so just comment out the following line in Facebook library:


include_once 'jsonwrapper/jsonwrapper.php';


That's it, have fun.


Sunday, September 21, 2008

snmpwalk

Check available OIDs
E.g.,
snmpwalk -v 2c -c mtbsnmpcomm 172.33.0.135 .1.3.6.1.2.1.25.3.2.1

Wednesday, May 14, 2008

Japanese language support on BlackBerry

I finally got a conclusion regarding Japanese language support on BlackBerry. It is rumored that BlackBerry 8707v supports Japanese language input with software version 4.2.2. This is supposedly because NTT DoCoMo is using 8707h, a 8707 series for DoCoMo. I got a 8707g but it did not have Japanese language input. I got 4.2.2 software from DoCoMo site but somehow it could not recognize my 8707g. Here are the findings and conclusion I got:

1. 8707g also supports Japanese language (so any letter will seem to work)
2. Japanese language display is supported, though not perfectly as sometimes it shows strange characters, when Chinese software is inluded (this is the condition when I initially got the 8707g, it could display Japanese mails and SMS though sometimes strangely)
3. BlackBerry OS software that is carrier specific only works for BlackBerry from that carrier, though it is said that it would work with any BlackBerry if you remove the VENDOR.XML file*) located at:
C:\Program Files\Common Files\Research In Motion\AppLoader\VENDOR.XML
(This seems to be the reason why the DoCoMo specific software does not work with my 8707g, since it is a SingTel version).
4. When I used SingTel specific 4.2.2 (i.e., 8707vCJK_PBr4.2.2_rel302_PL3.4.0.24_A4.2.2.122_SingTel.exe), I immediately got a list of language support, including Japanese language input.

Now it works like a charm!

References:
*)http://www.blackberryforums.com/rim-software/1871-blackberryos-4-x-download-faq-upgrade-downloads.html
Device software can be downloaded here:
http://na.blackberry.com/eng/support/downloads/#tab_tab_desktop

Thursday, May 1, 2008

政治家にとってやりやすい忍耐強い国民

ガソリン暫定税率が復活した昨日、約1時間ぐらい時間をかけて、リッター当り121円でガソリンを56.28L給油した。今日あのガソリンスタンドでリットル当30円増税になったら、1688.4円節税という計算になっている。バイトだと考えると、まあまあいい時給だ。収入が高く、黒い高級車に乗っている政治家はまるで別世界の存在に感じるが、本当に別世界だろうな。彼らに1688.4円のために1時間並ぶなんて考えられないだろう。

与党は「先進国では日本は6番目にガソリンが安い」といって増税を正当化している。全く論点が外れている。問題は無駄遣いだ。天下り、ハコものプロジェクト、保険金着服などなど、毎日のようにニュースに流れるのになかなか減らない。政治家にとってそれらをなくすより増税の方がやりやすいに決まっている。なぜなら日本国民は忍耐強いからだ。インドネシアのスハルト政権はガソリンの値上げで国民が大反発し政権が倒れた。まさに他国がうらやましがる日本の政治だ。

Wednesday, April 30, 2008

iSync plugins

iSync is great, except for very short list of supported phones.
Here are softwares to expand support, or hint to make own plugins:

nova media
OnSync
HOWTO: Write iSync Phone Plugins
DIY iSync™ Phone Plugin

誰かが負担しないといけない

どこかの政治家がテレビで高齢者の医療費負担増についてこう言った。

「誰かが負担しなければならない」

日本語って主語も目的語もないのに文として成り立つのは面白い。上記の文では目的語がないので、文脈から分かるといわれるが、話し手が本当に考えている目的語は何なのかは話し手にしか分からない。特に政治家にとって曖昧であった方があとでそのとき意図したい説明がつく。

通常考えると「誰かが負担しなければならない」は高齢化している日本では本当にその通り。しかし、毎日のように報道される社会保険庁のずさんな管理や、天下りの高額給料及び退職金、役所の人間が盗んだ住民の保険金、ハコモノに使われる膨大な資金を考えると、もしかして上記の言葉の話し手はこのことを言いたかったのではないか。

「誰かが何百億円や何兆円の無駄遣いや消えたお金を負担しなければならない」

その誰かは国民であり、そして今回は高齢者である。まさに弱肉強食だ。

Sunday, April 6, 2008

Indonesia makin bodoh

Ini dari milis:

Para Pelanggan Yth.

Sehubungan dengan Surat Menteri Kominfo Nomor: 84/M.KOMINFO/04/08 tanggal
2 April 2008 Perihal: Pemblokiran Situs dan Blog Yang Memuat Film Fitna,
maka situs berikut ini untuk sementara kami tutup sampai pemberitahuan
lebih lanjut :

1. Youtube
2. MySpace
3. Metacafe
4. Multiply
5. Rapid-share

Jika ini benar, menyedihkan sekali. Harap2 Indonesia makin pintar dengan usaha2 meningkatkan bandwidth serta jenis akses last on mile, eh malah makin bodoh. Apakah YouTube, misalnya, situs porno? situs komunis? situs anti agama tertentu? Jika iya, silahkan dilarang, tapi tidak kan? Hanya karena ada konten yang tidak cocok mengapa seluruh site diblok? Ini saja merupakan tindakan bodoh, tapi kondisi akan menjadi lebih parah jika ini dibiarkan, sebab pemerintah akan bebas memblok situs2 yang dia rasa tidak cocok, sama seperti Soeharto menutup Tempo dan media masa lainnya dijaman orde baru.

Wednesday, April 2, 2008

PDB, PRC formats

Palm's PDB and PRC formats are not only used by Palm, butl also by e-book reader on Symbian and even desktop PC. Here are some description on its format:

NS Basic/Palm PDB File Structure
http://www.nsbasic.com/palm/info/technotes/TN02a.htm
The PRC Format

http://web.mit.edu/tytso/www/pilot/prc-format.html

Other related resources:
Palm emulator on Mac
BookDesigner
- A tool to create PDB/PRC file?

Tuesday, April 1, 2008

Browse Nokia 6680’s files over BT on Mac

Mac could not browse Nokia 6680's (or, it seems, any Nokia's S60 device) files over BT on Mac. The problem is not on Mac side, but on Nokia side. Nokia has crippled the device.

Here is how to make it work:

OBEX File Transfer on Series 60, with Bluetooth File Exchange on OS X

(See full article at http://www.martin.st/software/s60-obexftp/)

Download these softwares:
SdpBrowser
SDP Editor (for Series 60 1st and 2nd edition)

Usage:

Using SdpBrowser, select Get PC Suite info in the Device menu, select the phone and click browse. If everything works as it should, it gives the SDP record handle of the OBEX FTP record and the RFCOMM channel of the PC Suite service.

Then start SDP Editor on the phone, choose Update channel in the menu, and enter the handle and RFCOMM channel given by SdpBrowser. Then, Bluetooth File Exchange should be able to browse the files on the phone.

The handle and channel shouldn't change as long as you don't install/remove any service on the phone, so in general you'll only need to rerun the application on the phone with the last, working values.

If it doesn't give all the necessary information, you can try to read it manually from the raw SDP records. Select Browse in the Device menu, and select the phone. Look for a record with the text "OBEX File Transfer", and look for the number on the row starting with "0:" in this record (e.g. "0: 0x10006"). That's the record handle (in hexadecimal). Also look for a record with the text "Nokia OBEX PC Suite Services". That record should have a row like "4: { { <0100> } }, { { <0003> }, { 0xc } }, { { <0008> } }". Here 0xc, that is 12, is the RFCOMM channel.

Sunday, March 30, 2008

Bible on Symbian

A free reader for free Bibles, as well as other reading materials, on Symbian? It turns out that there is no ideal solution now:

Olive Tree
Free (but not opensource) Bible reader for Symbian, excellent usability, but only handles file produced by Olive Tree. Even though file format is Palm's PDB, for example Palm Bible+ PDB files are not readable. So, use a general e-book reader for other reading materials? Such as Mobipocket.

Mobipocket
This general e-book reader is owned by Amazon, and is in fact quite cool. Its file format is Palm's PRC. It has a free (but not opensource) client for Symbian, and even a free software to convert MS Word documents etc into PRC format that it can read. But, since it does not read PDB format, and there is very little free Bible available for Mobipocket, it cannot serve as one-stop application for both Bible and other materials reading purpose. Installing both Mobipocket and a Bible reader would be an inefficient resource use and is not convenient.

SymbianBible (formerly S60Bible)
Free and opensource Bible reader for Symbian, ported from Palm, and reads Palm Bible+ PDB files. SymbianBible does not read Olive Tree PDB files. Olive Tree reader is slightly better, but this is good enough. Now, can this read other reading materials? Theoretically yes, as long as it is in Bible+ PDB format. But there is scarce information as how to create one. There is only information, i.e., the one in BibleConverter. BibleConverter is a Java program from Palm Bible+ that will convert a specially tagged text file into PDB file readable by Bible+. I tried creating PDB file using BibleConverter, but for unknown reasons the resulting file are often unrecognized by SymbianBible.

Other prominent e-book reader is Plucker, though opensource and has tools for MacOS X, but lacks Symbian support.

Friday, March 28, 2008

OpenOffice &#8220;Aqua&#8221;

It's rather difficult to find the place to download OpenOffice "aqua" version (for Mac). Here it is:

Porting site (but not uptodate?)
http://porting.openoffice.org/mac/download/aqua.html
Updated main site (in Japaese)
http://homepage.mac.com/oz_k/open_soft/aqua_ooo24.html
Download site:
http://ooopackages.good-day.net/pub/OpenOffice.org/MacOSX/

Wednesday, March 5, 2008

Use Inkscape on Mac to do batch conversion

Here is how to use Inkscape on Mac to do batch conversion from SVG to PNG:

1. First, get Inkscape for Mac
2. Open Terminal then run as follows:

for i in *.svg; do /path/to/Inkscape.app/Contents/Resources/bin/inkscape -f "$i" -e "$i.png" -w 1000; done


-w 1000 is make the size big (1000 pixels)

Friday, February 29, 2008

GPS waypoint data from W54T to Google Maps

au's Toshiba W54T is a cellphone with GPS, and a BREW application that can get location data and save to disk is preinstalled. I took this data to show the path on Google Maps.

auw54t-kml.jpg

Here is how:

Application name is "地図ビューアー". Click on "簡易ハンディGPS" and location data will be displayed. Click on "アプリ設定" , then select "あしあと設定" then use menu "あしあと保存" to save GPS data taken up to that point. The data is like this:
本ファイルは、地図ビューアーにより出力されたGPS情報ファイルです。

出力日時:2008/02/28 11:49:51 +0900

+++GPSログ+++
888234473,130.682362,33.660194
888234490,130.682271,33.659990
888234502,130.682474,33.659684
888234510,130.682458,33.659749
888234522,130.682501,33.659808
888234529,130.682389,33.659781
888234540,130.682265,33.659781
888234552,130.682120,33.659845
888234560,130.681890,33.660124
888234572,130.681890,33.660027
888234580,130.681745,33.660027
888234592,130.681804,33.659968

In order to display this as path on Google Maps, this data needs to be converted to KML. GPSBabel, which also has Mac binary, is said to be able to do this. But, it always failed to convert the above formatted file for unknown reasons. When the above file is opened from GPSBabel, it is recognized as "DeLorme XMap/SAHH 2006 Native .TXT" but GPSBabel tried to read the first item as latitude not timestamp. Websites mentioned that the above format is "NMEA 0183 sentences", so I tried converting it to KML and conversion finished, but resulting file does not contain any coordinate. Finally I manually converted it to KML by putting the latitudes and longitudes in between as follows:


ff0000ff
5

#myStyle

130.682362,33.660194
130.682271,33.659990
130.682474,33.659684
130.682458,33.659749
130.682501,33.659808
130.682389,33.659781
130.682265,33.659781
130.682120,33.659845
130.681890,33.660124
130.681890,33.660027
130.681745,33.660027
130.681804,33.659968

This KML file can be opened from Google Earth for viewing, or put somewhere and feed the URL to Google Maps, e.g., as follows:

http://maps.google.co.jp/maps?q=http://bp.maltech.jp/gpstest/2008_0228_134831.kml

Thursday, February 28, 2008

After lunch walk

My usual working time at the office is about 8:30 to 20:30, and when desk work takes much of this time, and often I continued at home, my back hurts. Walking is the best cure, and here is my route back home to get the car (walking back home at night is too cold...) from GPS data taken by my cellular phone (au W54T):




Sunday, February 24, 2008

Software list

Here is software list for Mac (for Windows is here: http://arnold.siboro.org/blog/notes/?p=29)

BibleDesktop
BluePhoneElite 2
Camino
CrossOver
Cyberduck
EMP NS Connection
EPSON Scan
ffmpegX
Flip4Mac
Freemind-0_8_0
Gizmo Project
Google Earth
iSquint
JDiskReport
MarsEdit
NeoOffice
Picasa Web Albums Uploader
PsyncX
Remote Desktop Connection
Skim
Skype
Smultron
Thunderbird
Tooble
Transmission
Vienna
VLC
VMware Fusion
Wireshark
XMeeting
xTime Project 4
Yahoo! Messenger

Tuesday, February 12, 2008

Better poor man&#8217;s blackberry

I found a better solution to my previous post. This requires a phone that supports IMAP and IMAP's IDLE. As always, a Japanese-capable phone is necessary for my case, and this time I resorted to using 702NKII (Vodafone KK's version of Nokia 6680). Some sites such as this says that built-in email application on S60 phones could not retrieve email from Gmail for lack of support of SSL, but it's not true, at least for this Nokia 6680. Here are the steps toward a better poor man's blackberry:

gmail-imap-on-nokia6680.jpg

1. Create a Gmail account dedicated for this purpose
This is necessary since I have gigabytes of mails on my Gmail account and it seems that as is with Thunderbird this Nokia 6680 will try to get headers of all of these mails... So I created a dedicated address and I am going to forward only necessary mails and I am going to delete frequently.

2. Set up email client on Nokia 6680
Go to "Messages" then create a new mailbox. On Mailbox settings, set the access point to the one known to work (in my case I am already able to access Gmail via Java client using Indosat Matrix access point so I am using this), set "My e-mail address" to the address created above, set outgoing mail server to "smtp.gmail.com", set "User name" to the mail address created above, set "Incoming mail server" to "imap.gmail.com" and "Mailbox type" to "IMAP4", set "Security (ports)" to "On (993/995)", and set the rest appropriately. On "Automatic retrieval", set "Header retrieval" to "Always on", set "Retrieval interval" to "Every 5 minutes" to get the effect of push mail, and set other parts as prefered.

That's it. I have tried and the phone plays the sound to notify new mail a few minutes after I sent mail to the above gmail address. I didn't do much testing because I am using Matrix's GPRS on international roaming...