In NXP’s KW40Z_Connectivity_Software_1.0.1 package, there is a wireless_uart_demo project under BLE example directory. Our goal is to modify this project such that it can transmit 1000 BLE packets with 250 bytes data.
I use the wireless_uart_demo project and create two copies; one for receiver and one for sender. The sender project will transmit 1000 packets and the receiver will display the packets it receives in the Shell. Next, in sender project, I modify UartStreamFlushTimerCallback function in app.c (see attachment: app_Sender.c) and in receiver project, I modify BleApp_GattServerCallback function in app.c (see attachment: app_RX.c). For both sender and receiver projects, I add GattClient_ExchangeMtu command in BleApp_StateMachineHandler function so that it can expand ATT_MTU to 250.
When I select temp and bytesRead=20 in UartStreamFlushTimerCallback function in sender project, receiver project is able to display all 1000 packets in the Shell. However, if I select temp and bytesRead=30, receiver project doesn’t display any packet. However, when I use a sniffer, the sniffer is able to capture the 30 bytes data packet (see attachment: sniffer_capture.png) and the ATT_Exchange_MTU request and response.
Did I miss any step to enable large payload?