I'm trying to modify the SimpleBLEPeripheral to change Characteristic 1 from a single byte into a 16 byte array. I have successfully configured it to be initialised and it reads OK, but get an error when trying to write 16 bytes. Write permissions are enabled. I can see that I'm getting erors because the existing source code is configured for single byte write only. Are there any examples I can look at which succesfully write an array?
In the same application, characteristic 5 is 5 bytes of array. You can look at it.
Have you checked simpleGATTprofile.c? SimpleProfile_SetParameter has length checks for each char that need to be updated. Also there are a number of points that single byte copies need to be changed to array copies in this file and others within the project.
There were a number of hurdles but we got there in the end using the memcpy function, but the real culprit was the callback and 'notifyapp' which copies the pointer to the array for your application to use - it's currently set a s a pointer to a char but now needs to point to a char array, this was causing the application to crash.
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.