Sony Ericsson GC82 on Mac OS X
Using a wrapper script for pppd with Internet Connect on Mac OS
another, harder way
to accomplish basically the same results as these, but unless
you're a masochist or you just like messing around with source
code packages, you don't need to go any further.
When you use the Sony Ericsson GC82, it establishes a PPP
connection to your computer using its own built-in PPP stack.
Since that stack is buggy the card attempts to assign itself
the "remote" address of 127.0.0.2. Your computer is the "local"
end, and gets its address from the network, which in this case
means your wireless service provider.
If you specify a remote address when you start up pppd, the
card will accept the address you give it. Unfortunately, the
Internet Connect application on Mac OS X doesn't allow you to
specify, well, anything of the sort. Internet Connect also
overrules any configurations in /etc/ppp/options where the more
UNIX-inclined user might attempt to fix the problem. Internet
Connect in fact issues a long list of options as command line
arguments to pppd, so it's possible to write a
and fix those options ourselves.
Eventually I hope to have this put together in an Installer
package, but for now here's how you can install the wrapper
- Open up a Terminal (if you never use it, it's in the
Utilities subfolder of the Applications folder; if you do use
it, open up a fresh window).
- On the previous page of instructions, you should have
downloaded and expanded an archive containing these
instructions and several other files. In your Terminal
window, `cd` to that new folder. You can type the command
`cd` followed by a space and drag the folder from the Finder
into the Terminal window; the command line will auto-complete
and you can then hit "return" to make it happen.
- Enter the next four commands exactly as they appear
here. You can copy and paste them (one at a time):
sudo cp ./pppd.pl /usr/sbin/
sudo cp /usr/sbin/pppd /usr/sbin/pppd.orig
sudo chmod 4511 /usr/sbin/pppd.orig
sudo cp /usr/sbin/pppd.pl /usr/sbin/pppd
You will most likely be prompted for your password after the
first command and not the other three.
- If you have an existing PPP connection such as a dialup
account, test it now.
- If you have problems or would just like to remove
everything, enter the following commands in a Terminal
sudo cp /usr/sbin/pppd.orig /usr/sbin/pppd
sudo chmod 4511 /usr/sbin/pppd
sudo rm /usr/sbin/pppd.orig
sudo rm /usr/sbin/pppd.pl
Asked Questions (Some more frequent than others):
- Q1: Will this break my existing PPP connections?
A1: It shouldn't, but anything can happen. If you follow the
instructions above and use the wrapper script provided, any
connection that isn't going to a Sony Ericsson GCxx card
(specifically named that way in its Modem Script) is passed
to pppd unmodified.
- Q2: I have some other Sony Ericsson device, and I don't
want to specify my own remote address for pppd. How can I do
A2: The wrapper looks specifically for the string "Sony
Ericsson GC" in the command line options for pppd. If you
want to keep the wrapper and use some other device, just make
sure the name of the modem script doesn't match that string
exactly. The script will trigger on a match of that string
anywhere in the command line, so if you change the name of
the modem script, make sure you also change the "Service
Provider" field in the PPP preferences for that connection.
- Q3: I notice that the wrapper always selects a "192.168"
address, but my company, or LAN, or ISP uses that range. Will
this conflict with my existing network?
A3: An example would be that your company LAN uses 192.168.0
through 192.168.5. Under normal circumstances you wouldn't
have a conflict: if you're connected to the LAN and you make
a wireless connection, the wrapper will see that routes
already exist to those networks and will grab the first
available network after that, in this case 192.168.6. If
you're not connected to the LAN, it probably doesn't matter
what IP space is being used. If your LAN uses that space but
doesn't announce the routes, see Q4.
- Q4: I'd like to specify a different range of remote
addresses. How can I do that?
A4: Grab a text editor (again, I'll endorse
) and edit the wrapper, which is that 'pppd.pl' file. Near
the top is this bit of code:
# @privnets specifies the IP space to use, in order of preference
# If you prefer different IP space, change the order here.
my @privnets = ("192.168", "172.16", "10");
# @stopnets correspond to the first *invalid* address after the ones in @privnets
# They don't have to be in any particular order (unlike @privnets)
my @stopnets = ("192.169", "172.32", "11");
You can change the order around in the @privnets variable;
just make sure you get the punctuation right (put each IP
address in quotation marks, and separate them with commas).
Don't specify a full IP address; the script grabs a single
Class C network at a time and checks to see if a route exists
to it, then just adds 255 to get the "last" address in the
range. If you have anything other than 0 in the fourth octet,
your results will not be predictable.
Similarly, you can change the @stopnets variable, but as long
as you're sticking with RFC1918-defined private address space
(the three ranges specified already) you shouldn't need to
touch them unless you want to lower the upper limit on the
available address range. If you add a totally different IP
range to @privnets (what,
space isn't good enough for you, buddy?) then you need to
make sure to add a corresponding network to @stopnets so the
script doesn't run wild.
in the main instructions.