The parameters of a BGAPI command, response or event are passed between the application and firmware in a payload. For example, a parameter of uint32 type uses 4 bytes of the payload space. A byte array parameter uses one byte to describe the length of the array and the actual data in array is copied into the remaining free payload space.
Maximum BGAPI Payload Size
The maximum BGAPI payload size is 256 bytes for both NCP and SoC modes. When an application calls a BGAPI command, BGAPI checks the payload length and will return error code 0x018a (command_too_long) if the payload will cause an overflow.
Note that some commands, enumerations and events are marked as deprecated. The usage of those commands is not recommended anymore as they will be removed in the future releases.
Sensitive Data Handling
Some commands in the Mesh classes read or write security-critical material. In Secure NCP applications the BGAPI
communication between the host and the target must be encrypted, or the commands will return the error code
0x0a0e mismatched_or_insufficient_security. This feature does not affect SoC or non-secure NCP applications.