== Usb tethering ==
#cat /etc/network/interfaces
auto lo
iface lo inet loopback
iface eth0 inet dhcp
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcpThe edit the file to provide hotplugging feature for usb0 type of interface which gets created when u start usb-tethering from android phone. Add below entries at the end of /etc/network/interfaces file.
allow-hotplug usb0
iface usb0 inet dhcp
and then save the file. You need to restart the board or networking using #sudo /etc/init.d/networking restart
== Bluetooth tethering ==
sudo apt-get install bluetooth bluez
sudo bluetoothctl -a
# scan
# pair <MAC>
# trust <MAC>
# connect <MAC>
And finally used pand to create a PAN (Personal Area Network) connection:
sudo pand -c C8:BC:C8:E1:E5:C5 --role PANU --persist 30
which should result in creating a new network interface bnep0 (see with ifconfig -a).
/etc/netwok/interfaces:
iface bnep0 inet dhcp
After adding the pand connect command to /etc/rc.local, the connection is established on startup if the other device is in reach. With the persist option, the PAN demon will attempt to reconnect whenever the connection is interrupted.