Arduino is not easy to debug, whenever the USB serial communication is not working like expected.
The serial monitor is not much of help, since the serial port is already used for the communication itself.
I have imagined to store the communication in an array in a first run, than stop the host, start the serial monitor to read the results.
The problem is to avoid the reset of the array between the two phases.
Since I am not very experienced with the Arduino and I expect it to be somewhat tricky, I would have highly appreciate if someone could give me some clues how to do that magic.