Skip to Content

Share internet between Mac and Newton via Bluetooth

Earlier today I was checking out the new messages in my NewtonTalk mailing list when I came across a very cool how-to penned by Panic's own Steven Frank. Specifically, he described the method he has used to get his Mac (running OS 10.4) to share its internet connection with his Newton message pad over Bluetooth (Newton Bluetooth drivers and specifics here). So, whenever the Newt is within 30 feet or so of the Mac, it's surfing the web, checking email, streaming internet radio, all wirelessly over Bluetooth. Awesome.

With his permission, we're able to reprint the tutorial here. Please note, as Steven states, that the tutorial assumes you have several things already in place (like a functioning Bluetooth setup), as getting it to work isn't for the faint-hearted, and if your Newton and/or Mac explode after trying this, well, neither Steven nor TUAW is responsible. That said, on to the goods after the jump.

Thanks again, Steven!
It is assumed that you already have worked out the kinks in your
Newton Bluetooth setup. You should be paired with the Mac, and have
done a service discovery. Make sure you select the Mac's Serial Port
service in the Newton's Bluetooth Setup (there was only one in my
case).

Next, you'll need to go to Terminal on the Mac, and carefully enter
these commands.

sudo /usr/sbin/sysctl -w net.inet.ip.forwarding=1

sudo /usr/sbin/natd -interface en1 -use_sockets -same_ports -dynamic -
clamp_mss

(Note the "en1" here. If your Mac is connected to the internet using
AirPort, use en1. If it's connected using Ethernet, use en0 here
instead.)

sudo /sbin/ipfw add divert natd ip from any to any via en1

(Same deal with the "en1" here.)

sudo named

sudo named

(I'm not sure this has to be done twice. One site I was reading
suggested it.)

sudo /usr/sbin/pppd /dev/tty.Bluetooth-PDA-Sync 230400 noauth local
passive proxyarp asyncmap 0 silent persist :10.0.1.111

This starts a PPP server on the Bluetooth-PDA-Sync serial port. Note
the IP address here. I've used 10.0.1.111. This will be the address
assigned to your Newton.

This can be anything you like, but it should be a valid IP address
for your LAN. If you use, for example, 192.168 addressing, you
should use a 192.168.0.x address instead. Make sure it's not an
address that's in use by something else!

Now, you need to set up an internet connection on the Newton side!
Whew!

Create a new Internet Setup called whatever you like.

Protocol: PPP
Configuration: Manual
User ID: <none>
When closing, disconnect: <your preference>
Local IP Address: (whatever IP address you used in the pppd command
above!)
Gateway/Router Address: (the IP address of the machine that's sharing
its connection -- in my case, the Mac. NOT the address of your
actual router!)
Primary DNS: <an actual working DNS address> (Using 0.0.0.0 doesn't
seem to cut it.)
Secondary DNS: <optional, up to you>
Domain Name: <none>

Now, cross your fingers, and initiate a network connection from the
Newton. With a little luck, it should connect to the PPP server
running on your Mac, and get online.

When you are all done, and you want to turn off the internet sharing
on the Mac, try the following commands:

sudo killall pppd
sudo killall named
sudo /sbin/ipfw -f flush
sudo killall natd
sudo /usr/sbin/sysctl -w net.inet.ip.forwarding=0

A few notes:
1. I've only tried this on Mac OS X 10.4 Tiger

2. At one point I went into the Bluetooth system preferences pane,
Sharing tab, and changed the Bluetooth-PDA-Sync serial port from
"Modem" to "RS-232". I'm not sure if this is required, but it's
something to try if it doesn't work for you.

3. Because this runs a PPP server on the Bluetooth-PDA-Sync port, it
will conflict with anything else that tries to use that port, such as
Palm HotSync.

Categories

Portables Hacks How-tos

Earlier today I was checking out the new messages in my NewtonTalk mailing list when I came across a very cool how-to penned by Panic's own...
 

Add a Comment

*0 / 3000 Character Maximum

5 Comments

Filter by:
borg

I don't know if this would work with Newton (or any other bluetooth devices), but if you install the Missing Sync demo for Palm, it will install a bluetooth network gateway that doesn't stop working after the 14 day demo (provided you do not uninstall). This solution is pretty good, and much more 'elegant' than what you must do for linux/bluez. But a freebie? Someone ought to try it.

September 12 2006 at 9:56 AM Report abuse rate up rate down Reply
Shaaheen

Also, when I type "sudo killall named" it says No matching processes were found!

Any ideas?

September 12 2006 at 6:52 AM Report abuse rate up rate down Reply
Shaaheen

This line looks like a description:

sudo /sbin/ipfw add divert natd ip from any to any via en1

Is this a code or that ADD DIVERT is a part of code? Can you explain it more?

September 12 2006 at 6:47 AM Report abuse rate up rate down Reply
Joseph

I was a few months old when the Newton came out. I've never got to use one... It looked really cool too :'(

September 12 2006 at 4:25 AM Report abuse rate up rate down Reply
Darrell

Awesome setup. I wish I had a newton, I would do this and more... sad times for me. :-(

September 11 2006 at 10:13 PM Report abuse rate up rate down Reply
Buy an ad here

Hot Apps on TUAW

Tweets

© 2012 AOL Inc. All Rights Reserved.