Gnokii OS X, Part II

A long circuitous path, but in the end — sucess!

Started off with darwinports, but that only got us 0.6.8 (current as of this writing was 0.6.27).

Then tried Fink. That got us up to 0.6.13
Tried that version agains a LG phone. It wrked, but the LG phonewasn’t a GSM phome, and thus didnt understand the extended GSM (Ahyes) AT command set. So, no recovery of SMS messages.

Switched to Nokia 6085 phone. Tried 6510 and series40 drivers. Connected just fine, seemed to better understand the –getsms message, but spit out a bunch of errors — and no SMS messages.

Student Jacob was able to quicly install 0.6.27 on a Denebian system, connect to phone via USB, and recover a trial SMS message, all of which suggested we really needed a newer verion on the Mac. Further resaerch suggested that by enabling “unstable” trees of FInk archives and CVS/rsync Source Distributions, we could get version 0.6.26. (

This required these steps from Fink FAQ:

run fink configure, answer Yes to “turn on untsable trees”
run fink selfupdate-rsync; fink index; fink scanpackages
then finally

fink install gnokii

Which now told me I needed somethink like 87 prerequisites. Ok, said I. Just do it.

It did, then choked on gtk. But it suggested

You are attempting to build gtk+2 with version 3.1 of Xcode, which
requires an update to your installed version of X11. Please download
and install X11 2.3.0 or later from

Once you have installed X11 2.3.0, please re-attempt installation of
this package gtk+2.

Hmm. Hadn’t even installed Apple’s X11 yet. So first, I grabbed a Leopard install disk and installed X11. Then I manually got the X11 2.3.0 package installer, installed that. Rebooted. ran fink selfupdate, fink update, and GTK complied. Ran fink install gnokii, and low and behold, gnokii 0.6.26 was alive and well. tested with gnokii –identify and then the all important gnokii –getsms IN 1 1, got the SMS message. Sweet success.

Next step was to rempile the GSMI::Gnokii perl interface. See Need the “Beta-Test” versions. Had to define GNOKII_DIR with “export GNOKII_DIR=/sw”. Then edit Makefile to remove the “-arch ppc” loader directive.

GSMI mostly works. Do be sure to initialize hash arrays before using. Lot’s of error messages dumped, but in the end — stuff works. here’s a sample:

use GSMI;
use Data::Dumper;
my $smshash={};
my $smscounthash={};
print Dumper($smscounthash);
$gsm->GetSMS("IN", 1, $smshash);
#print Dumper($smshash);
print "Message from phone=".$smshash->{'text'}."n";

and outputs…

2008-12-08 13:45:38.950 perl[13902:10b] *** _NSAutoreleaseNoPool(): Object 0x34d8c0 of class NSCFData autoreleased with no pool in place - just leaking
Stack: (0x90401adf 0x9030e1f2 0x903228c5 0x903224a1 0x6cf038 0x453e36 0x40569a 0x450e25 0x4448e4 0x401995 0x401b79 0x2f6c3 0x1c795d 0x1be3b9 0x14b480 0x204e)
2008-12-08 13:45:41.931 perl[13902:1403] *** _NSAutoreleaseNoPool(): Object 0x3bf400 of class __NSFastEnumerationEnumerator autoreleased with no pool in place - just leaking
Stack: (0x90401adf 0x9030e1f2 0x6d372c 0x9098f9ca 0x950d7635 0x950fb908 0x950fbd54 0x453dc7 0x955316f5 0x955315b2)
2008-12-08 13:45:41.932 perl[13902:1403] *** _NSAutoreleaseNoPool(): Object 0x39f900 of class NSCFArray autoreleased with no pool in place - just leaking
Stack: (0x90401adf 0x9030e1f2 0x9516b1b8 0x6d378d 0x9098f9ca 0x950d7635 0x950fb908 0x950fbd54 0x453dc7 0x955316f5 0x955315b2)
Can not access device please check permissionsAuto was called with GetSMSStatus
$VAR1 = {
'unread' => 0,
'read' => 1
Auto was called with GetSMS
Message from phone=Hello world
Auto was called with disconnect
Attempt to free unreferenced scalar: SV 0x83614c, Perl interpreter: 0x800000.

About Wesley Wright

Born on a mountain top near New York City, Craziest state in the land of the pretty. Raised in the woods so's he knew every tree, Killed him a bear when he was only three.
This entry was posted in ElectronicArts, MacOS Support, Projects, Scripts - Programming, Systems and Servers. Bookmark the permalink.