AnsweredAssumed Answered

I can't send many packets through BlueNRG

Question asked by bensmail.chahir on Sep 7, 2016
Hello,

I'm using the ST BLE (SPBTLE-RF) to send data from MCU to smartphone. We used an entire solution from ST (VL53L0X sensor, STM32F401 MCU and SPBTLE-RF BLE).
I want to send many packets (a lot of data, >50 ko) using HCI_Process() function, but I couldn't. I modified this function to do a loop, but it sent only the first 22 bytes for each packet.

For this BLE service, I used :
  ret =  aci_gatt_add_char(envSensServHandle, UUID_TYPE_128, uuid, size_packet,
                           CHAR_PROP_READ, ATTR_PERMISSION_NONE,
                           GATT_NOTIFY_READ_REQ_AND_WAIT_FOR_APPL_RESP,
                           16, 0, &tempCharHandle);
  ret = aci_gatt_update_char_value(envSensServHandle, tempCharHandle, 0, size_packet,
            (uint8_t*)&(*(uint8_t *)(address_dat+(size_packet*num_packet))));

num_packet is given as an input to HCI_Process();
I know that size_packet can't be greater than HCI_MAX_PAYLOAD_SIZE (255).

I look forward to hearing from you. Thanks

Outcomes