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

peer manager database : N_WRITE_BUFFERS = number of connected peers?

I didn't find any documentation in the peer manager for the need of this write buffers. I do understand, that peer device data is stored there before written to flash. But how big has this buffer to be? I'm looking for RAM space to free and the pm's buffer_memory along with m_write_buffer_records take up HUGE chunks of it, and both are defined by N_WRITE_BUFFERS = 8 in the sdk So the question is, what is this buffer for?

  • Store all devices found while scanning? (seems like a waste of RAM). Reducing the buffer then would mean not to be able to find more then N devices at a time when scanning.
  • Store all devices that are actually connected/bonded. Then N could be reduced to fit the application.
  • Store device information UNTIL it is written into flash. This would mean even more waste of RAM, are there any applications where one would connect/bond to 8 peers at a time?

I guess the second one is true, so is it safe to assume reducing N_WRITE_BUFFERS to the number of (potential) peers (peripheral & central) of the actual application?

Parents Reply Children
No Data
Related