dragon
2004-06-01, 07:11 PM CDT
Introduction
This is a mini-HOWTO which aims to assist Fedora Core -2- users to set up Bluetooth network connection sharing with a Palm (Tungsten T3 initially) as a "service" for casual / home use. There are many similar HOWTO's on the net, however, I will endeavour to provide a set of files that can be downloaded, including an init script that allows the service to appear in the Fedora Core Services (System Settings -> Server Settings -> Services in the Gnome Menu).
NOTES:
* This mini-HOWTO does NOT cover the initial bluetooth setup, only network connection sharing. I will post links to pages for the initial setup later.
* This is a work in progress and details will be updated as they become available and when I have time.
* Also, this setup is NOT guaranteed to be secure and should only be used in a relatively secure physical environment where others aren't likely to have physical access to the bluetooth connection (e.g. in a house).
Please be aware that bluetooth configuration seems to be highly dependent on the Linux distribution / you are using. If you are not using Fedora Core 2, these instructions / files may not work, but please let me know if they do.
Finally, I would not only welcome feedback, but also actively encourage others to contribute to this mini-HOWTO.
Requirements
Below are my first attempt at a list of requirements. I will update this list with more precise requirements when I have more time.
Fedora Core 2
Fedora-compatible bluetooth adaptor
Palm Tungsten T3 (and possibly other Palms - let me know if this works for other models)
bluez (Linux bluetooth related packages)
dund (to listen for incoming bluetooth connections)
pppd (to act as a server for PPP connections)
iptables (for network connection sharing)
bluetooth-netshare init script (attached - to automate network connection sharing and allow control through the Gnome Desktop)
Gnome (optional (I believe), this is if you wish to manipulate the service through a GUI. You may be able to do so via KDE, but I have not tried)
The versions of each of the above is the most up to date for Fedora Core 2 as at 1st June 2004. I will post exact versions when I have time.
Instructions
Below is a basic list of steps with more details to follow:
Check Palm<->PC bluetooth connectivity
Create device /dev/rfcomm0 (courtesy of Original_Homes!!)
Set up /etc/bluetooth/rfcomm.conf (example attached)
Set up /etc/init.d/bluetooth-netshare (example attached)
Set up your Palm and test the connection
Most, if not all of these steps need to be performed as root.
1) Check Palm<->PC bluetooth connectivity
Here we are concerned with whether or not your Palm can create any kind of bluetooth connection with your PC.
Adjust Palm bluetooth settings (System -> Prefs -> Bluetooth). Bluetooth: On, Discoverable: Yes, Connectable: Yes
Ensure that your PC's bluetooth adaptor is functioning (adaptor plugged in, bluetooth is configure, bluetooth service is running - I will post links to various HOWTO's when I have time)
Type: "hcitool scan" at a terminal (ensure your Palm is on). If you can see the name of your Palm device listed then you've successfully created a bluetooth connection between your Palm and PC!
2) Create device /dev/rfcomm0 (courtesy of Original_Homes!!)
The following step creates the device Fedora Core needs to connect to the bluetooth device on your PC. At a terminal, enter:
mknod /dev/rfcomm0 c 216 0
3) Setup /etc/bluetooth/rfcomm.conf (example attached)
Here we are configuring a bluetooth serial connection, which will allow you to create a TCP / IP connection later on.
Make a backup of your existing /etc/bluetooth/rfcomm.conf (e.g. rename it to rfcomm.conf with "mv /etc/bluetooth/rfcomm.conf rfcomm.conf.bak")
Copy the rfcomm.conf from the attached archive to /etc/bluetooth
Edit the "device" line by substituting 11:22:33:44:55:66 with the MAC address of your Palm (if you're unsure, try "hcitool scan" at a terminal)
If you're using a Palm Tungsten T3, you're done, however, other models may need to adjust the "channel". Please post if you know the correct channels for other Palms.
4) Setup /etc/init.d/bluetooth-netshare
Copy bluetooth-netshare from the attached archive to /etc/init.d/
Edit any paths if they are different on your system (the default should be fine for Fedora Core 2)
In the "Start()" function, adjust the IP address assigned by dund if necessary (the first IP address will be for your PC, the 2nd for your Palm).
If you adjusted the IP address above, then adjust the IP address which is masqueraded by /sbin/iptables (also in the Start() function). For those that already have a firewall set up by another program, you may wish to move this line to the other program. For beginners, look for the IP address after "-s" and only change the 192.168.3.2 part and make sure it is the same as the IP address assigned to the Palm by dund (the second IP address in the dund line).
Set the network interface to be shared by /sbin/iptables (after the "-o" - replace "eth0" with the name of the network to be shared (e.g. "eth1", "ppp1")). You should be able to add another line to share other network interfaces.
Make /etc/init.d/bluetooth-netshare executable ("chmod 755 /etc/init.d/bluetooth-netshare")
Check whether the service is displayed in Gnome Service Configuration (in the Gnome menu, select "System Settings" -> "Server Settings" -> "Services", select "Edit Runlevel" -> "Runlevel 5").
Start the service (click on bluetooth-netshare and click on the "Start" icon)
Later, when you have determined that your service setup is correct, set the service to start whenever your computer goes into Runlevel 5 (e.g. when it boots up) by checking the box next to "bluetooth-netshare").
5) Set up your Palm and test the connection
Here we concentrate on settings on the Palm itself and making the final step to establish the connection
If you have set up the bluetooth device as a Trusted Device, remove it as a Trusted Device (also perform these steps if you're not sure).
- System -> Prefs -> Bluetooth (under the heading "Communication")
- Click "Trusted Devices"
- Select the device name of your Bluetooth Adaptor
- Click "Details"
- Click "Delete Device" and click "OK"
- NOTE: If you set up your bluetooth adaptor as a Trusted device when it was connected under Windows, the bluetooth connection with Fedora Core 2 probably will NOT work.
Set up a new Connection:
- System -> Prefs -> Connection (under the heading "Communication")
- Click "New"
- Set a name (e.g. "BT to FC2")
- Connect to: "PC"
- Via: "Bluetooth"
- Device: click on "Tap to add"
- Click on OK
Set up a new Network
- System -> Prefs -> Network (under the heading "Communication")
- Service: Set a name (e.g. "FC2 Network Connection")
- User Name: *leave blank*
- Password: *leave blank*
- Connection: Select the Connection you created above (e.g. "BT to FC2")
- Click on "Details"
- Connection Type: "PPP"
- Idle timeout: Choose a setting (I select "never")
- Query DNS: "tick"
- IP Address: "tick" automatic
- You shouldn't need anything under "Script"
Test the connection
Whilst still in "Network", click on Connect (the Palm should say "Initialising", then "Signing On" then the "Connect" button should change to "Disconnect").
If the connection WAS NOT successful, open terminals and enter the following commands at each:
- "hcidump"
- "tail -f /var/log/messages"
Reattempt the connection and watch the content of each window - you may get some clues as to what is wrong. If you still cannot get the connection working, add a post below.
If the connection WAS succesful, try out some Internet applications like WebPro (browser - ensure proxy settings are correct) or VersaMail. You could also try out PalmVNC (that's right - control your desktop from your Palm!). ICQ for Palm has widespread problems, possibly because ICQ runs as a service. If you manage to get ICQ for Palm working, please add a post below.
Conclusion
In this mini-HOWTO, we explored network connection sharing with a Palm Tungsten over Bluetooth. As mentioned, this howto is only a basic one and still requires some work. If you have any feedback or require assistance OR you would like to help improve this howto, please add a post below.
Happy networking!
This is a mini-HOWTO which aims to assist Fedora Core -2- users to set up Bluetooth network connection sharing with a Palm (Tungsten T3 initially) as a "service" for casual / home use. There are many similar HOWTO's on the net, however, I will endeavour to provide a set of files that can be downloaded, including an init script that allows the service to appear in the Fedora Core Services (System Settings -> Server Settings -> Services in the Gnome Menu).
NOTES:
* This mini-HOWTO does NOT cover the initial bluetooth setup, only network connection sharing. I will post links to pages for the initial setup later.
* This is a work in progress and details will be updated as they become available and when I have time.
* Also, this setup is NOT guaranteed to be secure and should only be used in a relatively secure physical environment where others aren't likely to have physical access to the bluetooth connection (e.g. in a house).
Please be aware that bluetooth configuration seems to be highly dependent on the Linux distribution / you are using. If you are not using Fedora Core 2, these instructions / files may not work, but please let me know if they do.
Finally, I would not only welcome feedback, but also actively encourage others to contribute to this mini-HOWTO.
Requirements
Below are my first attempt at a list of requirements. I will update this list with more precise requirements when I have more time.
Fedora Core 2
Fedora-compatible bluetooth adaptor
Palm Tungsten T3 (and possibly other Palms - let me know if this works for other models)
bluez (Linux bluetooth related packages)
dund (to listen for incoming bluetooth connections)
pppd (to act as a server for PPP connections)
iptables (for network connection sharing)
bluetooth-netshare init script (attached - to automate network connection sharing and allow control through the Gnome Desktop)
Gnome (optional (I believe), this is if you wish to manipulate the service through a GUI. You may be able to do so via KDE, but I have not tried)
The versions of each of the above is the most up to date for Fedora Core 2 as at 1st June 2004. I will post exact versions when I have time.
Instructions
Below is a basic list of steps with more details to follow:
Check Palm<->PC bluetooth connectivity
Create device /dev/rfcomm0 (courtesy of Original_Homes!!)
Set up /etc/bluetooth/rfcomm.conf (example attached)
Set up /etc/init.d/bluetooth-netshare (example attached)
Set up your Palm and test the connection
Most, if not all of these steps need to be performed as root.
1) Check Palm<->PC bluetooth connectivity
Here we are concerned with whether or not your Palm can create any kind of bluetooth connection with your PC.
Adjust Palm bluetooth settings (System -> Prefs -> Bluetooth). Bluetooth: On, Discoverable: Yes, Connectable: Yes
Ensure that your PC's bluetooth adaptor is functioning (adaptor plugged in, bluetooth is configure, bluetooth service is running - I will post links to various HOWTO's when I have time)
Type: "hcitool scan" at a terminal (ensure your Palm is on). If you can see the name of your Palm device listed then you've successfully created a bluetooth connection between your Palm and PC!
2) Create device /dev/rfcomm0 (courtesy of Original_Homes!!)
The following step creates the device Fedora Core needs to connect to the bluetooth device on your PC. At a terminal, enter:
mknod /dev/rfcomm0 c 216 0
3) Setup /etc/bluetooth/rfcomm.conf (example attached)
Here we are configuring a bluetooth serial connection, which will allow you to create a TCP / IP connection later on.
Make a backup of your existing /etc/bluetooth/rfcomm.conf (e.g. rename it to rfcomm.conf with "mv /etc/bluetooth/rfcomm.conf rfcomm.conf.bak")
Copy the rfcomm.conf from the attached archive to /etc/bluetooth
Edit the "device" line by substituting 11:22:33:44:55:66 with the MAC address of your Palm (if you're unsure, try "hcitool scan" at a terminal)
If you're using a Palm Tungsten T3, you're done, however, other models may need to adjust the "channel". Please post if you know the correct channels for other Palms.
4) Setup /etc/init.d/bluetooth-netshare
Copy bluetooth-netshare from the attached archive to /etc/init.d/
Edit any paths if they are different on your system (the default should be fine for Fedora Core 2)
In the "Start()" function, adjust the IP address assigned by dund if necessary (the first IP address will be for your PC, the 2nd for your Palm).
If you adjusted the IP address above, then adjust the IP address which is masqueraded by /sbin/iptables (also in the Start() function). For those that already have a firewall set up by another program, you may wish to move this line to the other program. For beginners, look for the IP address after "-s" and only change the 192.168.3.2 part and make sure it is the same as the IP address assigned to the Palm by dund (the second IP address in the dund line).
Set the network interface to be shared by /sbin/iptables (after the "-o" - replace "eth0" with the name of the network to be shared (e.g. "eth1", "ppp1")). You should be able to add another line to share other network interfaces.
Make /etc/init.d/bluetooth-netshare executable ("chmod 755 /etc/init.d/bluetooth-netshare")
Check whether the service is displayed in Gnome Service Configuration (in the Gnome menu, select "System Settings" -> "Server Settings" -> "Services", select "Edit Runlevel" -> "Runlevel 5").
Start the service (click on bluetooth-netshare and click on the "Start" icon)
Later, when you have determined that your service setup is correct, set the service to start whenever your computer goes into Runlevel 5 (e.g. when it boots up) by checking the box next to "bluetooth-netshare").
5) Set up your Palm and test the connection
Here we concentrate on settings on the Palm itself and making the final step to establish the connection
If you have set up the bluetooth device as a Trusted Device, remove it as a Trusted Device (also perform these steps if you're not sure).
- System -> Prefs -> Bluetooth (under the heading "Communication")
- Click "Trusted Devices"
- Select the device name of your Bluetooth Adaptor
- Click "Details"
- Click "Delete Device" and click "OK"
- NOTE: If you set up your bluetooth adaptor as a Trusted device when it was connected under Windows, the bluetooth connection with Fedora Core 2 probably will NOT work.
Set up a new Connection:
- System -> Prefs -> Connection (under the heading "Communication")
- Click "New"
- Set a name (e.g. "BT to FC2")
- Connect to: "PC"
- Via: "Bluetooth"
- Device: click on "Tap to add"
- Click on OK
Set up a new Network
- System -> Prefs -> Network (under the heading "Communication")
- Service: Set a name (e.g. "FC2 Network Connection")
- User Name: *leave blank*
- Password: *leave blank*
- Connection: Select the Connection you created above (e.g. "BT to FC2")
- Click on "Details"
- Connection Type: "PPP"
- Idle timeout: Choose a setting (I select "never")
- Query DNS: "tick"
- IP Address: "tick" automatic
- You shouldn't need anything under "Script"
Test the connection
Whilst still in "Network", click on Connect (the Palm should say "Initialising", then "Signing On" then the "Connect" button should change to "Disconnect").
If the connection WAS NOT successful, open terminals and enter the following commands at each:
- "hcidump"
- "tail -f /var/log/messages"
Reattempt the connection and watch the content of each window - you may get some clues as to what is wrong. If you still cannot get the connection working, add a post below.
If the connection WAS succesful, try out some Internet applications like WebPro (browser - ensure proxy settings are correct) or VersaMail. You could also try out PalmVNC (that's right - control your desktop from your Palm!). ICQ for Palm has widespread problems, possibly because ICQ runs as a service. If you manage to get ICQ for Palm working, please add a post below.
Conclusion
In this mini-HOWTO, we explored network connection sharing with a Palm Tungsten over Bluetooth. As mentioned, this howto is only a basic one and still requires some work. If you have any feedback or require assistance OR you would like to help improve this howto, please add a post below.
Happy networking!