mkr 1300, the things network and mydevices cayenne

pablodg92:
With another code I can connect to TTN without problem

Please post the working code.

Post a link to where you got the libraries from. Please use the chain links icon on the toolbar to make it clickable. Or if you installed it using Library Manger (Sketch > Include Library > Manage Libraries) then say so and state the full name of the library.

pablodg92:
I´m using the code and the libraries given by cayenne and TTN

Are you saying this is the unmodified example code that comes with one of the libraries?