Data transfer speed

8 posts / 0 new
Last post
BenjaminDu
Offline
Last seen: 3 days 3 hours ago
Joined: 2016-03-14 02:38
Data transfer speed

Hi,
I need to transmit data from peripheral tocentral, if I put more data to buffer before previous data finished transmitting, the system will crash.
so I need to know if the previous data is transmitted.
is there a function for me to do so?
or there could be an error detected for me to stop transmitting more data?

Every time I put 5 bytes into buffer, is there any other way for me to transfer more data? such as to put 10 byte into buffer one time?

Thanks a lot

Benjamin

Device: 
MT_dialog
Offline
Last seen: 2 hours 6 sec ago
Staff
Joined: 2015-06-08 11:34
Hi BenjaminDu,

Hi BenjaminDu,

Since you are transmitting data from peripheral to central i suppose that you are using notifications (since are faster than indications since there is no need to wait for confirmation from the master in order to send the next bulk of data). So, in order to get a confirmation that the previous data has been transmitted you will have to catch the confirmation of the send event, for example, in order to send a notification you should issue a GATTC_SEND_EVT_CMD and that message should have as a response a GATTC_CMP_EVT (the implementation of the custom profile uses the same scheme with custom messages CUSTS1_VAL_NTF_REQ for sending the notification and CUSTS1_VAL_NTF_CFM for confirmation, implemeting the above scheme). Regarding the 5 bytes into the buffer and that the device crash, with the notifications you are able to carry 20 bytes on the same packet and then you can extend that by increasing the MTU size (maximum 512 byets). From what you are mentioning something else is the reason that your device is crashing, if you could track where the code ends up when the device crashes it would help, since it seems quite weird to transfer 5 bytes and crash.

Thanks MT_dialog

BenjaminDu
Offline
Last seen: 3 days 3 hours ago
Joined: 2016-03-14 02:38
Hi MT_dialog,

Hi MT_dialog,

Thanks a lot for your answering me so quickly.
Yes I use notifications, do you mean I can get GATTC_CMP_EVT message when a transmit is over? I can find several GATTC_CMP_EVT , but I don't know which is the one I should use.
Attached is a snapshot when "crash" happend, can you help me to have an analysis ? my analysis(guess) is that 20 register are full when I want to put more data into the registers( but I don't know why it's "Can not read" instead of "write". and I wonder if I can check whether they are empty to see I can transmit more data.

Thank a lot

Attachment: 
MT_dialog
Offline
Last seen: 2 hours 6 sec ago
Staff
Joined: 2015-06-08 11:34
Hi BenjaminDu,

Hi BenjaminDu,

Well yes, as mentioned above for each notification message you send a GATTC_CMP_EVT should be indicated back to your application. Regarding the crashing, as far as i can tell from the screenshot you ve send apparently your device is getting detached from the jlink and thats why you get those messages in keil and not because the buffers overflowed or something like that (at least this is what the error in keil indicates). Additionally i see that you are using a quite old reference design (the throughput_eval_peripheral project). I strongly suggest to move onto the latest SDK since the reference design you are using is quite obsolete and not supported. If you are interested to check the throughput capabilities of the 580 you should check the DSPS reference design.

Thanks MT_dialog

BenjaminDu
Offline
Last seen: 3 days 3 hours ago
Joined: 2016-03-14 02:38
I downloaded the latest SDK

I downloaded the latest SDK and now am testing the examples to get familiar with it.
The reason I used the old version SDK is that there are a good example available that can meet my needs, my application has two 580s to exchange data frequently, I need the two 580s to get connected and sometimes they can sleep. I wonder if there are better examples you could recommend to meet my needs.

MT_dialog
Offline
Last seen: 2 hours 6 sec ago
Staff
Joined: 2015-06-08 11:34
Hi BenjaminDu,

Hi BenjaminDu,

If you would like to test throughput you can use the DSPS reference design, the project implement the side of the peripheral as well as the side of the central, so you can check that if it suits you.

Thanks MT_dialog

BenjaminDu
Offline
Last seen: 3 days 3 hours ago
Joined: 2016-03-14 02:38
Hi MT_dialog,

Hi MT_dialog,

I installed DSPS onto my iPad, but no where to find the target example to run on my 580.

As I have two 580 to exchange data, one as CENTRAL , another as PERIPHERAL, I found all the examples are for PERIPHERAL, is there any example for CENTRAL? or I need some configure ?

Thanks
Benjamin

MT_dialog
Offline
Last seen: 2 hours 6 sec ago
Staff
Joined: 2015-06-08 11:34
Hi BenjaminDu,

Hi BenjaminDu,

The DSPS folder includes the sps_device folder and the sps_host project, the first one includes the peripheral side and the latter the central side of the application. You can use as a central either the project sps_host thats included in the folder and use another 580 for the demo, or you can use the android/ios application as a central.

Thanks MT_dialog