need my usb tethering back
#9
I am curious how much of this scripting needs to be changed to add PAN AP capacity to Mobian?
http://wiki.maemo.org/Bluetooth_PAN

Code:
Install the iptables package:

apt-get install iptables

create the following 2 files:

/etc/udev/rules.d/98-bnep0.rules:

ACTION=="add", SUBSYSTEM=="net",  KERNEL=="bnep0", RUN+="/etc/udev/bluenet.sh"
ACTION=="remove", SUBSYSTEM=="net",  KERNEL=="bnep0", RUN+="/etc/udev/bluenet.sh"

/etc/udev/bluenet.sh:

#! /bin/sh
if [ $ACTION = "add" ]; then
    echo 1 > /proc/sys/net/ipv4/ip_forward
    iptables -t nat -A POSTROUTING ! -o lo -j MASQUERADE
    ifconfig bnep0 192.168.3.1
    ifconfig bnep0 up
    /usr/sbin/dnsmasq -I lo -z -a 192.168.3.1 -F 192.168.3.64,192.168.3.127 -x /var/run/dnsmasq.pid.bnep0
else
    iptables -t nat -D POSTROUTING ! -o lo -j MASQUERADE
    if [ -f /var/run/dnsmasq.pid.bnep0 ]; then
        DNSMASQ_PID=`cat /var/run/dnsmasq.pid.bnep0`
        rm -f /var/run/dnsmasq.pid.bnep0
        kill $DNSMASQ_PID
       fi
fi

then set /etc/udev/bluenet.sh as executible:

chmod +x /etc/udev/bluenet.sh

I have been using PAN for my laptop and tablet when mobile for many years and it works great, almost as power efficient as USB and far better than WiFi on a mobile battery.
I did notice we can already join a bluetooth PAN as a client from Advanced Networking settings.
  Reply


Messages In This Thread
need my usb tethering back - by HLing - 06-30-2021, 10:40 AM
RE: need my usb tethering back - by HLing - 07-01-2021, 06:00 PM
RE: need my usb tethering back - by biketool - 07-02-2021, 01:48 AM
RE: need my usb tethering back - by guenther - 07-02-2021, 08:13 AM
RE: need my usb tethering back - by HLing - 07-02-2021, 11:53 AM
RE: need my usb tethering back - by guenther - 07-02-2021, 12:52 PM
RE: need my usb tethering back - by HLing - 07-02-2021, 03:15 PM
RE: need my usb tethering back - by guenther - 07-02-2021, 03:51 PM
RE: need my usb tethering back - by biketool - 07-28-2021, 06:22 AM
RE: need my usb tethering back - by ragreenburg - 07-30-2021, 08:48 AM
RE: need my usb tethering back - by HLing - 08-02-2021, 06:33 AM
RE: need my usb tethering back - by biketool - 08-02-2021, 10:13 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  packages held back user641 7 1,410 09-18-2023, 03:05 PM
Last Post: diederik
  When are we getting Geary back? LibrePhoneUser 15 5,591 12-09-2022, 04:18 AM
Last Post: Anna
  Wifi issue since last update and held back updates goku499 11 5,331 09-21-2022, 02:39 PM
Last Post: Katsujinken
  How to move Firefox address bar back to top? Zebulon Walton 5 2,989 06-11-2022, 09:41 AM
Last Post: iwakura_lain
  sharing mobile data through usb tethering deb75 7 4,273 02-26-2022, 08:52 AM
Last Post: Zebulon Walton
  Packages being kept back user641 2 1,910 02-08-2022, 05:34 PM
Last Post: user641
  USB Tethering scott_VYuCAbn3k1NFK 19 24,494 10-22-2020, 01:05 PM
Last Post: dukla2000

Forum Jump:


Users browsing this thread: 1 Guest(s)