BLE array transfer

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
ArTc_3305816
Level 2
Level 2
5 likes given First like given

Hi

I am using the evaluation kit CYW920719Q40EVB1-01.

I am trying to send an array through BLE but I am facing a problem. so far I am able to create the array and send up to 6 values only but if I increase my array number, the board resets itself.

any suggestions and assistance would be appreciated.

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.

There are 2 problems in your project:

1. When you claim the thermistor_last_reading[ ], please initiate the size. And you only claim 2 bytes in the thermistor_gatt_db.h for the array.

2. You don't need to sned notification 10 times in the timer callback. You can send all the 20 bytes at once.

I make some changes for your project, it can work fine now. Please find the attachment.

View solution in original post

8 Replies
Owen_Zhang123
Moderator
Moderator
Moderator
5 questions asked 500 solutions authored 250 sign-ins

Are you using the notify or indicate? Could you give a snip of your application code?

0 Likes

Hi

I'm using the Notify, and started with an example code since I'm still a beginner with this unit and BLE.

where do I attach the snip code?

0 Likes
lock attach
Attachments are accessible only for community members.

Hi,

You can click on 'Use advanced editor ' on top ( right most ) for the reply box and can 'attach ' the zip file of your project.

I have attached one example for 'Notify' .You may have a look.

Thanks,
Anjana

lock attach
Attachments are accessible only for community members.

Hi

Thank you for your help. please find attached my modified code from a previous example.

What I'm doing is saving a series of data from an analog input to an array that I "hoped" to send via BLE yet I'm facing some trouble.

I would be grateful if you can help me with this.

thank you

0 Likes
lock attach
Attachments are accessible only for community members.

There are 2 problems in your project:

1. When you claim the thermistor_last_reading[ ], please initiate the size. And you only claim 2 bytes in the thermistor_gatt_db.h for the array.

2. You don't need to sned notification 10 times in the timer callback. You can send all the 20 bytes at once.

I make some changes for your project, it can work fine now. Please find the attachment.

Hi,

excuse me for the late response. Thank your for your help and I will check right now the addressed problems.

0 Likes

What is the max number of bytes that I can send at once? I understand that max is 20 bytes, yet I think that it is possible to send multiple times of these 20 byte packets, correct?

0 Likes

The MTU size of 20719 is 23~512 bytes. But the actural size is negotiated between client and server. Usually the size is 23 by the phone. So the notify size can be 20 bytes. Please refer to the following KBA for details: Maximum Packet Size According to MTU – KBA203312