This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2564MODN: SPPLEDemo connection between to CC2564MODN, how credits works?

Part Number: CC2564MODN

Hello guys, I'm working on an app which I have to get data from some FSR sensor and an IMU, package on a buffer and trasmit it via BLE to a server.

I'm using the service that SPPLE bluetopia provides, so I'm trying to cofigure the SPPLEDemo to transmit data constantly from one STM32Discovery to the other, after all the connection is established, one board works as slave and the other as master.

Slave:

Registerspple --> Advertisle 1

Master:

Connectle [Slave ADDR] --> Discoverspple [Slave ADDR]  --> Configurespple [Slave ADDR]

The MTU=131.

I just can send 131 bytes, with the lesend [BD_ADDR] [Bytes to send], If I want to send more data it won't let me, Cannot send data, no transmit credits.

And always if I send just 131 bytes or more the received packets are this:

SPP+LE>
Data Indication Event, Connection ID 1, Received 128 bytes.

SPP+LE>
Data Indication Event, Connection ID 1, Received 3 bytes.

So I don't know if I'm using the exact function with my purpose or if I can continously refresh the transmit credits to be able to constantly send data.

Please help me.

Thank you and best regards

  • Hi,

    You can let the client send credits, each time it has received some data from the server. Please check the code, "SPPLESendCredits" in SPPLEDemo.c.

    Also, please note SPPLE demo is based on credits protocol, as detailed in the WiKi page :

    processors.wiki.ti.com/.../CC256x_TI_Bluetooth_Stack_SPPLEDemo_App

    Thanks
  • Okey, thank you for the quick response.
    So for a project like mine, where I have to be always sending data through a BLE connection I should create a service to send and receive data via a SPPLE port? Callling directly the API's GATT_Write_Without_Response_Request or GATT_Write_Request to send for example ?
    Sorry for the dumb questions, but I'm a little bit lost with all of these function, APIs and bluetooth stack, and I don't know how to get what I exaclty need.
    I get all the data from the device, store it on a buffer and I just want to establish a connection, and be continiously sending the data I collect via BLE to another device, for begin another discovery board. And then to an app for example. I don't know how it's the better way to do it so. Please if somebody could help I'll really appreciate that.
    Really thankful and best regards!!
  • Okey, thank you for the quick response.
    So for a project like mine, where I have to be always sending data through a BLE connection I should create a service to send and receive data via a SPPLE port? Callling directly the API's GATT_Write_Without_Response_Request or GATT_Write_Request to send for example ?
    Sorry for the dumb questions, but I'm a little bit lost with all of these function, APIs and bluetooth stack, and I don't know how to get what I exaclty need.
    I get all the data from the device, store it on a buffer and I just want to establish a connection, and be continiously sending the data I collect via BLE to another device, for begin another discovery board. And then to an app for example. I don't know how it's the better way to do it so. Please if somebody could help I'll really appreciate that.
    Really thankful and best regards!!
  • SPPLE demo is based on credits based data transfer to ensure data is not lost.. You are free to implement your own service with out credits.. Please refer publicly available BLE GATT documentation for implementing custom services/characteristics..

    Thanks