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

Switching GATT connection to newly provisioned node #514

Merged
merged 1 commit into from
Jun 1, 2023
Merged

Conversation

philips77
Copy link
Member

In some situations it is useful to connect to a newly provisioned node using GATT Proxy instead of relying on transporting messages over ADV Bearer. This is especially true for Low Power Nodes (LPN), which need to establish friendship before they can exchange messages. However, they may be open for GATT connections.

This PR adds a feature allowing to switch the GATT connection to a newly provisioned node. When the phone was connected to another GATT Proxy at the time of provisioning, a new dialog will be displayed allowing to disconnect it and connect to the new node.

Note
This will only work if the node doesn't change MAC address when switching to Mesh Proxy service.

Screen Shot 2023-06-01 at 12 48 23

@philips77 philips77 merged commit 0c0f798 into main Jun 1, 2023
@philips77 philips77 deleted the connection branch June 1, 2023 10:49
@philips77
Copy link
Member Author

This PR also fixes #498. The NetworkConnecion class has several issues:

  • disconnectCurrent() was disconnecting only the first proxy. It might be, that the first one was not connected
  • scanning was started when Automatic Connection was being enabled, even if the connection was already established

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant