This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Master Emulator stops working?

Hi!

I'm testing a custom service developed on the nRF51822 development board by using the Master Emulator API in a C# project.

The project is based on the example project nRFUART and uses the same mechanism when arrays of bytes that are longer than 20 shall be sent. That is, splitting it into arrays of 20 bytes each and then calling MasterEmulator::SendData(pipeNr, data) once for every packet in a for-loop.

But when doing this repeatedly with arrays that are about 100 bytes long, sometimes the program gets stuck in the sending loop. The for-loop containing SendData(...) seems to never return!

When looking into the log-file created by MasterEmulator I find these lines starting to appear at exactly that moment:

1210471;13:43:35.4741 [MainThread] Waiting for HCI_Num_Completed_Packets_Event, 164 second(s) elapsed

1210472;13:43:36.4872 [MainThread] Waiting for HCI_Num_Completed_Packets_Event, 165 second(s) elapsed

1210473;13:43:37.5013 [MainThread] Waiting for HCI_Num_Completed_Packets_Event, 166 second(s) elapsed

1210474;13:43:38.5154 [MainThread] Waiting for HCI_Num_Completed_Packets_Event, 167 second(s) elapsed

1210475;13:43:39.5296 [MainThread] Waiting for HCI_Num_Completed_Packets_Event, 168 second(s) elapsed

Which is continued until I exit the program.

So my question is if anyone can explain what this means, why it happens and if there is a way to avoid it?

Related