![]() |
Re: [HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC)
Chain INPUT (policy ACCEPT)
target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination & bnep0 Link encap:Ethernet HWaddr C0:38:F9:18:40:FF BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:161 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:37112 (36.2 KiB) TX bytes:0 (0.0 B) |
Re: [HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC)
Let see if you can ping to your 850. In your N900:
Code:
ping 192.168.1.2 |
Re: [HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC)
No it doesn't answer. Something is wrong with the N900 I think. I tried with proxy enabled on k850 but again no luck.
|
Re: [HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC)
I just notice that there isn't any IP address in the 'ifconfig bnep0' output, and your iptables queue is empty, which means the script isn't even run properly. It's required in section 4.3.3 that you must have root privilege to run the script.
Do you have rootsh installed? If so, please enter run and run the script again to see if the IP address has been setup correctly. |
Re: [HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC)
Ok now the script is working but ip tables are still empty. "ifconfig bnep0" output is
Code:
bnep0 Link encap:Ethernet HWaddr C0:38:F9:18:40:FF |
Re: [HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC)
Quote:
|
Re: [HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC)
I 've set manually the ip as also dns, gateway etc but it refusing to connect.
|
Re: [HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC)
no ping to peer side? Is there any way to check whether the PAN has successfully establish on your 850 side? Have you tried to pair up PAN with you N900 to other device like a PC?
Just to make sure, are you sure you setup the IP of the correct interface on your 850? In N900 it is bnep0, which is setup by my script. |
Re: [HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC)
Thanks for the tutorial, it works for me with Gentoo on my notebook.
However, although I'm not "afraid" to use the terminal, there still is a huge drawback in comparison to tethering via DUN: I can't seem to get it working without running something in the terminal. I understand that bnep0 is created dynamically on the N900 when I'm establishing the connection, but bnep0 doesn't have an IP after the connection is established. Digging through some Debian documentation, I set the IP address and up script in /etc/network/interfaces, but neither is applied. Following the bluez PAN documentation, there's the --devup option for pand, but setting Script under [PANU Role] in /etc/bluetooth/main.conf on the N900 to your setup script doesn't do a thing. Is anyone deep enough into the N900/Debian side of things to have the final clue for me? |
Re: [HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC)
Quote:
What my script does is very simple: setup the IP on bnep0 and create the forwarding for internet access. If you've seen the bnep0, N900 is pretty much done everything it has to do. You're using Gentoo I'm sure you understand what I mean, and you must see there's nothing in N900 that blocks your way in this case. That's why I'd like you to check whether there's anything blocked on 850 size. I'm not going to blame 850 for anything poorly written, but there's still a lot of things that can go wrong in 850 if you can't open the terminal and look at the interface directly. Say, if you've setup the IP on the wrong interface on 850, of course it won't work. Also, it's chance that there's a startup sequence in 850 that when the PAN is establish it'd automatically do something that is not your intent, and drop the PAN entirely if that sequence failed. That's what we want to find out. Sorry about the terminal things, but actually I don't go to the terminal to trigger that script everytime when I am using it (daily in fact). I trigger the script through Queen Beecon Widget once I got the PAN established. |
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:
|
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)
|
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?
|
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 |
Re: [HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC)
Quote:
Regarding the bnep0, have you installed connectivity manager? |
Re: [HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC)
yes, I have it installed
|
Re: [HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC)
Quote:
Please install it and try again. ^^ |
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
|
Re: [HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC)
Quote:
Thank you very much for your kind help. |
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? |
Re: [HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC)
What do you get when you run the following as root?
Code:
ifconfig bnep0 up |
Re: [HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC)
error: no such device
|
Re: [HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC)
Quote:
Code:
lsmod | grep bnep |
Re: [HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC)
I got it working! I had to reinstall something related to libicd, but now I see bnep0, thanks for your help
|
Re: [HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC)
Quote:
|
Re: [HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC)
Thanks for this thread. I already had Bluetooth DUN on my laptop, but also just configured Bluetooth PAN just to understand it better. The script and worked like a charm except I just went ahead and used manual IP configuration on my laptop (including setting up Google's DNS rather than changing resolv settings on the n900).
Now that I'm all up and running with PAN tethering on my laptop, I thought I'd give it a go on my shiny new WiFi XOOM. I've gotten to the point where I can tell the XOOM to tether to the n900. However, I can't get any routing working (not even pings). The XOOM keeps reporting no IPv4 values (0.0.0.0), and I haven't figured out how to manually set the values without rooting it. Anyone have any thoughts about how I can do that on an unrooted WiFi ZOOM? Note: Not being able to tether the XOOM to the n900 will likely result in a returned XOOM, so I'd rather not root it. Also, WiFi tethering is out since the n900 currently only support ad-hoc mode and Android will only connect to WiFi networks in infrastructure mode. |
Re: [HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC)
Quote:
Have you try pinging a pingable external IP address like 67.195.160.76? |
Re: [HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC)
Thanks for the response, 9k.
I'm not sure it's a DNS problem as I can't ping the n900 by ip address from the XOOM. It looks like the N900 gets setup with both an IPv4 and an IPv6 address on the bnep0 interface, but the XOOM only ever gets an IPv6 address. I'm not currently setup with IPv6 via gprs and don't know enough about the subject yet to know what my options are at this point to get everything talking. Spending my time just reading up at the moment while hoping someone can help direct me down the right path. There's a long thread about IPv6 and some links to bluetooth pan tethering on IPv6 that I'm hoping leads to an epiphany for me. |
Re: [HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC)
Quote:
Code:
echo 0 > /proc/sys/net/ipv4/icmp_echo_ignore_all Code:
iptables -t nat -A POSTROUTING -o gprs0 -p ipv6 -j MASQUERADE |
Re: [HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC)
I changed the ping setting, but I'm getting a new "network is unreachable" error now. It looks like the XOOM is neither getting an IPv4 nor an IPv6 address now, but even after reverting the recent changes, it doesn't seem to be helping. :S
|
Re: [HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC)
Quote:
You'd need to manually configure ipv6 address on both side and enable the ipv6 forwarding instead of ipv4: Code:
echo 1 > /proc/sys/net/ipv6/conf/all/forwarding Code:
/sbin/ip -6 addr show scope global dev gprs0 |
Re: [HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC)
So I should have probably read the script messages better. As it turns out, initializing a bluetooth connection from the XOOM to the N900 wasn't actually bringing up the bnep0 interface on the n900 so the dnsmasq was failing since it couldn't bind to the interface properly. Once I moved the interface setup commands in your script prior to the dnsmasq, I started getting IPv4 ip addresses just fine on the XOOM.
Once I got to that point, I was able to successfully ping my n900's bnep0 ip. However, I'm still unable to successfully ping any other IP yet. Getting close... Thanks for all your suggestions, 9k. |
Re: [HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC)
it looks like most of it is working now in actually reverting some of the testing changes i made before realizing that the dnsmasq just wasn't working properly.
i can hit google via ip address tethering through either wlan or grps, but i can't seem to get the dns working with it. i haven't done much more than adding google's dns servers to the n900's resolv config. |
Re: [HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC)
Quote:
1) cat /proc/sys/net/ipv4/ip_forward to see if it is 1 (enable) 2) run iptables -t nat -A POSTROUTING -o gprs0 -j MASQUERADE alone as root to see if it returns any error 3) Failing that, you might need run 'route' as root to check if there is any other default route (0.0.0.0) getting in the way. |
Re: [HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC)
1) ipv4 fowarding is on
2) no error reported 3) routing looks okay: Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.1.0 * 255.255.255.0 U 0 0 0 wlan0 192.168.2.0 * 255.255.255.0 U 0 0 0 bnep0 default 192.168.1.1 0.0.0.0 UG 0 0 0 wlan0 |
Re: [HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC)
It's all up and working now. Rather than add the DNS entries in the resolv.conf, I'm sending it straight to the client using the dhcp-option:
--dhcp-option=6,8.8.8.8,8.8.4.4 Thanks again for all your help, 9k! Have you looked into trying to put something together using dbus scripts rather than the widget? http://wiki.maemo.org/DbusScripts It looks interesting. I tried running it in debug mode to take a look at events that the xoom might trigger when connecting to the n900, but I didn't see anything pop up in my initial testing. |
Re: [HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC)
That's great. Glad to know one more device that can work with N900. ^^
dbus-scripts could be risky. For those people who are not heavily relying on dbus triggering, they can use my script. Manual triggering of PAN tethering is not that much hassle anyway. Risk asides, dbus could be very convenient. Tell me how it goes after you tried ;) |
Re: [HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC)
I did find creating a start/stop script was useful to clean up dnsmasq for clean restarts.
|
Re: [HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC)
Quote:
|
Re: [HOWTO] N900 Bluetooth-PAN Tethering (N900 supplies Internet Access for PC)
Sure. I did a lot of testing around switching from wlan to gprs and back without actually disconnecting the bluetooth connection. Dnsmasq stayed up between calls and would cause failure messages when trying to run the start script again with the interface change. I haven't had the time to add it yet, but I'd like to pass the ext interface in as a script param so that I can reuse for lots of different scenarios (e.g. aliases, queen bee widgets, dbus scripts, etc.).
|
All times are GMT. The time now is 04:08. |
vBulletin® Version 3.8.8