mirror of
https://github.com/bettercap/bettercap
synced 2025-08-19 13:09:49 -07:00
fix: fixed a bug in the GATT library which caused BLE characteristics enumeration to fail in some cases
This commit is contained in:
parent
5077476209
commit
272384c673
1 changed files with 3 additions and 2 deletions
5
vendor/github.com/bettercap/gatt/peripheral_linux.go
generated
vendored
5
vendor/github.com/bettercap/gatt/peripheral_linux.go
generated
vendored
|
@ -123,11 +123,12 @@ func (p *peripheral) DiscoverCharacteristics(cs []UUID, s *Service) ([]*Characte
|
||||||
binary.LittleEndian.PutUint16(b[5:7], 0x2803)
|
binary.LittleEndian.PutUint16(b[5:7], 0x2803)
|
||||||
|
|
||||||
b = p.sendReq(op, b)
|
b = p.sendReq(op, b)
|
||||||
if done = b[0] != byte(attOpReadByTypeRsp); done {
|
done, err = finish(op, start, b)
|
||||||
|
if done {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
b = b[1:]
|
b = b[1:]
|
||||||
|
|
||||||
l, b := int(b[0]), b[1:]
|
l, b := int(b[0]), b[1:]
|
||||||
switch {
|
switch {
|
||||||
case l == 7 && (len(b)%7 == 0):
|
case l == 7 && (len(b)%7 == 0):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue