DA14592 BLE Notify Maximum 60 Bytes

Hello,

I have used BLE peripheral example ( custom service + asy ) as reference where i have addded two characteristics in which i want to exchange 256 bytes of data.

I am able to send  only 60 bytes of data to mobile application (tested nrf Connect for IOS) ,

That is in firmware i made a provision that when i receive a certain command from BLE application the firmware should reply with these 256 bytes of data,

but when i check this in application i get only 60 data.

So please help me soo that i can get this data correct and full in one shot,

I had changed the MTU size to 512 bytes, but nothing changed



Regards

Jc.

Parents
  • Hi JC,

    Apologies for the delay.
    I tried to replicate this on my side but I was not able.
    I used the Custom Service example from git: ble-sdk10-da1459x-examples/connectivity/ble_custom_service_example at main · renesas/ble-sdk10-da1459x-examples
    I made the following changes:

    /* Just to demonstrate how notifications can be sent explicitly for dedicated attribute handles */
    #define APP_NOTIF_DEMONSTRATION            ( 1 )
    
    /**
     * Attribute values maximum size expressed in bytes
     *
     * \warning The remote device must not exceed that number. Otherwise, the system will crash!!!
     *
     */
    #define ATTR_MAX_SIZE                      ( 260 )
    

    Then at the end of the ble_peripheral_task.c file where we Notify data on the characteristics:

    #if APP_NOTIF_DEMONSTRATION
                    /*
                     * The following code is just for demonstration purposes to illustrate how notifications
                     * can be sent explicitly for a specific attribute handle.
                     * A connected peer device will receive notifications/indications only if has them enabled
                     * explicitly. The notification type is defined automatically based on its associated
                     * attribute declaration.
                     */
                    if (notif & NOTIF_TIMER_EVENT) {
                            /* Generate a random number with the help of the TRNG engine */
                            int arbitrary_value = rand();
    
                            uint8_t test_val[256]= {0};
                            for (int i=0;i<256;i++){
                            	test_val[i] = rand();
                            }
    
                            /* Send notifications for a specific attribute value (referenced by its UUID) */
                            mcs_send_notifications(CHARACTERISTIC_ATTR_1_128_UUID,
                                 (const uint8_t *)&test_val, sizeof(test_val));
    
                            mcs_send_notifications(CHARACTERISTIC_ATTR_4_128_UUID,
                                 (const uint8_t *)&arbitrary_value, sizeof(arbitrary_value));
                    }
    #endif

    On my side it works as expected. I am able to see the Characteristic of the 1st Service being notified every 5 seconds with 256 random bytes.

    Best regards,
    OV_Renesas

Reply
  • Hi JC,

    Apologies for the delay.
    I tried to replicate this on my side but I was not able.
    I used the Custom Service example from git: ble-sdk10-da1459x-examples/connectivity/ble_custom_service_example at main · renesas/ble-sdk10-da1459x-examples
    I made the following changes:

    /* Just to demonstrate how notifications can be sent explicitly for dedicated attribute handles */
    #define APP_NOTIF_DEMONSTRATION            ( 1 )
    
    /**
     * Attribute values maximum size expressed in bytes
     *
     * \warning The remote device must not exceed that number. Otherwise, the system will crash!!!
     *
     */
    #define ATTR_MAX_SIZE                      ( 260 )
    

    Then at the end of the ble_peripheral_task.c file where we Notify data on the characteristics:

    #if APP_NOTIF_DEMONSTRATION
                    /*
                     * The following code is just for demonstration purposes to illustrate how notifications
                     * can be sent explicitly for a specific attribute handle.
                     * A connected peer device will receive notifications/indications only if has them enabled
                     * explicitly. The notification type is defined automatically based on its associated
                     * attribute declaration.
                     */
                    if (notif & NOTIF_TIMER_EVENT) {
                            /* Generate a random number with the help of the TRNG engine */
                            int arbitrary_value = rand();
    
                            uint8_t test_val[256]= {0};
                            for (int i=0;i<256;i++){
                            	test_val[i] = rand();
                            }
    
                            /* Send notifications for a specific attribute value (referenced by its UUID) */
                            mcs_send_notifications(CHARACTERISTIC_ATTR_1_128_UUID,
                                 (const uint8_t *)&test_val, sizeof(test_val));
    
                            mcs_send_notifications(CHARACTERISTIC_ATTR_4_128_UUID,
                                 (const uint8_t *)&arbitrary_value, sizeof(arbitrary_value));
                    }
    #endif

    On my side it works as expected. I am able to see the Characteristic of the 1st Service being notified every 5 seconds with 256 random bytes.

    Best regards,
    OV_Renesas

Children
No Data