This Article Provides a step by step example of how to get 251 byte packet size for the Apollo2 and Apollo2Blue BLE solutions.
There is a README file in the AmbiqMicro/AmbiqSuite/tools/emp2include directory. The contents, shown below, provide an explanation of what is needed. The remainder of this document simply serves as an example to follow.
First.. navigate to the EM microelectronics website and download the Configuration Editor. It’s located on the forum, under Resources. You’ll need to create an account and log in.
Once download is complete, open the EM9304 Configuration Editor and select the second button from the top “Open rom_revB.elf”
Then go to the “Platform” tab and change the “Max Packet Payload” to 251
Then got to “File”, “Save Diff Patch” give the .emp file a name and save it in the tools/emp2include folder.
Now open a Unix command prompt using Cygwin, or navigate to the directory below and open msys.bat
In the Unix command window, navigate to …AmbiqMicro/AmbiqSuite/tools/emp2include and then run the python script by typing: python emp2include.py –o OTP
Per the README, You now have new em9304_patches.h and em9304_patches.c files in the /third_party/exactle/sw/hci/ambiq/em9304 directory.
Then in the code.. Change the ATT_DEFAULT_MTU size (in att_defs.h) to something larger than the default.. something like 247 (for the full 251 bytes, set this value to 247 since there is 4 bytes l2cap header)
Now you should be working with the larger packet size.