1 Reply Latest reply on Apr 25, 2017 1:08 PM by user_478787221

    CYBLE_ERROR_INVALID_PARAMETER when transmitted string too long


      I am running the UART_to_BLE example but have made modifications to the peripheral code so that the demo board (CY8CKIT-042-BLE-A) acts like an emulator for a board set we have not made yet. The basic functionality works fine (I am using Coolterm String Entry to test this). When I issue a command ($ followed by two characters and =) which is followed by data and then an !, the ! indicates I am writing and the peripheral device then simply issues an acknowledge (after checking to see whether the command is valid) to the central device. If I issue a command similar to what is described above followed by a ?, the ? indicates a read condition and the device should send data back. This also works but only when the string is short. For example, if in coolTerm, the Central device issues the command $DT=?, values corresponding to DT should be returned from the Peripheral device to the central device. If \n$DT=10743,1777!\n, values will be returned as expected. But if I set $DT to the intended length: "\n$DT=10743,1777,3964,3786!\n", I get stuck in the loop :
      do {
      bleApiResult = CyBle_GattsNotification(cyBle_connHandle, &uartTxDataNtf);
      while((CYBLE_ERROR_OK != bleApiResult) && (CYBLE_STATE_CONNECTED == cyBle_state));
      with a CYBLE_ERROR_INVALID_PARAMETER invoked as part of the bleApiResult. Note that the modifications to the code are mainly in the app_UART.c and app_UART.h files.


      By the way, when I submit the complete string in CoolTerm from the Peripheral Side, I do get the complete string received by the central device.  It is only when I try to respond to the Central device in code by sending a string that I run into this error and limitation on string size.




      I have submitted a MyCases for this but sometimes takes a while to resolve.  If there is anything obvious I am missing, I would appreciate your feedback.