|Top Previous Next|
The actual buffer allocation happens when the sys.buffalloc method is called.
The BLE interface is unable to receive data if its RX buffer has zero capacity. Current buffer capacity can be checked through bt.rxbuffsize, which returns the buffer capacity in bytes.
Relationship between the two is as follows: bt.rxbuffsize = num_pages * 256 - 33 (or =0 when num_pages=0), where "num_pages" is the number of buffer pages that was GRANTED through bt.rxbuffrq. "-33" is because a number of bytes is needed for internal buffer variables.
Buffer allocation will not work if the BLE interface is enabled (bt.enabled= 1- YES at the time when sys.buffalloc executes).