Skip to content

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

@vanniroldiem

Description

@vanniroldiem

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions