ESP32+Gateway LG01 + TTN

I’ve already connected the GTW in the TTN, but I can’t connect the esp32 to the Dragino LG01 gateway.
I tried to used the sketch example of wiki.dragino ( changed the pins, because this one is for the uno, and Im using the esp32), doesnt worked.

One of my doubts, is how can I configure which gateway I’ll use, if a have 3 and the same area? In the most of scketch I just saw the credential for the TTN server and nothing to the gtw.

You can’t and you don’t. With LoRaWAN the node does not connect to a gateway like with WiFi. A node connects to the network (TTN). So only TTN credentials are required.