From my now much more complete experience, if you have issues with OTAA, of course first double check you have registered the keys correct, and of course created an app and registered the device on TTN. If that is all done, and you still cannot connect, most likely you are too far away from a GW. To test if that is your issue, try using ABP (even if that is not what you are going to use later). First check TTN recieved the packet at all, if not, try increase to SF11 or SF12.
ttn.sendBytes(payload, sizeof(payload),1,0,11);
If you get the packet through, check how it was received. If the rssi is down around -120, you have a very weak signal. Then you need to move the device, get a better antenna, use higher SF, or the best solution, and what grows TTN, get your own GW, and deploy that to provide better coverage in your area.
regards
/PA