[Samsung Gear 2] papudrun:
I made attempt to share internet connection directly to Gear2 with quite big success. But first things first.

What you need:

- rooted gear 2 (neo)

- enabled network tethering over bluetooth on phone paired with gear 2 (tested on Galaxy S4)

Step 0: Enable sdb root

sdb root on

Step 1: using sdb copy required network tools to /tmp/ directory on gear and change permissions:

sdb push ifconfig /tmp/
sdb push pand /tmp/
sdb push route /tmp/
sdb push ping /tmp/
sdb shell chmod +x /tmp/ifconfig
sdb shell chmod +x /tmp/pand
sdb shell chmod +x /tmp/route
sdb shell chmod +x /tmp/ping

Step 2: open shell and run hcitool:

sdb shell

sh-3.2# hcitool con
Connections:
> ACL 5C:2E:xx:xx:xx:xx handle 12 state 1 lm SLAVE AUTH ENCRYPT

5C:2E:xx:xx:xx:xx - this is mac of your phone

Step 3: connect to phone

sh-3.2# cd /tmp/
sh-3.2# ./pand --connect 5C:2E:xx:xx:xx:xx

Now you should have new interface bnep0, you can run ./ifconfig -a to check

Step 4: Set IP and gateway

This part is bit tricky because I can't manage to get IP addres by dhcp so you have to check which addres you should assign. I've connected to S4 with other android phone and checked ip with IP Tools from Google Play.

sh-3.2# ./ifconfig bnep0 up
sh-3.2# ./ifconfig bnep0 192.168.44.200
sh-3.2# ./route add default gw 192.168.44.1

Step 5: Test connection

sh-3.2# ./ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: icmp_seq=0 ttl=44 time=716.873 ms
64 bytes from 8.8.8.8: icmp_seq=1 ttl=44 time=119.090 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=44 time=220.530 ms
64 bytes from 8.8.8.8: icmp_seq=5 ttl=44 time=197.332 ms
64 bytes from 8.8.8.8: icmp_seq=6 ttl=44 time=199.790 ms
64 bytes from 8.8.8.8: icmp_seq=7 ttl=44 time=136.653 ms
64 bytes from 8.8.8.8: icmp_seq=8 ttl=44 time=147.867 ms
^C--- 8.8.8.8 ping statistics ---
9 packets transmitted, 7 packets received, 22% packet loss
round-trip min/avg/max/stddev = 119.090/248.305/716.873/194.396 ms

As you can see connection isn't very stable.

What opportunities does that give to us?

XMLHttpRequest from watchface or application without bridge app on phone

Standalone webbrowser

...?

TODO:

dhclient

auto connection when paired with phone

DNS

Integration with ROM

Update 1:

dhclient now works (dirty hand made dhclient-script)

DNS works (thanks to Talon^)

Permanent write to rom (still no autoconnect)

I've crated tar package which should make all process more easy

To install gearnet.tar package do the following:

1. By adb

sdb push gearnet.tar /tmp/
sdb root on
sdb shell

In Gear shell prompt:

sh-3.2# mount -o remount,rw /
sh-3.2# tar --overwrite -xvf /tmp/gearnet.tar -C /
sh-3.2# reboot

now after reboot you should be able to run command

as root

:

sh-3.2# gearnet
sh-3.2# ping google.pl
PING google.pl (74.125.195.94): 56 data bytes
64 bytes from 74.125.195.94: icmp_seq=0 ttl=45 time=132.238 ms
64 bytes from 74.125.195.94: icmp_seq=1 ttl=45 time=184.377 ms
64 bytes from 74.125.195.94: icmp_seq=2 ttl=45 time=151.909 ms
64 bytes from 74.125.195.94: icmp_seq=3 ttl=45 time=104.898 ms
64 bytes from 74.125.195.94: icmp_seq=4 ttl=45 time=153.549 ms
64 bytes from 74.125.195.94: icmp_seq=5 ttl=45 time=181.517 ms
^C--- google.pl ping statistics ---
6 packets transmitted, 6 packets received, 0% packet loss
round-trip min/avg/max/stddev = 104.898/151.415/184.377/27.474 ms
sh-3.2#