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

txCharacteristic.setValue() doesn't notify central #360

Open
vovagorodok opened this issue Apr 21, 2024 · 1 comment
Open

txCharacteristic.setValue() doesn't notify central #360

vovagorodok opened this issue Apr 21, 2024 · 1 comment
Labels
type: imperfection Perceived defect in any part of project

Comments

@vovagorodok
Copy link

vovagorodok commented Apr 21, 2024

Peripheral: nano_33_iot (same issue with esp32dev)
Central: HP EliteBook 840 G1 with Kubuntu 23.10

When running data transfer by: https://github.com/vovagorodok/ArduinoBleOTA/blob/main/tools/uploader.sh
Central doesn't receive ack notification.
Peripheral side: https://github.com/vovagorodok/ArduinoBleOTA/blob/2c900594f3b9850dfd17ab0c8df5019fe3efb78c/src/ArduinoBleOtaClass.cpp#L107

Logs:
PCAP:

ble_logs.zip

__BLE_TRACE__:

Click here to view

HCI event: 3E
        SubEvent: 0xA
No matching MAC
Resolved peer     : 0x0, 0x0, 0x0, 0x0, 0x0, 0x0
Resolved local    : 0x0, 0x0, 0x0, 0x0, 0x0, 0x0
data opcode: 0x2
MTU
Data tx ->  0x2 0x0 0x0 0x7 0x0 0x3 0x0 0x4 0x0 0x3 0xF2 0x0.
HCI event: 13
Outstanding packets: 0
Data[0]: 0x0
Data[1]: 0x1
data opcode: 0x8
By type
Data tx ->  0x2 0x0 0x0 0x9 0x0 0x5 0x0 0x4 0x0 0x1 0x8 0x1 0x0 0xA.
HCI event: 13
Outstanding packets: 0
Data[0]: 0x0
Data[1]: 0x1
data opcode: 0x10
readByGroupReq: start: 0x1
readByGroupReq: end: 0xFFFF
readByGroupReq: UUID: 0x2800
readByGroupReq: attrcount: 23
Data tx ->  0x2 0x0 0x0 0x12 0x0 0xE 0x0 0x4 0x0 0x11 0x6 0x1 0x0 0x5 0x0 0x0 0x18 0x6 0x0 0x9 0x0 0x1 0x18.
HCI event: 13
Outstanding packets: 0
Data[0]: 0x0
Data[1]: 0x1
data opcode: 0x10
readByGroupReq: start: 0xA
readByGroupReq: end: 0xFFFF
readByGroupReq: UUID: 0x2800
readByGroupReq: attrcount: 23
Data tx ->  0x2 0x0 0x0 0x1A 0x0 0x16 0x0 0x4 0x0 0x11 0x14 0xA 0x0 0x17 0x0 0x4 0x2F 0xA7 0xD6 0x41 0x97 0xC0 0xAD 0xED 0x11 0xC5 0x36 0xCA 0x55 0xC1 0x15.
HCI event: 13
Outstanding packets: 0
Data[0]: 0x0
Data[1]: 0x1
data opcode: 0x10
readByGroupReq: start: 0x18
readByGroupReq: end: 0xFFFF
readByGroupReq: UUID: 0x2800
readByGroupReq: attrcount: 23
Data tx ->  0x2 0x0 0x0 0x9 0x0 0x5 0x0 0x4 0x0 0x1 0x10 0x18 0x0 0xA.
HCI event: 13
Outstanding packets: 0
Data[0]: 0x0
Data[1]: 0x1
data opcode: 0x10
readByGroupReq: start: 0x1
readByGroupReq: end: 0xFFFF
readByGroupReq: UUID: 0x2801
readByGroupReq: attrcount: 23
Data tx ->  0x2 0x0 0x0 0x9 0x0 0x5 0x0 0x4 0x0 0x1 0x10 0x1 0x0 0xA.
HCI event: 13
Outstanding packets: 0
Data[0]: 0x0
Data[1]: 0x1
data opcode: 0x8
By type
Data tx ->  0x2 0x0 0x0 0x9 0x0 0x5 0x0 0x4 0x0 0x1 0x8 0x1 0x0 0xA.
HCI event: 13
Outstanding packets: 0
Data[0]: 0x0
Data[1]: 0x1
data opcode: 0x8
By type
Data tx ->  0x2 0x0 0x0 0x1B 0x0 0x17 0x0 0x4 0x0 0x9 0x7 0x2 0x0 0x2 0x3 0x0 0x0 0x2A 0x4 0x0 0x2 0x5 0x0 0x1 0x2A 0x7 0x0 0x20 0x8 0x0 0x5 0x2A.
HCI event: 13
Outstanding packets: 0
Data[0]: 0x0
Data[1]: 0x1
data opcode: 0x8
By type
Data tx ->  0x2 0x0 0x0 0x84 0x0 0x80 0x0 0x4 0x0 0x9 0x15 0xB 0x0 0x4 0xC 0x0 0xA4 0xC2 0x5C 0xCF 0xD6 0xA3 0xC1 0xAD 0xED 0x11 0xC5 0x36 0x4C 0x56 0xC1 0x15 0xD 0x0 0x12 0xE 0x0 0x3A 0x41 0xFD 0xD4 0x96 0x73 0xC2 0xAD 0xED 0x11 0xC5 0x36 0xE2 0x56 0xC1 0x15 0x10 0x0 0x2 0x11 0x0 0x1E 0xE5 0x5D 0x89 0x99 0x87 0xC3 0xAD 0xED 0x11 0xC5 0x36 0x6E 0x57 0xC1 0x15 0x12 0x0 0x2 0x13 0x0 0x9D 0x6 0xA6 0xD0 0xC0 0x1B 0xC5 0xAD 0xED 0x11 0xC5 0x36 0x86 0x58 0xC1 0x15 0x14 0x0 0x2 0x15 0x0 0x47 0x7B 0x26 0x60 0x9C 0x57 0xC4 0xAD 0xED 0x11 0xC5 0x36 0xFA 0x57 0xC1 0x15 0x16 0x0 0x2 0x17 0x0 0x19 0xBF 0x3D 0x60 0xE9 0xDB 0xC6 0xAD 0xED 0x11 0xC5 0x36 0x1C 0x59 0xC1 0x15.
HCI event: 13
Outstanding packets: 0
Data[0]: 0x0
Data[1]: 0x1
data opcode: 0x8
By type
Data tx ->  0x2 0x0 0x0 0x9 0x0 0x5 0x0 0x4 0x0 0x1 0x8 0x17 0x0 0xA.
HCI event: 13
Outstanding packets: 0
Data[0]: 0x0
Data[1]: 0x1
data opcode: 0x12
Write req
Data tx ->  0x2 0x0 0x0 0x5 0x0 0x1 0x0 0x4 0x0 0x13.
HCI event: 13
Outstanding packets: 0
Data[0]: 0x0
Data[1]: 0x1
data opcode: 0xA
Data tx ->  0x2 0x0 0x0 0x12 0x0 0xE 0x0 0x4 0x0 0xB 0x41 0x72 0x64 0x75 0x69 0x6E 0x6F 0x42 0x6C 0x65 0x4F 0x54 0x41.
HCI event: 13
Outstanding packets: 0
Data[0]: 0x0
Data[1]: 0x1
data opcode: 0xA
Data tx ->  0x2 0x0 0x0 0x7 0x0 0x3 0x0 0x4 0x0 0xB 0x0 0x0.
HCI event: 13
Outstanding packets: 0
Data[0]: 0x0
Data[1]: 0x1
data opcode: 0xA
Data tx ->  0x2 0x0 0x0 0x11 0x0 0xD 0x0 0x4 0x0 0xB 0x45 0x78 0x61 0x6D 0x70 0x6C 0x65 0x20 0x53 0x41 0x4D 0x44.
HCI event: 13
Outstanding packets: 0
Data[0]: 0x0
Data[1]: 0x1
data opcode: 0xA
Data tx ->  0x2 0x0 0x0 0x8 0x0 0x4 0x0 0x4 0x0 0xB 0x1 0x0 0x0.
HCI event: 13
Outstanding packets: 0
Data[0]: 0x0
Data[1]: 0x1
data opcode: 0xA
Data tx ->  0x2 0x0 0x0 0xF 0x0 0xB 0x0 0x4 0x0 0xB 0x45 0x78 0x61 0x6D 0x70 0x6C 0x65 0x20 0x53 0x57.
HCI event: 13
Outstanding packets: 0
Data[0]: 0x0
Data[1]: 0x1
data opcode: 0xA
Data tx ->  0x2 0x0 0x0 0x8 0x0 0x4 0x0 0x4 0x0 0xB 0x1 0x0 0x0.
HCI event: 13
Outstanding packets: 0
Data[0]: 0x0
Data[1]: 0x1
data opcode: 0x12
Write req
Data tx ->  0x2 0x0 0x0 0x5 0x0 0x1 0x0 0x4 0x0 0x13.
HCI event: 13
Outstanding packets: 0
Data[0]: 0x0
Data[1]: 0x1
data opcode: 0x52
Write req
Data tx ->  0x2 0x0 0x0 0x10 0x0 0xC 0x0 0x4 0x0 0x1B 0xE 0x0 0x0 0xEF 0x0 0x0 0x0 0x4C 0x9 0x0 0x0.
HCI event: 13
Outstanding packets: 0
Data[0]: 0x0
Data[1]: 0x1
Don't have full packet yet
Handle: 0x0, 0x20
dlen: 0x1B, 0x0
len: 0xF2, 0x0
cid: 0x4, 0x0
Don't have full packet yet
Handle: 0x0, 0x20
dlen: 0x36, 0x0
len: 0xF2, 0x0
cid: 0x4, 0x0
Don't have full packet yet
Handle: 0x0, 0x20
dlen: 0x51, 0x0
len: 0xF2, 0x0
cid: 0x4, 0x0
Don't have full packet yet
Handle: 0x0, 0x20
dlen: 0x6C, 0x0
len: 0xF2, 0x0
cid: 0x4, 0x0
Don't have full packet yet
Handle: 0x0, 0x20
dlen: 0x87, 0x0
len: 0xF2, 0x0
cid: 0x4, 0x0
Don't have full packet yet
Handle: 0x0, 0x20
dlen: 0xA2, 0x0
len: 0xF2, 0x0
cid: 0x4, 0x0
Don't have full packet yet
Handle: 0x0, 0x20
dlen: 0xBD, 0x0
len: 0xF2, 0x0
cid: 0x4, 0x0
Don't have full packet yet
Handle: 0x0, 0x20
dlen: 0xD8, 0x0
len: 0xF2, 0x0
cid: 0x4, 0x0
Don't have full packet yet
Handle: 0x0, 0x20
dlen: 0xF3, 0x0
len: 0xF2, 0x0
cid: 0x4, 0x0
data opcode: 0x52
Write req

Issue reproduces each time only on this laptop (checked on bluezero and bleak python libraries)

@per1234 per1234 added the type: imperfection Perceived defect in any part of project label Apr 22, 2024
@vovagorodok
Copy link
Author

vovagorodok commented May 4, 2024

Looks that changing transfer package size to 20 (23 (min mtu size) - 3 (bytes header size for write reserved by ble protocol)) helps, but negotiated MTU is higher than 23 . Any idea what can be the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

2 participants