Unfortunately, you shouldn’t be using 2019r2. You really need to upgrade to 2019r3 if you want to use API 2.0.
Aside from r2 already being discontinued (for lack of a better word), r3 includes several fixes for these “type mismatch” errors and warnings that appeared in the transition to API 2.0, including a change back to the original Event names.
ignore 19r2 and above for serial, 19r1 and below are perfect using API 1.
for some unknown reason serial was changed in API2, no reason has been given, it is perfect in all previous versions using API 1.
download 19r1.1, use the examples included in that download, it will work properly.
if you have it working now in the version you are running I am sure there is nothing that will be improved by changing to the methodology of the newer version, it can not make it ‘better’, it will change the keywords and error handling.
is it an ‘upgrade’ mmmmmm
no reason for me to change long standing code for no reason, depreciated is not removed, I suspect the 17r2.1 code you have will still work fine in 27r2.1.