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

S130 general purpose application

Hi,

I am trying make general-purpose s130 app that will be able to connect to central and peripheral at the same time and to exchange informations between them. At the beggining my app should connect to peripheral and discover all its services. After that it should create its own services (at peripheral side) based on earlier discovered ones. Then communication peripheral-my device- central would be possible.

As far I managed to connect and discover services from peripheral and connect to central. I also succed in creating new services and making them available for central. Problem is communication between them.

My question is is it even possible to make the app like this on nRF51? Or maybe someone has created similar app and would be able to help me or give me some advice?

I know that tere is "ble_hrs_csrs example" but in that example we know about all services - so it is different than my app.

Parents
  • So, I managed to read values from peripheral through central/peripheral device, but there is a problem with writing values on peripherals. It seems ok, all error codes are "success" but when I am trying to read that value after writing it I always get original value - nothing changes on peripheral.

    On my c/p device, after I get "BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST" ,which is write request, I use "sd_ble_gattc_write()" to write proper value on peripheral. Then, after getting response from it - "BLE_GATTC_EVT_WRITE_RSP" I use sd_ble_gatts_rw_authorize_reply() to send reply to my central device (master control panel). Should I store some values somewhere? I do not do that. Can it be a problem?

Reply
  • So, I managed to read values from peripheral through central/peripheral device, but there is a problem with writing values on peripherals. It seems ok, all error codes are "success" but when I am trying to read that value after writing it I always get original value - nothing changes on peripheral.

    On my c/p device, after I get "BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST" ,which is write request, I use "sd_ble_gattc_write()" to write proper value on peripheral. Then, after getting response from it - "BLE_GATTC_EVT_WRITE_RSP" I use sd_ble_gatts_rw_authorize_reply() to send reply to my central device (master control panel). Should I store some values somewhere? I do not do that. Can it be a problem?

Children
No Data