DTLS handshake failure BG77

Hello, I am trying to get CoAP working via DTLS using example 5.2 in datasheet Quectel_BG95BG77BG600L_Series_CoAP_Application_Note_V1.0. When I try to handshake I get the error “DTLS handshaking failure” - according to the datasheet.

Module’s firmware: BG77LAR02A04_01.201.01.201

Here is the log:

[2024-01-22_11:57:50:584]at+cereg?

[2024-01-22_11:57:50:584]+CEREG: 0,5

[2024-01-22_11:57:50:584]OK
[2024-01-22_11:58:03:329]AT+QCOAPCFG="pdpcid",0,1 

[2024-01-22_11:58:03:329]OK
[2024-01-22_11:58:14:694]AT+QCOAPCFG="trans",0,4,5

[2024-01-22_11:58:14:694]OK
[2024-01-22_11:58:28:057]AT+QCOAPCFG="dtls",0,1,0

[2024-01-22_11:58:28:057]OK
[2024-01-22_11:58:33:291]AT+QSSLCFG="dtls",0,1

[2024-01-22_11:58:33:291]OK
[2024-01-22_11:58:38:064]AT+QSSLCFG="dtlsversion",0,1

[2024-01-22_11:58:38:064]OK
[2024-01-22_11:58:45:729]AT+QFUPL="UFS:0_server.psk",34

[2024-01-22_11:58:45:729]CONNECT
[2024-01-22_11:58:47:568]+QFUPL: 34,322e

[2024-01-22_11:58:47:568]OK
[2024-01-22_11:59:01:130]AT+QCOAPOPEN=0,"leshan.eclipseprojects.io",5684

[2024-01-22_11:59:01:130]OK
[2024-01-22_11:59:02:479]
[2024-01-22_11:59:02:479]+QCOAPOPEN: 0,-9

If I don’t use DTLS, but only CoAP, there is no problem and I always connect successfully.

Does anyone know what could be causing this please?

Thank you in advance for the answer.