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

S130 can't be a central and Peripheral at the same time

As a peripheral,S130 can work ok,but when I add a central role, there is a error at central start to connect a peripheral.err_code = sd_ble_gap_connect(&addr,&m_scan_param,&m_connection_param); APP_ERROR_CHECK(err_code);here,err_code=0x00000005,the return value is out of the legal returns.I don't know what happen. whether is the m_scan_param or the m_connection_param value wrong?

Parents
  • The headline is incorrect. The S130 indeed can handle both GAP Central and Peripheral roles at the same time and several nRF5 SDK examples show it. It's your FW which is buggy.

    From very little you shared it's impossible to help you. Please identify which exact HW do you use, which SD version, which nRF5/nRF51 SDK version, what example project you started from and also go back in your project history to be as close as possible to the example (ideally to the moment when all major features worked as expected). Then we can do something together. Otherwise your question is as effective as screaming from the window.

  • I used NRF51822FFAC,SD is S130 V1.0,SDK is 9.0,example is ble_app_hrs_rscs_relay.I used the S130 as a central and peripheral before,but the connection between central and other peripheral offen breaks,and the connection never release as a slaver role.The gap connect param as a central is #define MARSTER_MIN_CONNECTION_INTERVAL MSEC_TO_UNITS(200, UNIT_1_25_MS) /**< Determines minimum connection interval in millisecond 1.25 ms units. 200=250ms*/ #define MARSTER_MAX_CONNECTION_INTERVAL MSEC_TO_UNITS(360, UNIT_1_25_MS) /**< Determines maximum connection interval in millisecond 1.25 ms units. 360=450ms*/ #define MARSTER_SLAVE_LATENCY 0 /**< Determines slave latency in counts of connection events. */ #define MARSTER_SUPERVISION_TIMEOUT MSEC_TO_UNITS(400, UNIT_10_MS) /**< Determines supervision time-out in units of 10 millisecond.4000ms */

Reply
  • I used NRF51822FFAC,SD is S130 V1.0,SDK is 9.0,example is ble_app_hrs_rscs_relay.I used the S130 as a central and peripheral before,but the connection between central and other peripheral offen breaks,and the connection never release as a slaver role.The gap connect param as a central is #define MARSTER_MIN_CONNECTION_INTERVAL MSEC_TO_UNITS(200, UNIT_1_25_MS) /**< Determines minimum connection interval in millisecond 1.25 ms units. 200=250ms*/ #define MARSTER_MAX_CONNECTION_INTERVAL MSEC_TO_UNITS(360, UNIT_1_25_MS) /**< Determines maximum connection interval in millisecond 1.25 ms units. 360=450ms*/ #define MARSTER_SLAVE_LATENCY 0 /**< Determines slave latency in counts of connection events. */ #define MARSTER_SUPERVISION_TIMEOUT MSEC_TO_UNITS(400, UNIT_10_MS) /**< Determines supervision time-out in units of 10 millisecond.4000ms */

Children
No Data
Related