- 帖子: 182
- 感谢您收到 0
Sending files with BLE CC2540?
- btt
- [btt]
- 帖子作者
- 离线
- 管理员
Less
更多
2020-09-27 20:05 #116
由 btt
新帖
问题:是否可以:
1- create a new GATT profile (or modify an existing one as Simple Gatt profile) in order to have a characteristic that can handle a longer data size than 1?
2- is it the case that the maximum user data transfer in a single transaction can be 80 bytes (so my characteristic will be 80)?
3- when I have a data size established for a characteristic... can I send less? let's assume I have 80 but only 50 bytes of data... do I need to add 30 bytes of zeros or just send the 50 good ones?
4- finally I guess I have to split my files in the characteristic size and send each chunk in a different transfer message, right?
解答:
1) Easiest way for you is to modify the simpleGATT profile. look at Characteristic 5 which has the size of 5 bytes. That one you could increase up to 20 bytes.
2) No, the maximum packet size to transfer from the application to the lower layers is 20 Bytes so that would be the maximum one to use. So four of these packets could be sent OTA with a notification (Totally 80 bytes).
3) When you read, or notification is sent, the whole characteristic is sent so typically you would have to fill with zeroes (or anything else).
4) Yes you are correct.
1- create a new GATT profile (or modify an existing one as Simple Gatt profile) in order to have a characteristic that can handle a longer data size than 1?
2- is it the case that the maximum user data transfer in a single transaction can be 80 bytes (so my characteristic will be 80)?
3- when I have a data size established for a characteristic... can I send less? let's assume I have 80 but only 50 bytes of data... do I need to add 30 bytes of zeros or just send the 50 good ones?
4- finally I guess I have to split my files in the characteristic size and send each chunk in a different transfer message, right?
解答:
1) Easiest way for you is to modify the simpleGATT profile. look at Characteristic 5 which has the size of 5 bytes. That one you could increase up to 20 bytes.
2) No, the maximum packet size to transfer from the application to the lower layers is 20 Bytes so that would be the maximum one to use. So four of these packets could be sent OTA with a notification (Totally 80 bytes).
3) When you read, or notification is sent, the whole characteristic is sent so typically you would have to fill with zeroes (or anything else).
4) Yes you are correct.