I am developing a multi-link application where several Peripherals take turns transmitting real-time samples to a Central, generally about a 156 byte payload per transmission. A typical case would be 8 Server peripherals sending to 1 Client Central with the event length of each transmission just a bit longer than the packet duration and a relatively short Connection Interval. The Central would manage the timing and request the transfer from each Peripheral in turn, first from 1, then 2, ..., then 8, then back to 1, 2, ....8, 1, 2 .... and so on.
To make the development as easy as possible I bought a whole bunch of nRF52840 Preview kits and I plan to modify application examples for the nRF52840 in SDK 15.0.0 - basically merge the multi-link Central example with the experimental MTU Central&Peripheral example. My theory is that adaption to a multi-link application is a small extension of the Central functionality, so start with the more complex MTU example as a baseline and modify it to multi-link capability, rather than the other way around. I noticed however, that unfortunately the MTU example has the client/server roles around the other way to my application - it has the Central as the Server sending data to the Peripheral as Client. It is not clear to me how, or how easily, these roles can be reversed.
How hard is this MTU example to adapt? Are the client and server source code files (amtc.c, amts.c, amt.h) agnostic about whether the client is a Central or Peripheral? and about whether the Server is a Central or Peripheral? are those roles assigned outside of these components in main.c only?
I am not sure what has to be done to reverse the roles - I can't see where the Central is assigned the role of Server and where the Peripheral is assigned the role of Client. Is is only in one place and it can easily be reversed? or is a lot of the code dependent upon the current arrangement and roles cannot be easily swapped without a major rewrite?
Many thanks in advance for your help.
cheers
Jeff