Hello..i would suggest to Use only the examples from the WiFiNina examples as they are tailored to work with the MKR1010.
Communication to the NINA...