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.

  • The connect param as a slave is`#define SLAVER_MIN_CONN_INTERVAL MSEC_TO_UNITS(125, UNIT_1_25_MS) /< Minimum acceptable connection interval (150ms). */ #define SLAVER_MAX_CONN_INTERVAL MSEC_TO_UNITS(188, UNIT_1_25_MS) /< Maximum acceptable connection interval (235ms). / #define SLAVER_SLAVE_LATENCY 0 /< Slave latency. */ #define SLAVER_CONN_SUP_TIMEOUT MSEC_TO_UNITS(600, UNIT_10_MS) /< Connection supervisory timeout (6 seconds)/

    The scan param is: #define MARSTER_SCAN_INTERVAL 560 /< Determines scan interval in units of 0.625 millisecond. //350ms */ #define MARSTER_SCAN_WINDOW 80 /< Determines scan window in units of 0.625 millisecond. //50ms */ when remove the central role ,the slaver role can work well. `

Reply
  • The connect param as a slave is`#define SLAVER_MIN_CONN_INTERVAL MSEC_TO_UNITS(125, UNIT_1_25_MS) /< Minimum acceptable connection interval (150ms). */ #define SLAVER_MAX_CONN_INTERVAL MSEC_TO_UNITS(188, UNIT_1_25_MS) /< Maximum acceptable connection interval (235ms). / #define SLAVER_SLAVE_LATENCY 0 /< Slave latency. */ #define SLAVER_CONN_SUP_TIMEOUT MSEC_TO_UNITS(600, UNIT_10_MS) /< Connection supervisory timeout (6 seconds)/

    The scan param is: #define MARSTER_SCAN_INTERVAL 560 /< Determines scan interval in units of 0.625 millisecond. //350ms */ #define MARSTER_SCAN_WINDOW 80 /< Determines scan window in units of 0.625 millisecond. //50ms */ when remove the central role ,the slaver role can work well. `

Children
No Data
Related