Issue connecting a NodeMCU (Esp32S) with M6E Nano

I am using paulvha’s library with the #undef statement included to connect from the esp32 to the m6e nano. However, I see that in the constant read example code we are simply stepping into an infinite “while” loop if we are unable to initially connect to the M6E Nano. My question is: how can we make it so that the esp32 continuously attempts to reconnect to the M6E Nano rather than hanging when it is unable to do so the first time?

When I try to do this myself and print the nano.msg I get the code:

01 00 03 1D 0C C2 00 A4 60 30 00 00 02 20 19 06 10 01 19 01 11 00 00 00 10 BC 91

Also, does the scanning of tags function asynchronously? I am trying to scan a tag and send its information to a web server and I am wondering if there could be periods during the sending process that the scanner is “inactive” or scanning, but the esp32 is not able to read it because it is currently handling an HTTP POST request.

Thanks

Alex