This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Role of nRF51822 in connectable and undirected advertising mode

Hi Friends,

I am using nRF51822(S110 and SDK10.0.0) in my project and I need the chip to be in connectable and advertising mode under peripheral config . I configured the device to my requirement. I needed to write a data to chip using mobile app. But found the service available is only to read. Can I write a data from mobile app and if Yes any example programs.

Thanks.

  • How did you configure it? Did you make the characteristic value writable? What app are you using? You can have a look at ble_app_uart example. Examine tx_char_add(). There you can see that the characteristic properties allow write request (char_md.char_props.write = 1;) and write command (char_md.char_props.write_wo_resp = 1;). You also need to allow write access to the attribute, this you do with BLE_GAP_CONN_SEC_MODE_SET_OPEN(&attr_md.write_perm);

  • I have configured the m_adv_params.type to BLE_GAP_ADV_TYPE_ADV_IND, The characteristic value is configured as writable and I am using nRF connect app to update the value .

    The write request is updated as you said. In the nRF connect app after making connection to a beacon the client tab shows read and write option but I cannot view the modified value.

    The exact thing to be done is "in connect mode I have to update a value to data field through nRFconnect app and I have to receive the same data in receiver. Any solution?

  • What do you mean by "I cannot view the modified value"? Where can't you view it? Are you able to write or not?

  • Under Client tab of nRF connect there is an option generic access and it has write and read access. In write option I have given some data and in log window it shows the data is sent . But I can't receive it when I try to receive it with another mobile loaded with app

  • So you connect with one smart phone, write to the device name characteristic, disconnect, connect with another smart phone, and try to read the device name characteristic? It should stay the same, but if you reset the device name will be reset. How are you disconnecting?

Related