R410M and Vodafone sim: Failed to connect to modem

I have an SODAQ Sara R410M with Vodafone sim. When I use the sketch NBIOT-Test-UDP I get the error “Failed to connect to the modem” and “Failed to create socket”.

I connect from Spain.

I try this AT commands:
AT+URAT=8
OK

AT+URAT?
+URAT: 8
OK

AT+CGDCONT=1,“IP”,“nb.inetd.gdsp”
OK

AT+CFUN=1
OK

AT+CGDCONT?
+CGDCONT: 1,“IP”,“nb.inetd.gdsp”,“10.21.38.68”,0,0,0,0
OK

AT+COPS=1,2,“21401”
OK

AT+USOCR=17
+USOCR: 0
OK

AT+USOST=0,“37.97.216.22”,3000,4,"Data”

+CME ERROR: Operation not allowed

Dear @David,

By default the module is in String mode. I believe your previous sketch did put it into hex mode.
The example sketch doesn’t check if you use the correct command mode.
You can check with the following command: Read AT+UDCONF=1 the reply 1,1 = hex mode and 1,0 = string mode.

You can set the mode with: AT+UDCONF=1,0

Best regards,
Jan