maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N900 (https://talk.maemo.org/forumdisplay.php?f=44)
-   -   [HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC) (https://talk.maemo.org/showthread.php?t=58570)

eezo 2011-02-13 20:51

Re: [HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC)
 
Finally got it working... Not the Debian way, but the udev way of things...

Quote:

# cat /etc/udev/rules.d/96-bnep0.rules
ACTION=="add", SUBSYSTEM=="net", KERNEL=="bnep0", PROGRAM="/root/bnep0"

# cat /root/bnep0
#!/bin/sh

run-standalone.sh dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:'Setting up...'

ifconfig bnep0 >/dev/null || exit 1

modprobe ipt_MASQUERADE

iptables -F
iptables -t nat -F

iptables -t nat -A POSTROUTING -o gprs0 -j MASQUERADE

echo 1 > /proc/sys/net/ipv4/ip_forward

ifconfig bnep0 192.168.1.1/24 up

run-standalone.sh dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:'Bluetooth PAN NATting set up - Enjoy!'

JadeH 2011-03-12 21:21

Re: [HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC)
 
I have no bnep0 device no matter what I do and I tried what's in this thread, how do I make it appear? (I tried with bluetooth on, etc, but your script always says there is no bnep0, and when i do ifconfig bnep0 it says it doesn't exist)

eezo 2011-03-12 21:23

Re: [HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC)
 
bnep0 is created automatically on the N900 when you connect from your PC. Does the Bluetooth icon gurn blue when you establish the connection?

JadeH 2011-03-13 15:10

Re: [HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC)
 
yeah it turns blue, I use the bluetooth DUN script fine for tethering, but I wanted to give this bluetooth PAN thing a try.

I can't find a bnep0 device no matter what I do though :/ not sure why

9000 2011-03-13 15:12

Re: [HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC)
 
Quote:

Originally Posted by JadeH (Post 966870)
yeah it turns blue, I use the bluetooth DUN script fine for tethering, but I wanted to give this bluetooth PAN thing a try.

I can't find a bnep0 device no matter what I do though :/ not sure why

Thank you for giving it a try. Let's work it out together.

Regarding the bnep0, have you installed connectivity manager?

JadeH 2011-03-13 15:30

Re: [HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC)
 
yes, I have it installed

9000 2011-03-14 01:04

Re: [HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC)
 
Quote:

Originally Posted by JadeH (Post 966882)
yes, I have it installed

I might have missed this one in the instruction: bluez

Please install it and try again. ^^

JadeH 2011-03-18 00:36

Re: [HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC)
 
Hi, sorry my n900 broke due to the usb port falling off, I just got my replacement today, and same problem as my old one! no bnep0. I'm going to try to see if i have bluez installed and tell you what happens

9000 2011-03-18 02:25

Re: [HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC)
 
Quote:

Originally Posted by mauron85 (Post 929290)
For DHCP and Auto DNS configuration, you can inspire from:
http://wiki.maemo.org/N900_USB_router

Just add before stand-alone command:

Code:

dnsmasq -I lo -z -a 192.168.1.1 -F 192.168.1.64,192.168.1.127

PS: tested and it works with Windows 7, but probably you'll have to renew dns lease:
Code:

ipconfig /renew "Name of PAN Adapter"

Per your suggestion the main script in 4.3.1 is modified accordingly such that IP and DNS can be assigned to client automatically once PAN is established.

Thank you very much for your kind help.

JadeH 2011-03-18 05:11

Re: [HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC)
 
apparently i already had bluez installed, what do i do now

i tried hciconfig and it shows hci0 and when there's bluetooth activity the TX and RX increase in number, is it related to bluetooth?


All times are GMT. The time now is 04:03.

vBulletin® Version 3.8.8