change control point characteristics

Hi,

My project is to read the value of ADC and advertise live data over BLE.I have referred this Tutorial:1. Introduction — DA145XX Tutorial SDK peripherals (renesas.com) and I was able to successful to read ADC value in a time interval using app_easy_timer.But I got stuck when it came to the advertise live data by changing the value of control point characteristic. When I refer to other tickets all the answers end in change the value of control point characteristics. But I got confused how/where to change the value of control point in user_custs1_impl.c

Thanks

Femilda Philiph

Parents
  • Hi Femilda,

    Thank you for posting your question online.
    Please refer on the attached ble_app_peripheral_adc_characteristic.zip file. 
    It contains a project based on the ble_app_peripheral example, when you write the value of 0x01 into the Control Point Characteristic it will start updating the ADC Value 1 Characteristic with ADC values from P0_6.
    Please refer here for more details: (+) BLE+ADC - Bluetooth Low Energy - Wireless Connectivity - Renesas Community
    Please also check the ble_app_peripheral example, on the user_custs1_impl.c file and on the user_catch_rest_hndl function (on the user_peripheral.c file) we show how to handle different custom characteristics with different properties. 
    ble_app_peripheral_adc_characteristic.zip

    Kind Regards,
    OV_Renesas

  • Hi ,

    I have given value to control point by:

    // Parameters of the @ref CUSTS1_VAL_WRITE_IND message
    struct custs1_val_write_ind
    {
    /// Connection index
    uint8_t conidx;
    /// Handle of the attribute that has to be written
    uint16_t handle;
    /// Data length to be written
    uint16_t length;
    /// Data to be written in attribute database
    uint8_t value[0x01];
    };

    Now after establishing connection, the change i noticed is the name of ble changed to DLG ADC_UPDATE from DLG_PRPH.But  Im unable to read the adc values from gpadc or sent adc value to mobile application. 

  • Hi Femilda,

    Thank you for the reply.
    Did you run the example I shared on my previous answer? You were not able to see the ADC values being updated on the ADC Value 1 Characteristic? 
    Are you working with a Generic GATT Application as your central or do you have another device acting as your BLE Central?

    Kind Regards,
    OV_Renesas

  • Hi,

    Thank you for the reply.

    I had run the code that you have shared in the previous question, but I wasn't able to read the ADC value or sent the value, only a characteristic as (ADC read and ADC read and write) only available and we are using Renesas Smart bond application on our mobile as central.

  • Hi Femilda,

    Thank you for the reply.
    On your SmartBond App please press the button to read the Characteristic User Description for the custom characteristics.
    The first Characteristic of the 1st Custom Service is the Control Point Characteristic. And the 3rd Characteristic of the 1st Custom Service is the ADC Value 1 Characteristic.
    If you write any value other than 0x00 on the Control Point Characteristic (and you have enabled the Notifications for the 3rd Characterisitc) then you should be able to see the ADC values being sent on the ADC Value 1 Characteristic automatically.


    Kind Regards,
    OV_Renesas

  • Hi,

    Thanks for your guidance.

    I was able to update the ADC value, but the values were read only on light blueR  not able to change the value of control point characteristics using smartbond app

  • Hi Femilda,

    Thank you for the reply.
    Glad you were able to use the GPADC and update the ADC value on a specific characteristic. 
    It is weird that you are not able to use the project with the SmartBond App because it works as expected on my side. 
    If you found any answer helpful, you can verify it so you can help others in the community as well.
    If you face any other issue, feel free to raise a new ticket.

    Kind Regards,
    OV_Renesas

Reply
  • Hi Femilda,

    Thank you for the reply.
    Glad you were able to use the GPADC and update the ADC value on a specific characteristic. 
    It is weird that you are not able to use the project with the SmartBond App because it works as expected on my side. 
    If you found any answer helpful, you can verify it so you can help others in the community as well.
    If you face any other issue, feel free to raise a new ticket.

    Kind Regards,
    OV_Renesas

Children
No Data