Skip to content

How to set ATT MTU size in aioble? #701

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

Closed
rivendell1984 opened this issue Jul 19, 2023 · 2 comments
Closed

How to set ATT MTU size in aioble? #701

rivendell1984 opened this issue Jul 19, 2023 · 2 comments

Comments

@rivendell1984
Copy link

Hello, is there API to set ATT MTU size in aioble?

@jimmo
Copy link
Member

jimmo commented Jul 19, 2023

Please see this discussion thread: https://github.com/orgs/micropython/discussions/11945#discussioncomment-6368946

This should be added to the readme.

@rivendell1984
Copy link
Author

@jimmo Thanks a lot, it works

It hasn't added to readme. the code snippet is below, which works well:

  try:
    print("Connecting to", device)
    connection = await device.connect()
  except asyncio.TimeoutError:
    print('Timeout during connection')
        
  async with connection:
    try:
      await connection.exchange_mtu(128)
      service = await connection.service(_CUSTOM_SERVICE_UUID)
...

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

No branches or pull requests

2 participants