Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

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

    Reply
    Page 26 of 31 | Prev | 16   24     25   26   27     28   | Next | Last
    jschan | # 251 | 2012-08-27, 03:59 | Report

    Originally Posted by janszoon View Post
    how do you restart dbus-scripts ?
    The easiest way if you can't remember is just to reboot. Otherwise, you can use the following command:

    Code:
    killall dbus-scripts
    There's a good wiki page on dbus scripts if you are looking to learn more about it as well.

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to jschan For This Useful Post:
    janszoon

     
    janszoon | # 252 | 2012-08-28, 22:14 | Report

    ok If you hav'nt guessed - I'm keen to get this working :-)

    update to above is as follows.

    I thought I would try these steps again in case I got it wrong.

    firstly I sudo gainroot

    then...

    1) cd home/user/MyDocs
    2) tar xvf tether.tar
    3) three files produced.
    4) cp tether-dbus-config /etc/dbus-scripts.d
    5) cp tether-dbus-controller.sh tether.sh /opt/tether
    6) reboot
    7) Par n900 and Nexus 7
    8) select "use this connection for internet" in Nexus 7 bluetooth settings
    9) run script: ./tether.sh start
    10) message shows "Tethering from bnep0 to gprs0 activated"
    11) Try to access web on Nexus...
    12) no internet connection

    Help me save my N900 for a bit longer :-) think of it like rescuing a puppy.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    jschan | # 253 | 2012-08-28, 22:50 | Report

    janszoon - i haven't responded since i don't use an n900 anymore (mine died a while ago). i'd rather not give you a possibly bad response if someone else is able to help you.

    with that said, my 2 cents is If you are getting the tethering activated message, the n900 may be setup properly. it's hard to say for sure obviously, but you may want to test it using a computer connected via bluetooth to see if that works.

    the other thing you may want to check is that your device is the one connected to bnep0. if you have multiple devices connected to your phone, the bluetooth interface may be different (eg bnep1). you can use the "ifconfig" command as root to check if you have more than just the one bnep0 interface defined.

    fyi - there was a newer version of the script that starts up your grps connection if you don't have an active internet connection up (though you'll need to manually modify a setting--see the comments in the script for more info). also, if you've installed dbus, you shouldn't need to run the start or stop command yourself (the same/similar activation messages should appear as soon as you connect a bluetooth device as the ones you get when running the tether.sh script manually).

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by jschan; 2012-08-28 at 22:52.
    The Following User Says Thank You to jschan For This Useful Post:
    janszoon

     
    janszoon | # 254 | 2012-08-28, 23:50 | Report

    and like magic...it now works..... thanks for your help

    Edit | Forward | Quote | Quick Reply | Thanks

     
    sakkeus | # 255 | 2012-10-03, 17:18 | Report

    I have also tried to use my n900 as a 3g modem for Nexus 7. I followed the steps in the janszoon's post but I can't get the PAN connection between the devices established. Nexus 7 is not showing the option to use the bluetooth connection for internet (or at least I can't find it). N900 says in the bluetooth setup GUI that the supported profile is OPP and bnep0 is not shown in ifconfig.

    I had the devices paired already before installing the scripts, but I also tried to pair them again. This did not help either.

    Any suggestions what might be the reason?

    Originally Posted by janszoon View Post
    ok If you hav'nt guessed - I'm keen to get this working :-)

    update to above is as follows.

    I thought I would try these steps again in case I got it wrong.

    firstly I sudo gainroot

    then...

    1) cd home/user/MyDocs
    2) tar xvf tether.tar
    3) three files produced.
    4) cp tether-dbus-config /etc/dbus-scripts.d
    5) cp tether-dbus-controller.sh tether.sh /opt/tether
    6) reboot
    7) Par n900 and Nexus 7
    8) select "use this connection for internet" in Nexus 7 bluetooth settings
    9) run script: ./tether.sh start
    10) message shows "Tethering from bnep0 to gprs0 activated"
    11) Try to access web on Nexus...
    12) no internet connection

    Help me save my N900 for a bit longer :-) think of it like rescuing a puppy.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    jackburton | # 256 | 2012-10-03, 20:32 | Report

    Originally Posted by sakkeus View Post
    I have also tried to use my n900 as a 3g modem for Nexus 7. I followed the steps in the janszoon's post but I can't get the PAN connection between the devices established. Nexus 7 is not showing the option to use the bluetooth connection for internet (or at least I can't find it). N900 says in the bluetooth setup GUI that the supported profile is OPP and bnep0 is not shown in ifconfig.

    I had the devices paired already before installing the scripts, but I also tried to pair them again. This did not help either.

    Any suggestions what might be the reason?
    What does your /etc/bluetooth/main.conf look like?

    You may need to modify the line:
    Code:
    DisablePlugins = network,input,hal
    and remove the network part. This is my line on my phone:
    Code:
    DisablePlugins = hal
    A reboot is recommended. You could probably try restarting bluetoothd instead as that may work.

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 4 Users Say Thank You to jackburton For This Useful Post:
    boltronics, Estel, PMaff, PVince81

     
    sakkeus | # 257 | 2012-10-05, 14:02 | Report

    Originally Posted by jackburton View Post
    What does your /etc/bluetooth/main.conf look like?

    You may need to modify the line:
    Code:
    DisablePlugins = network,input,hal
    and remove the network part. This is my line on my phone:
    Code:
    DisablePlugins = hal
    A reboot is recommended. You could probably try restarting bluetoothd instead as that may work.
    Thank you! Now the connection is working perfectly.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Viqsi | # 258 | 2013-03-06, 16:44 | Report

    Originally Posted by droll View Post
    this works great with a desktop PC. how can i share this with multiple PCs?
    I have a multiple-PCs method that doesn't use this script at all - it actually functions automatically once you make the BT connection. No need to run a script!

    It's pretty straightforward, but it has two significant requirements - kernel-power v52 (for bridging support) and busybox-power (for the brctl bridging utility). Those are pretty unavoidable if you want to be able to do multiple PCs. In particular, kernel-power has to be v52 (or, hypothetically, any later version - there aren't any as of this writing) because that's when bridging support was added.

    kernel-power v52 can be found here:
    http://talk.maemo.org/showpost.php?p...&postcount=141
    busybox-power can be found in extras-devel or any mirror of same.

    Anyways, here's how this works:
    1) Install kernel-power v52 and busybox-power.

    2) Reboot so the new kernel is loaded.

    3) As root, edit /etc/network/interfaces and add the following lines at the bottom:
    Code:
    auto pan0
    iface pan0 inet static
            address 192.168.2.1
            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.2.0/24 ! -d 192.168.2.0/24 -j MASQUERADE ; echo 1 >/proc/sys/net/ipv4/ip_forward"
            up sh -c "/sbin/start-stop-daemon -S -p /var/run/btpan.pid -m -b -x /usr/sbin/dnsmasq -- -k -I lo -z -a 192.168.2.1 -F 192.168.2.100,192.168.2.105 -b"
            down sh -c "/sbin/start-stop-daemon -K -p /var/run/btpan.pid"
    4) As root, create the new file /etc/udev/rules.d/50-bnep.rules with the following contents:
    Code:
    KERNEL=="pan0", ACTION=="add", RUN+="/bin/sh -c '/sbin/ifup -f %k'"
    KERNEL=="pan0", ACTION=="remove", RUN+="/bin/sh -c '/sbin/ifdown -f %k'"
    KERNEL=="bnep0", ACTION=="add", RUN+="/bin/sh -c '/sbin/ifconfig %k up; /usr/bin/brctl addif pan0 %k'"
    KERNEL=="bnep0", ACTION=="remove", RUN+="/bin/sh -c '/sbin/ifconfig %k down'"
    KERNEL=="bnep1", ACTION=="add", RUN+="/bin/sh -c '/sbin/ifconfig %k up; /usr/bin/brctl addif pan0 %k'"
    KERNEL=="bnep1", ACTION=="remove", RUN+="/bin/sh -c '/sbin/ifconfig %k down'"
    KERNEL=="bnep2", ACTION=="add", RUN+="/bin/sh -c '/sbin/ifconfig %k up; /usr/bin/brctl addif pan0 %k'"
    KERNEL=="bnep2", ACTION=="remove", RUN+="/bin/sh -c '/sbin/ifconfig %k down'"
    KERNEL=="bnep3", ACTION=="add", RUN+="/bin/sh -c '/sbin/ifconfig %k up; /usr/bin/brctl addif pan0 %k'"
    KERNEL=="bnep3", ACTION=="remove", RUN+="/bin/sh -c '/sbin/ifconfig %k down'"
    KERNEL=="bnep4", ACTION=="add", RUN+="/bin/sh -c '/sbin/ifconfig %k up; /usr/bin/brctl addif pan0 %k'"
    KERNEL=="bnep4", ACTION=="remove", RUN+="/bin/sh -c '/sbin/ifconfig %k down'"
    KERNEL=="bnep5", ACTION=="add", RUN+="/bin/sh -c '/sbin/ifconfig %k up; /usr/bin/brctl addif pan0 %k'"
    KERNEL=="bnep5", ACTION=="remove", RUN+="/bin/sh -c '/sbin/ifconfig %k down'"
    And presto-changeo, you should have automatic PAN connectivity. Connect each PC, wait a few seconds after the connection is established (there's a delay before the DHCP server responds), and you should be hooked up.

    One possible caveat - it's possible that you'll have to create the pan0 device somehow (normally this is done by running "brctl addbr pan0" as root). I didn't have to do this when I set this up, and I don't think anyone else would either, but it is kind of a potential isssue. You can tell if you have to or not by running "brctl show" after you've installed kernel-power v52 and busybox-power and rebooted. If it's created for you, you'll see a listing resembling this:
    Code:
    bridge name     bridge id               STP enabled     interfaces
    pan0            8000.000000000000       no
    I didn't run into this on the first try (and on the second phone, I only had to run it once and it was persistent across reboots), but it seems like it could be an issue, potentially. Hopefully not.

    Hope this helps!


    (Partly inspired by bits of the script in this thread, and by work done by Michael Krelin seen here: http://hacker.klever.net/n/2011/06/0...-bluetooth-pan - if you look in the comments on that blog post, you'll see me describing this method there too - and if you don't need multiple PCs and don't want to install the latest kernel-power, there's also instructions on having automatic no-need-to-run-a-script connectivity for one device there. )

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by Viqsi; 2013-07-29 at 17:00. Reason: revised after work with a second phone
    The Following 9 Users Say Thank You to Viqsi For This Useful Post:
    alfmar, Artyom, duesselschorsch, Estel, peterleinchen, sconf, snap, Sohil876, zerox

     
    sconf | # 259 | 2013-03-07, 08:06 | Report

    Thank you, got it working. I had to do slight changes.

    1. There seems to be apostrophe missing at the end of "brctl addif..." lines.
    2. I had to add "ifconfig %k up;" before "brctl addif...".

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 2 Users Say Thank You to sconf For This Useful Post:
    Estel, Viqsi

     
    ale152 | # 260 | 2013-05-21, 14:22 | Report

    A really big thank to 9000 and everyone who joined this thread!!!
    I managed to connect both my eeepc and my samsung galaxy tab to my n900 to share 3G connection!

    THANK YOU SO MUCH!!!

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to ale152 For This Useful Post:
    nokiabot

     
    Page 26 of 31 | Prev | 16   24     25   26   27     28   | Next | Last
vBulletin® Version 3.8.8
Normal Logout