-
-
Notifications
You must be signed in to change notification settings - Fork 243
bt-tether: add DHCP support for Android #442
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: noai
Are you sure you want to change the base?
bt-tether: add DHCP support for Android #442
Conversation
Added ip-method config option for DHCP vs static IP configuration. Android 11+ randomizes tethering subnets, breaking static IP configs. Changes: - Add ip-method config: "auto" (DHCP) or "manual" (static) - Android defaults to DHCP, iOS to static - DNS validation relaxed for DHCP mode Signed-off-by: cVeqT2vkiSX5kJVJxcVmz7rKHKbu9M9FNixoPNC <cVeqT2vkiSX5kJVJxcVmz7rKHKbu9M9FNixoPNC@users.noreply.github.com>
|
Great work, will test soon as i can. |
|
@wpa-2 is testing bt-tether functionalities. If he says it works I trust him and I will accept the PR. |
|
I don't have an iPhone or other Android device for available testing WIth DHCP I use IPDisplay to get the IP |
Sadly didn't work for me, any settings i need to adjust on the config? The issue seems to be with android16 not 11 EDIT |
|
For the changes I added the config item Maybe the better mode is to use Static mode when For discovering the IP address, maybe there is a way to get hostname resolution working for Bluetooth PAN? |
Sadly i couldnt find a way to even set a static IP, it seems every time you turn BT on its always random now, which sucks. |
|
So what options do we need on the config now then ? this is the current options? |
|
This is the configuration with This is the current flow to decide which mode to take. For existing configuration this should not change behaviour.
Stale static IP in network connection |
The dynamic IP stayed the same during reboots of the pwnagotchi. How to address this:
|
|
There is one thing consistent with my android build I found recently: it always starts with a 10.x.x.x/24. So depending on what build and model, the BT-pan is confirmed to always keep that consistent depending on the driver and the manufacture as long as it's android 13+ |
Tested static option>? bnep0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 Connects to phone but IP isnt working in the UI or pwnlog and after reboot I get Even when it does connect IP isnt working |
|
Marked this PR as Draft, while we try to sort this out. The log For testing I removed the BT-PAN, followed the BT-Tethering process and used the following two configurations bt-tether w/ static IPsbt-tether w/ DHCPRemove BT-PAN$ sudo bluetoothctl
devices
untrust 08:8B:C8:CO:FF:EE
remove 08:8B:C8:CO:FF:EE
exit
$ nmcli connection show
$ sudo nmcli connection delete $(nmcli -g connection.uuid connection show 'Pixel9Pro Network') |
Let me test again now ? So to confirm after moving the bt-pan redo the pairing process again. |
This is the edit im using? Not tested dhcp yet as I think static IP's is the best approach for thew wider use. oddly when clicking It does show all the BT information as if it's connected. |
Description
Added DHCP support to bt-tether plugin for modern Android devices that randomize tethering subnets.
Key changes:
ip-methodconfig option ("auto" for DHCP, "manual" for static)Motivation and Context
Android 11+ randomizes the Bluetooth tethering subnet prefix on each connection (e.g.,
192.168.X.Ywhere X changes). This breaks static IP configurations that assume192.168.44.x.Fixes #441
How Has This Been Tested?
Types of changes
Checklist:
git commit -s