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

Decoding packet with more than one field of same data type will result in capturing only the last one #348

Open
vanniroldiem opened this issue Mar 15, 2024 · 0 comments

Comments

@vanniroldiem
Copy link

in pygatt/backends/bgapi/bgapi.py, in function _scan_rsp_data():

line 554:

# End of field
  field_name = (
      constants.scan_response_data_type[field_value[0]])

line 583:
data_dict[field_name] = bytearray(field_value)

at every fileld end, no check is performed on the existance of the key 'field_name' prior to assignment.

BLE standard allows for certain data types to be repeated.

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

1 participant