Skip to content

Feature request: Allow setting custom connection timeout in SMPClient() #69

@gudnimg

Description

@gudnimg

When using this code:

async with SMPClient(SMPBLETransport(), "00:11:22:33:44:55") as client:
    # do stuff

the timeout on the BLE scan when using an address is only 5 seconds and I don't see any way to modify it. 5 seconds is awfully short for BLE devices which have slow advertising intervals and when the environment has a lot of Bluetooth traffic. The specification allows the advertising interval to go up to 10 seconds.

I'm mainly concerned about the connect call which isn't directly called by my own script:

async def __aenter__(self) -> "SMPClient":
        await self.connect()
        return self

I am open to submitting a PR for this but want to ask first if the maintainers are open to this idea. :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions