Active Topics

 


Reply
Thread Tools
Posts: 1,425 | Thanked: 983 times | Joined on May 2010 @ Hong Kong
#111
Originally Posted by jschan View Post
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
You need to setup an ipv6 network on both N900 and XOOM manually in this case.

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
Of course you need the ipv6 prefix to setup the ipv6 of the bnep0. Please install iproute run the following command to see if your ISP is really providing ipv6 adderss:

Code:
/sbin/ip -6 addr show scope global dev gprs0
 

The Following User Says Thank You to 9000 For This Useful Post:
Posts: 166 | Thanked: 74 times | Joined on May 2010
#112
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.
 
Posts: 166 | Thanked: 74 times | Joined on May 2010
#113
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.
 
Posts: 1,425 | Thanked: 983 times | Joined on May 2010 @ Hong Kong
#114
Originally Posted by jschan View Post
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.
Then you are 99 percent done. Check the following:

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.
 

The Following User Says Thank You to 9000 For This Useful Post:
Posts: 166 | Thanked: 74 times | Joined on May 2010
#115
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
 
Posts: 166 | Thanked: 74 times | Joined on May 2010
#116
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.
 
Posts: 1,425 | Thanked: 983 times | Joined on May 2010 @ Hong Kong
#117
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

Last edited by 9000; 2011-04-01 at 18:37.
 
Posts: 166 | Thanked: 74 times | Joined on May 2010
#118
I did find creating a start/stop script was useful to clean up dnsmasq for clean restarts.
 
Posts: 1,425 | Thanked: 983 times | Joined on May 2010 @ Hong Kong
#119
Originally Posted by jschan View Post
I did find creating a start/stop script was useful to clean up dnsmasq for clean restarts.
I haven't encountered any problem with unclean dnsmasq restart. Would you share your experience?
 
Posts: 166 | Thanked: 74 times | Joined on May 2010
#120
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.).
 
Reply

Tags
bluetooth-pan, tethering


 
Forum Jump


All times are GMT. The time now is 22:48.