Reply
Thread Tools
Posts: 915 | Thanked: 57 times | Joined on Jun 2011
#231
Originally Posted by 9000 View Post
As long as your PC can route internet traffic, you don't need my script when they are in the same PAN (as in same LAN). All you have to do is to set the default routing in N900. I thought I could automate this process by modification my script, but you could just do it manually.
no i dont hav a router. if i had one then i would easily created a ad hoc network. i hav a simple desktop with windows xp installed and a broadband line via a cable. no usb hub or router. so how to share the internet? ithink i will need ur script. u just guide me.what should i do at first? i am wondering weder its possible with nokia pc suite. nyz waiting fr ur reply
__________________
PR 1.3
CSSU (TESTING)
KERNEL POWER 49
BACKUPMENU
 
Posts: 1,425 | Thanked: 983 times | Joined on May 2010 @ Hong Kong
#232
Originally Posted by trisha02 View Post
no i dont hav a router. if i had one then i would easily created a ad hoc network. i hav a simple desktop with windows xp installed and a broadband line via a cable. no usb hub or router. so how to share the internet? ithink i will need ur script. u just guide me.what should i do at first? i am wondering weder its possible with nokia pc suite. nyz waiting fr ur reply
You can setup Internet Connection Sharing in Windows XP. You may search "Internet Connection Sharing in Windows XP" in microsoft.com for details. For Windows' networking, I'm afraid that is just as much I could help you here.

Things could be easier for me to guide you out if your are using a Linux. Not because I'm more familiar with Linux, but I can help you with pure CLI commands.

Get back here once you have successfully setup up an internet gateway in your Windows XP. I'll show you how to manually setting default routing in N900 such that it could share your PC's internet traffic.
 
Posts: 3 | Thanked: 0 times | Joined on Oct 2011
#233
Thanks for your help with trying some things I've got it working.
 
Posts: 1,425 | Thanked: 983 times | Joined on May 2010 @ Hong Kong
#234
Originally Posted by Nino View Post
First of all for the archos32 I do not need any script. It works with the application bluetooth dial up networkingon the n900.
If I do "ifconfig bnep0 down" the answer is "error: SIOCGFFLAGS (No such device) " and the installed ifconfig can't list all the devices
In this case archos 32 uses DUN instead of PAN. The error you got might imply there wasn't a PAN profile existed in your implementation.

BTW, have you got it working by some other means?
 
Viqsi's Avatar
Posts: 115 | Thanked: 136 times | Joined on Mar 2008 @ Central Ohio
#235
This script, for whatever reason, wasn't working effectively for me and my iPad when I tried - and I wanted something that required less intervention. So I took bits of it (notably, the whole setting-up-dnsmasq bit for DHCP) and shoehorned it into a method described here: http://hacker.klever.net/n/2011/06/0...n#.T1ew6-XipJa. It works beautifully for me.

The advantage of this method is that there is no script that has to be run at any time. It Just Works Automatically, whether my n900 is connected via 3G or WiFi (that's 'cause the iptables setup is very subtly different, going by subnets rather than interface; it could probably be adapted to the OP's script as well).

The disadvantages are twofold:
1) pc-connectivity-manager potentially conflicts with this method (it occasionally likes to modify one of the files in question by itself), so if you're using it for other purposes then this won't work for you, and
2) it requires modifying system files and so a typo can potentially screw up your system. If you're at all worried about possible screwups along the way, I'd suggest sticking to the script in the OP.

There might be a way to make this work with pc-connectivity-manager (if it can be used to make the necessary changes to /etc/network/interfaces itself). I leave this as an exercise for the reader, as I have no interest in messing with that package again.


Quick and dirty steps follow...

Preqs needed: rootsh, Kernel-Power, iptables. pc-connectivity-manager should NOT be installed!

FIRST: As root, modify the file "/etc/network/interfaces". Make a backup copy first! By default, it'll look something like this:
Code:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
There may be more in the file; don't be alarmed. The thing to watch out for is whether or not a "bnep0" appears anywhere in the file - so long as "bnep0" isn't in there yet, there's no worries. (It shouldn't appear, but if you've used pc-connectivity-manager and it's still installed then this problem has a good chance of showing up, in which case this will not work and you might not be able to use this method.)

You need to add the following section to the bottom of the file:
Code:
auto bnep0
iface bnep0 inet static
        address 192.168.100.10
        netmask 255.255.255.0
        pre-up sh -c "/usr/sbin/iptables -t nat -F ; /usr/sbin/iptables -t nat -A POSTROUTING -s 192.168.100.0/24 ! -d 192.168.100.0/24 -j MASQUERADE ; echo 1 >/proc/sys/net/ipv4/ip_forward"
SECOND: As root, create a new file, "/etc/udev/rules.d/50-bnep.rules". The contents should be as follows:
Code:
KERNEL=="bnep0", ACTION=="add", RUN+="/bin/sh -c '/sbin/ifup -f %k ; /sbin/start-stop-daemon -S -p /var/run/btpan.pid -m -b -x /usr/sbin/dnsmasq -- -k -I lo -z -a 192.168.100.10 -F 192.168.100.100,192.168.100.105 -b'"
KERNEL=="bnep0", ACTION=="remove", RUN+="/bin/sh -c '/sbin/ifdown -f %k ; /sbin/start-stop-daemon -K -p /var/run/btpan.pid'"
THIRD: Pair your n900 and PC (or iPad, or any other such device).

FOURTH: Enjoy!

Hopefully this will work for all y'all as well as it did for me.

Last edited by Viqsi; 2012-03-07 at 19:46. Reason: Minor change to the second part - that also has to be done as root.
 

The Following 3 Users Say Thank You to Viqsi For This Useful Post:
Posts: 1,425 | Thanked: 983 times | Joined on May 2010 @ Hong Kong
#236
Thank you very much Viqsi for taking your valuable effort in making others life better. (Even though I have iPad I have never ever attempted to try my own script with it ^^)

I figured recently many devices, such as Samsung Galaxy Tab 7.7, has bluetooth tetherng capability built in. Mobile makers seem to realize customers' needs, and advantages, for tethering with bluetooth.
 
Posts: 44 | Thanked: 22 times | Joined on Dec 2010
#237
Viqsi's post above worked perfectly for me. Very easy. I've tried a few times in the past using info in the first post and haven't been able to get it to work. Thank you Viqsi!!!
 
Scottlfa's Avatar
Posts: 124 | Thanked: 38 times | Joined on Feb 2010 @ Gaffney, South Carolina, USA
#238
Tried the instructions, and thus far with my tab 7.0 plus i can get it pair, even tether ... just no magic.

Its been a rough set of hours trying to get the n900 to tether at all and it saddens me that such an open device has to be so damned hard to setup. My g2 with any custom rom on it tethers in less than a few minutes. Yet the n900 barely [ad-hoc only] tethers wifi and bluetooth is a hit or miss nightmare of configs and options. Was trying to get some new use out of an old device but after nearly six hours of fiddling with it i am pretty sure its going back to the box of exhibits. Seems the G2 won again ... if there comes a time when effective and easy tethering becomes an option i will revisit the device. Thanks for the efforrs put forth though on all parts.
__________________
Need more apps for the N900?
Qole's Easy Debian lets you choose from some 25,000 precompiled packages running safely on top of Maemo!
 
Scottlfa's Avatar
Posts: 124 | Thanked: 38 times | Joined on Feb 2010 @ Gaffney, South Carolina, USA
#239
Got it working after a little more [and a few more hours], by combining the efforts of both guys 9000 and Viqsi.

Edited the 192.168.100.# to match the scripts 192.168.3.#'s for one, installed bluetooth-dun for two and ran the script. It found and updated messages after that. Going to fiddle now and see it the scripts still needed.

Script's needed still [at least with my foolish med-lings ], made one for wifi and one for gprs [wifi for testing while keeping ssh up running]. Cool beans now, setup desktop shortcuts for the two types and all is gravy so far . Thanks guys for the information.
__________________
Need more apps for the N900?
Qole's Easy Debian lets you choose from some 25,000 precompiled packages running safely on top of Maemo!

Last edited by Scottlfa; 2012-05-03 at 00:13.
 
Posts: 1,425 | Thanked: 983 times | Joined on May 2010 @ Hong Kong
#240
Just wanted to tell you it works with my SGT 7.7, and I'm glad to see that you have resolved it already. ^^
 
Reply

Tags
bluetooth-pan, tethering

Thread Tools

 
Forum Jump


All times are GMT. The time now is 12:55.