This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How do I do Sample Data write from Central to Peripheral device via WRITE_REQ

Hi,

I'm using Central multilink peripheral example to get connected with Our Custom Peripheral App (iOS). I'm able to receive the data from Peripheral device, Now i need to SEND the data to peripheral App.

Can someone suggest me an example from where i can do a sample data write to peripheral device via WRITE_REQ, the characteristic type is NOTIFY, WRITE. Let me know also if type needs to be modified as well??

Thanks Brajesh

Parents
  • You should have a look at nRF UART for iOS, source code available here.

    For the peripheral part you should have a a look at tx_char_add() in ble_app_uart.

    You should set

    char_md.char_props.write         = 1;
    

    and

    BLE_GAP_CONN_SEC_MODE_SET_OPEN(&attr_md.write_perm);
    

    Edit 17.08.2015: Sorry, I was a bit quick on the trigger there.

    I recommend having a look at ble_app_uart_c. Available on Github here. More specifically ble_uart_c_write_string()

Reply
  • You should have a look at nRF UART for iOS, source code available here.

    For the peripheral part you should have a a look at tx_char_add() in ble_app_uart.

    You should set

    char_md.char_props.write         = 1;
    

    and

    BLE_GAP_CONN_SEC_MODE_SET_OPEN(&attr_md.write_perm);
    

    Edit 17.08.2015: Sorry, I was a bit quick on the trigger there.

    I recommend having a look at ble_app_uart_c. Available on Github here. More specifically ble_uart_c_write_string()

Children
Related