I have couple of questions regarding the BT_spp_send function. I hope you can help.
Thank you for you help,
1 & 2 :
If BT_spp_send() is failing frequently, it typically points to incorrect handling of RTS. The BT controller is unable to send anything back to the MSP430 leading to memory allocation failures since the application is still trying to pump data to the controller. As part of the demo application, RTS is enabled only as part of the Idle hook and is disabled elsewhere.
You can try the following:
a. Check if RTS is being handled correctly as part of the application customizations
b. Try to increase the number of allocated BT buffers as part of heap_bt.c to see if this makes any difference. However, note that this should not be required since we have validated the SDK behavior with 110 bytes of payload.
SPP_ERR_INVALID_STATE is returned for the following conditions:
a. If BT_spp_start() is called without required initialization
b. If BT_spp_connect() is called without required initialization
c. If BT_spp_disconnect() is called without required initialization
d. If BT_spp_send() is called without required initialization
Please initialize SPP and then call the required SPP API functions.
Another help needed using the api BT_spp_send():
i wanna send a test array with measured signal values. They including also negativ values.
i take a look at the API :
API_RESULT BT_spp_send (
IN SPP_HANDLE spp_handle,
IN UCHAR *data,
IN UINT16 data_len
with UCHAR *data I can only send values between 0...255. And i didnt understand, why data so send is 1Byte and data length of data send is 2Byte.
What kind of modifications are needed to send value of e.g. short int.?I am working on the demo accel-app...
UCHAR data Signifies byte information and payload could be anything, but it needs to be encoded before transmission and decoded after receives.
ex. To transmit short int data(X = 0x1234)
data = X / 0x100; /* MSB of variable 'X' */
data = X % 0x100; /* LSB of variable 'X' */
Y = (int)(data * 0x100) + data;
So application data signals needs to be encoded and decoded based on the application data range.
I have problem with decoding data < 256, especially sending zero ... the receviing data is diffrent according to data >= 256any idea about this?
Could you provide more details on the issue? Could you put an example of what you are getting vs what you are expecting?
Could you please give us more details about "I have problem with decoding data < 256, especially sending zero ... the receviing data is diffrent according to data >= 256"
anyway decoding and encoding logic is based on the developer and an application.Here our question is " In the bluetooth(stack) level are you getting any data/byte corruption or missing" ?
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.