Genymobile / gnirehtet

Gnirehtet provides reverse tethering for Android
Apache License 2.0
6.29k stars 576 forks source link

bluetooth tethering other devices #83

Open LuckyFalkor opened 6 years ago

LuckyFalkor commented 6 years ago

I have an old phone that I want to reverse tether off my computer, turn on its Bluetooth tethering, and have other devices connect to it for internet. yes a lot like wifi but poor mans version I guess.

the old phone reverse tethers wonderfully, awesome software, however my other device I want to use can't seem to get internet through the phone, any suggestions?

I turned on Bluetooth tethering on the old cell and connected the two, things seem to connect fine, just no internet of second phone.

thanks,

rom1v commented 6 years ago

however my other device I want to use can't seem to get internet through the phone

I'm not sure I understand. Your "other device" is connected through gnirehtet or through some "bluetooth tethering"? Do you have any relevant logs in adb logcat?

LuckyFalkor commented 6 years ago

i have a samsung s5 and s8. s5 is connected through gnirehtet and working well. i have shared s5's internet through bluetooth tethering and the s8 is connected to it via that link. the s5 still displays working internet, but the s8 can not seem to get a connection. the s5 is rooted and has Lineage OS on it, if you have a suggestion that needs root for the s5, i am game, s8 is not and will not be rooted however.

i'm not 100% sure on how to get those logs, but i'll look into it asap and see what i can find out.

rom1v commented 6 years ago

i have shared s5's internet through bluetooth tethering and the s8 is connected to it via that link. the s5 still displays working internet, but the s8 can not seem to get a connection.

OK, so it's a problem with your bluetooth tethering, isn't it?

LuckyFalkor commented 6 years ago

perhaps, but i have gotten this to work when my s5 was my primary phone and on the mobile network, bluetooth and all.

i was betting it might be that tethered devices are not having their network traffic rerouted. Youtube app (not browser) on the s5 for example seems to have some issues, if i connect the s5 to a wifi that doesn't supply internet it seems to think all is well and uses the rerouted gnirehtet connections without a problem. it would seem the tethering functions might suffer from this as well, but the above workaround did not work around this issue.

i'll wrangle a couple of devices from somewhere and test the bluetooth thing more thoroughly, just to be more certain.

svladimirs commented 6 years ago

Sorry if offtop. Romain Vimont, can (will can?) gnirehtet bring internet to android using bluetooth or wi-fi like scrcpy connect pc with phone?

rom1v commented 6 years ago

Romain Vimont, can (will can?) gnirehtet bring internet to android using bluetooth or wi-fi

Bluetooth, no.

Wi-Fi, currently it does not work due to the adb reverse bug over adb connect.

I did a workaround for scrcpy (https://github.com/Genymobile/scrcpy/issues/5), but it was "easy" because there is 1 client for 1 server. In gnirehtet, there are n clients for 1 server. I didn't want the gnirehtet relay server to poll for adb devices.

Since then, I implemented an adb device monitor, so there would be no need to poll, but it would still add some complexity. I do not plan to work on this.

Moreover, it's not a very common use case (typically, a Wi-Fi connection gives access to the Internet).