I am using two HM10 modules, one wired together with an STM32 Blue Pill and the other wired with a STM NUCLEO-F401RE. I want to see what is the maximum throughput of 10 byte payload messages I can send across BLE from one HM10 to the other.
Currently, the method I use to test throughput is by sending an incrementing payload value which is essentially a 64 bit number expressed as a 8 byte payload, with the additional 2 bytes at the front left as 0’s. On the Master side, for every message received, I check whether the payload value has increase by one and, if not, then I have missed a message and increment a ‘missedMessageCounter’. I do this for a set number of messages (e.g. 1000).
The results are that for low throughput (<100 messages/second) I get a pretty good message success rate (99.7% delivered) but for anything above this the message success rate decreases exponentially. I understand that the HM10 can only send 1 packet in 1 interval which is default to 20ms in length, but I have set it to 7.5ms to increase throughput. Despite this, I should still see better message success rate at a higher throughput, but yet I am not and also I do not understand why the messages are lost at all because BLE is a lossless protocol so it should have received all messages unless it disconnects which I know is not occurring during my testing.
My main problem is that I am not receiving all the messages I send and that I have no way of knowing this without using a incrementing message. Is there a interrupt or function on the HM10 that can notify me when a message was not delivered or is my approach not correct?
I have attempted to increase signal power on the HM10 by setting it to 6db, this did improve message delivery rate success a lot but still I find message missing.
Jacob is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.