SirKillalot
January 5th, 2006, 11:09 PM
Hi.
This, my very fist howto, describes how to get your Logitech MX900 mouse bluetooth donge work as HID and Bluetooth dongle at once and how you go online with your Palm using that Bluetooth dongle. The problem in Ubuntu is that the MX900 is working EITHER as mouse device OR Bluetooth dongle with the standard configurations. Maybe I should've split that into up two howtos, the Bluetooth howto and the thing with the Palm.. whatever.
STEP 1
Getting bluetooth work with MX900.
First you need a working bluez on your PC:
sudo apt-get install libbluetooth1 bluez-utils bluez-pin
Check whether bluetooth module is loaded:
lsmod | grep bluetooth
Now, create a startup script to get your mouse work AND let your dongle work as a dongle!
sudo touch /etc/init.d/bluetooth
sudo gedit /etc/init.d/bluetooth
sudo chmod +x /etc/init.d/bluetooth
edit it like that:
hid2hci
hcid
sdpd
hidd --server
You should link that script to the runlevels:
sudo update-rc.d bluetooth defaults
(If you don't have any of that programs, install them :P. You could try to find them via apt-cache search of apt-file search)
You need to restart your machine in order to get everything work. You can check if everything went ok by searching for a Bluetooth device for example using
hcitool scan
STEP 2
Get your Palm device online
First you need to edit the private key for Bluetooth pairings of your computer. The file is called /etc/bluetooth/pin.
The standard key is simply '1234'.
Then startup your Palm, go to the Preferences menu and select 'Bluetooth'. Enable your Bluetooth and add your PC as an authorized device. Use the key for the connection you set up the step before on your PC.
Now go to the 'Connections' tab and create a new connection. Call it something like 'Bluetooth PC', Select 'PC' as device to connect to and use 'Bluetooth' as medium. Finally, select your PC in the last control.
Now switch to your desktop back.
Create /etc/ppp/peers/dun:
115200
proxyarp
192.168.168.1:192.168.168.50
local
ms-dns 172.16.3.3
noauth
debug
ktune
(Thanks to Botsinge)
First get the Bluetooth address of your palm:
hcitool scan
It should be something like '00:60:57:4C:09:3C'. Don't lose the address, we'll need it now.
Edit your rfcomm configuration file to emulate Bluetooth -> com port.
sudo gedit /etc/bluetooth/rfcomm.conf
enter:
rfcomm0 {
bind yes;
device 00:60:57:4C:09:3C ;
channel 1;
comment "Palm";
}
Where '00:60:57:4C:09:3C' is the bluetooth address of your Palm. This step makes rfcomm bind your Palm Bluetooth connectio to the 1st rfcomm channel.
We create a NAT forwarding for your palm to share your internet connection. To get it run every boot, we create a startup script:
sudo touch /etc/init.d/btinternet
sudo chmod +x /etc/init.d/btinternet
sudo gedit /etc/initd.d/btinternet
paste:
dund --listen --msdun --channel 1 192.168.2.101:192.168.2.102
iptables -A INPUT --in-interface ppp0 -d 0.0.0.0/0 -j ACCEPT
iptables -A FORWARD --in-interface ppp0 -j ACCEPT
iptables -A FORWARD --in-interface eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -t nat -A POSTROUTING --out-interface eth0 -j SNAT --to 192.168.0.1
where 192.168.0.1 is your local address and eth0 your internet interface. This will create a ppp0 interface just for your Palm. You need to have 'dund'
installed for that. It should be available in the Ubuntu repos.
Again thanks to Botsinge!
After that, edit the file /etc/default/bluez-utils.
Find the row
DUND_ENABLED=0
and change it to
DUND_ENABLED=1
and change the row
DUND_OPTIONS="--listen --persist"
to
DUND_OPTIONS="--listen --persist --msdun call dun"
Then, restart bluez-utils:
sudo /etc/init.d/bluez-utils restart
Okay, that was very much, but I think now it should work. Get your Palm again and go to the 'Network' tab in Preferences.
Select 'Windows RAS', leave user and password blank and take the connection you set up before.
Now press C O N N E C T.
My whole Bluetooth system is running very fine after working on it for more than a month, because of the lack of information about the MX900 under Linux. I cannot really test if this all will work for a Ubuntu from scratch, it works fine for me, maybe I forgot some steps I made a month ago, but if so, just tell me. I'll try to complete the howto. Hope I could help.
Regards
Caglar
This, my very fist howto, describes how to get your Logitech MX900 mouse bluetooth donge work as HID and Bluetooth dongle at once and how you go online with your Palm using that Bluetooth dongle. The problem in Ubuntu is that the MX900 is working EITHER as mouse device OR Bluetooth dongle with the standard configurations. Maybe I should've split that into up two howtos, the Bluetooth howto and the thing with the Palm.. whatever.
STEP 1
Getting bluetooth work with MX900.
First you need a working bluez on your PC:
sudo apt-get install libbluetooth1 bluez-utils bluez-pin
Check whether bluetooth module is loaded:
lsmod | grep bluetooth
Now, create a startup script to get your mouse work AND let your dongle work as a dongle!
sudo touch /etc/init.d/bluetooth
sudo gedit /etc/init.d/bluetooth
sudo chmod +x /etc/init.d/bluetooth
edit it like that:
hid2hci
hcid
sdpd
hidd --server
You should link that script to the runlevels:
sudo update-rc.d bluetooth defaults
(If you don't have any of that programs, install them :P. You could try to find them via apt-cache search of apt-file search)
You need to restart your machine in order to get everything work. You can check if everything went ok by searching for a Bluetooth device for example using
hcitool scan
STEP 2
Get your Palm device online
First you need to edit the private key for Bluetooth pairings of your computer. The file is called /etc/bluetooth/pin.
The standard key is simply '1234'.
Then startup your Palm, go to the Preferences menu and select 'Bluetooth'. Enable your Bluetooth and add your PC as an authorized device. Use the key for the connection you set up the step before on your PC.
Now go to the 'Connections' tab and create a new connection. Call it something like 'Bluetooth PC', Select 'PC' as device to connect to and use 'Bluetooth' as medium. Finally, select your PC in the last control.
Now switch to your desktop back.
Create /etc/ppp/peers/dun:
115200
proxyarp
192.168.168.1:192.168.168.50
local
ms-dns 172.16.3.3
noauth
debug
ktune
(Thanks to Botsinge)
First get the Bluetooth address of your palm:
hcitool scan
It should be something like '00:60:57:4C:09:3C'. Don't lose the address, we'll need it now.
Edit your rfcomm configuration file to emulate Bluetooth -> com port.
sudo gedit /etc/bluetooth/rfcomm.conf
enter:
rfcomm0 {
bind yes;
device 00:60:57:4C:09:3C ;
channel 1;
comment "Palm";
}
Where '00:60:57:4C:09:3C' is the bluetooth address of your Palm. This step makes rfcomm bind your Palm Bluetooth connectio to the 1st rfcomm channel.
We create a NAT forwarding for your palm to share your internet connection. To get it run every boot, we create a startup script:
sudo touch /etc/init.d/btinternet
sudo chmod +x /etc/init.d/btinternet
sudo gedit /etc/initd.d/btinternet
paste:
dund --listen --msdun --channel 1 192.168.2.101:192.168.2.102
iptables -A INPUT --in-interface ppp0 -d 0.0.0.0/0 -j ACCEPT
iptables -A FORWARD --in-interface ppp0 -j ACCEPT
iptables -A FORWARD --in-interface eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -t nat -A POSTROUTING --out-interface eth0 -j SNAT --to 192.168.0.1
where 192.168.0.1 is your local address and eth0 your internet interface. This will create a ppp0 interface just for your Palm. You need to have 'dund'
installed for that. It should be available in the Ubuntu repos.
Again thanks to Botsinge!
After that, edit the file /etc/default/bluez-utils.
Find the row
DUND_ENABLED=0
and change it to
DUND_ENABLED=1
and change the row
DUND_OPTIONS="--listen --persist"
to
DUND_OPTIONS="--listen --persist --msdun call dun"
Then, restart bluez-utils:
sudo /etc/init.d/bluez-utils restart
Okay, that was very much, but I think now it should work. Get your Palm again and go to the 'Network' tab in Preferences.
Select 'Windows RAS', leave user and password blank and take the connection you set up before.
Now press C O N N E C T.
My whole Bluetooth system is running very fine after working on it for more than a month, because of the lack of information about the MX900 under Linux. I cannot really test if this all will work for a Ubuntu from scratch, it works fine for me, maybe I forgot some steps I made a month ago, but if so, just tell me. I'll try to complete the howto. Hope I could help.
Regards
Caglar