maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   Creating AP hotspot from N900 - possible? (https://talk.maemo.org/showthread.php?t=101276)

Wasmachinemann-NL 2022-01-03 01:00

Re: Creating AP hotspot from N900 - possible?
 
Quote:

Originally Posted by biketool (Post 1573188)
are you using kernel power or CSSU-thumb?
Bluetooth PAN should have been packaged into a .deb and put onto the repos or just part of CSSU upgrades six years ago, but what in this would interrupt booting?
Do you have backupmenu installed where reinstall is easy over USB? You could also use backupmenu to access the filesystem over USB and remove or fix the script files.
anyways when you are back installed follow the link
https://wiki.maemo.org/Bluetooth_PAN
and start after it mentions Genwall which you do not really need, the scripts and iptables do it all.

Sharing your connection over bluetooth [n900]


Using udev to automatically setup internet connection sharing over bluetooth comes now.


A kernel with iptables support is needed,

Kernel Power is the recommended way to achieve this. see Kernel Power for installation details.

The default kernel with CSSU-thumb is also suitable.


Install the iptables package:

Code:

apt-get install iptables
create the following 2 files:

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

Code:

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:

Code:

#! /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:

Code:

chmod +x /etc/udev/bluenet.sh
now whenever an authorised remote device makes a bluetooth pan (nap) connection iptables and dnsmasq are setup to allow that device access to the phones network. TODO: when no internet connection is active ask to set it up

I got bored tonight and thanks to this I managed to setup Bluetooth PAN, thank you biketool!

biketool 2022-01-03 11:08

Re: Creating AP hotspot from N900 - possible?
 
@ dredlok706
You can check the BT PAN thread, this is the first I have ever heard of following the instructions correctly blocking boot.
I suspect you ended up doing something else that we will never know of. I highly recommend backupmenu I made a thread a few years ago how to quickly reflash, load CSSU, and get to where you can use your backupmenu backup files. https://talk.maemo.org/showthread.php?t=95865
There is the expedient of switching the SIM you mention, but for the sake of the thread I will again say that for a mobile device with a limited battery the bluetooth PAN tethering is by far the best way to share a cellular/wireless internet connection.

@sicelo
Bluetooth PAN is often a premium paid service on unrooted stock Android and probably Apple devices though it becomes a network sharing option(uses NAT) if you are running an OS like LineageOS(FOSS Android fork). If you have a alternate firmware device with BT PAN service available then any network connection you have will be shared if you have PAN enabled no extra charge for tethering.


All times are GMT. The time now is 23:59.

vBulletin® Version 3.8.8