Skip to content
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

Support Bluetooth internet sharing #3

Merged
merged 1 commit into from Dec 20, 2023
Merged

Support Bluetooth internet sharing #3

merged 1 commit into from Dec 20, 2023

Conversation

abranson
Copy link
Member

Add a persistent Bluetooth tethering switch. Also clean up the logging a bit and move it to use a logging category.

connd/com.jollamobile.Connectiond.xml Outdated Show resolved Hide resolved
connd/qconnectionagent.cpp Outdated Show resolved Hide resolved
connd/qconnectionagent.cpp Outdated Show resolved Hide resolved
connd/qconnectionagent.cpp Outdated Show resolved Hide resolved
connd/qconnectionagent.cpp Show resolved Hide resolved
connd/qconnectionagent.cpp Outdated Show resolved Hide resolved
connd/qconnectionagent.cpp Outdated Show resolved Hide resolved
connd/qconnectionagent.cpp Outdated Show resolved Hide resolved
connd/qconnectionagent.cpp Outdated Show resolved Hide resolved
connd/qconnectionagent.cpp Show resolved Hide resolved
@abranson abranson force-pushed the jb60398 branch 2 times, most recently from 76a26ac to 980a70c Compare September 15, 2023 09:20
Copy link
Contributor

@pvuorela pvuorela left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Squash the commits please, either to one things for all or then debug and bluetooth separately. Would have been nice if the debug changes were separate on reviewing as now the bluetooth changes get a bit lost in all the delta.

connd/qconnectionagent.h Outdated Show resolved Hide resolved
connd/qconnectionagent.cpp Outdated Show resolved Hide resolved
connd/qconnectionagent.cpp Outdated Show resolved Hide resolved
connd/qconnectionagent.h Outdated Show resolved Hide resolved
Copy link
Contributor

@pvuorela pvuorela left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't test right now, but this looks sane enough. Only one very minor comment.

[tethering] Support Bluetooth internet sharing. Fixes JB#60398

- Enable Bluetooth tethering in connman with a persistent setting, whenever
  Bluetooth is powered on. It can use either mobile data or WLAN, so doesn't
  need to control either of those - network will be shared to connected
  devices whenever it's available.
- Use logging category and tidy logging messages a bit
- Replaced every Q_FOREACH with fors
- Check tech type instead of comparing pointers
- Call startTethering directly on startup.
- Rename signal to 'bluetoothTetheringFinished'
- Don't bail out of techChanged when wifi is not present, to check Bluetooth too
- Add comment describing Bluetooth tethering behaviour
- Cleanup and formatting
- Stop powering on Bt when tethering is enabled. Add a comment explaining
  this
- Renamed delayedTethering and btTetheringEnabled to tetherXWhenPowered
  to better describe them. They do the same thing, just wifi gets powered
  when tethering is enabled while Bt does not. Wifi's also gets cancelled
  when the connection is up, while Bt does not.
- Renamed setXTethering to enableXTethering
- Support stopTethering keepPowered parameter even though it's not really
  going to be turned off by the current UI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants