|Top Previous Next|
The actual buffer allocation happens when the sys.buffalloc method is called.
The BLE interface is unable to transmit data if its TX buffer has zero capacity. Current buffer capacity can be checked through bt.txbuffsize, which returns the buffer capacity in bytes.
Relationship between the two is as follows: bt.txbuffsize = num_pages * 256 - 33 (or =0 when num_pages=0), where "num_pages" is the number of buffer pages that was GRANTED through bt.txbuffrq. "-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).