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

Initial values in gatt_tree not used #67

Closed
WouterJD opened this issue Jan 18, 2022 · 1 comment · Fixed by #68
Closed

Initial values in gatt_tree not used #67

WouterJD opened this issue Jan 18, 2022 · 1 comment · Fixed by #68
Labels
bug Something isn't working

Comments

@WouterJD
Copy link
Contributor

The problem
Initial values in gatt_tree not used

Reproduction
Run gattserver.py

Expected behavior
Provide a clear and concise description of what you expected to happen.

Screenshots
Not applicable

Desktop (please complete the following information):

  • OS: Windows 10

Additional context
gattserver.py:

    gatt: Dict = {
            "A07498CA-AD5B-474E-940D-16F1FBE7E8CD": {
                "51FF12BB-3ED8-46E5-B4F9-D64E2FEC021B": {
                    "Properties": (GATTCharacteristicProperties.read |
                                   GATTCharacteristicProperties.write |
                                   GATTCharacteristicProperties.indicate),
                    "Permissions": (GATTAttributePermissions.readable |
                                    GATTAttributePermissions.writeable),
                    "Value": None
                    }
                }
            }

server.py: value is in lowercase

    async def add_gatt(self, gatt_tree: Dict):
        """
        Uses the provided dictionary add all the services and characteristics

        Parameters
        ----------
        gatt_tree : Dict
            A dictionary of services and characteristics where the keys are the
            uuids and the attributes are the properties
        """
        for service_uuid, service_info in gatt_tree.items():
            await self.add_new_service(service_uuid)
            for char_uuid, char_info in service_info.items():
                await self.add_new_characteristic(
                        service_uuid, char_uuid, char_info.get("Properties"),
                        char_info.get("value"), char_info.get("Permissions")
                        )

@kevincar kevincar added the bug Something isn't working label Jan 19, 2022
@kevincar kevincar linked a pull request Jan 19, 2022 that will close this issue
kevincar added a commit that referenced this issue Jan 20, 2022
…not-used

#67 initial values in gatt tree not used
@kevincar
Copy link
Owner

merged #68

@kevincar kevincar mentioned this issue Jun 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants