Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Share internet and TCP/IP services over Bluetooth Internet
The following instructions allow you to share single internet connection with multiple Bluetooth equipped Macs and devices. Using Personal File Sharing service in Mac OS X, you can connect to your server with a client computer equipped with Bluetooth through the Connect to Server command. This hint was built on previous hints regarding sharing internet to a Palm device, sharing internet with a Mac over a Bluetooth phone, and other info found on the web and on this site. I'm not a programmer nor am I a network administrator type, so excuse me if I make some newbie type mistakes here and have a few questions there. I do know the web a little and like Macs a great deal.

One Mac (acting as a server) connected to the Internet via a Bluetooth modem (56k). It is a B&W G3 300, OS X 10.2.6 (latest OS version I've tested). This should work with any mac with a Internet connection. The Bluetooth USB adapter has a Class 1 Radio.

The Setup
Make sure you have the following software installed and configured on the Mac acting as a server. My suggestion is to install the Palm conduit and iSync even if you don't have a Palm device. This is because the Techno Happy Meal Script uses the Palm conduit to initiate the PPP connection -- you will need to edit the AppleScript if you don't want to download and install the iSync Palm Conduit. Most recent versions now install the conduit automatically. Use the Bluetooth Serial Utility too, if the port is installed.
  • Bluetooth 1.2.1
  • iSync (if you want to share to a Palm device, may not need if you are running OS X 10.2 or higher)
  • iSync Palm Conduit (if you want to share to a Palm device, may not need if you are running OS X 10.2 or higher)
  • Download the Share Ethernet over Bluetooth script from TechnoHappyMeal.
Read the rest of the article for the remainder of the how-to...

On the Mac that acts as a server for your network (the one connected to the internet), create a Bluetooth Serial Port to share the connection over.
  1. Open Bluetooth Serial Utility
  2. Make new port by clicking the new button.
  3. Name the port "sharing-port"
  4. Port direction is incoming
  5. Require Authentication unchecked
  6. Require Encryption unchecked
  7. Show In Network Preferences unchecked
  8. Port Type Serial
  9. Click OK and you should see the port name selected with check mark in the list. Quit Bluetooth Serial Utility
Once you are connected to the internet:
  1. Use System Preferences -> Sharing -> Internet (tab) and click to start sharing the internet over Ethernet.

  2. Run the modified TechnoHappyMeal script. This script initiates a PPP server on the Bluetooth port and shares the internet connection from the Ethernet port. You will need to authenticate this with the name and password. Courtesy of www.technohappymeal.com (the first line is split in two; enter it as one with no extra spaces):
    
    do shell script "sudo /usr/sbin/pppd /dev/tty.Bluetooth-PDA-Sync 115200 noauth local
      passive proxyarp asyncmap 0 silent persist :10.0.1.201 &" with administrator privileges
    do shell script "sudo /usr/sbin/sysctl -w net.inet.ip.forwarding=1"
    do shell script "sudo /usr/sbin/natd -same_ports -use_sockets -log -deny_incoming -interface en0"
    do shell script "sudo /sbin/ipfw add divert natd ip from any to any via en0"
    
    This will enable a Palm OS device to connect and share the internet.

  3. Open the Terminal and type sudo /usr/sbin/pppd /dev/tty.sharing-port 115200 noauth local passive proxyarp asyncmap 0 silent persist :10.0.1.202This will require authentication and initiate another PPP server listing over sharing-port. Now type ps -ax | grep pppd | grep -v grep to see the ports running. If you see something like this the you are serving over Bluetooth:
    0:00.03 /usr/sbin/pppd /dev/tty.sharing-port 115200 noauth local passive proxyarp
      asyncmap 0 silent persist :10.0.1.202
    0:00.10 pppd serviceid 5 plugin /System/Library/SystemConfiguration/PPPController.bundle/
      Contents/PlugIns/PPPDialogs.ppp logfile /tmp/ppp.log plugin
    0:00.03 /usr/sbin/pppd /dev/tty.Bluetooth-PDA-Sync 115200 noauth local passive proxyarp
      asyncmap 0 silent persist :10.0.1.201
    
    If you don't want to run the Palm stuff or iSync, then don't, but you must replace the line sudo /usr/sbin/pppd /dev/tty.Bluetooth-PDA-Sync 115200 noauth local passive proxyarp asyncmap 0 silent persist :10.0.1.201 & with sudo /usr/sbin/pppd /dev/tty.sharing-port 115200 noauth local passive proxyarp asyncmap 0 silent persist :10.0.1.201 &.
Note: If you need to HotSync (Palm users) again or use your Bluetooth for something else, you need to first stop the internet sharing. Then, you can either restart the Mac or stop the PPP server manually. To stop it manually, go to the Terminal and type ps -ax | grep pppd | grep -v grep this will show you the PPP servers running. Find the Process ID and use sudo kill PID#. You'll need the root password.

Making a connection to the Bluetooth Server with client devices:
A Palm OS T2 with built in Bluetooth. Make a connection using Prefs -> Connection -> New. Edit Connection. Name the Connection (use the server's name). Select Connect to: PC, Via: Bluetooth, Device: tap to find you device. Under Detail, set the connection speed to 115,200 bps, Flow Control to Automatic. Now, go back to the Communication Preferences and click on Network. Create a new Service and call it something like "Bluetooth Over PPP." Leave username and password blank. For Connection, select the connection that you created above. Click Details, and use the following settings: Select Connection type: PPP , Idle timeout: Never, Query DNS: unchecked. Find your DNS addresses (go in to the Terminal and type more /etc/resolv.conf and look for the xxx.xxx.xxx.xxx addresses and enter them in the Primary and Secondary DNS fields. IP Address: check Automatic (or try 10.0.1.201). Tap Connect . Check on the Internet for troubleshooting tips as there are a lot out there.

Here are my client configurations:
  • 12" powerbook with built in Bluetooth
  • G4 Dual 533 Digital Audio with the D-Link T120 Bluetooth adapter
  • iBook G3 900 with USB Bluetooth adapter
  • OS X 10.2.6 (or higher)
  • Bluetooth 1.2.1
Create a modem port to share the Internet with Bluetooth Serial Utility:
Open Bluetooth Serial Utility. Make new port by clicking the new button. Name the port "BluetoothInternet-Port" or something you'll remember. Port direction is Outgoing. This is the most important part. Make sure to select the right service port (in this case the name is "sharing-port") from the services directory of the server you're connecting to. Require Authentication unchecked (may need this in Panther?). Require Encryption unchecked. Show In Network Preferences checked. Port Type Modem. Click OK and you should see the port you just created. Quit Bluetooth Serial Utility.

In the System Preferences -> Networking panel, create a new location called MyBluetoothNetwork. You should see a dialogue saying a new port has been detected. Click OK and set up your Network Port Configuration by checking on BluetoothInternet-Port. Use Show BluetoothInternet-Port and use the following settings under PPP tab. TCP/IP make sure you enter a DNS Server; all other are provided by server. Find your DNS addresses, go in to the Terminal and type more /etc/resolv.conf and look for the xxx.xxx.xxx.xxx addresses and enter them in the above fields. PPP - leave blank, Proxies - leave blank, Bluetooth Modem - Select Null Modem 115200, Check Enable error correction and compression in modem, un-check wait for dial tone, check Show Bluetooth status in menu bar, check Show modem status in menu bar, click Apply Now.

Using the top menu bar select Connect. You should now be connected shown by the Bluetooth icon in the menu bar. Make sure Personal File Share is on and use the Connect to Server command to connect to server volumes using AFP. You can find the server IP from the System Preferences -> Networking -> Ethernet panel of the serving computer. Find your DNS addresses, go in to the Terminal and type more /etc/resolv.conf and look for the xxx.xxx.xxx.xxx addresses and enter them in the above fields. Open Term and type ps -ax | grep pppd | grep -v grep to see the ports running.
    •    
  • Currently 2.83 / 5
  You rated: 2 / 5 (6 votes cast)
 
[71,138 views]  

Share internet and TCP/IP services over Bluetooth | 13 comments | Create New Account
Click here to return to the 'Share internet and TCP/IP services over Bluetooth' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Share internet and TCP/IP services over Bluetooth
Authored by: paliby on Dec 04, '03 06:54:55PM

I've done everything, but when i try to connect in the 'client' computer, it initiates the connection but stays always on 'authenticating' dialog, and it happens nothing. What i'm doing wrong? It's necessary to set any password in the server or something? (I'm trying to connect my pb12" with built-in bluetooth to my desktop mac, connected via LAN to the internet and with a USB Bluetooth adapter)



[ Reply to This | # ]
Share internet and TCP/IP services over Bluetooth
Authored by: Arachante on Dec 15, '03 05:05:43PM

I've exactly the same problem, so i notice that during the client stays on 'authentication' the server's system.log say : 'Unsupported protocol 0x8057 received'. What's wrong? and What's this 0x8057 protocol ?



[ Reply to This | # ]
Share internet and TCP/IP services over Bluetooth
Authored by: Imparator on Jun 25, '04 03:17:36PM

I also have got the same Problem. It worked on my system for a while as I used OS X 10.2
Since I updated to 10.3 it does not work any more.
Do you already have a solution?



[ Reply to This | # ]
Share internet and TCP/IP services over Bluetooth
Authored by: Nat! on Jan 15, '04 06:29:07PM
Doesn't work for me on 10.3.2.

When I run the TechnoHappyMeal script I get an error from natd that the divert port is already in use. True. Because InternetSharing already started a natd process apparently.

When I kill the old natd and hand assemble the TechnoHappyMeal parameters and the original parameters. I get no errors. But it also doesn't seem to work, at least not with my P900.

Did anyone with a P900 get this to work ?

[ Reply to This | # ]

Share internet and TCP/IP services over Bluetooth
Authored by: palba on Apr 10, '04 06:16:41AM

I've done it all. All the things Tommedia suggests but my palm holds on the signing on message. What am I wrong? Also another question is: I've created a new setting in the Bluetooth serial utility, now is impossible to delete or modifying it. It is in use by anothe app, but I don't know which!!
Any suggestion is very appreciated.
Many Thanks in advance.
palba



[ Reply to This | # ]
Share internet and TCP/IP services over Bluetooth
Authored by: gkt on Apr 15, '04 10:25:46PM

I had this problem too. My Palm Tungsten T would connect (bluetooth would connect if you checked system preferences), but it would sit at "Signing on..." (I'm running a TiBook 15" with 10.3.3)

I used technohappymeal's scripts too. The fix appeared to be to change the pppd line to explicitly put in a local IP address "10.0.1.1:10.0.1.201".
I also removed the "-deny_incoming" line form the natd call, but not sure if this really makes a difference.



[ Reply to This | # ]
Share internet and TCP/IP services over Bluetooth
Authored by: Superboy on May 22, '04 11:41:52AM

I have just made an app to make enabling internet-over-bluetooth a whole lot easier! :D Just run the app and follow the instructions :) email me at the address in the program for comments please!



[ Reply to This | # ]
Share internet and TCP/IP services over Bluetooth
Authored by: Superboy on May 23, '04 02:12:35PM

Ah... You cant get the app :) Email me at elijahg@dsl.pipex.com, and i will send it to you :)



[ Reply to This | # ]
Share internet and TCP/IP services over Bluetooth
Authored by: Superboy on Jun 12, '04 05:12:56AM

Hi
I have now made a website for the utility. Go to bluetooth.webhop.org to download it.



[ Reply to This | # ]
Share internet and TCP/IP services over Bluetooth
Authored by: sd on Nov 01, '04 04:35:42PM

Nice hint, but I had to change
:10.0.1.201
to
10.0.1.1:10.0.1.201
in order to make the script work (otherwise, the Palm connects but do not retreives any web content).



[ Reply to This | # ]
Share internet and TCP/IP services over Bluetooth
Authored by: Sumleilmus on Nov 14, '04 07:45:26PM

In the original hint above all the replies, the link is expired for the script. I refer to

Download the Share Ethernet over Bluetooth script from TechnoHappyMeal.


Does anyone know where I can get the script, so I can try this?

Thanks.



[ Reply to This | # ]
Share internet and TCP/IP services over Bluetooth
Authored by: aixccapt99 on Nov 15, '04 10:48:10PM

The website linked in the hint is no longer operational, but the scripts have been posted in the forums (by black0, not me, and I've no way to verify they're the same, but they look right...) here:

http://forums.macosxhints.com/showthread.php?t=30635



[ Reply to This | # ]
Share internet and TCP/IP services over Bluetooth
Authored by: sparcleosx on Jun 25, '05 05:30:57AM

I've been searching for a solution for days, and trying all the options, scripts and programs I found.

the lost scripts from technoHappyMeal, which were no longer available, but found in a forum thread http://forums.macosxhints.com/showthread.php?t=30635;
the utility Bluetooth Serial Utility; considered Brickhouse; followed articles with
step by step ways.

But none of these seemed to work right. Error here, failure there.

So.. I tried it myself with the combination of all I read and tried before.. And I
have to admit... It was fairly easy afterall..

Assuming the Palm is already setup for a bluetooth serial connection to another
bluetooth device, you are a few steps away from a succesful connection..

My Mac Mini , with Tiger 10.4.1 is behind an OpenBSD firewall. So it has a
private range address (ie. 10.0.0.0/8, or 172.16.0.0/16), in this case it's in a
range of 172.16.140.8/29, which leaves me a few addresses.. This is not really
important for the moment. I just mention it, for the fact I'm not using 'natd' on my mac, to keep it simple.

First I stopped the Hotsync Manager (opened it, and selected 'Disable'), then in the Bluetooth preference pane I changed the Bluetooth-PDA-Sync serial setting from modem to RS-232.

In a terminal I entered :
sudo /usr/sbin/pppd /dev/tty.Bluetooth-PDA-Sync 115200 noauth local passive proxyarp asyncmap 0 silent persist :172.16.140.14

(here you see the 172.16.140.14 address, which makes it possible not to use natd, since it's in the same network as the Mac is. So the Firewall knows where to sent it to.. got no routing problems etc.. pick any free address in your private range .. if you are using , for example : firewall -> 192.168.1.1 mac -> 192.168.1.2 you can enter instead of 172... 192.168.1.3)

in the system.log on the mac (tail -f /var/log/system.log) you should see something like this :

Jun 25 10:33:57 hostname pppd[679]: pppd 2.4.2 (Apple version 229) started by username, uid 0
Jun 25 10:33:57 hostname pppd[679]: Connect: ppp0 <--> /dev/tty.Bluetooth-PDA-Sync

the last thing you have to do, is make sure the mac shares the internet connection.. (forwards the packets..) this is done by :
sudo sysctl -w net.inet.ip.forwarding=1
which results in :
net.inet.ip.forwarding: 0 -> 1

and I had to type :
sudo ifconfig ppp0 up

now your mac should be able to receive packets from the Palm over the pppdaemon (ethernet interface ppp0) and forward them to the default router.
(which might be your firewall, or your uplink to your ISP)

Now your Palm (I'm using a Palm Tungsten T3, but that shouldn't really matter,
as long as your Palm has Bluetooth.. ) should be set up for using a Bluetooth network connection to your mac.

And you can surf the internet ...

So.. short :
- Disable Hotsync Manager
- Change Bluetooth-PDA-Sync (in BT-prefpane) type from modem to RS-232
- enter in a terminal :
sudo /usr/sbin/pppd /dev/tty.Bluetooth-PDA-Sync 115200 noauth local \
passive proxyarp asyncmap 0 silent persist :172.16.140.14
sudo sysctl -w net.inet.ip.forwarding=1
sudo ifconfig ppp0 up
( and setup your Palm for a BT connection to your mac)



[ Reply to This | # ]