A brief update:
I tried to use modem.readBytes() also, could not get it to work reliable. Stumbled upon a modem.format() which seems to switch something to hexMode, but that didn't affect the result at all.
I had to base64 encode the downlink message at the backend to get things working which is not optimal but works.
Is there a way to get the receiving side to work with binary data, especially data with zero bytes embedded?
It would be nice to have some kind of document on the MKRWAN library functions. Any available?
Yeah, there is a problem with the underlying modem firmware. It transmits data using a printf format (%s) function which stops sending data when it encounters the null character. I had a look at v1.2.2 of the ST modem firmware stack and the problem still exists there.
You can use the format() method and set the data format to ASCII HEX. If you have control over how the data is sent, this may be helpful.
Otherwise, using base64 encoding would work as well which I think is more efficient than ASCII HEX.